Win32 - Monitor running processes

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
ccnt2003
Posts: 7
Joined: Tue Aug 02, 2005 2:30 am

HELP

Post by ccnt2003 »

What do these red number represent.please have a explain.
I want to ask whether i have some problem with my configure of cacti or not ?
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[33] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.796, output: 62
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[33] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.796, output: 4204
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[31] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.416, output: 4148
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[31] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.416, output: 26
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[32] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.472, output: 15320
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[32] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.472, output: 97065


my graphy disply:[/code][/list]
Attachments
Snap2.gif
Snap2.gif (42.75 KiB) Viewed 8601 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

The SNMP OID this script monitors for CPU usage is defined as: The number of centi-seconds of the total system's CPU resources consumed by this process. Note that on a multi-processor system, this value may increment by more than one centi-second in one centi-second of real (wall clock) time.

The SNMP OID this script monitors for memory usage is defined as: The total amount of real system memory allocated to this process.

I've never closely looked into what gets polled/graphed, so I created two new graphs on one of my servers to see how much the numbers changed.

MNM5.exe

Code: Select all

08/02/2005 01:10:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.1640, output: 2127
08/02/2005 01:15:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.1640, output: 2127
08/02/2005 01:20:24 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.1640, output: 2127
08/02/2005 01:25:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.1640, output: 2128
08/02/2005 01:30:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.1640, output: 2128

08/02/2005 01:10:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.1640, output: 4184
08/02/2005 01:15:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.1640, output: 4184
08/02/2005 01:20:24 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.1640, output: 4184
08/02/2005 01:25:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.1640, output: 4184
08/02/2005 01:30:23 PM - CMDPHP: Poller[0] Host[1] DS[235] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.1640, output: 4184
explorer.exe

Code: Select all

08/02/2005 01:10:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.2328, output: 39613
08/02/2005 01:15:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.2328, output: 39730
08/02/2005 01:20:24 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.2328, output: 39844
08/02/2005 01:25:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.2328, output: 39954
08/02/2005 01:30:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.2328, output: 40128


08/02/2005 01:10:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.2328, output: 8352
08/02/2005 01:15:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.2328, output: 8348
08/02/2005 01:20:24 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.2328, output: 8340
08/02/2005 01:25:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.2328, output: 8340
08/02/2005 01:30:23 PM - CMDPHP: Poller[0] Host[1] DS[236] SNMP: v1: ares, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.2328, output: 8364
After looking at the numbers between each polling cycle, now one can understand why the cpu usage is often labeled with m.
Attachments
ares_explorer.png
ares_explorer.png (3.85 KiB) Viewed 8586 times
ares_mbm5.png
ares_mbm5.png (3.7 KiB) Viewed 8586 times
ccnt2003
Posts: 7
Joined: Tue Aug 02, 2005 2:30 am

why appear the statement ???????

Post by ccnt2003 »

Thank for your reply.
I want to ask why it appear the statement. but my cpu actual usage is "100%".but the graphy appear "135.62".
why appear the statement ???????
I can not understand the SNMP OID this script monitors for CPU usage is "U"
my poller log:
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[33] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.796, output: U
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[33] WARNING: Result from SNMP not valid. Partial Result:
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[33] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.796, output: U
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[33] WARNING: Result from SNMP not valid. Partial Result:
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[31] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.416, output: 4148
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[31] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.416, output: 29
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[32] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.472, output: 14840
08/03/2005 09:10:02 AM - CMDPHP: Poller[0] Host[14] DS[32] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.472, output: 202207
Attachments
Snap1.gif
Snap1.gif (15 KiB) Viewed 8580 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

U means no valid data. The process PID 796 no longer exists. The script will only reindex, when the number of processes changes (this will change once cacti 0.8.7 comes out).

The svchost.exe process really isn't a good one to monitor, since there are several which run on a Win32 system. I believe, cacti will grab the data from the first one finds (via PID).
ccnt2003
Posts: 7
Joined: Tue Aug 02, 2005 2:30 am

why it appear the state

Post by ccnt2003 »

Thank for your reply.
I want to ask why it appear the state. but my cpu actual usage is "100%".the graphy appear "135.62".
why appear the state ???????
I can not understand "135.62",please have a explain.

thanks

my cacti log :
oid: .1.3.6.1.2.1.25.5.1.1.1.796, output: 62
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[33] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.796, output: 4204
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[31] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.416, output: 4148
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[31] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.416, output: 26
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[32] SNMP: v2: 192.168.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.472, output: 15320
08/02/2005 05:30:02 PM - CMDPHP: Poller[0] Host[14] DS[32] SNMP: v2: 192.168.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.472, output: 97065
Attachments
Snap1.gif
Snap1.gif (13.37 KiB) Viewed 8573 times
sapg
Posts: 22
Joined: Thu Aug 19, 2004 11:41 am
Location: UK
Contact:

Post by sapg »

I would like to get graphs like these for processes running on Linux boxes, does anyone do that? Could anyone share what they have with me?

Thanks,
Sapan
sapg
Posts: 22
Joined: Thu Aug 19, 2004 11:41 am
Location: UK
Contact:

Post by sapg »

OK, I've found this but I have no idea how I turn this into a graph in Cacti -

snmpwalk -OQ -Ov -v1 -c public localhost .1.3.6.1.2.1.25.4.2.1.2
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

sapg: This thread is for Win32 systems. I suggest you start your own thread.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

BSOD2600,

I have a Data Query that get's uses the service name as the index. Unfortunately, if you have one that appears more than once, the first one always wins which is not necessarily a down side. It exists in 0.8.6f today. It's a little feature I snuck in. :)

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
carrison
Posts: 30
Joined: Fri Oct 14, 2005 2:26 am

Post by carrison »

Great job! Thank you very very much :lol:
carrison
Posts: 30
Joined: Fri Oct 14, 2005 2:26 am

Post by carrison »

BSOD2600 and TheWitness,

Maybe you can offer a tutorial of compling add-on and templetes for cacti to us in future, I envy you very much :wink:
mrloon
Posts: 14
Joined: Wed May 31, 2006 10:11 pm

Multiple processes with the same name

Post by mrloon »

Is there a way with the W32 Monitor Running Processes, to watch say two or more processes of the same name (for example, dllhost.exe which will normally have multiple processes of that running). I can monitor each process by pid, but when reset, the graph is gone. By name, I can only get one of the multiple processes of the same name to graph. Is this being worked on in the script, is there a workaround, or am I just unable to do this?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

After you restart the server/process, you'll have to manually update the PID in the data source that you want to monitor. It's for that reason why the script goes off the processes name instead.
mrloon
Posts: 14
Joined: Wed May 31, 2006 10:11 pm

Post by mrloon »

I do have it based on process name, but the issue that I have is I monitor items that are com objects of websites, and under IIS6, those objects can be set to recyle if memory hits a certain limit. Being most items under IIS for Com objects appear as the same process name, its hard to monitor them. Was hoping that this script could monitor multiple processes that have that same name, that get cycled at times due to IIS6 memory managemnet for its application pools, though appears this cannot be done within Cacti scripts. :(
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

The way this script works, is that it will reindex the list of processes if the total count changes. So if a processA with PID 1432 stops and processB with PID 6522 starts, cacti will continue to look for PID 1432. An inefficient way to fix this is to change the reindex method to verify all fields; that way cacti will reindex it every polling cycle.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests