Skip to content
Snippets Groups Projects
Commit e99941ca authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

Wait a random time

With the cron-synchronized scripts, if they do some communication with
our servers, do a random-time sleep, so they don't rush in all at once.
parent 8a61ea70
Branches
No related merge requests found
......@@ -9,6 +9,11 @@ BASEURL='https://securt-test.labs.nic.cz/logsend/upload.cgi?'
RID="$(atsha204cmd serial-number)"
CERT="/etc/ssl/startcom-cznic.pem"
# Don't load the server all at once. With NTP-synchronized time, and
# thousand clients, it would make spikes on the CPU graph and that's not
# nice.
sleep $(( $(tr -cd 0-9 </dev/urandom | head -c 8) % 120 ))
# Grep regexp: Month date time hostname something.something daemon
logread | \
/usr/bin/whatsnew /tmp/logs.last.sha1 | \
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment