Time Logger
Time Logger v2.0.0 — a sysops toolkit for logging, monitoring, and managing system operations from the command line. All data is stored locally in flat log files with timestamps, making it easy to review history, export records, and search across entries.
Commands
Run scripts/script.sh <command> [args] to use.
Core Operations
| Command |
Description |
scan <input> |
Log a scan entry (e.g. system scans, resource discovery) |
monitor <input> |
Log a monitor entry (e.g. uptime monitoring, service checks) |
report <input> |
Log a report entry (e.g. daily/weekly summaries, incident reports) |
alert <input> |
Log an alert entry (e.g. threshold alerts, anomaly warnings) |
top <input> |
Log a top entry (e.g. top resource consumers, peak usage) |
usage <input> |
Log a usage entry (e.g. CPU/memory/disk usage snapshots) |
check <input> |
Log a check entry (e.g. health checks, verification results) |
fix <input> |
Log a fix entry (e.g. applied patches, resolved issues) |
cleanup <input> |
Log a cleanup entry (e.g. temp file removal, log rotation) |
backup <input> |
Log a backup entry (e.g. backup runs, snapshot records) |
restore <input> |
Log a restore entry (e.g. recovery operations, data restores) |
log <input> |
Log a generic log entry (e.g. free-form notes, misc events) |
benchmark <input> |
Log a benchmark entry (e.g. performance baselines, load tests) |
compare <input> |
Log a compare entry (e.g. before/after comparisons, diff results) |
Each command without arguments shows the 20 most recent entries for that category.
Utility Commands
| Command |
Description |
stats |
Summary statistics across all log categories with entry counts and disk usage |
export <fmt> |
Export all data in json, csv, or txt format |
search <term> |
Search across all log files for a keyword (case-insensitive) |
recent |
Show the 20 most recent entries from the global activity history |
status |
Health check — version, data directory, total entries, disk usage, last activity |
help |
Show full usage information |
version |
Show version string (time-logger v2.0.0) |
Data Storage
All data is persisted locally under ~/.local/share/time-logger/:
<command>.log — One log file per command (e.g. scan.log, monitor.log, backup.log)
history.log — Global activity log with timestamps for every operation
export.<fmt> — Generated export files (json/csv/txt)
Each entry is stored as YYYY-MM-DD HH:MM|<input> (pipe-delimited). No external services, no API keys, no network calls — everything stays on your machine.
Requirements
- Bash 4.0+ with
set -euo pipefail
- Standard Unix utilities:
date, wc, du, grep, tail, cat, sed, basename
- No external dependencies or packages required
- No API keys or accounts needed
When to Use
- Tracking system operations — Log scans, monitors, and health checks to build a searchable history of your sysops activities
- Recording incident response — Use
alert, fix, and restore to document the lifecycle of an incident from detection through resolution
- Auditing maintenance tasks — Track
cleanup, backup, and restore operations so you can prove compliance and trace back when actions occurred
- Benchmarking and comparing — Use
benchmark and compare to record performance baselines and before/after results across system changes
- Generating ops reports — Use
report to log periodic summaries, then export json to pull structured data for dashboards or handoffs
Examples
# Log a system scan
time-logger scan "Full port scan on 192.168.1.0/24 — 12 hosts found"
# Record a monitoring event
time-logger monitor "nginx upstream response time spiked to 2.3s"
# Log an alert
time-logger alert "Disk usage on /var exceeded 90% threshold"
# Record a fix applied
time-logger fix "Rotated nginx logs and freed 4.2GB on /var"
# Search for all entries mentioning 'nginx'
time-logger search nginx
# Export everything to JSON
time-logger export json
# View summary statistics
time-logger stats
# Check recent activity
time-logger recent
Powered by BytesAgain | bytesagain.com | hello@bytesagain.com
1---
2version: "1.0.0"
3name: time-logger
4description: "Log time entries and see where your hours go each day. Use when scanning hours, monitoring totals, reporting summaries, ranking categories."
5metadata:
6 source: https://skillmd.com/skills/bytesagain/time-logger
7---
8
9# Time Logger
10
11Time Logger v2.0.0 — a sysops toolkit for logging, monitoring, and managing system operations from the command line. All data is stored locally in flat log files with timestamps, making it easy to review history, export records, and search across entries.
12
13## Commands
14
15Run `scripts/script.sh <command> [args]` to use.
16
17### Core Operations
18
19| Command | Description |
20|---------|-------------|
21| `scan <input>` | Log a scan entry (e.g. system scans, resource discovery) |
22| `monitor <input>` | Log a monitor entry (e.g. uptime monitoring, service checks) |
23| `report <input>` | Log a report entry (e.g. daily/weekly summaries, incident reports) |
24| `alert <input>` | Log an alert entry (e.g. threshold alerts, anomaly warnings) |
25| `top <input>` | Log a top entry (e.g. top resource consumers, peak usage) |
26| `usage <input>` | Log a usage entry (e.g. CPU/memory/disk usage snapshots) |
27| `check <input>` | Log a check entry (e.g. health checks, verification results) |
28| `fix <input>` | Log a fix entry (e.g. applied patches, resolved issues) |
29| `cleanup <input>` | Log a cleanup entry (e.g. temp file removal, log rotation) |
30| `backup <input>` | Log a backup entry (e.g. backup runs, snapshot records) |
31| `restore <input>` | Log a restore entry (e.g. recovery operations, data restores) |
32| `log <input>` | Log a generic log entry (e.g. free-form notes, misc events) |
33| `benchmark <input>` | Log a benchmark entry (e.g. performance baselines, load tests) |
34| `compare <input>` | Log a compare entry (e.g. before/after comparisons, diff results) |
35
36Each command without arguments shows the 20 most recent entries for that category.
37
38### Utility Commands
39
40| Command | Description |
41|---------|-------------|
42| `stats` | Summary statistics across all log categories with entry counts and disk usage |
43| `export <fmt>` | Export all data in `json`, `csv`, or `txt` format |
44| `search <term>` | Search across all log files for a keyword (case-insensitive) |
45| `recent` | Show the 20 most recent entries from the global activity history |
46| `status` | Health check — version, data directory, total entries, disk usage, last activity |
47| `help` | Show full usage information |
48| `version` | Show version string (`time-logger v2.0.0`) |
49
50## Data Storage
51
52All data is persisted locally under `~/.local/share/time-logger/`:
53
54- **`<command>.log`** — One log file per command (e.g. `scan.log`, `monitor.log`, `backup.log`)
55- **`history.log`** — Global activity log with timestamps for every operation
56- **`export.<fmt>`** — Generated export files (json/csv/txt)
57
58Each entry is stored as `YYYY-MM-DD HH:MM|<input>` (pipe-delimited). No external services, no API keys, no network calls — everything stays on your machine.
59
60## Requirements
61
62- **Bash** 4.0+ with `set -euo pipefail`
63- Standard Unix utilities: `date`, `wc`, `du`, `grep`, `tail`, `cat`, `sed`, `basename`
64- No external dependencies or packages required
65- No API keys or accounts needed
66
67## When to Use
68
691. **Tracking system operations** — Log scans, monitors, and health checks to build a searchable history of your sysops activities
702. **Recording incident response** — Use `alert`, `fix`, and `restore` to document the lifecycle of an incident from detection through resolution
713. **Auditing maintenance tasks** — Track `cleanup`, `backup`, and `restore` operations so you can prove compliance and trace back when actions occurred
724. **Benchmarking and comparing** — Use `benchmark` and `compare` to record performance baselines and before/after results across system changes
735. **Generating ops reports** — Use `report` to log periodic summaries, then `export json` to pull structured data for dashboards or handoffs
74
75## Examples
76
77```bash
78# Log a system scan
79time-logger scan "Full port scan on 192.168.1.0/24 — 12 hosts found"
80
81# Record a monitoring event
82time-logger monitor "nginx upstream response time spiked to 2.3s"
83
84# Log an alert
85time-logger alert "Disk usage on /var exceeded 90% threshold"
86
87# Record a fix applied
88time-logger fix "Rotated nginx logs and freed 4.2GB on /var"
89
90# Search for all entries mentioning 'nginx'
91time-logger search nginx
92
93# Export everything to JSON
94time-logger export json
95
96# View summary statistics
97time-logger stats
98
99# Check recent activity
100time-logger recent
101```
102
103---
104
105Powered by BytesAgain | bytesagain.com | hello@bytesagain.com