From 1599d6e0068ecf6375de408a0fd17621870642fb Mon Sep 17 00:00:00 2001 From: slerena Date: Mon, 21 Dec 2009 12:03:36 +0000 Subject: [PATCH] 2009-12-21 Sancho Lerena * util/tentacle_served: Fixed call to get_pid, using a width of * 300 cols. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2225 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_server/ChangeLog | 4 ++++ pandora_server/util/tentacle_serverd | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pandora_server/ChangeLog b/pandora_server/ChangeLog index 2b4f93a47d..92dfbc2c81 100644 --- a/pandora_server/ChangeLog +++ b/pandora_server/ChangeLog @@ -1,3 +1,7 @@ +2009-12-21 Sancho Lerena + + * util/tentacle_served: Fixed call to get_pid, using a width of 300 cols. + 2009-12-21 Ramon Novoa * util/pandora_xml_stress.pl: Properly read agent_interval diff --git a/pandora_server/util/tentacle_serverd b/pandora_server/util/tentacle_serverd index a03e27ca0e..317db413cf 100755 --- a/pandora_server/util/tentacle_serverd +++ b/pandora_server/util/tentacle_serverd @@ -33,8 +33,12 @@ else fi function get_pid { - TENTACLE_PID=`ps -Af | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | tail -1 | awk '{ print $2 }'` - echo $TENTACLE_PID + # This sets COLUMNS to XXX chars, because if command is run + # in a "strech" term, ps aux don't report more than COLUMNS + # characters and this will not work. + COLUMNS=300 + TENTACLE_PID=`ps -Af | grep "$TENTACLE_PATH$TENTACLE_DAEMON" | grep -v grep | tail -1 | awk '{ print $2 }'` + echo $TENTACLE_PID } # Pandora server settings