Win32 - Monitor running processes

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

Moderators: Developers, Moderators

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

Errors There is no such variable name in this MIB

Post by mutha »

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

Post by BSOD2600 »

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: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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 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?
mutha
Posts: 3
Joined: Fri May 20, 2005 8:32 pm

Post by mutha »

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

Post by mutha »

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 10727 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

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: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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 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?
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Post by elnino »

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

Post by BSOD2600 »

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

Post by elnino »

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

Post by BSOD2600 »

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

Post by elnino »

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: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

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 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?
CactiPadawan
Posts: 23
Joined: Mon Jun 06, 2005 11:15 am

Post by CactiPadawan »

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

Post by CactiPadawan »

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

Who is online

Users browsing this forum: No registered users and 4 guests