2017-07-06 13:51:24 +02:00
|
|
|
typedef struct DriveStats DriveStats;
|
2017-10-05 16:20:47 +02:00
|
|
|
typedef struct CPUStats CPUStats;
|
2017-07-06 13:51:24 +02:00
|
|
|
|
|
|
|
enum {
|
|
|
|
NDRIVE = 16,
|
|
|
|
NAMELEN = 31
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DriveStats {
|
|
|
|
char name[NAMELEN+1];
|
|
|
|
int64_t size;
|
|
|
|
int64_t blocksize;
|
|
|
|
|
|
|
|
int64_t read;
|
|
|
|
int64_t written;
|
|
|
|
int64_t nread;
|
|
|
|
int64_t nwrite;
|
|
|
|
int64_t readtime;
|
|
|
|
int64_t writetime;
|
|
|
|
int64_t readlat;
|
|
|
|
int64_t writelat;
|
|
|
|
};
|
|
|
|
|
2017-10-05 16:20:47 +02:00
|
|
|
struct CPUStats {
|
|
|
|
natural_t user;
|
|
|
|
natural_t nice;
|
|
|
|
natural_t sys;
|
|
|
|
natural_t idle;
|
|
|
|
};
|
|
|
|
|
2017-07-06 13:51:24 +02:00
|
|
|
extern int readdrivestat(DriveStats a[], int n);
|
2017-10-05 16:20:47 +02:00
|
|
|
extern int readcpustat(CPUStats *cpu);
|