Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

getting process command lines: /usr/bin/ps, usr/ucb/ps, and pargs all have issues

3514554Jul 31 2017

Our software has to run a wide range of customer systems mostly 10 and 11, and they are not always up-to-date with patches.  We run the commands as root to  access all processes, and so don't get line truncation.

1) /usr/ucb/ps problems:  deprecated, and many customers unwilling to install ucb package mainly due to security concerns.

2) /usr/bin/ps problems:  truncates at 80 unless Solaris 11+ AND use the "no dash" arg format: ex: ps awwx.  QUESTION: I can't find any official documentation on "no dash" mode -- anyone know of any? I did find a couple of non-Oracle blog posts on it.

3) pargs problems:  Some processes cause it to mess up such as sendmail.  Or is a process uses "--" arguments, pargs often can't read the args.    QUESTION:  I can't seem to find any documentation of these bugs, or if they are fixed in later versions -- anyone know of any?

* v11.0 example using "--" with process args:  "/usr/lib/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1"

  $ sudo pargs -l 1001

  pargs: target has corrupted argument list

...or  without -l, it still can't get args

  1001:   /usr/lib/gdm-simple-slave --display-id /org/gnome/DisplayManager/Display1

  argv[0]: /usr/lib/gdm-simple-slave

  argv[1]: <NULL>

  argv[2]: <NULL>

* v1.0 example with process: "/usr/lib/sendmail -Ac -q15m"

  $ sudo pargs -l 1149

  pargs: target has corrupted argument list

...or  without -l:

  $ sudo pargs 1149

  1149:   /usr/lib/sendmail -Ac -q15m

  argv[0]: sendmail: Queue runner@00:15:00 for /var/spool/clientmqueue                                                                                                                                                                                                                                                                                         

  argv[1]: <NULL>

  argv[2]: @00:15:00 for /var/spool/clientmqueue   

thanks, Jim

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 28 2017
Added on Jul 31 2017
0 comments
670 views