The pargs command and the preap command improve process debugging. The pargs command prints the arguments and environment variables that are associated with a live process or core file. The preap command removes defunct (zombie) processes. A zombie process has not yet had its exit status claimed by its parent. These processes are generally harmless but can consume system resources if they are numerous. You can use the pargs and preap commands to examine any process that you have the privileges to examine. When you become an administrator, you can examine any process.Example 9 Debugging a Process (pargs)
The pargs command is unable to display all the arguments that are passed to a process with the ps command. The following example shows how to use the pargs command in combination with the pgrep command to display all the arguments that are passed to a process.
# 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
The following example shows how to use the pargs –e command to display the environment variables that are associated with a process.
$ pargs -e 6763 6763: tcsh envp: DISPLAY=:0.0