Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been sent a simple monitoring script by the author of ASSP, but I am not sure how to fix the PROC= line that causes an error.

# ASSP watchdog process.

# Start in the correct directory.
cd $BASE

# Check for a running ASSP process.
PROC=`ps -axvO ucomm | grep Schedule::Cron | grep perl | awk '{print $1}'`

FILES=`lsof -p "${PROC}" | grep /usr/share/assp | grep perl`

# If ASSP is not running, start it.
if [ "${FILES}" ]
then {
echo "ASSP is already running."
else {
echo "Restarting ASSP."
} fi

It gives the following error.

ERROR: Must set personality to get -x option.

I am not sure if this line is remotely close to working. I was thinking of a write script that simply checks if there is a perl script active and if not, start it manually. This server runs Debian and has ASSP/Postfix installed.

share|improve this question
up vote 1 down vote accepted

Part of the issue with ps is that there are some dozen versions of it and Linux's ps tries to be compatible with all of them by figuring out what version's options you're trying to use. Options starting with - are BSD-style, but -v and -O are conflicting BSD options.

Try ps ax to get the command column of all of the processes currently running. Since you're using it in a pipe it should use the whole command name, but if for some reason it truncates the commandline, use axww for unlimited width.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.