File: state.h

package info (click to toggle)
asmem 1.9-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 308 kB
  • ctags: 135
  • sloc: ansic: 1,416; sh: 183; makefile: 51
file content (44 lines) | stat: -rw-r--r-- 1,354 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
 * Copyright (c) 1999  Albert Dorofeev <Albert@mail.dma.be>
 * For the updates see http://bewoner.dma.be/Albert/
 *
 * This software is distributed under GPL. For details see LICENSE file.
 */

#ifndef _state_h_
#define _state_h_

/* file to read for stat info */
#define PROC_MEM "/proc/meminfo"

/* The structure defines what memory information we use */
struct meminfo {
	unsigned long total;	/* total memory available */
	unsigned long used;	/* the total of used memory */
	unsigned long free;	/* free memory */
	unsigned long shared;	/* shared memory */
	unsigned long buffers;	/* buffers memory */
	unsigned long cached;	/* cached memory */
	unsigned long swap_total;	/* total swap space */
	unsigned long swap_used;	/* used swap space */
	unsigned long swap_free;	/* free swap space */
};

struct asmem_state {
	long int update_interval; /* interval (sec) to check the statistics */
	unsigned char standard_free;	/* use free memory as is */
	unsigned char mb; 		/* display in MBytes */
	unsigned char show_used; 	/* show used instead of free */
	char proc_mem_filename[256]; /* the file to read for the memory info */
	char bgcolor[50];
	char fgcolor[50];
	char memory_color[50];
	char buffer_color[50];
	char cache_color[50];
	char swap_color[50];
	struct meminfo last;	/* the old data */
	struct meminfo fresh;	/* the new data */
};

#endif