I want to build some monitoring of processes in HP-UX 11.x.
Is there any way to get the whole set of commands and arguments instead of the first 60 characters? I read that there's a limitation of the ps -ef command that we can't overcome. In this case is there any other command that I can use?
My need is so basic I can't believe there's no way to get that information
You read correctly. The HP-UX kernel does not save the entire argument list for later inspection. No tool can be built to get back more than the kernel saved.
NAME
ps - report process status
SYNOPSIS
ps [-adeflP] [-g grplist] [-p proclist] [-R prmgrplist] [-t termlist]
[-u uidlist]
XPG4 Synopsis
ps [-aAcdefHjlP] [-C cmdlist] [-g grplist] [-G gidlist] [-n namelist]
[-o format] [-p proclist] [-R prmgrplist] [-s sidlist] [-t termlist]
[-u uidlist] [-U uidlist]
and later...
args The command line given when the process was
created. This column should be the last one
specified, if it is desired. Only a subset of the
command line is saved by the kernel; as much of
the command line will be displayed as is
available. The output in this column may contain
spaces. The default heading for this column is
COMMAND if -o is specified and CMD otherwise.
nhatch, run the "uname -a" command and post the results.
It looks like nhatch does have a valid point here. Upgrading to HP-UX 11.11 (aka HP-UX 11i) may be an option.
We have some 11i systems and sure enough, on them the ps command does have that -x option. The language about kernel limitations is still present, but that limit has been raised quite a bit. Instead of 64 characters, it now seems to be 1015 characters.
I had not noticed this about 11i before. Thanks nhatch!