#include <glib.h>Go to the source code of this file.
Data Structures | |
| struct | settings_info |
| Contains system settings. This struct contains several fields that represent different system settings like hostname maximum for a shared memory segment, etc. More... | |
| struct | dev_info |
| Contains device lists. This struct contains two device lists. More... | |
| struct | cpu_info |
| Contains cpu characteristics. This struct contains several fields that represent different cpu characteristics as clock MHz or cache size. More... | |
| struct | mem_info |
| Contains memory data and statistics. Contains fields for total, free and other interesting information. More... | |
| struct | stats_info |
| Contains statistics about cpu time usage. Contains fields for global and per cpu/core statistics. Context switches is also provided. More... | |
| struct | battery_info |
| Battery status information. Contains fields for charge and capacity data. Referenced by acpi_info structure. More... | |
| struct | acpi_info |
| Contains temperature and battery statistics. Uses the battery_info structure. More... | |
Defines | |
| #define | PROC_DIR "/proc/" |
| #define | CPU_FILE "/proc/cpuinfo" |
| #define | MEM_FILE "/proc/meminfo" |
| #define | DEV_FILE "/proc/devices" |
| #define | FILES "/proc/sys/fs/file-nr" |
| #define | FILE_MAX "/proc/sys/fs/file-max" |
| #define | INODES "/proc/sys/fs/inode-nr" |
| #define | HOST_NAME "/proc/sys/kernel/hostname" |
| #define | DOMAIN_NAME "/proc/sys/kernel/domainname" |
| #define | P_MAX_Q "/proc/sys/fs/mqueue/queues_max" |
| #define | P_MAX_M "/proc/sys/fs/mqueue/msg_max" |
| #define | P_MAX_S "/proc/sys/fs/mqueue/msgsize_max" |
| #define | PAGE_MAX "/proc/sys/kernel/shmall" |
| #define | SEG_MAX "/proc/sys/kernel/shmmni" |
| #define | SEG_SIZE "/proc/sys/kernel/shmmax" |
| #define | THREADS_MAX "/proc/sys/kernel/threads-max" |
| #define | SEM "/proc/sys/kernel/sem" |
| #define | STATS_FILE "/proc/stat" |
| #define | BATT_STATE "/proc/acpi/battery/BAT0/state" |
| #define | BATT_INFO "/proc/acpi/battery/BAT0/info" |
| #define | BATT_STATE1 "/proc/acpi/battery/BAT1/state" |
| #define | BATT_INFO1 "/proc/acpi/battery/BAT1/info" |
| #define | TEMPERATURE "/proc/acpi/thermal_zone/THRM/temperature" |
| #define | TEMP_TRIP "/proc/acpi/thermal_zone/THRM/trip_points" |
| #define | MAX_FIELD_SZ 255 |
| #define | FIELD_SZ 15 |
Functions | |
| int | get_cpu_info () |
| Fills cpu_info struct fields. | |
| int | get_mhz_info () |
| Updates Mhz (for Centrino, AMD64...). | |
| int | get_mem_info () |
| Fills mem_struct fields. | |
| int | get_devs_info () |
| Fills devs_struct fields. | |
| int | get_settings_info () |
| Get settings values. | |
| int | get_stats_info () |
| Get cpu times. | |
| int | get_acpi_info () |
| Collects ACPI data. | |
| int | get_battery_info () |
| Get static information about the battery. | |
| #define BATT_INFO "/proc/acpi/battery/BAT0/info" |
| #define BATT_INFO1 "/proc/acpi/battery/BAT1/info" |
| #define BATT_STATE "/proc/acpi/battery/BAT0/state" |
| #define BATT_STATE1 "/proc/acpi/battery/BAT1/state" |
| #define CPU_FILE "/proc/cpuinfo" |
| #define DEV_FILE "/proc/devices" |
| #define DOMAIN_NAME "/proc/sys/kernel/domainname" |
Definition at line 34 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define FILE_MAX "/proc/sys/fs/file-max" |
| #define FILES "/proc/sys/fs/file-nr" |
| #define HOST_NAME "/proc/sys/kernel/hostname" |
Definition at line 33 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define INODES "/proc/sys/fs/inode-nr" |
Definition at line 32 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define MEM_FILE "/proc/meminfo" |
| #define P_MAX_M "/proc/sys/fs/mqueue/msg_max" |
Definition at line 36 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define P_MAX_Q "/proc/sys/fs/mqueue/queues_max" |
Definition at line 35 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define P_MAX_S "/proc/sys/fs/mqueue/msgsize_max" |
Definition at line 37 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define PAGE_MAX "/proc/sys/kernel/shmall" |
Definition at line 38 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define SEG_MAX "/proc/sys/kernel/shmmni" |
Definition at line 39 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define SEG_SIZE "/proc/sys/kernel/shmmax" |
Definition at line 40 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define SEM "/proc/sys/kernel/sem" |
Definition at line 42 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| #define STATS_FILE "/proc/stat" |
| #define TEMP_TRIP "/proc/acpi/thermal_zone/THRM/trip_points" |
| #define TEMPERATURE "/proc/acpi/thermal_zone/THRM/temperature" |
| #define THREADS_MAX "/proc/sys/kernel/threads-max" |
Definition at line 41 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
| int get_acpi_info | ( | ) |
Collects ACPI data.
| int get_battery_info | ( | ) |
Get static information about the battery.
| int get_cpu_info | ( | ) |
Fills cpu_info struct fields.
| int get_devs_info | ( | ) |
Fills devs_struct fields.
| int get_mem_info | ( | ) |
Fills mem_struct fields.
| int get_mhz_info | ( | ) |
Updates Mhz (for Centrino, AMD64...).
| int get_settings_info | ( | ) |
Get settings values.
| int get_stats_info | ( | ) |
Get cpu times.
1.5.1