How y-lebid/sysmon works
sysmon is a Linux command-line system-information utility. Its workflow constructs a SystemInfo snapshot from Linux interfaces, then prints system, hardware, CPU, memory, and GPU details. The implementation excerpt supports the collection and display relationships shown; README-documented capabilities such as serial number and UUID are exposed by the API even though the CLI does not print them.
Main entry points: system_info.cpp SystemInfo collector · main.cpp CLI display
Components 17
CLI
- CLI display
src/main.cpp
Information Collection
- SystemInfo collector
src/system_info.cpp - System identity
src/system_info.cpp - Hardware details
src/system_info.cpp - CPU details
src/system_info.cpp - Memory details
src/system_info.cpp - GPU details
src/system_info.cpp
Linux Sources
- OS files
- CPU procfs
- Memory procfs
- Uptime procfs
- DMI sysfs
- uname()
- DRM sysfs
- PCI ID database
Other components
- CLI user
- Terminal output
Connections 17
- CLI user → CLI display: runs
README.md - CLI display → SystemInfo collector: constructs
src/main.cpp - CLI display → SystemInfo collector: requests fields
src/main.cpp - CLI display → Terminal output: prints results
src/main.cpp - SystemInfo collector → System identity: collects
src/system_info.cpp - SystemInfo collector → Hardware details: collects
src/system_info.cpp - SystemInfo collector → CPU details: collects
src/system_info.cpp - SystemInfo collector → Memory details: collects
src/system_info.cpp - SystemInfo collector → GPU details: collects
src/system_info.cpp - System identity → OS files: reads
src/system_info.cpp - System identity → Uptime procfs: reads
src/system_info.cpp - System identity → uname(): calls
src/system_info.cpp - Hardware details → DMI sysfs: reads
src/system_info.cpp - CPU details → CPU procfs: reads
src/system_info.cpp - Memory details → Memory procfs: reads
src/system_info.cpp - GPU details → DRM sysfs: reads IDs
src/system_info.cpp - GPU details → PCI ID database: looks up names
src/system_info.cpp