HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

"ps -efx" answer length

 
Rodrigo Allende
Occasional Visitor

"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
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
Occasional Visitor

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.

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.