sosmonitor 0.3.1__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sosmonitor
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Simple server monitor: CPU, memory, disk and load alerts by webhook or email. One file, no root, no dependencies.
5
5
  License: MIT
6
6
  Project-URL: Homepage, https://github.com/diemsouza/sosmonitor
@@ -28,96 +28,125 @@ Dynamic: license-file
28
28
 
29
29
  # SOSMonitor
30
30
 
31
+ [![PyPI](https://img.shields.io/pypi/v/sosmonitor)](https://pypi.org/project/sosmonitor/)
32
+ [![Python](https://img.shields.io/pypi/pyversions/sosmonitor)](https://pypi.org/project/sosmonitor/)
33
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
34
+
31
35
  > Sometimes simple is more than enough.
32
36
 
33
37
  A tiny server monitor that watches **CPU, memory, disk and load average** and tells you when something crosses a limit, by **webhook** (n8n, Make, Zapier, your own endpoint...) and/or **email**.
34
38
 
35
39
  No agent to install, no paid monitoring service, no dashboard to maintain, no root. One Python file run by cron. It fits any server that just needs a simple "hey, the disk is at 90%" alert, and it was born on locked-down hosts (Cloudways and similar) where you can't install anything else.
36
40
 
37
- - **One file:** `sosmonitor.py`. Python 3.8+ standard library only (`psutil` is optional). Install it with a single `curl`, or from PyPI with `pipx`.
41
+ - **One file:** `sosmonitor.py`. Python 3.8+ standard library only (`psutil` is optional). Install it from PyPI, or with a single `curl` where there is no package manager at all.
38
42
  - **No root:** it is scheduled in your own user's crontab.
39
43
  - **Self-contained:** it only writes next to its config file (log, state, lock).
40
44
  - **No alert spam:** you get one alert per level change, with a margin so a value hovering around a threshold doesn't flood your inbox.
41
45
 
42
46
  ## Install
43
47
 
44
- ### Single file (main way)
48
+ Two ways. Pick by what your host lets you do.
45
49
 
46
- ```bash
47
- mkdir ~/sosmonitor && cd ~/sosmonitor
48
- curl -fsSLO https://github.com/diemsouza/sosmonitor/raw/main/sosmonitor.py
50
+ | | Use this when | Reference |
51
+ | --- | --- | --- |
52
+ | **Package** | You can install software on the server | EC2, a VPS, your own machine |
53
+ | **Single file** | No `pip`, no root, nothing to install | Cloudways and other managed hosts |
49
54
 
50
- python3 sosmonitor.py install # 1. creates the config in ~/.config/sosmonitor/, schedules cron
51
- # and creates the `sosmonitor` command
52
- python3 sosmonitor.py config # 2. opens the config: set server_name, webhook and/or email
53
- python3 sosmonitor.py test # 3. prints a test alert and sends it to the enabled channels
55
+ Either way you end up with the same `sosmonitor` command, a config file and a cron entry.
56
+
57
+ ### Package
58
+
59
+ ```bash
60
+ sudo apt install pipx # Debian/Ubuntu. Fedora/Amazon Linux: sudo dnf install pipx
61
+ pipx install sosmonitor
62
+ pipx ensurepath # puts ~/.local/bin on your PATH
63
+ exec $SHELL # or open a new session
64
+
65
+ sosmonitor install # 1. creates the config and schedules cron
66
+ sosmonitor config # 2. opens the config: set server_name, webhook and/or email
67
+ sosmonitor test # 3. prints a test alert and sends it to the enabled channels
54
68
  ```
55
69
 
56
- Three steps: `install`, then `config` to edit, then `test` to validate the channels. Only `install` and `config` create a config file; `run` and `test` never do (without one they tell you to run `install`).
70
+ Don't skip `pipx ensurepath`. Without it the tool is installed but the shell can't find it yet.
57
71
 
58
- `install` can be run as many times as you like: it never duplicates the cron line, recreates the link or rewrites an existing config. It finishes with a summary showing the state of each step (`created`, `ok`, `already`, `manual` or `failed`), for example:
72
+ `pipx` keeps SOSMonitor in its own environment and puts only the command on your `PATH`. `uv tool install sosmonitor` does the same.
59
73
 
60
- ```
61
- Config created /Users/me/.config/sosmonitor/config.json
62
- Command ok sosmonitor (~/.local/bin/sosmonitor)
63
- Schedule ok every 5 minute(s)
64
- ```
74
+ `pip install sosmonitor` works as well, but on Debian, Ubuntu, Fedora and most current server images the system Python refuses it with `error: externally-managed-environment` (PEP 668). There, use `pipx`, a virtualenv, or `pip install --user --break-system-packages sosmonitor`.
65
75
 
66
- A step that fails does not stop the others. `install` exits with a non-zero code only when a step failed; a step that needs a manual action (for example a host without `crontab`, where it prints the line to paste in your panel) is marked `manual` and still exits 0.
76
+ On macOS and Windows, CPU and memory need `psutil`: `pipx install "sosmonitor[psutil]"`. On Linux nothing else is needed.
67
77
 
68
- **macOS:** `crontab` is blocked until your terminal has Full Disk Access. If `install` shows `Schedule failed crontab: Operation not permitted`, open System Settings > Privacy & Security > Full Disk Access, enable your terminal, restart it and run `install` again. The config and the command are already in place, so it only schedules cron.
78
+ Because pip, pipx and uv create the `sosmonitor` command themselves, `install` does not touch `~/.local/bin` or your shell startup files, and marks that step `already`.
69
79
 
70
- `curl -fsSLO` downloads the file under its own name. The `-L` follows GitHub's redirect from `/raw/` to the raw file. You can also `git clone https://github.com/diemsouza/sosmonitor` and use the script from the clone.
80
+ ### Single file
71
81
 
72
- ### Python package (pipx, uv or pip)
82
+ No package manager, no dependencies, no root. This is the one for locked-down hosts:
73
83
 
74
84
  ```bash
75
- pipx install sosmonitor # or: uv tool install sosmonitor
76
- # or: pip install --user sosmonitor
85
+ mkdir ~/sosmonitor && cd ~/sosmonitor
86
+ curl -fsSLO https://github.com/diemsouza/sosmonitor/raw/main/sosmonitor.py
77
87
 
78
- sosmonitor install # 1. creates the config, schedules it in cron
79
- sosmonitor config # 2. opens the config in your editor
80
- sosmonitor test # 3. validates the channels
88
+ python3 sosmonitor.py install # 1. creates the config, schedules cron and
89
+ # creates the `sosmonitor` command
90
+ sosmonitor config # 2. set server_name, webhook and/or email
91
+ sosmonitor test # 3. validate the channels
81
92
  ```
82
93
 
83
- Same three steps and the same `install` summary as above (including the macOS note). `install` is safe to run repeatedly, and `run` and `test` never create a config.
94
+ `install` also adds `~/.local/bin` to your `PATH` in your shell startup files, so you never edit `.bashrc` yourself. Open a new session (or run the `export` line it prints) and you can drop the `python3` from then on.
95
+
96
+ `curl -fsSLO` downloads the file under its own name; `-L` follows GitHub's redirect from `/raw/` to the raw file. You can also `git clone https://github.com/diemsouza/sosmonitor` and use the script from the clone.
84
97
 
85
- The `sosmonitor` command is created automatically by pip, pipx or uv, so `install` does not touch `~/.local/bin` or your shell startup files. On macOS and Windows, CPU and memory need `psutil`, so install it as an extra: `pipx install "sosmonitor[psutil]"` or `pip install "sosmonitor[psutil]"`. On Linux nothing else is needed.
98
+ ### Either way
86
99
 
87
- The examples below use `python3 sosmonitor.py ...`. With the package, run `sosmonitor ...` instead.
100
+ Three steps: `install`, then `config` to edit, then `test` to validate the channels. Only `install` and `config` ever create a config file; `run` and `test` never do (without one they tell you to run `install`).
101
+
102
+ `install` can be run as many times as you like: it never duplicates the cron line, recreates the link or rewrites an existing config. It finishes with a summary showing the state of each step (`created`, `ok`, `already`, `manual` or `failed`), for example:
103
+
104
+ ```
105
+ Config created /home/ubuntu/.config/sosmonitor/config.json
106
+ Command already sosmonitor (~/.local/bin/sosmonitor)
107
+ Schedule ok every 5 minute(s)
108
+ ```
109
+
110
+ A step that fails does not stop the others. `install` exits with a non-zero code only when a step failed; a step that needs a manual action (for example a host without `crontab`, where it prints the line to paste in your panel) is marked `manual` and still exits 0.
111
+
112
+ **macOS:** `crontab` is blocked until your terminal has Full Disk Access. If `install` shows `Schedule failed crontab: Operation not permitted`, open System Settings > Privacy & Security > Full Disk Access, enable your terminal, restart it and run `install` again. The config and the command are already in place, so it only schedules cron.
88
113
 
89
114
  ## Commands
90
115
 
91
- | Command | What it does |
92
- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
93
- | `python3 sosmonitor.py` (or `run`) | Runs one check. This is what cron calls, and the default with no command. Without a config file it says so, points to `install` and exits non-zero (it never creates one) |
94
- | `python3 sosmonitor.py test` | Prints a test alert on screen (title and body, as in the email), sends it to every enabled channel and shows the result. Never creates a config (without one it points to `install`) |
95
- | `python3 sosmonitor.py config` | Creates the config if missing and opens it in `$VISUAL`, `$EDITOR`, `nano` or `vi` (`notepad` on Windows). Checks the JSON when the editor closes and offers to reopen it once. Without a terminal or an editor, prints the path and a command to copy |
96
- | `python3 sosmonitor.py install` | Creates the config if missing, adds a crontab entry that runs every `check_interval_minutes` and creates the `sosmonitor` command (Linux/macOS), unless a package install already provides it. Safe to run again. Runs every step even if one fails and prints a summary of each; exits non-zero only if a step `failed`. `--no-shortcut` skips the command |
97
- | `python3 sosmonitor.py uninstall` | Removes that crontab entry, the `sosmonitor` command and its PATH lines, and prints a summary of each step (non-zero exit only if a step `failed`) |
98
- | `python3 sosmonitor.py --version` | Prints the installed version. See the [CHANGELOG](CHANGELOG.md) for what changed in each version |
116
+ The examples below use the `sosmonitor` command, which both installs give you. Before you have run `install` from a single-file download, use `python3 sosmonitor.py ...` instead.
117
+
118
+ | Command | What it does |
119
+ | --- | --- |
120
+ | `sosmonitor` (or `sosmonitor run`) | Runs one check. This is what cron calls, and the default with no command. Without a config file it says so, points to `install` and exits non-zero (it never creates one) |
121
+ | `sosmonitor test` | Prints a test alert on screen (title and body, as in the email), sends it to every enabled channel and shows the result. Never creates a config (without one it points to `install`) |
122
+ | `sosmonitor config` | Creates the config if missing and opens it in `$VISUAL`, `$EDITOR`, `nano` or `vi` (`notepad` on Windows). Checks the JSON when the editor closes and offers to reopen it once. Without a terminal or an editor, prints the path and a command to copy |
123
+ | `sosmonitor install` | Creates the config if missing, adds a crontab entry that runs every `check_interval_minutes` and creates the `sosmonitor` command (Linux/macOS), unless a package install already provides it. Safe to run again. Runs every step even if one fails and prints a summary of each; exits non-zero only if a step `failed`. `--no-shortcut` skips the command |
124
+ | `sosmonitor uninstall` | Removes that crontab entry, the `sosmonitor` command and its PATH lines, and prints a summary of each step (non-zero exit only if a step `failed`) |
125
+ | `sosmonitor --version` | Prints the installed version. See the [CHANGELOG](CHANGELOG.md) for what changed in each version |
99
126
 
100
127
  ### Where the config lives
101
128
 
102
- | Install | Config file |
103
- | ---------------------------- | ------------------------------------------------------------------------------------ |
104
- | New install (`curl` or package) | `~/.config/sosmonitor/config.json` (or `$XDG_CONFIG_HOME/sosmonitor/`), `%APPDATA%\SOSMonitor\config.json` on Windows |
105
- | Existing single-file install | `config.json` next to `sosmonitor.py`, if it is already there |
106
- | Any, with `-c /path/to.json` | That file. `-c` overrides everything |
129
+ | Install | Config file |
130
+ | --- | --- |
131
+ | New install (package or `curl`) | `~/.config/sosmonitor/config.json` (or `$XDG_CONFIG_HOME/sosmonitor/`), `%APPDATA%\SOSMonitor\config.json` on Windows |
132
+ | Existing single-file install | `config.json` next to `sosmonitor.py`, if it is already there |
133
+ | Any, with `-c /path/to.json` | That file. `-c` overrides everything |
107
134
 
108
- The order is: `-c`, then a `config.json` next to the script if it already exists (so every existing install keeps working as is), otherwise the user config folder. `install` (or `config`) creates the file there and tells you where. `run` and `test` never create a config: without one they say so and point to `install`. SOSMonitor never moves or copies an existing file. The user folder survives upgrades, which pip and pipx would otherwise wipe from the script's folder.
135
+ The order is: `-c`, then a `config.json` next to the script if it already exists (so every existing install keeps working as is), otherwise the user config folder. `install` (or `config`) creates the file there and tells you where. `run` and `test` never create a config: without one they say so and point to `install`. SOSMonitor never moves or copies an existing file. The user folder also survives a package upgrade, which would otherwise wipe anything kept inside the installed package.
109
136
 
110
137
  **The log, state and lock files always live next to the config file in use**, wherever that is. It doesn't matter which directory you run the command from.
111
138
 
112
139
  ```bash
113
- python3 sosmonitor.py -c /path/to/other.json # run with that config
114
- python3 sosmonitor.py -c /path/to/other.json test
115
- python3 sosmonitor.py -c /path/to/other.json install # creates it if missing; the cron line keeps the -c path
140
+ sosmonitor -c /path/to/other.json # run with that config
141
+ sosmonitor -c /path/to/other.json test
142
+ sosmonitor -c /path/to/other.json install # creates it if missing; the cron line keeps the -c path
116
143
  ```
117
144
 
118
145
  ### The `sosmonitor` command
119
146
 
120
- With the single-file install on Linux and macOS, `install` also creates the `sosmonitor` command (a link at `~/.local/bin/sosmonitor`) and adds that folder to your `PATH` in your shell startup files, so you never edit `.bashrc` yourself. Open a new terminal session to use it, or run the `export` line it prints. If your host's shell doesn't load startup files, `install` says so in its summary, and the full path it prints (`~/.local/bin/sosmonitor`) always works. The link is followed, so `config.json`, the log and the state stay next to the real file. Use `install --no-shortcut` to only schedule cron. If a package install (pip, pipx, uv) already put `sosmonitor` on your `PATH`, `install` marks the command `already`: it creates no link and touches no startup file, and the cron line runs that executable. `uninstall` only removes what `install` created.
147
+ With the single-file install on Linux and macOS, `install` creates the command as a link at `~/.local/bin/sosmonitor` and adds that folder to your `PATH` in your shell startup files. Open a new terminal session to use it, or run the `export` line it prints. If your host's shell doesn't load startup files, `install` says so in its summary, and the full path it prints (`~/.local/bin/sosmonitor`) always works. The link is followed, so the config, the log and the state stay next to the real file. Use `install --no-shortcut` to only schedule cron.
148
+
149
+ If a package install (pip, pipx, uv) already put `sosmonitor` on your `PATH`, `install` marks the command `already`: it creates no link, touches no startup file, and the cron line runs that executable. `uninstall` only removes what `install` created.
121
150
 
122
151
  On Windows, create `sosmonitor.cmd` in a folder on your `PATH` with this single line:
123
152
 
@@ -165,18 +194,18 @@ Created by `install` or `config` (with `chmod 600`, since it holds passwords and
165
194
  }
166
195
  ```
167
196
 
168
- | Key | What it does |
169
- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
170
- | `server_name` | Name shown in alerts and in the email subject |
171
- | `check_interval_minutes` | How often cron runs the check (used by `install`, 1 to 59) |
172
- | `disk_path` | Partition to measure (`/`, `/home`, `C:\` ...) |
173
- | `send_every_check` | `true`: the webhook receives the metrics on every check. `false`: only when there is an alert. Email is only ever sent for alerts |
174
- | `sustain_checks` | How many consecutive checks a metric must stay at or above a level before the alert is sent. `1` (default) alerts on the first check. Raise it (e.g. `3`) on noisy servers. Recovery is never delayed |
175
- | `thresholds` | Levels in % and the message for each one. They apply to CPU, memory and disk. Your object **replaces** the default list, so include every level you want (e.g. add `"50"` and keep `"70"`, `"80"`...) |
176
- | `recovery_message` | Sent when a metric goes back below the lowest level |
177
- | `top_processes` | `enabled` (default `true`) and `count` (default `3`): list the top CPU or memory consumers in the alert, only when that metric alerts |
178
- | `webhook` | `url` receives a JSON `POST`; `token`, if set, goes in the header named by `token_header` (default `X-Monitor-Token`; change it to e.g. `X-Token` or `Authorization` if your service requires) |
179
- | `email` | SMTP settings. Port 465 uses SSL; other ports use STARTTLS when the server offers it. For Gmail, use an [app password](https://myaccount.google.com/apppasswords). `to` is a list |
197
+ | Key | What it does |
198
+ | --- | --- |
199
+ | `server_name` | Name shown in alerts and in the email subject |
200
+ | `check_interval_minutes` | How often cron runs the check (used by `install`, 1 to 59) |
201
+ | `disk_path` | Partition to measure (`/`, `/home`, `C:\` ...) |
202
+ | `send_every_check` | `true`: the webhook receives the metrics on every check. `false`: only when there is an alert. Email is only ever sent for alerts |
203
+ | `sustain_checks` | How many consecutive checks a metric must stay at or above a level before the alert is sent. `1` (default) alerts on the first check. Raise it (e.g. `3`) on noisy servers. Recovery is never delayed |
204
+ | `thresholds` | Levels in % and the message for each one. They apply to CPU, memory and disk. Your object **replaces** the default list, so include every level you want (e.g. add `"50"` and keep `"70"`, `"80"`...) |
205
+ | `recovery_message` | Sent when a metric goes back below the lowest level |
206
+ | `top_processes` | `enabled` (default `true`) and `count` (default `3`): list the top CPU or memory consumers in the alert, only when that metric alerts |
207
+ | `webhook` | `url` receives a JSON `POST`; `token`, if set, goes in the header named by `token_header` (default `X-Monitor-Token`; change it to e.g. `X-Token` or `Authorization` if your service requires) |
208
+ | `email` | SMTP settings. Port 465 uses SSL; other ports use STARTTLS when the server offers it. For Gmail, use an [app password](https://myaccount.google.com/apppasswords). `to` is a list |
180
209
 
181
210
  In messages, `{metric}` (CPU, Memory, Disk), `{value}` (rounded %) and `{server}` are replaced. Messages can be in any language. Set `"enabled": false` to turn a channel off without deleting its settings.
182
211
 
@@ -192,16 +221,16 @@ SOSMonitor remembers the last level of each metric (in `sosmonitor_state.json`)
192
221
 
193
222
  Example with levels 70 and 80:
194
223
 
195
- | Check | Value | Level | Alert |
196
- | ----- | ----- | ----- | --------------------------------- |
197
- | 1 | 65% | 0 | – |
198
- | 2 | 71% | 70 | **"CPU at 71%"** |
199
- | 3 | 69% | 70 | – (still within 70 − 5) |
200
- | 4 | 72% | 70 | – |
201
- | 5 | 83% | 80 | **"CPU at 83% (WARNING)"** |
202
- | 6 | 77% | 80 | – (still within 80 − 5) |
203
- | 7 | 74% | 70 | **"CPU at 74%"** |
204
- | 8 | 64% | 0 | **"CPU at 64% (BACK TO NORMAL)"** |
224
+ | Check | Value | Level | Alert |
225
+ | --- | --- | --- | --- |
226
+ | 1 | 65% | 0 | – |
227
+ | 2 | 71% | 70 | **"CPU at 71%"** |
228
+ | 3 | 69% | 70 | – (still within 70 − 5) |
229
+ | 4 | 72% | 70 | – |
230
+ | 5 | 83% | 80 | **"CPU at 83% (WARNING)"** |
231
+ | 6 | 77% | 80 | – (still within 80 − 5) |
232
+ | 7 | 74% | 70 | **"CPU at 74%"** |
233
+ | 8 | 64% | 0 | **"CPU at 64% (BACK TO NORMAL)"** |
205
234
 
206
235
  ### The alert message
207
236
 
@@ -289,13 +318,13 @@ Also:
289
318
 
290
319
  ## Platforms
291
320
 
292
- | | CPU / memory | Disk / load | Scheduling | Dependencies |
293
- | ----------- | ---------------------- | ------------------------------ | -------------------------------------------------------------- | ------------------------------------------------- |
294
- | **Linux** | Native (reads `/proc`) | Native | User crontab | None |
295
- | **macOS** | Needs `psutil` | Native | User crontab | `pip install "sosmonitor[psutil]"` or `pip3 install psutil` |
296
- | **Windows** | Needs `psutil` | Disk native, load via `psutil` | Task Scheduler: `install` prints the `schtasks` command to run | `pip install "sosmonitor[psutil]"` or `pip install psutil` |
321
+ | | CPU / memory | Disk / load | Scheduling | Dependencies |
322
+ | --- | --- | --- | --- | --- |
323
+ | **Linux** | Native (reads `/proc`) | Native | User crontab | None |
324
+ | **macOS** | Needs `psutil` | Native | User crontab | `pipx install "sosmonitor[psutil]"` |
325
+ | **Windows** | Needs `psutil` | Disk native, load via `psutil` | Task Scheduler: `install` prints the `schtasks` command to run | `pipx install "sosmonitor[psutil]"` |
297
326
 
298
- When `psutil` is installed, SOSMonitor uses it on every platform. Without it, missing metrics are simply skipped.
327
+ When `psutil` is installed, SOSMonitor uses it on every platform. Without it, missing metrics are simply skipped. With a single-file install, plain `pip install psutil` (or your distro's `python3-psutil` package) does the same job.
299
328
 
300
329
  Alpine and other musl or busybox hosts work with no dependency at all: everything, including the top processes list, is read straight from `/proc`, without needing `ps`.
301
330
 
@@ -309,15 +338,23 @@ On macOS, `crontab` also needs Full Disk Access for your terminal (see [Install]
309
338
 
310
339
  ## Files created (always next to the config in use)
311
340
 
312
- | File | Content |
313
- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
314
- | `sosmonitor.log` | One JSON line per check (metrics, alerts, delivery result). Rotates to `.log.1` at 5 MB, keeping one old file (about 10 MB at most) |
315
- | `sosmonitor_state.json` | Last level of each metric, the `sustain_checks` counters and the CPU counters used for the next average |
316
- | `.sosmonitor.lock` | Prevents two checks from running at the same time |
341
+ | File | Content |
342
+ | --- | --- |
343
+ | `sosmonitor.log` | One JSON line per check (metrics, alerts, delivery result). Rotates to `.log.1` at 5 MB, keeping one old file (about 10 MB at most) |
344
+ | `sosmonitor_state.json` | Last level of each metric, the `sustain_checks` counters and the CPU counters used for the next average |
345
+ | `.sosmonitor.lock` | Prevents two checks from running at the same time |
317
346
 
318
347
  ## Updating
319
348
 
320
- **Package install:** `pipx upgrade sosmonitor` (or `uv tool upgrade sosmonitor`, or `pip install --user -U sosmonitor`), then `sosmonitor --version` and `sosmonitor test`. Your config, log and state live in the user config folder, so the upgrade doesn't touch them. Cron keeps working because it points to the `sosmonitor` executable.
349
+ **Package install:**
350
+
351
+ ```bash
352
+ pipx upgrade sosmonitor # or: uv tool upgrade sosmonitor
353
+ sosmonitor --version
354
+ sosmonitor test
355
+ ```
356
+
357
+ With `pip`, use `pip install --user -U sosmonitor` (plus `--break-system-packages` where PEP 668 applies). Cron keeps working because it points to the `sosmonitor` executable, not to a file inside the package.
321
358
 
322
359
  **Single file:** SOSMonitor is a single file, so updating is just downloading it again:
323
360
 
@@ -325,22 +362,22 @@ On macOS, `crontab` also needs Full Disk Access for your terminal (see [Install]
325
362
  cd ~/sosmonitor # the folder where sosmonitor.py lives
326
363
  cp sosmonitor.py sosmonitor.py.bak
327
364
  curl -fsSLO https://github.com/diemsouza/sosmonitor/raw/main/sosmonitor.py
328
- python3 sosmonitor.py --version
329
- python3 sosmonitor.py test
365
+ sosmonitor --version
366
+ sosmonitor test
330
367
  ```
331
368
 
332
369
  To get a specific version instead of the latest, download `sosmonitor.py` from that version on the [Releases](https://github.com/diemsouza/sosmonitor/releases) page (or `pipx install sosmonitor==VERSION`), where each release also lists its changes.
333
370
 
334
- **What is not touched:** `config.json`, the log, the state file and the lock. They are separate files. Cron and the `sosmonitor` command keep working because they point to the same `sosmonitor.py` (or to the package executable).
371
+ **What is not touched:** the config, the log, the state file and the lock. They live outside the script and outside the package. Cron and the `sosmonitor` command keep working either way.
335
372
 
336
373
  **What to check after updating:**
337
374
 
338
375
  1. Read the [CHANGELOG](CHANGELOG.md) for the versions between yours and the new one. Each entry has a "Config changes" line (renamed, removed or new keys).
339
- 2. Keys missing from your `config.json` use the default value, so a new option never breaks an old config. To use a new option, add it by hand using `config.example.json` as reference (`sosmonitor config` opens the file).
340
- 3. Run `python3 sosmonitor.py test` to confirm the channels still work.
341
- 4. Run `python3 sosmonitor.py install` again only if the CHANGELOG says the cron entry or the command changed. It is safe to run and never overwrites `config.json`.
376
+ 2. Keys missing from your config use the default value, so a new option never breaks an old config. To use a new option, add it by hand using `config.example.json` as reference (`sosmonitor config` opens the file).
377
+ 3. Run `sosmonitor test` to confirm the channels still work.
378
+ 4. Run `sosmonitor install` again only if the CHANGELOG says the cron entry or the command changed. It is safe to run and never overwrites an existing config.
342
379
 
343
- **Rolling back (single file):** `mv sosmonitor.py.bak sosmonitor.py`. For a package, install the previous version: `pipx install --force sosmonitor==VERSION`.
380
+ **Rolling back:** single file, `mv sosmonitor.py.bak sosmonitor.py`. Package, install the previous version: `pipx install --force sosmonitor==VERSION`.
344
381
 
345
382
  ## Development
346
383
 
@@ -348,7 +385,7 @@ To get a specific version instead of the latest, download `sosmonitor.py` from t
348
385
  python3 -m unittest discover tests
349
386
  ```
350
387
 
351
- The tests use only the standard library and never touch your real `config.json`.
388
+ The tests use only the standard library and never touch your real config.
352
389
 
353
390
  ## License
354
391