version 1.24, 2001/06/03 06:46:47 |
version 1.25, 2001/07/12 05:17:26 |
|
|
#include <err.h> |
#include <err.h> |
#endif |
#endif |
|
|
static int getkval __P((unsigned long, int *, int, char *)); |
|
static int swapmode __P((int *, int *)); |
static int swapmode __P((int *, int *)); |
|
|
#include "top.h" |
#include "top.h" |
|
|
|
|
static int stathz; |
static int stathz; |
|
|
/* these are offsets obtained via nlist and used in the get_ functions */ |
|
|
|
static unsigned long cp_time_offset; |
|
|
|
/* these are for calculating cpu state percentages */ |
/* these are for calculating cpu state percentages */ |
static long cp_time[CPUSTATES]; |
static long cp_time[CPUSTATES]; |
static long cp_old[CPUSTATES]; |
static long cp_old[CPUSTATES]; |
|
|
machine_init(statics) |
machine_init(statics) |
struct statics *statics; |
struct statics *statics; |
{ |
{ |
char errbuf[_POSIX2_LINE_MAX]; |
int pagesize; |
int pagesize, i = 0; |
|
|
|
stathz = getstathz(); |
stathz = getstathz(); |
if (stathz == -1) |
if (stathz == -1) |