1753481 Members
4081 Online
108794 Solutions
New Discussion юеВ

"ps -efx" answer length

 
Rodrigo Allende
New Member

"ps -efx" answer length

MACHINE: HP BL860c;
OS: HP-UX B.11.31;
PROBLEM: whenever I issue a "ps -efx|grep java" trying to find a process, I get an incomplete answer.

EX (I will short comm name for this example):
entire answer should be...
"bus 7580 1 0 Nov24 java -cp
/home/bus/ISM_PROD/iway55sm/lib/AbsoluteLayout.jar:/home/bus/ISM_PROD/iway55sm/lib/accessMio.jar:/home/bus/ISM_PROD/iway55sm/lib/activation.jar:/home/bus/ISM_PROD/iway55sm/lib/classes12.jar -DIWAY55=/home/bus/ISM_PROD/iway55sm com.ibi.service.edaqmSilentService -config base"

though I only see...
"bus 7580 1 0 Nov24 java -cp
/home/bus/ISM_PROD/iway55sm/lib/AbsoluteLayout.jar:/home/bus/ISM_PROD/iway55sm/lib/accessMio.jar:/home/bus/ISM_PRO"

I tried almost everything like ps command line options like -x or -o, even setting тАЬDEFAULT_CMD_LINE_WIDTH=2010тАЭ and тАЬPS_CMD_BASENAME=255тАЭ on /etc/default/ps, though nothing works.
Would anyone please help me with this?
Thanks a lot for any reply.
5 REPLIES 5
Steven Schweda
Honored Contributor

Re: "ps -efx" answer length

> I tried almost everything like ps command
> line options like -x or -o, even setting
> [...]

As usual, I'd rather see what's in the file
than what you say is in the file.

On my system, "man ps" says things like:

[...]
The default length of the COMMAND field is 128 (including the null
terminator). This can be configured by setting
DEFAULT_CMD_LINE_WIDTH=value in the /etc/default/ps file. The value
of DEFAULT_CMD_LINE_WIDTH should be between 64 and 1020. However,
when the comm column is displayed, by default, the length of the
COMMAND field will be 14 characters. If the environment variable
PS_CMD_BASENAME is defined, then the length of the COMMAND field will
be between 64 and 255 characters.
[...]

> [...] "DEFAULT_CMD_LINE_WIDTH=2010" [...]

"2010" does not seem to me to be "between 64
and 1020."
Rodrigo Allende
New Member

Re: "ps -efx" answer length

Dear Steve.
Actually "2010" was a typo, I actually meant "1020":
"DEFAULT_CMD_LINE_WIDTH=1020".

Would you have any suggestion?
Thanks and regards.
Dennis Handly
Acclaimed Contributor

Re: "ps -efx" answer length

I have no problems getting about 1020 chars with ps -x.

Re: "ps -efx" answer length

Hi,

perhaps your terminal-emulator has auto wrap off?

Regards,
Roland
Mike Miller_8
Regular Advisor

Re: "ps -efx" answer length

Try dumping the output to a file.