wmshutdown: Destroy dialog window before shutting down. This is especially useful...
[dockapps.git] / wmhdplop / procstat.h
blobabce78fca86c2eece2eea003d287c0ec77bc0b7b
1 #ifndef PROCSTAT_H
2 #define PROCSTAT_H
3 #include "util.h"
5 struct pstat {
6 unsigned long total;
7 long nslice, cur_slice;
8 unsigned long *slices;
9 float update_interval;
12 typedef struct {
13 /* counted in sectors */
14 struct pstat swap_in, swap_out;
15 struct pstat disk_read, disk_write;
16 } ProcStats;
18 void pstat_init(struct pstat *pst, long nslice, float update_interval);
19 float pstat_current(struct pstat *pst);
20 void pstat_add(struct pstat *pst, unsigned long v);
21 void pstat_advance(struct pstat *pst);
22 float pstat_meanval(struct pstat *pst);
24 /* given in MB/s */
25 float get_read_throughput();
26 float get_write_throughput();
27 float get_swapin_throughput();
28 float get_swapout_throughput();
29 float get_read_mean_throughput();
30 float get_write_mean_throughput();
32 void update_stats();
33 void init_stats(float update_interval);
34 void scan_all_hd(int add_partitions);
35 #endif