System.CPU.Usage(*) argument syntax

Started by 3 van de 8, June 21, 2007, 12:08:53 PM

Previous topic - Next topic

3 van de 8

I am trying to get a reading of CPU utilization on my windows xp host, but i do not know the argument to use. I have a dual core Intel processor. The function System.CPU.Count reports 2 processors. I would like to know what argument i have to use to create a graph, or any value if i use this function.
The Disk.FreePerc(C:) argument works fine, wich means my agent configuration works fine.

Regards Jan

Alex Kirhenshtein

Hello.

"System.CPU.Usage" - usage for all processors
"System.CPU.Usage(X)" - usage for cpu number X; index is zero-based. So, "System.CPU.Usage(1)" should give you cpu utilization for second core of your processor.

NB! this DCI is for last minute, you can also use System.CPU.Usage5 and System.CPU.Usage15 for last 5 and 15 minutes data respectively.

wbr, alex.

3 van de 8

The thing is, if i use snmputilg (from microsoft to walk the OID tree) i get a response on instance 5 and 6 (.1.3.6.1.2.1.25.3.3.1.2.5) and (.1.3.6.1.2.1.25.3.3.1.2.6)
But if i try System.CPU.Usage(5) or System.CPU.Usage(6) The Get function returns "Cannot get parameter: Requested datacollection item is not supported by agent"
If i try 0 or 1 i get "Cannot get parameter: Communication failure". The other functions for 5 and 15 minutes give similar results

Alex Kirhenshtein

Does it work without parameters? (you can try it using "nxget" utility - "nxget NETXMS_AGENT_IP System.CPU.Usage")

Can you please start agent in debug mode ("nxagentd -D"), do a "System.CPU.Usage(0)" request and send me log file?

Also, can you check (in Settings -> Control Panel -> Administrative Tools -> Perfomance) that counters "\Processor(X)\% Processor Time" are valid?

Victor Kirhenshtein

Hello!

Ensure that winperf subagent is loading. You should have line in your config like this:

SubAgent = winperf.nsm

You can check list of currently loaded subagents by selecting node object in console, then Tools->Info->Agent->Subagent List.

Best regards,
Victor

3 van de 8

It took some time and figuring.
Where would i send te logs to?
I'll leave it om my site, http://www.vangolen.net/netXMS-logs.rar

It is five files:
nxagentd.conf (my config file)
nxagentd-1.log (first log)
nxagentd-2.log (second log)
nxagentd-3.log (third log)
nxget-on-linux-server.log (goes with the third log)

i had to find out if i had the syntax correct hence the disksize in the nxget log on the server.
Regards Jan

PS. I like the concept and the layout of NetXMS very much keep up the good work.

Alex Kirhenshtein

You are using localized version of windows and PDH counters are localized too - but we have english names hardcoded.
It will be fixed in 0.2.18.

---
[22-jun-2007 00:53:03] CheckCounter: PDH Error C0000BB8 in call to PdhAddCounter (Het opgegeven object is niet op het systeem gevonden.)
---