Win32 - Monitor running processes

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

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Win32 - Monitor running processes

#1 Post by BSOD2600 » Wed Mar 02, 2005 6:10 pm

I created a snmp script that will allow one to graph a processes CPU and memory usage on any WindowsNT based host (NT, 2K, XP, 2K3). The Microsoft SNMP agent must be installed; Net-SNMP will not work.

Instructions are in the readme

Updated 12/2/2005:
Added <index_type> to the script, which was added in a recent Cacti version. This makes it so you no longer need to change the PID to the process name.
Attachments
running_procs_graph.png
Example of running processes
running_procs_graph.png (10.91 KiB) Viewed 90870 times
dcplusplus.png
sample graph
dcplusplus.png (5.78 KiB) Viewed 90870 times
Win32_RunningProcs.zip
Readme, templates, and script.
(31.09 KiB) Downloaded 138780 times
Last edited by BSOD2600 on Sat Feb 25, 2006 1:15 pm, edited 5 times in total.

Spark
Posts: 15
Joined: Wed Jan 26, 2005 6:48 am

#2 Post by Spark » Thu Mar 03, 2005 7:07 am

Very nice :D

I will test and report if any question.

Thanks

vtmgr
Posts: 27
Joined: Wed Aug 11, 2004 2:23 pm
Location: Vermont, USA

Processes

#3 Post by vtmgr » Thu Mar 03, 2005 11:15 am

Very nice job. Our server guys will like this. Looking forward to the multiple process version!

Thanks!
Cacti 0.8.6f
CMD
MySQL 4.0.20
Net-SNMP 5.1.1
IIS 6
PHP 5.0.2
RRDtool 1.2.10
Windows 2003 Server

DevilSun
Cacti User
Posts: 166
Joined: Fri Jul 16, 2004 1:59 pm
Location: Oregon

#4 Post by DevilSun » Mon Mar 07, 2005 11:34 am

Very nice BSOD! Good job!

Hardinxcore
Posts: 7
Joined: Fri Mar 11, 2005 7:11 am

Pleaz help for installing under w2k3

#5 Post by Hardinxcore » Fri Mar 11, 2005 7:13 am

I don't know how to install this.

could you make a step by step plan? (e.a: which button i must click)

thnx in advance

zoidberg
Posts: 2
Joined: Fri Mar 11, 2005 9:36 am

#6 Post by zoidberg » Fri Mar 11, 2005 9:43 am

Hi,

when trying to import the templates, I am getting
Error: XML: Hash version does not exist.

running Cacti 0.8.6b

any ideas ?

thanks

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#7 Post by BSOD2600 » Fri Mar 11, 2005 10:27 am

Hardinxcore: Do you have Cacti set up to monitor hosts and graph different things already? Read through the readme.txt?

zoidberg: My only guess is your cacti version is too old. I created this with 0.8.6c.

zoidberg
Posts: 2
Joined: Fri Mar 11, 2005 9:36 am

#8 Post by zoidberg » Tue Mar 15, 2005 5:45 am

upgraded to 0.8.6c - working fine now.

thanks

mumuuu
Posts: 6
Joined: Tue Mar 22, 2005 8:00 am

#9 Post by mumuuu » Tue Mar 22, 2005 1:30 pm

Hi all

those script are great !!!!
but i've a pb with it ..... let me explain :

i tooke the file and i put the win32_procs.xml file in the cacti directory

then i put those 3 others files in cacti with the graphique interface

then i try to graph so i add in the " Associated Data Queries" the "SNMP - Get Processor Information" and i saved the settings.

then i click create graph for ..... and there is no procces like in the pictures up in this page in my cacti :evil: so could u help me because my english is not so bad but maybe i missed some steps in the README.txt file :oops:

THX by advance for your answer

mumuuu
Posts: 6
Joined: Tue Mar 22, 2005 8:00 am

#10 Post by mumuuu » Thu Mar 24, 2005 4:06 pm

ok I found where i was wrong but i only have the CPU usage ... :-? :(

i don't have the memory usage why ??????
could u help me ??? :D

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#11 Post by BSOD2600 » Sat Mar 26, 2005 2:56 pm

1) you don't put the files anywhere... it's best if you import them. Read through the readme.txt
2) When you add the snmp - process info to a device, then click on the green circle, do you see anything being outputted ?

BlueT
Posts: 4
Joined: Mon Mar 28, 2005 3:00 pm

#12 Post by BlueT » Mon Mar 28, 2005 3:07 pm

Hi

I am using this script, it is working however I am not getting any memory information on any of the runing proccesses. I would much really appreciate helpon getting this working.

When I click the green circle after adding the snmp info proccess to a device, It says success (152 items; 38 Rows)

Thanks

User avatar
BSOD2600
Cacti Moderator
Posts: 12160
Joined: Sat May 08, 2004 12:44 pm
Location: USA

#13 Post by BSOD2600 » Mon Mar 28, 2005 9:13 pm

1) Is the Re-Index Method set to Index Count Changed or Verify All Fields ?
2) In Data Source section, did you change the Index Type to hrSWRunName ?
3) Click on verbose query and paste the output.
4) Turn on debugging and paste the relivant section for the process(es) you're monitoring.

muriachi
Posts: 14
Joined: Tue Dec 14, 2004 6:54 am
Location: Campinas, BR

#14 Post by muriachi » Tue Mar 29, 2005 9:12 am

Great Job !!!!

:oops: Is there like for Linux ? So I think which is necessary changes snmpd.conf ...

BlueT
Posts: 4
Joined: Mon Mar 28, 2005 3:00 pm

#15 Post by BlueT » Tue Mar 29, 2005 10:06 am

The Re-Index Method is set to Index Count Changed, but i have tried both.
Yes i did change it ro hrSWRunName and put the name in the index value.
I have attached the verbose query in a text file as it was long
The log files had the following relevent (i think) entries
03/29/2005 03:48:03 PM - CMDPHP: Poller[0] PHP Script Server Started Properly
03/29/2005 03:48:03 PM - CMDPHP: Poller[0] Host[1] SNMP: Host responded to SNMP
03/29/2005 03:48:03 PM - CMDPHP: Poller[0] Host[1] RECACHE: Processing 5 items in the auto reindex cache for '127.0.0.1'.
03/29/2005 03:48:03 PM - CMDPHP: Poller[0] Host[1] WARNING: Result from SNMP not valid. Partial Result: 31188 KBytes
03/29/2005 03:48:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.1192, output: U
03/29/2005 03:48:03 PM - CMDPHP: Poller[0] Host[1] SNMP: v1: 127.0.0.1, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.1192, output: 60567
03/29/2005 03:48:03 PM - POLLER: Poller[0] CACTI2RRD: d:/Apache/rrd/rrdtool.exe update d:\www\operations\cacti\rra\localhost_proc_mem_32.rrd --template proc_mem:proc_cpu 1112107682:U:60567
Attachments
Verbose.txt
(10.51 KiB) Downloaded 2779 times

Post Reply