Ticket #26040: patch-client-hobbitclient-darwin.sh.diff

File patch-client-hobbitclient-darwin.sh.diff, 580 bytes (added by fclaire@…, 14 years ago)
  • client/hobbitclient-darwin.sh

    old new  
    4444ps -ax -ww -o pid,ppid,user,start,state,pri,pcpu,time,pmem,rss,vsz,command
    4545
    4646# $TOP must be set, the install utility should do that for us if it exists.
    47 if test "$TOP" != ""
     47if test "$TOP" != "" -a "$AWK" != ""
    4848then
    49     if test -x "$TOP"
     49    if test -x "$TOP" -a -x "$AWK"
    5050    then
    5151        echo "[top]"
    52         $TOP -l 1 -n 20
     52        $TOP -l 2 -n 20 -o cpu | $AWK '/^Processes:/ {toprun++} toprun == 2'
    5353    fi
    5454fi
    5555