Xymon Mailing List Archive search

FreeBSD 6.1 and PS and COMMAND

list Dave Overton
Mon, 26 Jun 2006 08:15:00 -0700
Message-Id: <018101c69933$4b15f5b0$user-77349d5d7986@xymon.invalid>

There is the problem, and my information was incorrect.

Freebsd 4.11 returns this with the command string:
ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,cputime,pmem,rss,vsz,args
ps: args: keyword not found
  PID  PPID USER    STARTED STAT PRI %CPU      TIME %MEM  RSS   VSZ
    0     0 root    31Aug05 DLs  -18  0.0   0:04.53  0.0    0     0

Freebsd 6.1 returns: (as expected)
ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,cputime,pmem,rss,vsz,args
  PID  PPID USER   STARTED STAT PRI %CPU      TIME %MEM   RSS   VSZ COMMAND
    0     0 root   17Jun06 WLs   98  0.0   0:00.00  0.0     0     0
[swapper]

So, my subject line was wrong, the PS line works fine in v6.1, its v4.11 it
breaks in.

Excerpt from #man ps:

KEYWORDS
     The following is a complete list of the available keywords and their
     meanings.  Several of them have aliases (keywords which are synonyms).

     %cpu       percentage cpu usage (alias pcpu)
     %mem       percentage memory usage (alias pmem)
     acflag     accounting flag (alias acflg)
     command    command and arguments
     cpu        short-term cpu usage factor (for scheduling)
     flags      the process flags, in hexadecimal (alias f)


Dave Overton, Owner
SYIX.COM

user-4179705f9dca@xymon.invalid
(XXX) XXX-XXXX x101
Fax (XXX) XXX-XXXX
800-988-SYIX 
-----Original Message-----
From: Henrik Stoerner [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Monday, June 26, 2006 5:28 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] FreeBSD 6.1 and PS and COMMAND

On Wed, Jun 21, 2006 at 11:57:56AM -0700, Dave Overton wrote:
I am running FreeBSD 6.1 Release, Hobbit with the patches on the > website today, and a bit frustrated.
[snip]
Expected string COMMAND not found in ps output header
So, I go looking...  Can't find where PS is told to do this!!!  Argh.  > A bit of guidance, like what file tells PS to read those columns?  and > why does it hate the COMMAND column?
The "ps" command that the Hobbit client runs is in the ~hobbit/client/hobbitclient-freebssd.sh script. It was recently changed to provide a specific set of columns and therefore now is

ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,cputime,pmem,rss,vsz,args

Last I tested this, it did provide the "COMMAND" column. Maybe this has changed in 6.1 ?


Regards,
Henrik