version 1.127, 2013/11/26 21:08:12 |
version 1.128, 2014/04/08 14:04:11 |
|
|
#include <sys/sysctl.h> |
#include <sys/sysctl.h> |
#include <sys/device.h> |
#include <sys/device.h> |
#include <sys/pool.h> |
#include <sys/pool.h> |
|
#include <sys/vmmeter.h> |
|
|
#include <time.h> |
#include <time.h> |
#include <nlist.h> |
#include <nlist.h> |
#include <kvm.h> |
#include <kvm.h> |
|
|
#define rate(x) ((unsigned)((((unsigned)x) + halfuptime) / uptime)) /* round */ |
#define rate(x) ((unsigned)((((unsigned)x) + halfuptime) / uptime)) /* round */ |
#define pgtok(a) ((a) * ((unsigned int)uvmexp.pagesize >> 10)) |
#define pgtok(a) ((a) * ((unsigned int)uvmexp.pagesize >> 10)) |
(void)printf("%6u %7u ", |
(void)printf("%6u %7u ", |
pgtok(total.t_avm), pgtok(total.t_free)); |
pgtok(uvmexp.active + uvmexp.swpginuse), |
|
pgtok(uvmexp.free)); |
(void)printf("%4u ", rate(uvmexp.faults - ouvmexp.faults)); |
(void)printf("%4u ", rate(uvmexp.faults - ouvmexp.faults)); |
(void)printf("%3u ", rate(uvmexp.pdreact - ouvmexp.pdreact)); |
(void)printf("%3u ", rate(uvmexp.pdreact - ouvmexp.pdreact)); |
(void)printf("%3u ", rate(uvmexp.pageins - ouvmexp.pageins)); |
(void)printf("%3u ", rate(uvmexp.pageins - ouvmexp.pageins)); |