I have a command in my script:
ps -u $user -o pid,ppid,pcpu,stime,stat,comm
This line works fine in Linux. But it won't work on Solaris b/c the "format" of "stat" does not exist in Solaris? I got the following error:
ps: unknown output format: -o stat
usage: ps [ -aAdeflcjLPy ] [ -o format ] [ -t termlist ]
[ -u userlist ] [ -U userlist ] [ -G grouplist ]
[ -p proclist ] [ -g pgrplist ] [ -s sidlist ]
'format' is one or more of:
user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid
pri opri pcpu pmem vsz rss osz nice class time etime stime
f s c lwp nlwp psr tty addr wchan fname comm args projid project
Does it use a different name other than stat that's not obvious in the list above????