2011-09-05 Koichiro Kikuchi <koichiro@rworks.jp>

* pandora_agent_daemon: Added support for OpenVZ/Virtuozzo.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4898 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
koichirok 2011-09-05 09:52:18 +00:00
parent 53ce875a6b
commit 20e5a21e4b
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2011-09-05 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent_daemon: Added support for OpenVZ/Virtuozzo.
2011-09-02 Koichiro Kikuchi <koichiro@rworks.jp>
* pandora_agent: Now module_condition and module_precondition

View File

@ -52,6 +52,17 @@ pidof_pandora () {
else
PANDORA_PID=`ps -Af | grep "$TRUNCATED_DAEMON" | grep -v grep | head -1 | awk '{ print $2 }'`
fi
elif [ "$OS_NAME" = "Linux" -a -x /usr/sbin/vzpid ]
then
for _pid in `ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | awk '{ print $2 }'`
do
_ctid=`/usr/sbin/vzpid $_pid | awk '$1 == '$_pid' { print $2 }'`
if [ "X$_ctid" = "X0" ]
then
PANDORA_PID=$_pid
break
fi
done
else
PANDORA_PID=`ps -Af | grep "$DAEMON $PANDORA_PATH" | grep -v grep | head -1 | awk '{ print $2 }'`
fi