Solved

Help with wmi via Nagios

Posted on 2013-06-24
2
569 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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Email signature management is something that is often overlooked in many organizations or is simply not implemented effectively. Let's take a look at what methods are available for managing this important piece of corporate branding.
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…

762 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

11 Experts available now in Live!

Get 1:1 Help Now