Solved

Help with wmi via Nagios

Posted on 2013-06-24
2
571 Views
Last Modified: 2013-06-25
I run the following wmi query aginst NS client

nscp wmi --select "select Frequency_PerfTime from Win32_PerfRawData_CustomTiersCalculator_CustomTiersCalculator"

and the output looks like

| Frequency_PerfTime |
|--------------------|
| 2660000000         |


Is there a way so I can make it so the only output is 2660000000?
0
Comment
Question by:Alice7
  • 2
2 Comments
 
LVL 34

Accepted Solution

by:
Duncan Roe earned 500 total points
ID: 39274290
Try this
nscp wmi --select "select Frequency_PerfTime from Win32_PerfRawData_CustomTiersCalculator_CustomTiersCalculator" | tail --lines=1 | awk '{print $2}'

Open in new window

0
 
LVL 34

Assisted Solution

by:Duncan Roe
Duncan Roe earned 500 total points
ID: 39274292
How it works: given the output
| Frequency_PerfTime |
|--------------------|
| 2660000000         |

Open in new window

discard all but the last line using tail --lines=1. Next use awk '{print $2}' to output only the 2nd non-space sequence in that line.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Safe to delete the DataStore.edb on a Win 7 computer? 4 86
Trying to make SNMP connection work 7 65
Determine Who is Runnig my Bash Shell Script 4 64
php ssh2_scp_send 1 49
Are you one of those front-line IT Service Desk staff fielding calls, replying to emails, all-the-while working to resolve end-user technological nightmares? I am! That's why I have put together this brief overview of tools and techniques I use in o…
Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now