Win32 - Monitor running processes

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

Moderators: Moderators, Developers

Post Reply
Author
Message
mutha
Posts: 3
Joined: Fri May 20, 2005 8:32 pm

Errors There is no such variable name in this MIB

#61 Post by mutha » Mon May 23, 2005 10:39 pm

I may be missing something here, but I followed these instructions

Code: Select all

By default, the index type will use 'hrSWRunIndex'. This number is the same as the PID in process manager.  You want to change it to use 'hrSWRunName' for each process.  Type in the executables name (i.e. winamp.exe).  You can find the name at top of the screen for the process you're working on (i.e. computername - process - processname
and upon restarting a process and picking up a new PID Im getting error messages on the processes that were setup previously when poller.php runs thus no new data to graph.

I can remove the data sources and add them back and everything will work until the next restart.


thanks in advance

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

#62 Post by BSOD2600 » Tue May 24, 2005 2:02 am

You're saying you close a process, reopen it, and the data source is no longer valid? The only time the new PID is by default reindexed is when the number of processes changes. If this creates a problem, then you can change the reindex method to 'verify all fields'.

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#63 Post by TheWitness » Tue May 24, 2005 5:45 am

I have a fix for this.... It's not free, requires lot's of Atkins Coockies & Cream bars :)

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

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

mutha
Posts: 3
Joined: Fri May 20, 2005 8:32 pm

#64 Post by mutha » Tue May 24, 2005 9:25 pm

I'll give it a try thanks.

Witness, be careful with those Atkins delights, they tend to run straight thru you :)

mutha
Posts: 3
Joined: Fri May 20, 2005 8:32 pm

#65 Post by mutha » Wed May 25, 2005 4:44 pm

Code: Select all

You're saying you close a process, reopen it, and the data source is no longer valid?
Yes.. Tried the verify all fields>> didnt work for me

What is happening is although I am using run name for the data source, when poller.php runs it is still looking for original PID number.

I have also found that if I remove all of the data sources that I had setup (relative to this plugin) the nextime I add a new data source poller is trying to locate all of the previous PIDS I had setup before.

I am thinking "cache problem" because when I click clear poller cache from the Cacti System Utilities menu nothing happens. The same data is still there. Could be a separate issue. I am still learning :oops: :oops:

Here you go Witness
Attachments
Atkins-Advantage-Pralines.gif
Atkins-Advantage-Pralines.gif (1.58 KiB) Viewed 9469 times

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

#66 Post by BSOD2600 » Wed May 25, 2005 6:23 pm

1) the fix TheWitness is talking about will come in Cacti 0.8.6e by adding <index_type>nonunique</index_type> to the xml.

2) It sounds like you did not change the datasource hrSWRunName and the process name you want to monitor.

The only time Cacti will reindex the processes (aka refresh the PIDs), is if the number of them changes between polling cycles. When that happens, you'll see something like this in the log: CMDPHP: Poller[0] ASSERT: '40=36' failed. Recaching host 'gamerxp.zeus.xxx.com', data query #14. The <oid_num_indexes> line in win32_procs.xml triggers this.

So if a process closes and reopens again, resulting in the same number of processes, Cacti will not (currently) refresh the PIDs. I though changing the polling method to 'verify all fields' would've force cacti to do this.

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#67 Post by TheWitness » Wed May 25, 2005 8:38 pm

I wish I could just reach out and eat that thing! BSOD is correct. CVS has changed significantly due to a security flaw, so just be patient.

TheWitness
Last edited by TheWitness on Tue May 31, 2005 4:34 am, edited 1 time in total.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

#68 Post by elnino » Mon May 30, 2005 10:01 am

Has anyone gotten this script to work using the cactid poller? I'm using the 0.8.6.d version

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

#69 Post by BSOD2600 » Mon May 30, 2005 12:34 pm

I don't (can't) use cactid. What errors are you getting?

elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

#70 Post by elnino » Mon May 30, 2005 12:56 pm

