Win32 - Monitor running processes

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

Moderators: Developers, Moderators

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

Win32 - Monitor running processes

Post by BSOD2600 »

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
Example of running processes
Example of running processes
running_procs_graph.png (10.91 KiB) Viewed 98147 times
sample graph
sample graph
dcplusplus.png (5.78 KiB) Viewed 98147 times
Win32_RunningProcs.zip
Readme, templates, and script.
(31.09 KiB) Downloaded 139748 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

Post by Spark »

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

Post by vtmgr »

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

Post by DevilSun »

Very nice BSOD! Good job!
Hardinxcore
Posts: 7
Joined: Fri Mar 11, 2005 7:11 am

Pleaz help for installing under w2k3

Post by Hardinxcore »

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

Post by zoidberg »

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: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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

Post by zoidberg »

upgraded to 0.8.6c - working fine now.

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

Post by mumuuu »

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

Post by mumuuu »

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: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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

Post by BlueT »

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: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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

Post by muriachi »

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

Post by BlueT »

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 3704 times
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests