Skip to content

Commit

Permalink
Use named background threads
Browse files Browse the repository at this point in the history
Name the various background tasks that archiveloop uses so they're
identifiable in 'ps', 'pstree' and similar tools.
  • Loading branch information
marcone committed Nov 14, 2024
1 parent 5e265f2 commit 3aac453
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions run/archiveloop
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 717,7 @@ function set_time () {
}

function snapshotloop {
echo -n snapshotloop > /proc/self/comm
while true
do
sleep "${SNAPSHOT_INTERVAL:-3480}"
Expand All @@ -726,6 727,7 @@ function snapshotloop {
}

function freespacemanager {
echo -n freespacemanager > /proc/self/comm
# 10G
local reserve=10737418240
local threepctoftotalspace
Expand All @@ -745,6 747,7 @@ function freespacemanager {
}

function logrotator {
echo -n logrotator > /proc/self/comm
while true
do
if [ -s /var/log/nginx/access.log ]
Expand All @@ -764,6 767,7 @@ function logrotator {
}

function wifichecker {
echo -n wifichecker > /proc/self/comm
dmesg -w | {
while TMOUT=1 read -r line
do
Expand Down

0 comments on commit 3aac453

Please sign in to comment.