diff options
| author | Bruce Evans <bde@FreeBSD.org> | 1998-11-26 12:59:21 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 1998-11-26 12:59:21 +0000 |
| commit | c13e5fb79919693cb117f7841a22a3c4f3459d0e (patch) | |
| tree | 787fce9d70ab1e5ab60610f019ac88ac4d837104 /usr.bin/top | |
| parent | 698b4def3f559aae45195e06ced20aee40cea238 (diff) | |
Notes
Diffstat (limited to 'usr.bin/top')
| -rw-r--r-- | usr.bin/top/machine.c | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index fad6d7c52d44..116399b4067a 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -19,7 +19,7 @@ * Steven Wallace <swallace@freebsd.org> * Wolfram Schneider <wosch@FreeBSD.org> * - * $Id: machine.c,v 1.15 1998/09/11 14:38:12 dt Exp $ + * $Id: machine.c,v 1.16 1998/11/25 09:45:28 dfr Exp $ */ @@ -87,37 +87,32 @@ struct handle /* definitions for indices in the nlist array */ - static struct nlist nlst[] = { #define X_CCPU 0 - { "_ccpu" }, /* 0 */ + { "_ccpu" }, #define X_CP_TIME 1 - { "_cp_time" }, /* 1 */ -#define X_HZ 2 - { "_hz" }, /* 2 */ -#define X_STATHZ 3 - { "_stathz" }, /* 3 */ -#define X_AVENRUN 4 - { "_averunnable" }, /* 4 */ + { "_cp_time" }, +#define X_AVENRUN 2 + { "_averunnable" }, /* Swap */ -#define VM_SWAPLIST 5 +#define VM_SWAPLIST 3 { "_swaplist" },/* list of free swap areas */ -#define VM_SWDEVT 6 +#define VM_SWDEVT 4 { "_swdevt" }, /* list of swap devices and sizes */ -#define VM_NSWAP 7 +#define VM_NSWAP 5 { "_nswap" }, /* size of largest swap device */ -#define VM_NSWDEV 8 +#define VM_NSWDEV 6 { "_nswdev" }, /* number of swap devices */ -#define VM_DMMAX 9 +#define VM_DMMAX 7 { "_dmmax" }, /* maximum size of a swap block */ -#define X_BUFSPACE 10 +#define X_BUFSPACE 8 { "_bufspace" }, /* K in buffer cache */ -#define X_CNT 11 +#define X_CNT 9 { "_cnt" }, /* struct vmmeter cnt */ /* Last pid */ -#define X_LASTPID 12 +#define X_LASTPID 10 { "_nextpid" }, { 0 } }; @@ -158,7 +153,6 @@ static double logcpu; /* these are retrieved from the kernel in _init */ -static long hz; static load_avg ccpu; /* these are offsets obtained via nlist and used in the get_ functions */ @@ -279,13 +273,6 @@ struct statics *statics; return(-1); } - /* get the symbol values out of kmem */ - (void) getkval(nlst[X_STATHZ].n_value, (int *)(&hz), sizeof(hz), "!"); - if (!hz) { - (void) getkval(nlst[X_HZ].n_value, (int *)(&hz), sizeof(hz), - nlst[X_HZ].n_name); - } - (void) getkval(nlst[X_CCPU].n_value, (int *)(&ccpu), sizeof(ccpu), nlst[X_CCPU].n_name); |
