procps/proc/sysinfo.h

95 lines
3.1 KiB
C
Raw Normal View History

2002-12-09 07:00:07 +00:00
#ifndef PROC_SYSINFO_H
#define PROC_SYSINFO_H
2003-05-31 00:38:55 +00:00
#include <sys/types.h>
#include <sys/dir.h>
2002-11-25 10:16:33 +00:00
#include "procps.h"
2002-12-09 07:00:07 +00:00
EXTERN_C_BEGIN
2002-05-28 04:18:55 +00:00
extern unsigned long long Hertz; /* clock tick frequency */
2002-02-01 22:47:29 +00:00
extern long smp_num_cpus; /* number of CPUs */
#define JT double
2002-10-09 07:11:08 +00:00
extern void five_cpu_numbers(JT *uret, JT *nret, JT *sret, JT *iret, JT *wret);
2002-02-01 22:47:29 +00:00
#undef JT
extern int uptime (double *uptime_secs, double *idle_secs);
extern void loadavg(double *av1, double *av5, double *av15);
/* obsolete */
2003-01-23 05:48:27 +00:00
extern unsigned long kb_main_shared;
2002-02-01 22:47:29 +00:00
/* old but still kicking -- the important stuff */
2003-01-23 05:48:27 +00:00
extern unsigned long kb_main_buffers;
extern unsigned long kb_main_cached;
extern unsigned long kb_main_free;
extern unsigned long kb_main_total;
extern unsigned long kb_swap_free;
extern unsigned long kb_swap_total;
2002-02-01 22:47:29 +00:00
/* recently introduced */
2003-01-23 05:48:27 +00:00
extern unsigned long kb_high_free;
extern unsigned long kb_high_total;
extern unsigned long kb_low_free;
extern unsigned long kb_low_total;
2002-02-01 22:47:29 +00:00
/* 2.4.xx era */
2003-01-23 05:48:27 +00:00
extern unsigned long kb_active;
extern unsigned long kb_inact_laundry; // grrr...
extern unsigned long kb_inact_dirty;
extern unsigned long kb_inact_clean;
extern unsigned long kb_inact_target;
extern unsigned long kb_swap_cached; /* late 2.4+ */
2002-02-01 22:47:29 +00:00
/* derived values */
2003-01-23 05:48:27 +00:00
extern unsigned long kb_swap_used;
extern unsigned long kb_main_used;
2002-10-06 16:46:06 +00:00
/* 2.5.41+ */
2003-01-23 05:48:27 +00:00
extern unsigned long kb_writeback;
extern unsigned long kb_slab;
extern unsigned long nr_reversemaps;
extern unsigned long kb_committed_as;
extern unsigned long kb_dirty;
extern unsigned long kb_inactive;
extern unsigned long kb_mapped;
extern unsigned long kb_pagetables;
2002-02-01 22:47:29 +00:00
2003-05-31 00:38:55 +00:00
#define BUFFSIZE 8192
typedef unsigned long long jiff;
extern void crash(const char *filename);
extern void getrunners(unsigned int *restrict running, unsigned int *restrict blocked);
extern void getstat(jiff *restrict cuse, jiff *restrict cice, jiff *restrict csys, jiff *restrict cide, jiff *restrict ciow,
unsigned long *restrict pin, unsigned long *restrict pout, unsigned long *restrict s_in, unsigned long *restrict sout,
unsigned *restrict intr, unsigned *restrict ctxt,
unsigned int *restrict running, unsigned int *restrict blocked,
unsigned int *restrict btime, unsigned int *restrict processes);
2002-02-01 22:47:29 +00:00
extern void meminfo(void);
2002-10-06 16:46:06 +00:00
2003-01-23 05:48:27 +00:00
extern unsigned long vm_nr_dirty;
extern unsigned long vm_nr_writeback;
extern unsigned long vm_nr_pagecache;
extern unsigned long vm_nr_page_table_pages;
extern unsigned long vm_nr_reverse_maps;
extern unsigned long vm_nr_mapped;
extern unsigned long vm_nr_slab;
extern unsigned long vm_pgpgin;
extern unsigned long vm_pgpgout;
extern unsigned long vm_pswpin;
extern unsigned long vm_pswpout;
extern unsigned long vm_pgalloc;
extern unsigned long vm_pgfree;
extern unsigned long vm_pgactivate;
extern unsigned long vm_pgdeactivate;
extern unsigned long vm_pgfault;
extern unsigned long vm_pgmajfault;
extern unsigned long vm_pgscan;
extern unsigned long vm_pgrefill;
extern unsigned long vm_pgsteal;
extern unsigned long vm_kswapd_steal;
extern unsigned long vm_pageoutrun;
extern unsigned long vm_allocstall;
2002-10-06 16:46:06 +00:00
extern void vminfo(void);
2002-12-09 07:00:07 +00:00
EXTERN_C_END
2002-02-01 22:47:29 +00:00
#endif /* SYSINFO_H */