Files
securityonion/salt/common/tools/sbin
Josh Patterson 84cd966736 FIX: prevent so-sensor-clean runaway loop and concurrent instances
The cleanup loop had no progress check or pass limit, so once /nsm was over
threshold with nothing left to reclaim it spun at full speed, writing 1.1 GB /
12.5M lines to sensor_clean.log in five hours. Stop when a pass removes
nothing, when a pass frees no space, or at MAX_PASSES, and drop the per-pass
"no old files" logging in favor of one actionable line.

Replace the pgrep guard with flock -n. A find|while read subshell inherits the
parent's argv, so pgrep -cf counted one instance as hundreds; it was also
check-then-act, which let cron stack up overlapping runs.

Paths now derive from SENSOR_DIR with env-overridable LOG/LOCK so the
over-threshold path can be tested against a scratch filesystem.
2026-09-14 12:14:13 -04:00
..
2024-10-01 08:33:37 -04:00
2026-03-06 15:45:36 -05:00
2026-02-27 13:09:55 -05:00
2025-05-14 09:23:35 -04:00
2022-09-07 09:06:25 -04:00
2021-02-26 18:06:07 -05:00
2026-03-06 15:45:36 -05:00
2022-09-07 09:06:25 -04:00
2022-09-07 09:06:25 -04:00
2022-09-07 09:06:25 -04:00
2021-04-02 14:49:22 -04:00
2022-09-07 09:06:25 -04:00
2022-09-13 11:48:25 -04:00
2022-09-07 09:06:25 -04:00
2023-09-05 12:46:49 -04:00