You are not logged in.
Hi there,
I have an external usb hard drive whose sleep cycle I set with this udev rule:
ACTION=="add", SUBSYSTEM=="block", KERNEL=="sda", RUN+="/usr/bin/hdparm -S 180 /dev/sda"Now occasionally it get's woken up without me activly doing anything at my pc. Is it possible to identify the process thats wakes it up or at least see at what exact times it gets woken up and/or goes to sleep?
thanks in advance,
hachel
Offline
It would already help if someone could tell me how I could monitor in real time if the hard drive gets woken up or goes to sleep (like checking the output of hdparm -C every 10 seconds, but sometimes hdparm -C wakes up my harddrive in the first place).
Offline
The only thing coming to my mind is
blktrace -d /dev/sdx -o - | blkparse -i -This simply prints all I/O operations to the device, together with names of requesting processes. It seems that blktrace is in AUR.
Offline
ok that's something, thanks! Is it safe though? Or do I risk something, like data corruption or similar?
Offline
Should be safe. It just asks the kernel what operations are currently being performed and prints them.
Offline