feat: implement rtop system monitoring tool

feat: add basic system information display
feat: implement cpu monitoring
feat: implement memory monitoring
feat: implement process monitoring
feat: implement network monitoring
feat: implement disk monitoring
feat: implement filesystem monitoring
feat: add terminal control handling
feat: create initial project structure
feat: add build system with makefile
feat: add readme documentation
This commit is contained in:
2025-12-13 05:38:27 +01:00
commit 11926c5459
25 changed files with 2303 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
# retoor <retoor@molodetz.nl>
CC = gcc
CFLAGS = -Wall -Wextra -Werror -pedantic -std=c99 -O3 -march=native -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE
LDFLAGS = -static
SRCDIR = src
INCDIR = include
OBJDIR = obj
SOURCES = $(wildcard $(SRCDIR)/*.c)
OBJECTS = $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o)
TARGET = rtop
.PHONY: all clean debug
all: $(TARGET)
debug: CFLAGS += -g -DDEBUG
debug: $(TARGET)
$(TARGET): $(OBJECTS)
$(CC) $(OBJECTS) -o $@ $(LDFLAGS) 2>/dev/null || $(CC) $(OBJECTS) -o $@
$(OBJDIR)/%.o: $(SRCDIR)/%.c | $(OBJDIR)
$(CC) $(CFLAGS) -I$(INCDIR) -c $< -o $@
$(OBJDIR):
mkdir -p $(OBJDIR)
clean:
rm -rf $(OBJDIR) $(TARGET)
install: $(TARGET)
install -m 755 $(TARGET) /usr/local/bin/