Sysadmin Handbook
Sysadmin Handbook v2.0.0 — a thorough sysops toolkit for system administrators. Record, track, and manage all aspects of system administration from the command line. Every action is timestamped and logged locally for full auditability.
Why Sysadmin Handbook?
- Works entirely offline — your data never leaves your machine
- Simple command-line interface, no GUI needed
- Timestamped logging for every operation
- Export to JSON, CSV, or plain text anytime
- Automatic history and activity tracking
- Searchable records across all operation types
Getting Started
# See all available commands
sysadmin-handbook help
# Check current health status
sysadmin-handbook status
# View summary statistics
sysadmin-handbook stats
Commands
Operations Commands
Each command works in two modes: run without arguments to view recent entries, or pass input to record a new entry.
| Command |
Description |
sysadmin-handbook scan <input> |
Record a scan operation (port scans, vulnerability scans, network sweeps) |
sysadmin-handbook monitor <input> |
Log monitoring observations (service health, uptime checks, resource usage) |
sysadmin-handbook report <input> |
Create report entries (incident reports, audit summaries, status updates) |
sysadmin-handbook alert <input> |
Record alert events (threshold breaches, security warnings, service failures) |
sysadmin-handbook top <input> |
Log top-level metrics (CPU hogs, memory consumers, disk leaders) |
sysadmin-handbook usage <input> |
Track usage data (disk usage, bandwidth, API calls, license counts) |
sysadmin-handbook check <input> |
Record health checks (service checks, config validation, dependency tests) |
sysadmin-handbook fix <input> |
Document fixes applied (patches, config changes, workarounds) |
sysadmin-handbook cleanup <input> |
Log cleanup operations (temp files, old logs, orphaned processes) |
sysadmin-handbook backup <input> |
Track backup operations (full backups, incrementals, snapshots) |
sysadmin-handbook restore <input> |
Record restore operations (data recovery, config rollbacks) |
sysadmin-handbook log <input> |
General-purpose log entries (freeform notes, observations) |
sysadmin-handbook benchmark <input> |
Record benchmark results (performance tests, load tests, I/O benchmarks) |
sysadmin-handbook compare <input> |
Log comparison data (before/after, environment diffs, config comparisons) |
Utility Commands
| Command |
Description |
sysadmin-handbook stats |
Show summary statistics across all log categories |
sysadmin-handbook export <fmt> |
Export all data (formats: json, csv, txt) |
sysadmin-handbook search <term> |
Search across all entries for a keyword |
sysadmin-handbook recent |
Show the 20 most recent history entries |
sysadmin-handbook status |
Health check — version, data dir, entry count, disk usage |
sysadmin-handbook help |
Show the built-in help message |
sysadmin-handbook version |
Print version (v2.0.0) |
Data Storage
All data is stored locally in ~/.local/share/sysadmin-handbook/. Structure:
scan.log, monitor.log, report.log, etc. — one log file per command, pipe-delimited (timestamp|value)
history.log — unified activity log across all commands
export.json / export.csv / export.txt — generated export files
Each entry is stored as YYYY-MM-DD HH:MM|<input>. Use export to back up your data anytime.
Requirements
- Bash 4+ (uses
set -euo pipefail)
- Standard Unix utilities (
date, wc, du, tail, grep, sed, cat)
- No external dependencies or internet access needed
When to Use
- Incident response tracking — Log scan results, alerts, and fixes during an active incident so you have a complete timeline for the post-mortem
- Daily ops journaling — Record monitoring observations, health checks, and cleanup tasks as you go through your sysadmin routine
- Backup & restore auditing — Track every backup and restore operation with timestamps to prove compliance or diagnose failures
- Performance benchmarking — Store benchmark results over time and use
compare to track regressions or improvements across deploys
- Team handoff documentation — Log everything during your shift so the next admin can run
recent or search to get up to speed instantly
Examples
# Record a network scan result
sysadmin-handbook scan "192.168.1.0/24 — 14 hosts up, 3 with open SSH"
# Log a monitoring observation
sysadmin-handbook monitor "web-prod-01 CPU at 92% for 15 minutes"
# Document a fix you applied
sysadmin-handbook fix "Increased nginx worker_connections from 1024 to 4096"
# Track a backup operation
sysadmin-handbook backup "Full backup of /data completed — 48GB, 23 min"
# Export everything to JSON for archival
sysadmin-handbook export json
# Search all logs for a keyword
sysadmin-handbook search "nginx"
# View recent activity across all commands
sysadmin-handbook recent
Output
All commands output to stdout. Redirect to a file if needed:
sysadmin-handbook stats > report.txt
sysadmin-handbook export csv
Configuration
Set SYSADMIN_HANDBOOK_DIR environment variable to override the default data directory (~/.local/share/sysadmin-handbook/).
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
1---
2version: "1.0.0"
3name: the-book-of-secret-knowledge
4description: "A collection of inspiring lists, manuals, cheatsheets, blogs, hacks, one-liners, cli/web tools and m the book of secret knowledge, python, awesome."
5metadata:
6 source: https://skillmd.com/skills/bytesagain/the-book-of-secret-knowledge
7---
8
9# Sysadmin Handbook
10
11Sysadmin Handbook v2.0.0 — a thorough sysops toolkit for system administrators. Record, track, and manage all aspects of system administration from the command line. Every action is timestamped and logged locally for full auditability.
12
13## Why Sysadmin Handbook?
14
15- Works entirely offline — your data never leaves your machine
16- Simple command-line interface, no GUI needed
17- Timestamped logging for every operation
18- Export to JSON, CSV, or plain text anytime
19- Automatic history and activity tracking
20- Searchable records across all operation types
21
22## Getting Started
23
24```bash
25# See all available commands
26sysadmin-handbook help
27
28# Check current health status
29sysadmin-handbook status
30
31# View summary statistics
32sysadmin-handbook stats
33```
34
35## Commands
36
37### Operations Commands
38
39Each command works in two modes: run without arguments to view recent entries, or pass input to record a new entry.
40
41| Command | Description |
42|---------|-------------|
43| `sysadmin-handbook scan <input>` | Record a scan operation (port scans, vulnerability scans, network sweeps) |
44| `sysadmin-handbook monitor <input>` | Log monitoring observations (service health, uptime checks, resource usage) |
45| `sysadmin-handbook report <input>` | Create report entries (incident reports, audit summaries, status updates) |
46| `sysadmin-handbook alert <input>` | Record alert events (threshold breaches, security warnings, service failures) |
47| `sysadmin-handbook top <input>` | Log top-level metrics (CPU hogs, memory consumers, disk leaders) |
48| `sysadmin-handbook usage <input>` | Track usage data (disk usage, bandwidth, API calls, license counts) |
49| `sysadmin-handbook check <input>` | Record health checks (service checks, config validation, dependency tests) |
50| `sysadmin-handbook fix <input>` | Document fixes applied (patches, config changes, workarounds) |
51| `sysadmin-handbook cleanup <input>` | Log cleanup operations (temp files, old logs, orphaned processes) |
52| `sysadmin-handbook backup <input>` | Track backup operations (full backups, incrementals, snapshots) |
53| `sysadmin-handbook restore <input>` | Record restore operations (data recovery, config rollbacks) |
54| `sysadmin-handbook log <input>` | General-purpose log entries (freeform notes, observations) |
55| `sysadmin-handbook benchmark <input>` | Record benchmark results (performance tests, load tests, I/O benchmarks) |
56| `sysadmin-handbook compare <input>` | Log comparison data (before/after, environment diffs, config comparisons) |
57
58### Utility Commands
59
60| Command | Description |
61|---------|-------------|
62| `sysadmin-handbook stats` | Show summary statistics across all log categories |
63| `sysadmin-handbook export <fmt>` | Export all data (formats: `json`, `csv`, `txt`) |
64| `sysadmin-handbook search <term>` | Search across all entries for a keyword |
65| `sysadmin-handbook recent` | Show the 20 most recent history entries |
66| `sysadmin-handbook status` | Health check — version, data dir, entry count, disk usage |
67| `sysadmin-handbook help` | Show the built-in help message |
68| `sysadmin-handbook version` | Print version (v2.0.0) |
69
70## Data Storage
71
72All data is stored locally in `~/.local/share/sysadmin-handbook/`. Structure:
73
74- **`scan.log`**, **`monitor.log`**, **`report.log`**, etc. — one log file per command, pipe-delimited (`timestamp|value`)
75- **`history.log`** — unified activity log across all commands
76- **`export.json`** / **`export.csv`** / **`export.txt`** — generated export files
77
78Each entry is stored as `YYYY-MM-DD HH:MM|<input>`. Use `export` to back up your data anytime.
79
80## Requirements
81
82- Bash 4+ (uses `set -euo pipefail`)
83- Standard Unix utilities (`date`, `wc`, `du`, `tail`, `grep`, `sed`, `cat`)
84- No external dependencies or internet access needed
85
86## When to Use
87
881. **Incident response tracking** — Log scan results, alerts, and fixes during an active incident so you have a complete timeline for the post-mortem
892. **Daily ops journaling** — Record monitoring observations, health checks, and cleanup tasks as you go through your sysadmin routine
903. **Backup & restore auditing** — Track every backup and restore operation with timestamps to prove compliance or diagnose failures
914. **Performance benchmarking** — Store benchmark results over time and use `compare` to track regressions or improvements across deploys
925. **Team handoff documentation** — Log everything during your shift so the next admin can run `recent` or `search` to get up to speed instantly
93
94## Examples
95
96```bash
97# Record a network scan result
98sysadmin-handbook scan "192.168.1.0/24 — 14 hosts up, 3 with open SSH"
99
100# Log a monitoring observation
101sysadmin-handbook monitor "web-prod-01 CPU at 92% for 15 minutes"
102
103# Document a fix you applied
104sysadmin-handbook fix "Increased nginx worker_connections from 1024 to 4096"
105
106# Track a backup operation
107sysadmin-handbook backup "Full backup of /data completed — 48GB, 23 min"
108
109# Export everything to JSON for archival
110sysadmin-handbook export json
111
112# Search all logs for a keyword
113sysadmin-handbook search "nginx"
114
115# View recent activity across all commands
116sysadmin-handbook recent
117```
118
119## Output
120
121All commands output to stdout. Redirect to a file if needed:
122
123```bash
124sysadmin-handbook stats > report.txt
125sysadmin-handbook export csv
126```
127
128## Configuration
129
130Set `SYSADMIN_HANDBOOK_DIR` environment variable to override the default data directory (`~/.local/share/sysadmin-handbook/`).
131
132---
133Powered by BytesAgain | bytesagain.com | hello@bytesagain.com