No errors are shown on Low logging, but the graph doesn't show any data for the memory usage. If I put it on Medium logging here's what it pulls back:

Code: Select all

05/30/2005 10:50:12 AM - CACTID: Poller[0] Host[12] SNMP: v2: 192.0.0.237, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.812, value: 21564 KBytes  
05/30/2005 10:50:12 AM - CACTID: Poller[0] Host[12] SNMP: v2: 192.0.0.237, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.812, value: 40298  
05/30/2005 10:50:12 AM - CACTID: Poller[0] Host[12] SNMP: v2: 192.0.0.237, dsname: proc_mem, oid: .1.3.6.1.2.1.25.5.1.1.2.708, value: 5032 KBytes  
05/30/2005 10:50:12 AM - CACTID: Poller[0] Host[12] SNMP: v2: 192.0.0.237, dsname: proc_cpu, oid: .1.3.6.1.2.1.25.5.1.1.1.708, value: 3435  
Also, I switched out the functions.php that you said to a few posts up but that didn't help any.

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

#71 Post by BSOD2600 » Mon May 30, 2005 10:58 pm

You must be running linux and/or net-snmp. Read the first post, there is a fix for not displaying the kbytes.

elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

#72 Post by elnino » Tue May 31, 2005 8:23 am

Yes, I am running Linux with net-snmp and I already tried replacing the functions.php with the one from the other thread.

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#73 Post by TheWitness » Tue May 31, 2005 5:55 pm

That patch only works with cmd.php. I have to make Cactid 0.8.6e-rc11 :(

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

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

CactiPadawan
Posts: 23
Joined: Mon Jun 06, 2005 11:15 am

#74 Post by CactiPadawan » Tue Jun 14, 2005 5:50 am

My problem is the following :



+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/win32_procs.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.2.1.25.4.2.1.1'
+ No SNMP data returned
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/win32_procs.xml'
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/win32_procs.xml'
+ Found data query XML file at 'C:\Apache2\htdocs\cacti/resource/snmp_queries/win32_procs.xml'



It seems i havent the right mib ... how to fix that ?
[My config :
Windows XP Service Pack 2
ActivePerl-5.8.6.811-MSWin32-x86-122208
cacti-0.8.6d
mysql-4.1.12-win32
php-5.0.4-Win32
rrdtool-cygwin-1.2.9
net-snmp-5.2.1
apache_2.0.54-win32-x86-no_ssl]

CactiPadawan
Posts: 23
Joined: Mon Jun 06, 2005 11:15 am

#75 Post by CactiPadawan » Wed Jun 15, 2005 3:47 am

No one can help me ? I need to know what is the right mib to use and where to download it please.

Most template present in cacti use OID that arent present in the mibs installed by default in net-snmp it seems .. or maybe i did something wrong.

From what i can read here : http://www.net-snmp.org/docs/README.agent-mibs.html

UCD-SNMP-MIB and HOST-RESSOURCES-MIB

(the mibs you are using with your scripts)

are not working for Win32 based Platforms . . .

This readme says too that "The OS platform is probably the least reliable of the columns" ok but when i try a snmpwalk on my Win XP there is no OID associated with HOST-RESSOURCES-MIB or UCD-SNMP-MIB (or juste FileTable..) ... if i try with snmpget on a the OID you use in your scripts i have no result.

If i try the same (snmpwalk / snmpget) on a Linux based machine i can gather all the informations...

So it seems that i havent the right mibs installed
i read that file http://www.net-snmp.org/docs/FAQ.html#H ... _the_agent_
and i would like to know what kind of method you used to add a MIB that work with Win32 based platform ....

Please help ^^

Thank you in advance
[My config :
Windows XP Service Pack 2
ActivePerl-5.8.6.811-MSWin32-x86-122208
cacti-0.8.6d
mysql-4.1.12-win32
php-5.0.4-Win32
rrdtool-cygwin-1.2.9
net-snmp-5.2.1
apache_2.0.54-win32-x86-no_ssl]

Post Reply