File: state.h

package info (click to toggle)
ascpu 1.9-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 280 kB
  • ctags: 126
  • sloc: ansic: 1,219; sh: 183; makefile: 51
file content (35 lines) | stat: -rw-r--r-- 936 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
/*
 * ascpu is the CPU statistics monitor utility for X Windows
 * Copyright (c) 1998-2000  Albert Dorofeev <albert@tigr.net>
 * For the updates see http://www.tigr.net/
 *
 * 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_STAT "/proc/stat"

/* The maximum number of CPUs in the SMP system */
#ifdef __hpux__
#include <sys/pstat.h>
#define MAX_CPU PST_MAX_PROCS
#else
#define MAX_CPU 16
#endif

struct ascpu_state {
	long int update_interval; /* interval (sec) to check the statistics */
	long int hist_samples; /* num of samples to collect for the history */
	long int avg_samples; /* number of samples to collect for the average */
	int no_nice; /* do not show nice CPU time */
	int cpu_number; /* the number of the processor (-1 = total) */
	char proc_stat_filename[256];
	char bgcolor[50];
	char fgcolor[50];
};

#endif