2

Possible Duplicate:
How can I get a full process list in solaris, without truncated lines?

The output of ps command only returns 80 bytes.

Below is the text from manual pages of Solaris ps command:

args  The command with all its arguments as  a  string.  The
      implementation  may  truncate  this value to the field
      width;  it  is  implementation-dependent  whether  any
      further  truncation  occurs. It is unspecified whether
      the string represented is a version  of  the  argument
      list  as it was passed to the command when it started,
      or is a version of the arguments as they may have been
      modified  by  the  application.   Applications  cannot
      depend on being able to modify their argument list and
      having that modification be reflected in the output of
      ps.  The Solaris implementation limits the  string  to
      80 bytes;  the  string is the version of the argument
      list as it was passed to the command when it started.

My requirement is to pull entire length of the string present in ps -o args in Solaris, but I am unable to get entire length as its getting truncated.

Please suggest me on how to extract entire length of process.

Avinash
  • 21
  • 1
  • It is possible. I have a class that fetches a process's arguments, and its unittests pass on Solaris 8-11 (SPARC,x86,x86_64). The Solaris implementation does require more annoying code than most other platforms, so I can see why ps doesn't bother. So, not extremely helpful, in that I've never used any utilities on Solaris (I just programme for it!). But, I can assure you it would be possible to write a simple utility that would do it. – Nicholas Wilson Nov 13 '12 at 12:04

0 Answers0