Previous Table of Contents Next


Displaying and Controlling Information About Processes

Follow these steps to display and control information about a process:

1.  Type ps -e | grep process-name and press Return. The first column of the output displays the PID for the appropriate process name.
2.  Become superuser to use pcred, pfiles, pflags, pldd, pmap, psig, pstack, and pwdx commands.
3.  Type pcommand PID and press Return. The information for the specified command is displayed.

The following examples show the output for each of the /usr/proc/bin commands for the dtlogin PID of 283:

castle% ps -e | grep dtlogin
   283 ?        0:00 dtlogin
   270 ?        0:01 dtlogin
castle%
# /usr/proc/bin/pcred 283
283:    e/r/suid=0  e/r/sgid=0
        groups: 1 0 2 3 4 5 6 7 8 9 12
# exit
castle% /usr/proc/bin/ptime 283
/ptime: exec failed

real        0.016
user        0.000
sys         0.016
castle%
# /usr/proc/bin/pfiles 283
283:    /usr/dt/bin/dtlogin -daemon
  Current rlimit: 64 file descriptors
   0: S_IFDIR mode:0755 dev:32,24 ino:2 uid:0 gid:0 size:1024
      O_RDONLY|O_LARGEFILE
   1: S_IFDIR mode:0755 dev:32,24 ino:2 uid:0 gid:0 size:1024
      O_RDONLY|O_LARGEFILE
   2: S_IFREG mode:0644 dev:32,24 ino:326220 uid:0 gid:0 size:49
      O_WRONLY|O_APPEND|O_LARGEFILE
   3: S_IFCHR mode:0666 dev:32,24 ino:406038 uid:0 gid:3 rdev:13,12
      O_RDWR
   4: S_IFIFO mode:0666 dev:171,0 ino:4124779288 uid:0 gid:0 size:0
      O_RDWR|O_NONBLOCK
   5: S_IFREG mode:0644 dev:32,24 ino:326221 uid:0 gid:0 size:4
      O_WRONLY|O_LARGEFILE
      advisory write lock set by process 270
   7: S_IFSOCK mode:0666 dev:166,0 ino:32032 uid:0 gid:0 size:0
      O_RDWR
   8: S_IFDOOR mode:0444 dev:171,0 ino:4124780632 uid:0 gid:0 size:0
      O_RDONLY|O_LARGEFILE FD_CLOEXEC  door to nscd[174]
#
# /usr/proc/bin/pflags 283
283:    /usr/dt/bin/dtlogin -daemon
  /1:   flags = PR_PCINVAL|PR_ORPHAN|PR_ASLEEP [ wait() ]
#
# /usr/proc/bin/pldd 283
283:    /usr/dt/bin/dtlogin -daemon
/usr/openwin/lib/libXmu.so.4
/usr/openwin/lib/libX11.so.4
/usr/dt/lib/libDtSvc.so.1
/usr/lib/libresolv.so.2
/usr/lib/libdl.so.1
/usr/lib/libbsm.so.1
/usr/lib/libauth.so.1
/usr/lib/libsocket.so.1
/usr/lib/libnsl.so.1
/usr/dt/lib/libSDtFwa.so.1
/usr/lib/libc.so.1
/usr/openwin/lib/libXt.so.4
/usr/openwin/lib/libSM.so.6
/usr/openwin/lib/libICE.so.6
/usr/openwin/lib/libXext.so.0
/usr/lib/libm.so.1
/usr/openwin/lib/libtt.so.2
/usr/dt/lib/libXm.so.3
/usr/lib/libmp.so.2
/usr/lib/nss_files.so.1
/usr/lib/libpam.so.1
#
# /usr/proc/bin/pmap 283
283:    /usr/dt/bin/dtlogin -daemon
00010000    108K read/exec         /usr/dt/bin/dtlogin
0003A000     32K read/write/exec   /usr/dt/bin/dtlogin
00042000     80K read/write/exec     [ heap ]
EEE90000     12K read/shared       dev:32,24 ino:196384
EEEA0000     12K read/shared       dev:32,24 ino:196384
EEEB0000     12K read/shared       dev:32,24 ino:196384
EEEC0000      8K read/write          [ anon ]
EEF11000      4K read/write          [ anon ]
EEF89000      4K read/write          [ anon ]
EF001000      4K read/write          [ anon ]
EF060000     24K read/exec         /usr/lib/libpam.so.1
EF075000      4K read/write/exec   /usr/lib/libpam.so.1
(More information, not shown here)
EF7C0000      4K read/exec/shared  /usr/lib/libdl.so.1
EF7D0000    112K read/exec         /usr/lib/ld.so.1
EF7FB000      8K read/write/exec   /usr/lib/ld.so.1
EF7FD000      4K read/write/exec     [ anon ]
EFFF9000     28K read/write/exec     [ stack ]
 total     5480K
