Skip to content

loberman/serverstats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 1 column 1
---

```markdown
# RPMs for Grab Tools
**Author:** Laurence Oberman (<[email protected]>) with assistance from AI (Chat GPT/Gemini) 
**License:** GPLv3

A suite of modern, lightweight telemetry and analysis tools written in Rust, designed for storage, performance, and systems engineers. These tools provide structured sampling of Linux resource usage with built-in dashboard generation.

---

📦 Available RPMs

Package Version Platform Description
procstats_grab 1.0.0-1 el7 / el8 Process-level CPU, Memory, and I/O tracking
serverstats_grab 3.0.0-1 el8 System-wide Disk, CPU, Net, and Mem telemetry

🚀 Installation & Setup

Standard RHEL 8 / Linux

Install the RPMs and enable the systemd timers to ensure the gatherers run and restart automatically.

# Install Packages
rpm -Uvh serverstats_grab-3.0.0-1.el8.x86_64.rpm
rpm -Uvh procstats_grab-1.0.0-1.el8.x86_64.rpm

# Enable and Start Server Stats
systemctl enable --now serverstats_grab
systemctl enable --now serverstats_grab_restart.timer

# Enable and Start Process Stats
systemctl enable --now procstats_grab
systemctl enable --now procstats_grab_restart.timer

OpenShift / CoreOS Notes

The serverstats_gather and procstats_gather binaries are built specifically for OpenShift CoreOS.

  • No Dependencies: No font dependencies or sidecar containers required.
  • Non-Root: Runs as the non-root core user.
  • Usage: 1. SSH into the node: ssh core@<node>
  1. Start gatherers:
./serverstats_gather -g 10 &
./procstats_gather -g 60 &

Note: Data is written to the current working directory of the core user.


🛠 Tool Functionality

1. serverstats_grab

Captures key I/O, CPU, network, and memory stats into a single capture file for browser-based analysis.

  • Gather Mode: serverstats_grab -g <interval_seconds>
  • Analysis: serverstats_grab -a <capturefile> (Generates SVG/PNG graphs and index.html)
  • Playback (Deltas):
  • Disk: -pD | CPU: -pC | Memory: -pM | Network: -pN

2. procstats_grab

Scans /proc to record timestamped samples of process and thread activity. It provides insight into resource spikes rather than just cumulative totals.

  • Gather Mode: procstats_grab -g 10
  • Analysis: procstats_grab -a <csv_file> (Generates top 20 tables and spike charts)
  • Playback: procstats_grab -p <csv_file> (Replays CSV as a time-series table)

CSV Output Format

The tool generates a 14-column CSV: ts_epoch, pid, ppid, tid, comm, state, utime, stime, num_threads, vmrss_kb, vm_size_kb, read_bytes, write_bytes, cmdline


🧰 Included Helper Tools

Helper Tools

Tool Purpose
  • awr_io_analyze — Intelligent analysis of per-node AWR reports
  • blktrace_report.py — Summarizes blktrace per-CPU files
  • collectl2diskstats, collectl2diskstats-rhel7 — Convert collectl raw files for new tools
  • parse_collectlsZ — Parses collectlsZ files to summarize process data
  • convert_nmon.py — Converts nmon output for tabular review
  • iostat_report.py — Summarizes complete iostat logs
  • sanitize_logs.py — Removes IPs and server names from logs
  • short_disk_report.py — Short field view for disk stats playback
  • truncate_serverstats.py — Truncates serverstats_grab data files to a focused time window

📝 Troubleshooting & FAQ

  • Playback Issues: Ensure CSVs were generated by the latest version of procstats_grab to ensure consistent quoting.
  • Charts Not Loading: Open the generated index.html in a modern browser to view the dashboard.
  • Rust Built: These tools leverage the safety and speed of Rust and the Plotters library for charting.

Assistance from both Chatgpt and Gemini Developed by Laurence Oberman ([email protected]). Contributions and PRs are welcome!


---

About

New repo for what will replace collectl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published