The culprit of high CPU & Memory usage on Windows & Linux

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Satyam
Posts: 63
Joined: Mon Oct 24, 2011 8:14 am

The culprit of high CPU & Memory usage on Windows & Linux

Post by Satyam »

Hi,

I remember some time ago, the windows and linux admins of my company came to me and ask "Can you please tell me that which process/service is using such a high cpu or memory". This is the case because every time they have to close a lot of warning and critical tickets related to high CPU & Memory usage(which usually keep fluctuating) for their servers (Since our Nagios is integrated with a ticketing tool), so the thing is that they can see that CPU and Memory usage has went high at this time and crossed the warning & critical threshold in nagios and performance grapher, but they wanted and raised a question to me why can't your nagios tell that which process or service caused this. So they can take the necessary action and close the ticket with appropriate justification. Being an innocent nagios admin, i replied let me think a way around it, if it can be done and so i landed here for the ideas which can solve the thurst. Thanks...


Manish Kumar,
Open Source Tools Team, IMS, Mahindra Satyam
Bangalore, India
Thanks,
Sattanathan.S
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by jsmurphy »

About all I can suggest is check out nagios exchange http://exchange.nagios.org/ for some plugins that allow you to track specific process usage... I have no idea if they exist I've never really looked.

It could also be that your timing thresholds are currently a little too susceptible to false positives, ensure that CPU usage is high for an extended period of time before notifying... that way the issue should still be on-going by the time they get the notification and when they log on to the server they will be able to see who the offender is via task manager/top.

Edit: I also just had the idea that you could probably write your own script and use the process perfmon counter, alternatively a custom script and WMI might also be worth investigating..
Satyam
Posts: 63
Joined: Mon Oct 24, 2011 8:14 am

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by Satyam »

Hi,

Finally we have developed on our own solution (not from scratch... ) for this problem and its up at the Nagios exchange too. Feel free to use it and evaluate it. Please post for any bugs.

http://exchange.nagios.org/directory/Pl ... rs/details

http://exchange.nagios.org/directory/Ad ... ls/details
GaWd
Posts: 51
Joined: Wed Dec 15, 2010 1:45 pm

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by GaWd »

Looks like your windows agent link is broken. I'd be very interested in it if you re-post it.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by jsmurphy »

Great work! this will probably help a lot of people when you get that windows link fixed up :)
Satyam
Posts: 63
Joined: Mon Oct 24, 2011 8:14 am

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by Satyam »

Hi,

Anyone there from Nagios Exchange, how can i get that link fixed up ??

http://exchange.nagios.org/directory/Ad ... ls/details

I tired to edit and post it couple of times but with no success, I am not able to see any delete project button on exchange, so that i can try to delete it and upload it again.
User avatar
jsmurphy
Posts: 989
Joined: Wed Aug 18, 2010 9:46 pm

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by jsmurphy »

I'll see if I can find some one who can help out :)
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by mguthrie »

Updated the title. Exchange sometimes doesn't properly encode meta characters when it builds the URL. Here's the new link.
http://exchange.nagios.org/directory/Ad ... ls/details
Satyam
Posts: 63
Joined: Mon Oct 24, 2011 8:14 am

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by Satyam »

Thanks mguthrie !! Now it's working fine.
prandal
Posts: 8
Joined: Mon Nov 19, 2012 5:23 am

Re: The culprit of high CPU & Memory usage on Windows & Linu

Post by prandal »

Nice enhancement.

It would be great if you could feed your changes upstream to nsclient.org so they can become part of the standard NSClient++
Locked