aboutsummaryrefslogtreecommitdiff
path: root/bin/ps/ps.h
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2000-12-12 07:25:57 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2000-12-12 07:25:57 +0000
commit1f7d2501824fda6eed4bd2c81b4af3ee052c451a (patch)
tree9528cf76d335e8620128d2a3189901201cd0f526 /bin/ps/ps.h
parent522b7bcdf6043639be8497bc5ef732d769eff83a (diff)
downloadsrc-1f7d2501824fda6eed4bd2c81b4af3ee052c451a.tar.gz
src-1f7d2501824fda6eed4bd2c81b4af3ee052c451a.zip
Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather only scalar values and structures that are already part of the kernel/user interface, specifically rusage and rtprio. It no longer contains proc, session, pcred, ucred, procsig, vmspace, pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If any of these changed in size, ps, w, fstat, gcore, systat, and top would all stop working. The new structure has over 200 bytes of unassigned space for future values to be added, yet is nearly 100 bytes smaller per entry than the structure that it replaced.
Notes
Notes: svn path=/head/; revision=69896
Diffstat (limited to 'bin/ps/ps.h')
-rw-r--r--bin/ps/ps.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/bin/ps/ps.h b/bin/ps/ps.h
index f8d244c83e53..c7769eb14f7e 100644
--- a/bin/ps/ps.h
+++ b/bin/ps/ps.h
@@ -37,22 +37,11 @@
#define UNLIMITED 0 /* unlimited terminal width */
enum type { CHAR, UCHAR, SHORT, USHORT, INT, UINT, LONG, ULONG, KPTR };
-struct usave {
- struct timeval u_start;
- struct rusage u_ru;
- struct rusage u_cru;
- char u_acflag;
- char u_valid;
-};
-
-#define KI_PROC(ki) (&(ki)->ki_p->kp_proc)
-#define KI_EPROC(ki) (&(ki)->ki_p->kp_eproc)
-
typedef struct kinfo {
- struct kinfo_proc *ki_p; /* proc structure */
- struct usave ki_u; /* interesting parts of user */
+ struct kinfo_proc *ki_p; /* kinfo_proc structure */
char *ki_args; /* exec args */
char *ki_env; /* environment */
+ int ki_valid; /* 1 => uarea stuff valid */
} KINFO;
/* Variables. */
@@ -77,8 +66,8 @@ typedef struct var {
short width; /* printing width */
/*
* The following (optional) elements are hooks for passing information
- * to the generic output routines: pvar, evar, uvar (those which print
- * simple elements from well known structures: proc, eproc, usave)
+ * to the generic output routine pvar (which prints simple elements
+ * from the well known kinfo_proc structure).
*/
int off; /* offset in structure */
enum type type; /* type of element */