Retoor software development Projects Research SearchXNG
Register Sign In

28 lines
574 B
C
Raw Normal View History

feat: add complete rtop system monitoring tool with cpu, memory, process, network, disk, and filesystem modules Implement the initial project structure for rtop, a terminal-based system monitor written in C, including header files for all monitoring subsystems (cpu.h, memory.h, process.h, network.h, disk.h, filesystem.h, system.h, terminal.h, display.h), a Makefile with static linking and debug build support, a .gitignore for object files, a CHANGELOG documenting version 0.1.0, and a comprehensive README with build instructions, usage examples, and feature descriptions covering per-core CPU utilization, memory/swap stats, process listing with sort options, network interface rates, disk I/O, and filesystem usage with color-coded output and terminal resize handling.
2025-12-13 05:38:27 +01:00
/* retoor <retoor@molodetz.nl> */
#ifndef SYSTEM_H
#define SYSTEM_H
#define MAX_HOSTNAME_LEN 256
#define MAX_KERNEL_LEN 256
#define MAX_OS_LEN 256
#define MAX_ARCH_LEN 64
typedef struct {
char hostname[MAX_HOSTNAME_LEN];
char kernel[MAX_KERNEL_LEN];
char os_name[MAX_OS_LEN];
char arch[MAX_ARCH_LEN];
long uptime_seconds;
int uptime_days;
int uptime_hours;
int uptime_minutes;
double load_1;
double load_5;
double load_15;
} SystemInfo;
int system_info_init(SystemInfo *info);
int system_info_update(SystemInfo *info);
#endif
Reference in New Issue Copy Permalink
4bd31393cc
rtop/include/system.h
Response time: 34ms
Mail Licenses API