e445f7e6c5
The calls for reading diskstat have been moved out of sysinfo and into new files diskstat.[ch] These new library calls follow the standard pattern for the new libprocps. vmstat is updated to use the new API and also got the weighted IO time added. vmstat -p previously would only show partitions, not disks. There does not appear to be any good reason to artifically deny a user to use this command on a disk, rather than a partition so this restriction was lifted. I also realised using int for devid means you can send the library negative numbers, the index uses unsigned int. Other similiar calls will need to be fixed too. Signed-off-by: Craig Small <csmall@enc.com.au>
32 lines
667 B
C
32 lines
667 B
C
#ifndef PROC_SYSINFO_H
|
|
#define PROC_SYSINFO_H
|
|
#include <sys/types.h>
|
|
#include <dirent.h>
|
|
#include <proc/procps.h>
|
|
|
|
__BEGIN_DECLS
|
|
|
|
extern int have_privs; /* boolean, true if setuid or similar */
|
|
|
|
long procps_cpu_count(void);
|
|
long procps_hertz_get(void);
|
|
int procps_loadavg(double *av1, double *av5, double *av15);
|
|
|
|
#define BUFFSIZE (64*1024)
|
|
typedef unsigned long long jiff;
|
|
|
|
typedef struct slab_cache{
|
|
char name[48];
|
|
unsigned active_objs;
|
|
unsigned num_objs;
|
|
unsigned objsize;
|
|
unsigned objperslab;
|
|
}slab_cache;
|
|
|
|
extern unsigned int getslabinfo (struct slab_cache**);
|
|
|
|
extern unsigned get_pid_digits(void) FUNCTION;
|
|
|
|
__END_DECLS
|
|
#endif /* SYSINFO_H */
|