Menu

#18 fname on HPUX should use pst_ucomm instead of pst_cmd

open
nobody
None
5
2006-01-13
2006-01-13
No

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.

Discussion

  • Lasse Makholm

    Lasse Makholm - 2006-01-13

    Logged In: YES
    user_id=1426406

    Patch attached.

     
  • Lasse Makholm

    Lasse Makholm - 2006-01-13

    Patch fixing fname() to use pst_ucomm on HPUX

     

Log in to post a comment.

MongoDB Logo MongoDB