2002-12-09 12:30:07 +05:30
|
|
|
#ifndef PROC_SYSINFO_H
|
|
|
|
#define PROC_SYSINFO_H
|
2003-05-31 06:08:55 +05:30
|
|
|
#include <sys/types.h>
|
2014-07-06 19:51:01 +05:30
|
|
|
#include <dirent.h>
|
2015-06-20 03:13:02 +05:30
|
|
|
#include <proc/procps.h>
|
2002-11-25 15:46:33 +05:30
|
|
|
|
2015-06-20 03:13:02 +05:30
|
|
|
__BEGIN_DECLS
|
2002-12-09 12:30:07 +05:30
|
|
|
|
2011-07-14 16:46:02 +05:30
|
|
|
extern int have_privs; /* boolean, true if setuid or similar */
|
2002-02-02 04:17:29 +05:30
|
|
|
|
2015-06-29 18:01:36 +05:30
|
|
|
long procps_cpu_count(void);
|
2015-07-01 17:38:02 +05:30
|
|
|
long procps_hertz_get(void);
|
|
|
|
int procps_loadavg(double *av1, double *av5, double *av15);
|
|
|
|
long procps_pagesize_get(void);
|
2002-02-02 04:17:29 +05:30
|
|
|
|
2005-10-30 05:44:16 +05:30
|
|
|
#define BUFFSIZE (64*1024)
|
2003-05-31 06:08:55 +05:30
|
|
|
typedef unsigned long long jiff;
|
2002-10-06 22:16:06 +05:30
|
|
|
|
2003-06-08 22:58:06 +05:30
|
|
|
typedef struct disk_stat{
|
|
|
|
unsigned long long reads_sectors;
|
|
|
|
unsigned long long written_sectors;
|
2003-08-11 07:29:53 +05:30
|
|
|
char disk_name [16];
|
2003-06-08 22:58:06 +05:30
|
|
|
unsigned inprogress_IO;
|
2003-08-11 07:29:53 +05:30
|
|
|
unsigned merged_reads;
|
|
|
|
unsigned merged_writes;
|
|
|
|
unsigned milli_reading;
|
2003-06-08 22:58:06 +05:30
|
|
|
unsigned milli_spent_IO;
|
2003-08-11 07:29:53 +05:30
|
|
|
unsigned milli_writing;
|
2003-08-11 05:10:41 +05:30
|
|
|
unsigned partitions;
|
2003-08-11 07:29:53 +05:30
|
|
|
unsigned reads;
|
|
|
|
unsigned weighted_milli_spent_IO;
|
|
|
|
unsigned writes;
|
2003-06-08 22:58:06 +05:30
|
|
|
}disk_stat;
|
|
|
|
|
|
|
|
typedef struct partition_stat{
|
|
|
|
char partition_name [16];
|
2004-02-24 01:01:00 +05:30
|
|
|
unsigned long long reads_sectors;
|
2004-05-05 04:59:40 +05:30
|
|
|
unsigned parent_disk; // index into a struct disk_stat array
|
2003-06-08 22:58:06 +05:30
|
|
|
unsigned reads;
|
|
|
|
unsigned writes;
|
2011-11-27 17:17:17 +05:30
|
|
|
unsigned long long requested_writes;
|
2003-06-08 22:58:06 +05:30
|
|
|
}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**);
|
|
|
|
|
2003-07-03 10:50:19 +05:30
|
|
|
extern unsigned get_pid_digits(void) FUNCTION;
|
|
|
|
|
2015-06-20 03:13:02 +05:30
|
|
|
__END_DECLS
|
2002-02-02 04:17:29 +05:30
|
|
|
#endif /* SYSINFO_H */
|