plong

Unnamed repository; edit this file 'description' to name the repository.
git clone https://git.inz.fi/plong
Log | Files | Refs

mem.h (411B)


      1 #ifndef PLONG_MEM_H
      2 #define PLONG_MEM_H
      3 
      4 #include <stdint.h>
      5 #include "json.h"
      6 
      7 #define MEM_FIELDS(x) \
      8 	x(MemTotal, total) \
      9 	x(MemFree, free) \
     10 	x(MemAvailable, available) \
     11 	x(Buffers, buffers) \
     12 	x(Cached, cached) \
     13 	x(SwapCached, swapcached) \
     14 	x(SwapTotal, swaptotal) \
     15 	x(SwapFree, swapfree)
     16 
     17 struct mem {
     18 	int dummy;
     19 };
     20 
     21 int mem_init(struct mem *c);
     22 int mem_poll(struct mem *c, struct json *j);
     23 
     24 #endif