diff options
author | jhb <jhb@FreeBSD.org> | 2006-08-01 15:29:46 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-08-01 15:29:46 +0000 |
commit | 2c6524682bca711c5d252fea1d35c6718517ea9f (patch) | |
tree | 96a1f91a7d85cffabdbe683d469ff3b086527916 /sys/ddb | |
parent | 78fb4ee49d3e7340d6ed6d58e5f4c935a1ec11a8 (diff) | |
download | FreeBSD-src-2c6524682bca711c5d252fea1d35c6718517ea9f.zip FreeBSD-src-2c6524682bca711c5d252fea1d35c6718517ea9f.tar.gz |
Some cosmetic tweaks:
- Right justify 'pid' label.
- Move the uid column to the right 2 columns so that the 3 process id
columns (pid, ppid, pgrp) are grouped together.
- Expand the uid column to 5 chars.
- Don't indent the tid for multithreaded processes.
Requested by: bde (1, 2, 4)
Diffstat (limited to 'sys/ddb')
-rw-r--r-- | sys/ddb/db_ps.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/ddb/db_ps.c b/sys/ddb/db_ps.c index f220de0..b7755c7 100644 --- a/sys/ddb/db_ps.c +++ b/sys/ddb/db_ps.c @@ -57,10 +57,10 @@ static void dumpthread(volatile struct proc *p, volatile struct thread *td, * * 1 2 3 4 5 6 7 * 1234567890123456789012345678901234567890123456789012345678901234567890 - * pid uid ppid pgrp state wmesg wchan cmd - * <pid> <ui> <ppi> <pgi> <stat> < wmesg > < wchan > <name> - * <pid> <ui> <ppi> <pgi> <stat> (threaded) <command> - * <tid > <stat> < wmesg > < wchan > <name> + * pid ppid pgrp uid state wmesg wchan cmd + * <pid> <ppi> <pgi> <uid> <stat> < wmesg > < wchan > <name> + * <pid> <ppi> <pgi> <uid> <stat> (threaded) <command> + * <tid > <stat> < wmesg > < wchan > <name> * * For machines with 64-bit pointers, we expand the wchan field 8 more * characters. @@ -83,9 +83,9 @@ db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif) p = &proc0; #ifdef __LP64__ - db_printf(" pid uid ppid pgrp state wmesg wchan cmd\n"); + db_printf(" pid ppid pgrp uid state wmesg wchan cmd\n"); #else - db_printf(" pid uid ppid pgrp state wmesg wchan cmd\n"); + db_printf(" pid ppid pgrp uid state wmesg wchan cmd\n"); #endif while (--np >= 0 && !db_pager_quit) { if (p == NULL) { @@ -98,9 +98,9 @@ db_ps(db_expr_t addr, boolean_t hasaddr, db_expr_t count, char *modif) cred = p->p_ucred; pgrp = p->p_pgrp; - db_printf("%5d %4d %5d %5d ", p->p_pid, - cred != NULL ? cred->cr_ruid : 0, pp->p_pid, - pgrp != NULL ? pgrp->pg_id : 0); + db_printf("%5d %5d %5d %5d ", p->p_pid, pp->p_pid, + pgrp != NULL ? pgrp->pg_id : 0, + cred != NULL ? cred->cr_ruid : 0); /* Determine our primary process state. */ switch (p->p_state) { @@ -207,7 +207,7 @@ dumpthread(volatile struct proc *p, volatile struct thread *td, int all) void *wchan; if (all) { - db_printf(" %9d ", td->td_tid); + db_printf("%6d ", td->td_tid); switch (td->td_state) { case TDS_RUNNING: snprintf(state, sizeof(state), "Run"); |