Thursday, February 18, 2010

Solaris: How to know all the options of a command from process id

Question: How to find out, What all options or inputs were specified with a unix tool, from process id?

Ans: Solaris supports 'pargs', which, when, run with , will throw all the inputs specified with the command. Question is, why is 'ps -eaf' not sufficient. Answer lies in what 'ps -eaf' prints. 'ps -eaf' can print only limited number of outputs on one line, mostly, 80 char. What if, command + inputs were bigger/wider than 80 chars.

Also, 'pargs -e can also print the environment variable path.

No comments: