Added `ncpu'. This is zero for single processor systems and the number of
1998-09-09 Martin Baulig <baulig@Stud.Informatik.uni-trier.de> * glibtop.h (glibtop): Added `ncpu'. This is zero for single processor systems and the number of CPUs otherwise. * include/glibtop/cpu.h (glibtop_cpu): Added `xcpu_total', `xcpu_user', `xcpu_nice', `xcpu_sys' and `xcpu_idle'. (GLIBTOP_NCPU): #define this to 4.
This commit is contained in:
committed by
Martin Baulig
parent
9d564134de
commit
a331fb8e03
@@ -1,3 +1,12 @@
|
|||||||
|
1998-09-09 Martin Baulig <baulig@Stud.Informatik.uni-trier.de>
|
||||||
|
|
||||||
|
* glibtop.h (glibtop): Added `ncpu'. This is zero for single processor
|
||||||
|
systems and the number of CPUs otherwise.
|
||||||
|
|
||||||
|
* include/glibtop/cpu.h (glibtop_cpu): Added `xcpu_total', `xcpu_user',
|
||||||
|
`xcpu_nice', `xcpu_sys' and `xcpu_idle'.
|
||||||
|
(GLIBTOP_NCPU): #define this to 4.
|
||||||
|
|
||||||
1998-09-08 Martin Baulig <baulig@merkur.uni-trier.de>
|
1998-09-08 Martin Baulig <baulig@merkur.uni-trier.de>
|
||||||
|
|
||||||
* configure.in: Make the default to disable guile.
|
* configure.in: Make the default to disable guile.
|
||||||
|
@@ -50,6 +50,7 @@ struct _glibtop
|
|||||||
int input [2]; /* Pipe client <- server */
|
int input [2]; /* Pipe client <- server */
|
||||||
int output [2]; /* Pipe client -> server */
|
int output [2]; /* Pipe client -> server */
|
||||||
int socket; /* Accepted connection of a socket */
|
int socket; /* Accepted connection of a socket */
|
||||||
|
int ncpu; /* Number of CPUs, zero if single-processor */
|
||||||
unsigned long os_version_code; /* Version code of the operating system */
|
unsigned long os_version_code; /* Version code of the operating system */
|
||||||
const char *name; /* Program name for error messages */
|
const char *name; /* Program name for error messages */
|
||||||
const char *server_command; /* Command used to invoke server */
|
const char *server_command; /* Command used to invoke server */
|
||||||
|
@@ -34,19 +34,33 @@ __BEGIN_DECLS
|
|||||||
#define GLIBTOP_CPU_IDLE 4
|
#define GLIBTOP_CPU_IDLE 4
|
||||||
#define GLIBTOP_CPU_FREQUENCY 5
|
#define GLIBTOP_CPU_FREQUENCY 5
|
||||||
|
|
||||||
#define GLIBTOP_MAX_CPU 6
|
#define GLIBTOP_XCPU_TOTAL 6
|
||||||
|
#define GLIBTOP_XCPU_USER 7
|
||||||
|
#define GLIBTOP_XCPU_NICE 8
|
||||||
|
#define GLIBTOP_XCPU_SYS 9
|
||||||
|
#define GLIBTOP_XCPU_IDLE 10
|
||||||
|
|
||||||
|
#define GLIBTOP_MAX_CPU 11
|
||||||
|
|
||||||
|
/* Nobody should really be using more than 4 processors. */
|
||||||
|
#define GLIBTOP_NCPU 4
|
||||||
|
|
||||||
typedef struct _glibtop_cpu glibtop_cpu;
|
typedef struct _glibtop_cpu glibtop_cpu;
|
||||||
|
|
||||||
struct _glibtop_cpu
|
struct _glibtop_cpu
|
||||||
{
|
{
|
||||||
u_int64_t flags,
|
u_int64_t flags,
|
||||||
total, /* GLIBTOP_CPU_TOTAL */
|
total, /* GLIBTOP_CPU_TOTAL */
|
||||||
user, /* GLIBTOP_CPU_USER */
|
user, /* GLIBTOP_CPU_USER */
|
||||||
nice, /* GLIBTOP_CPU_NICE */
|
nice, /* GLIBTOP_CPU_NICE */
|
||||||
sys, /* GLIBTOP_CPU_SYS */
|
sys, /* GLIBTOP_CPU_SYS */
|
||||||
idle, /* GLIBTOP_CPU_IDLE */
|
idle, /* GLIBTOP_CPU_IDLE */
|
||||||
frequency; /* GLIBTOP_CPU_FREQUENCY */
|
frequency, /* GLIBTOP_CPU_FREQUENCY */
|
||||||
|
xcpu_total [GLIBTOP_NCPU], /* GLIBTOP_XCPU_TOTAL */
|
||||||
|
xcpu_user [GLIBTOP_NCPU], /* GLIBTOP_XCPU_USER */
|
||||||
|
xcpu_nice [GLIBTOP_NCPU], /* GLIBTOP_XCPU_NICE */
|
||||||
|
xcpu_sys [GLIBTOP_NCPU], /* GLIBTOP_XCPU_SYS */
|
||||||
|
xcpu_idle [GLIBTOP_NCPU]; /* GLIBTOP_XCPU_IDLE */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu)
|
#define glibtop_get_cpu(cpu) glibtop_get_cpu_l(glibtop_global_server, cpu)
|
||||||
|
Reference in New Issue
Block a user