Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support pid returns garbage in pandora scripts

  • pid returns garbage in pandora scripts

    Posted by qus on March 17, 2009 at 04:10

    Hello,

    Almost all Pandora scripts depend on pid -x command:

    PANDORA_PID=$(pidof -x $PANDORA_DAEMON
    if [ ! -z $PANDORA_PID ]
    then
    echo “Pandora FMS Data Server is currently running on this machine with PID ($PANDORA_PID). Aborting now…”
    exit 1

    Unfortunately pidof on my Suse and Ubuntu return garbage:

    Pandora FMS Network Server is currently running on this machine with PID (4741). Aborting now…
    war133:/etc/init.d # ./pandora_network start
    Pandora FMS Network Server is currently running on this machine with PID (4744). Aborting now…
    war133:/etc/init.d # ./pandora_network start
    Pandora FMS Network Server is currently running on this machine with PID (4747). Aborting now…
    war133:/etc/init.d # ./pandora_network start
    Pandora FMS Network Server is currently running on this machine with PID (4750). Aborting now…
    war133:/etc/init.d # ./pandora_network start
    Pandora FMS Network Server is currently running on this machine with PID (4753). Aborting now…
    war133:/etc/init.d # ./pandora_network start
    Pandora FMS Network Server is currently running on this machine with PID (4756). Aborting now…
    war133:/etc/init.d # ./pandora_network start
    Pandora FMS Network Server is currently running on this machine with PID (4759). Aborting now…

    The funny thing is that ‘pid -x /path/to/pandora’ from shell returns nothing. It seems garbege is returned only inside script…

    Note: this has probably something to do with the fact that on Suse init.d = rc.d

    manu replied 15 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply