Xymon Mailing List Archive search

4.3.17 SunOS Client Procs Problem

1 message in this thread

list Nick Pettefar · Thu, 3 Apr 2014 18:02:13 +0100 ·
I amended my client bin/xymonclient-sunos.sh file thus:

case $ZTYPE in
global)
    /bin/ps -A -o pid,ppid,user,stime,s,pri,pcpu,time,pmem,rss,vsz,args
   ;;
Global)
    #/bin/ps -A -o
zone,pid,ppid,user,stime,class,s,pri,pcpu,time,pmem,rss,vsz,args |
sort
    /bin/ps -A -o
zone,pid,ppid,user,stime,class,s,pri,pcpu,time,pmem,rss,vsz,args|head
-1;
    /bin/ps -A -o
zone,pid,ppid,user,stime,class,s,pri,pcpu,time,pmem,rss,vsz,args|sort|grep
-v COMMAND
   ;;
*)
    /bin/ps -A -o pid,ppid,user,stime,class,s,pri,pcpu,time,pmem,rss,vsz,args
   ;;
esac

Otherwise you get "Expected string CMD not found in ps output header"
due to the sort command tacked onto the end.


Regards,

Nick Pettefar