#
# /usr/proc/bin/psig 283
283:    /usr/dt/bin/dtlogin -daemon
HUP     ignored
INT     caught  RESETHAND,NODEFER
QUIT    ignored
ILL     default
TRAP    default
ABRT    default
EMT     default
FPE     default
KILL    default
BUS     default
SEGV    default
SYS     default
PIPE    ignored
ALRM    default
TERM    caught  RESETHAND,NODEFER
USR1    caught  RESETHAND,NODEFER
USR2    default
CLD     default NOCLDSTOP
PWR     default
WINCH   default
URG     default
POLL    default
STOP    default
TSTP    default
CONT    default
TTIN    ignored
TTOU    default
VTALRM  default
PROF    default
XCPU    ignored
XFSZ    ignored
WAITING default
LWP     default
FREEZE  default
THAW    default
CANCEL  default
LOST    default
RTMIN   default
RTMIN+1 default
RTMIN+2 default
RTMIN+3 default
RTMAX-3 default
RTMAX-2 default
RTMAX-1 default
RTMAX   default
#
# /usr/proc/bin/pstack 283
283:    /usr/dt/bin/dtlogin -daemon
 ef479154 wait     ()
 ef479154 _libc_wait (0, 3ec4c, 3b000, 12d, ef4e227c, 1e340) + 8
 0001e340 ManageSession (43000, 43000, 482f8, ef001230, 81010100, c) + 454
 00019348 StartDisplay (482f8, 3c954, 43000, 3b224, ef001240, ff00) + 7bc
 0001a324 ForEachDisplay (189a8, 0, 2400, 41800, 42e48, 17ca8) + 1c
 00017d54 main     (0, effffefc, efffff08, 3b000, 0, 0) + 228
 0001541c _start   (0, 0, 0, 0, 0, 0) + dc
#
# /usr/proc/bin/pwdx 283
283:    /
#
castle% /usr/proc/ptime 283
real        0.066
user        0.000
sys         0.032
castle%
castle% ptree 283
270   /usr/dt/bin/dtlogin -daemon
283   /usr/dt/bin/dtlogin -daemon
301   /bin/ksh /usr/dt/bin/Xsession
311   /usr/openwin/bin/fbconsole
346   /usr/dt/bin/sdt_shell -c unsetenv _ PWD;             unsetenv DT;
349   -csh -c unsetenv _ PWD;             unsetenv DT;      setenv DISP
366   /usr/dt/bin/dtsession
373   dtwm
374   dtterm -session dt0vPI0t -sdtserver
387   /bin/csh
407   ./textedit
528   sh
390   /bin/csh
393   /bin/csh
417   /usr/openwin/bin/cmdtool
420   /bin/csh
531   /bin/csh
553   ptree 283
375   dtfile -session dtbfiQD_
405   dtfile -session dtbfiQD_
376   snapshot -Wp 781 588 -Ws 326 201 -WP 6 6 +Wi -f snapshot.rs
castle%


Previous Table of Contents Next