1 /* 2 * Copyright (c) 1999 Albert Dorofeev <Albert@mail.dma.be> 3 * For the updates see http://bewoner.dma.be/Albert/ 4 * 5 * This software is distributed under GPL. For details see LICENSE file. 6 */ 7 8 #ifndef _state_h_ 9 #define _state_h_ 10 11 /* file to read for stat info */ 12 #define PROC_MEM "/proc/meminfo" 13 14 /* The structure defines what memory information we use */ 15 struct meminfo { 16 unsigned long total; /* total memory available */ 17 unsigned long used; /* the total of used memory */ 18 unsigned long free; /* free memory */ 19 unsigned long shared; /* shared memory */ 20 unsigned long buffers; /* buffers memory */ 21 unsigned long cached; /* cached memory */ 22 unsigned long swap_total; /* total swap space */ 23 unsigned long swap_used; /* used swap space */ 24 unsigned long swap_free; /* free swap space */ 25 }; 26 27 struct asmem_state { 28 long int update_interval; /* interval (sec) to check the statistics */ 29 unsigned char standard_free; /* use free memory as is */ 30 unsigned char mb; /* display in MBytes */ 31 unsigned char show_used; /* show used instead of free */ 32 char proc_mem_filename[256]; /* the file to read for the memory info */ 33 char bgcolor[50]; 34 char fgcolor[50]; 35 char memory_color[50]; 36 char buffer_color[50]; 37 char cache_color[50]; 38 char swap_color[50]; 39 struct meminfo last; /* the old data */ 40 struct meminfo fresh; /* the new data */ 41 }; 42 43 #endif 44 45