procps/proc/sysinfo.h
Craig Small 62f9a51532 library: remove procps_pagesize_get()
This is actually a systemcall getpagesize(2) or it is defined
in configure using a variety of methods, including a default
hard coded value as a last resort.

There is no need to have this in libprocps
2015-07-02 20:54:11 +10:00

59 lines
1.5 KiB
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 disk_stat{
unsigned long long reads_sectors;
unsigned long long written_sectors;
char disk_name [16];
unsigned inprogress_IO;
unsigned merged_reads;
unsigned merged_writes;
unsigned milli_reading;
unsigned milli_spent_IO;
unsigned milli_writing;
unsigned partitions;
unsigned reads;
unsigned weighted_milli_spent_IO;
unsigned writes;
}disk_stat;
typedef struct partition_stat{
char partition_name [16];
unsigned long long reads_sectors;
unsigned parent_disk; // index into a struct disk_stat array
unsigned reads;
unsigned writes;
unsigned long long requested_writes;
}partition_stat;
extern unsigned int getdiskstat (struct disk_stat**,struct partition_stat**);
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 */