ze-filter  (ze-filter-0.8.0-develop-180218)
ze-load.c File Reference
#include <ze-sys.h>
#include <libze.h>
#include "ze-filter.h"

Go to the source code of this file.

Classes

struct  cpustats_t
 

Macros

#define OS_OTHER   1
 
#define JCPU_STATES   5
 
#define JCPU_SLOPE   100
 
#define CPUSTAT_INITIALIZER   {FALSE, (time_t ) 0, {0, 0, 0, 0, 0}}
 
#define HISTLEN   8
 
#define CPU_LOAD_LOCK()   MUTEX_LOCK(&cpu_mutex)
 
#define CPU_LOAD_UNLOCK()   MUTEX_UNLOCK(&cpu_mutex)
 
#define DT_SYSLOAD   10
 

Typedefs

typedef int64_t loadtype_T
 
typedef struct cpustats_t cpustats_t
 

Functions

void * load_measure_thread (void *)
 
int evaluate_load_pct (cpustats_t *pct, cpustats_t *old, cpustats_t *new)
 
void print_cpu_load_info ()
 
void log_cpu_load_info ()
 
double get_cpu_load_info (int which)
 
void * cpuload_thread (void *data)
 
void cpuload_stop ()
 
bool cpuload_start ()
 

Macro Definition Documentation

◆ CPU_LOAD_LOCK

#define CPU_LOAD_LOCK ( )    MUTEX_LOCK(&cpu_mutex)

Definition at line 99 of file ze-load.c.

◆ CPU_LOAD_UNLOCK

#define CPU_LOAD_UNLOCK ( )    MUTEX_UNLOCK(&cpu_mutex)

Definition at line 101 of file ze-load.c.

◆ CPUSTAT_INITIALIZER

#define CPUSTAT_INITIALIZER   {FALSE, (time_t ) 0, {0, 0, 0, 0, 0}}

Definition at line 86 of file ze-load.c.

◆ DT_SYSLOAD

#define DT_SYSLOAD   10

Definition at line 775 of file ze-load.c.

◆ HISTLEN

#define HISTLEN   8

Definition at line 88 of file ze-load.c.

◆ JCPU_SLOPE

#define JCPU_SLOPE   100

Definition at line 69 of file ze-load.c.

◆ JCPU_STATES

#define JCPU_STATES   5

Definition at line 67 of file ze-load.c.

◆ OS_OTHER

#define OS_OTHER   1

Definition at line 34 of file ze-load.c.

Typedef Documentation

◆ cpustats_t

typedef struct cpustats_t cpustats_t

Definition at line 65 of file ze-load.c.

◆ loadtype_T

typedef int64_t loadtype_T

Definition at line 60 of file ze-load.c.

Function Documentation

◆ cpuload_thread()

void* cpuload_thread ( void *  data)

Definition at line 781 of file ze-load.c.

◆ evaluate_load_pct()

int evaluate_load_pct ( cpustats_t pct,
cpustats_t old,
cpustats_t new 
)

Definition at line 132 of file ze-load.c.

◆ load_measure_thread()

void* load_measure_thread ( void *  )