Not with a single command that I'm aware of.
Solaris ps
gets process data for such things as command-line arguments from the /proc/[PID]/psinfo
file, which contains data that fills a struct psinfo
per /usr/include/sys/procfs.h
:
#define PRARGSZ 80 /* number of chars of arguments */
typedef struct psinfo {
int pr_flag; /* process flags (DEPRECATED; do not use) */
int pr_nlwp; /* number of active lwps in the process */
.
.
.
char pr_fname[PRFNSZ]; /* name of execed file */
char pr_psargs[PRARGSZ]; /* initial characters of arg list */
...
So you can't get the entire set of command line arguments from /usr/bin/ps
. You could use /usr/ucb/ps ...
as you've already noted and format your output using awk
or similar. There's also pargs
, which can be used to emit command-line arguments. (The installed location of pargs
varies depending on Solaris version.)
Be aware, though, that a process can modify its arguments, and to get the full argument information requires permission to read the process address space.
ps whatever |cat
. – dave_thompson_085 Jun 21 '15 at 12:01