hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject help with ps command on MacOS
Date Sat, 05 Nov 2011 15:12:52 GMT
Working on HBASE-4737, we found that the standard way of getting pid / ppid
doesn't work on MacOS.

According to N:


could you check if
ps -o pid --no-headers -$id
works (with $id equals to 1 for example: is should return 1 as it's the pid
of the 'init' process, see the '-' before $id)

same for
ps -o ppid --pid $pId --no-headers
With for example 1 for  $pId. Should return 0

last is:
ps -o comm
should show 'java' for java process

Here is what I got:

zhihyu$ ps -o pid --no-headers -1
ps: illegal option -- -
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
          [-g grp[,grp...]] [-u [uid,uid...]]
          [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
       ps [-L]
~ zhihyu$ ps -o comm

If you have experience with using ps command on Mac, please comment.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message