On Tue, 2 Nov 2021 08:00:03 +0100, Stefan Kaintoch wrote:
Hi *.*,
I use a RPi4 with an external USB-HD as backup solution.
It runs restic on pi:~ $ uname -a Linux resticrepo 5.10.60-v7l+ #1449
SMP Wed Aug 25 15:00:44 BST 2021 armv7l GNU/Linux pi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
The USB-HD goes to sleep automatically a few minutes after usage. But it awakes about every 30 minutes. Of course it should not.
It shall only work if needed for backup once a day.
How can I identify the process which awakes the USB-HD?
Try these suggestions:
- see if there are any cron jobs with a 30 minute repeat rate. If there
are any, they'll be in one of the /etc/cron.* directories
- run "systemctl", which uses less to display a list of all systemd
services, showing which are loaded and active together with a short
description of what the job does.
- run 'top' in a terminal window and watch it as the time for the disk
activity approaches.
- Better, run
ls -s /var/log/*
Make a note of all the logs with a timestamp thats a bit *later* than
the last time you know the disk was woken up, and use 'less' to see
what, activity was logged at that time. Then scan through these logs to
see what happened at that time. There probably won't be more
than half a dozen logs to look at.
Hint: if you look for the last ocurrence it will be near the end of
the log. Be sure to use a command like:
sudo less /var/log/syslog
to look at the log: log files are only intended to be read by the
sysadmin, which is why you need to prefix the command with 'sudo'
and provide a password when asked.
If you've never used 'less' before, do read its manpage because its got
very powerful file searching abilities, all triggered with with single
key commands. Its one of the essential Linux tools that you really
should know how to use.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)