fname on HPUX should use pst_ucomm instead of pst_cmd
Status: Beta
Brought to you by:
durist
On HPUX the fname returns method returns the complete
command line which is not really what is expected of an
fname field.
It should return the basename of the executable that
the process is currently running. E.g. "automount"
rather than "/usr/bin/automount /opt/net yp auto.net
-rw,har,intr".
This is easily fixed by changing the second occurence
of pst_cmd in HPUX.c to pst_ucomm instead.
The "pst_ucomm" field in the __pst_status structure
(/usr/include/sys/pstat/pm_pstat_body.h) on HPUX is the
proper equivalent of e.g. the "comm" field in a
task_struct (/usr/src/linux-2.4/include/linux/sched.h)
on Linux.
Logged In: YES
user_id=1426406
Patch attached.
Patch fixing fname() to use pst_ucomm on HPUX