Process.UserTime, Process.KernelTime
-
I was looking at trying to collect the CPU time for individual processes via the agent. The supported agent paramaters are Process.UserTime and Proccess.KernerlTime.
Perfmon lists three different Process counters:
Process.% Priveleged Time
Process.% Processor Time
Process.% User TimeIt appears that Process.% Processor Time = Process.% Privelaged Time + Process.% User Time.
Do you know if my understanding is correct and is there a reason the agent does not collect the Process.% Processor Time value? Also the doucmenation states that the Process.UserTime and Proccess.KernerlTime are both listed in miliseconds instead of a percentage.
Is there a way to graph the Process total CPU time as a percentage? Would you be able to add in support to have a 1/5/15 minute average for process CPU time as well?
Thank you,
Kevin -
Process.UserTime and Proccess.KernerlTime is a total amount of time spent by process in appropriate mode. It's a always-increasing counters. You can collect perfmon counters via either PDH.CounterValue parameter or by defining new parameters via Counter in *WinPerf section of agent's configuration file.
Best regards,
VictorP.S. Look at this message for some more information about creating agent parameters from PDH counters:
https://www.netxms.org/forum/index.php/topic,88.msg381.html#msg381 -
-
Cool this looked like it worked. Here is my nxagentd.conf:
MasterServers = srvnetxms01.nrscorporation.com LogFile = {syslog} FileStore = C:\NetXMS\var SubAgent = ping.nsm SubAgent = portcheck.nsm SubAgent = winperf.nsm *WinPerf Counter = SQLServerCPU:"\Process(sqlservr)\% Processor Time":60:A:INT:Average % CPU Time for sqlservr.exe over past minuteOne general question. What will happen on the agent when sqlservr process is not running. Say it is restarting or it crashed or something like that? How does the agent handle perfmon counters when they don't exist?
Thank You,
Kevin -
For process counters in question, if process does not exist, counter will return 0. But in general, if you try to add non-existing performance counter, it may fail on agent startup, or may return error to data collection requests - depending on what PDH returns to agent.
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login