Welcome to Pandora FMS Community › Forums › Community support › Advanced troubleshooting › Issues with generic_proc agent
-
Issues with generic_proc agent
Posted by siskos on January 4, 2012 at 15:01Hello,
I use the module_type generic_proc to see if a necessary process on our server is still running.
module_begin
module_name wwwstartsrv
module_type generic_proc
module_exec ps aux | grep -c [w]wwstartsrv
module_endEverything seems ok and in the console I get that 1 process is running.
Now if the process is stopped I don’t get any mention of it in the console? Only the “last contact” keeps counting?
When I look into the xml of the agent (debug = 1) I also see that the module “wwwstartsrv” is actually not in the xml?When I run ps aux | grep -c [w]wwstartsrv manully i get 1 (if running) or 0 (not running).
If the process is started again it the “last contact” is updated along with the other modules, and the module is also back in de xml file.
Thanks! 🙂
tpalacios replied 12 years, 12 months ago 3 Members · 3 Replies -
3 Replies
-
::
Hi Siskos
good morningCan you try these command? is a little bit different.
ps -Af | grep smsd | grep -v "grep" | wc -l
the first grep shows you all process that contains a word smsd (the deamon of smstools). the second grep excludes the current command line, and the third counts the lines.
i’ve got these command for various modules and i have no problem.
bye!
-
-