The pargs command enables you to display all the arguments that are passed to a process. Use the pargs command in combination with the pgrep command to display the arguments that are passed to a process, as follows:
# pargs `pgrep ttymon` 579: /usr/lib/saf/ttymon -g -h -p system-name console login: -T sun -d /dev/console -l argv: /usr/lib/saf/ttymon argv: -g argv: -h argv: -p argv: system-name console login: argv: -T argv: sun argv: -d argv: /dev/console argv: -l argv: console argv: -m argv: ldterm,ttcompat 548: /usr/lib/saf/ttymon argv: /usr/lib/saf/ttymon
Use pargs -e to display the environment variables that are associated with a process, as in the following example:
$ pargs -e 6763 6763: tcsh envp: DISPLAY=:0.0
You can use the pargs and preap commands to examine any process you have privileges to look at. As superuser, you can examine any process.
You can use the preap command to clean up a defunct (also called a zombie) process. A zombie process is one that has not yet had its exit status reaped (or claimed) by its parent. These processes are generally harmless, but they can consume system resources if they are numerous.