OpenSolaris

  subsites:   Code Reviews   Gates   Issues   Defects   Polls   Test   PKG   Planet   Mail
You are not signed in. Sign in or register.

ps(1)

We propose two new options for ps(1):

  • -H option adds additional column showing home lgroup
  • -h lgroup_list only displays information about threads belonging to specified lgroups.
We also propose to add a new "home" format specifier to show the home lgroup of a process Example:
$ ps -eH
    PID LGRP TTY         TIME CMD
     0    0 ?           2:20 sched
     1    2 ?           0:00 init
     2    4 ?           0:00 pageout
     3    3 ?           3:12 fsflush
100044    2 ?           0:00 dhcpagen
100004    2 ?           0:03 svc.star
100006    1 ?           0:06 svc.conf
100135    1 ?           0:06 nscd
100292    4 ?           0:00 sac
100386    3 ?           0:00 nfsmapid
100134    1 ?           0:00 kcfd
100246    1 ?           0:00 rpcbind
...
100631    4 ?           0:00 devfsadm
100691    4 ?           0:01 snmpd
101500    2 pts/1       0:00 ps
100637    2 ?           0:00 dtlogin
100774    4 pts/1       0:00 bash
100671    1 ?           0:00 snmpXdmi
100667    3 ?           0:00 dmispd

Example showing the use of the "home" format specifier:

$ ps -o pid= -o home= -p $$
100747    1

Documents

Issues

  • Man page needs to explain what happens when an invalid lgroup is given, whether processing continues after an error, and what options don't work with -h or -H. (Fixed)
  • Man page synopsis doesn't include -h or -H (Fixed)
  • ps -h 99 displays some processes even though lgroup 99 isn't valid (Fixed)
  • ps -h gives home lgroups that don't jive with plgrp(1) (Fixed)
  • radial:jjc> ps -h 1
        PID TTY         TIME CMD
    100747 pts/1       0:01 bash
    404245 pts/7       0:00 ps
    334692 ?           0:00 in.rlogi
    404169 pts/7       0:00 tcsh
    404217 pts/7       0:00 tcsh
    403983 ?           0:00 in.rlogi
    radial:jjc> plgrp 100747 404245 334692 404169 404217 403983
         PID/LWPID    LGRP
      100747/1        1
    plgrp: Unable to grab process 404245: no such process or core file
      334692/1        1
      404169/1        1
      404217/1        3
      403983/1        1
    radial:jjc>