graph number of processes?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
stigmata
Posts: 49
Joined: Tue Nov 23, 2004 10:26 am

graph number of processes?

Post by stigmata »

Hi,

is it possible to graph the number of processes like apache or mysqld via SNMP?

Regards,
stigmata
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

No directly, but you could use a script to count the process names in the process table of the HOSTMIB and return a count.

PHP server would be a great way too implement this.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

you can use these 2 excellent templates sets :

- MySQL Graph Collection 2.0 : http://forums.cacti.net/viewtopic.php?t=6108

Image

- ApacheStats 0.4 : http://forums.cacti.net/viewtopic.php?t=4028

Image
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
stigmata
Posts: 49
Joined: Tue Nov 23, 2004 10:26 am

Post by stigmata »

hi fmangeant,

thx for this - did you know a solution to graph how much RAM the mysqld processes use? This is a very important thing for my monitorig :)
My problem - I'm not a programmer...


Regards,
stigmata
stigmata
Posts: 49
Joined: Tue Nov 23, 2004 10:26 am

Post by stigmata »

hi fmangeant / rony,

thx for this - did you know a solution to graph how much RAM the mysqld processes use? This is a very important thing for my monitorig :)
My problem - I'm not a programmer...


Regards,
stigmata
stigmata
Posts: 49
Joined: Tue Nov 23, 2004 10:26 am

Post by stigmata »

hi fmangeant / rony,

thx for this - did you know a solution to graph how much RAM the mysqld processes use? This is a very important thing for my monitorig :)
My problem - I'm not a programmer...


Regards,
stigmata
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

it should be possible with a little script :D

You can get a list of MySQL processes like this :

Code: Select all

$ snmpwalk -v 1 -c public localhost hrSWRunName | grep "mysqld"
HOST-RESOURCES-MIB::hrSWRunName.3621 = STRING: "mysqld_safe"
HOST-RESOURCES-MIB::hrSWRunName.3712 = STRING: "mysqld"
HOST-RESOURCES-MIB::hrSWRunName.3771 = STRING: "mysqld"
HOST-RESOURCES-MIB::hrSWRunName.3772 = STRING: "mysqld"
HOST-RESOURCES-MIB::hrSWRunName.3773 = STRING: "mysqld"
Parse the output, and then query each process memory size, for example :

Code: Select all

$ snmpwalk -v 1 -c public localhost hrSWRunPerfMem.3712
HOST-RESOURCES-MIB::hrSWRunPerfMem.3712 = INTEGER: 60516 KBytes
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
stigmata
Posts: 49
Joined: Tue Nov 23, 2004 10:26 am

Post by stigmata »

hmmmm, sounds very good but my experience in programming.................. is it possible that you wrote that script? It would be very helpful for me and other cacti-user?! :)

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

Post by CactiPadawan »

i am trying to use the apache template,

Apache Statistics - Bytes / Request :
not working -> ERROR: Could not parse color in ''


Apache Statistics - Hits / s :
working but i have no title nor legends ..

Apache Statistics - kBits / s120x500
working but i have no title nor legends ..

Apache Statistics - Thread Details
working but i have no title nor legends ..

Apache Statistics - Thread Details (%)
not working -> ERROR: Could not parse color in ''


i am sorry maybe its because i dont use cacti correctly .. i am a beginner with it. But i would appreciate any answer. Thank you.
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

If you're talking on a win32 host, then yes you can. I wrote a script: http://forums.cacti.net/viewtopic.php?t=6661
stigmata
Posts: 49
Joined: Tue Nov 23, 2004 10:26 am

Post by stigmata »

no, these are linux-boxes...
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests