#include <glib.h>
Go to the source code of this file.
Data Structures | |
struct | modules_info |
Contains modules information This struct contains a dumpe of the /proc/modules file. More... | |
struct | fs_info |
Filesystem information This structure keeps information about filesystems loaded in the kernel. The filesystems are splitted in two categories depending on if they are attached to any devices or not. More... | |
struct | net_dev_info |
Contains statistics for net usage with a certain device Contains information about usage of this net device. When the field is an array, the first element [0] if for received and the second one [1] for transmitted elements. More... | |
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... | |
struct | cmd_ver |
Contains information for cmdline, system version and load average This structure is used to store cmdline information (like kernel parameters) the system version (kernel, gcc..) and the load average. More... | |
struct | channels_info |
Defines | |
#define | PROC_DIR "/proc/" |
#define | CPU_FILE "/proc/cpuinfo" |
#define | CMD_FILE "/proc/cmdline" |
#define | VER_FILE "/proc/version" |
#define | LOAD_FILE "/proc/loadavg" |
#define | IOMEM_FILE "/proc/iomem" |
#define | IOPORTS_FILE "/proc/ioports" |
#define | DMA_FILE "/proc/dma" |
#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 | NET_DEVS "/proc/net/dev" |
#define | NET_PROTOCOLS "/proc/net/protocols" |
#define | FS_FILE "/proc/filesystems" |
#define | MOD_FILE "/proc/modules" |
#define | MAX_FIELD_SZ 255 |
#define | FIELD_SZ 15 |
#define | TV_DEVS 0 |
#define | TV_MODS 1 |
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. | |
int | get_cmd_ver_info () |
Get cmdline and version kernel information. | |
int | get_loadavg_info () |
Get load average information. | |
int | get_channels_info () |
Get infor for communication channels. | |
int | get_net_info () |
Get info for net devices. | |
int | get_fs_info () |
Get info about filesystems. | |
int | get_mod_info () |
#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 CMD_FILE "/proc/cmdline" |
#define CPU_FILE "/proc/cpuinfo" |
#define DEV_FILE "/proc/devices" |
#define DMA_FILE "/proc/dma" |
#define DOMAIN_NAME "/proc/sys/kernel/domainname" |
Definition at line 40 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 FS_FILE "/proc/filesystems" |
#define HOST_NAME "/proc/sys/kernel/hostname" |
Definition at line 39 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
#define INODES "/proc/sys/fs/inode-nr" |
Definition at line 38 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
#define IOMEM_FILE "/proc/iomem" |
#define IOPORTS_FILE "/proc/ioports" |
#define LOAD_FILE "/proc/loadavg" |
#define MEM_FILE "/proc/meminfo" |
#define MOD_FILE "/proc/modules" |
#define NET_DEVS "/proc/net/dev" |
Definition at line 56 of file lininfo.h.
Referenced by get_net_info(), and lkmonitor_load_net_dev().
#define P_MAX_M "/proc/sys/fs/mqueue/msg_max" |
Definition at line 42 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 41 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 43 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
#define PAGE_MAX "/proc/sys/kernel/shmall" |
Definition at line 44 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
#define SEG_MAX "/proc/sys/kernel/shmmni" |
Definition at line 45 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
#define SEG_SIZE "/proc/sys/kernel/shmmax" |
Definition at line 46 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
#define SEM "/proc/sys/kernel/sem" |
Definition at line 48 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 47 of file lininfo.h.
Referenced by get_settings_info(), and lkmonitor_write_settings().
#define TV_DEVS 0 |
#define TV_MODS 1 |
Definition at line 66 of file lininfo.h.
Referenced by lkmonitor_fill_tv(), and update_modules_info().
#define VER_FILE "/proc/version" |
int get_acpi_info | ( | ) |
Collects ACPI data.
int get_battery_info | ( | ) |
Get static information about the battery.
int get_channels_info | ( | ) |
Get infor for communication channels.
int get_cmd_ver_info | ( | ) |
Get cmdline and version kernel information.
int get_cpu_info | ( | ) |
Fills cpu_info struct fields.
int get_devs_info | ( | ) |
Fills devs_struct fields.
int get_fs_info | ( | ) |
Get info about filesystems.
int get_loadavg_info | ( | ) |
Get load average information.
int get_mem_info | ( | ) |
Fills mem_struct fields.
int get_mhz_info | ( | ) |
Updates Mhz (for Centrino, AMD64...).
int get_mod_info | ( | ) |
int get_net_info | ( | ) |
Get info for net devices.
int get_settings_info | ( | ) |
Get settings values.
int get_stats_info | ( | ) |
Get cpu times.