diff options
Diffstat (limited to 'usr.bin/procstat/procstat_bin.c')
-rw-r--r-- | usr.bin/procstat/procstat_bin.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/procstat/procstat_bin.c b/usr.bin/procstat/procstat_bin.c index a6757eb..178d0a4 100644 --- a/usr.bin/procstat/procstat_bin.c +++ b/usr.bin/procstat/procstat_bin.c @@ -28,6 +28,7 @@ #include <sys/types.h> #include <sys/sysctl.h> +#include <sys/user.h> #include <err.h> #include <errno.h> @@ -45,7 +46,7 @@ procstat_bin(pid_t pid, struct kinfo_proc *kipp) size_t len; if (!hflag) - printf("%5s %-70s\n", "PID", "PATH"); + printf("%5s %-16s %-53s\n", "PID", "COMM", "PATH"); name[0] = CTL_KERN; name[1] = KERN_PROC; @@ -64,5 +65,6 @@ procstat_bin(pid_t pid, struct kinfo_proc *kipp) strcpy(pathname, "-"); printf("%5d ", pid); + printf("%-16s ", kipp->ki_comm); printf("%s\n", pathname); } |