Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Even when the machine is idle, there is activity to the disk.
What's the best way to figure out what's doing it?
Once I know that I can try to reduce or stop it.
I've attached htop output
Try the top or htop command. See their man pages for details.
Note that, even when you are not actively using the machine, processes and daemons will still be running behind the scenes, as it were. The only time a computer is completely idle is when it's powered off.
I'd be looking at indexing software - was tracker to blame when I looked at this sort of thing. But anything doing (semi-)constant logging could be to blame.
Wait, what? I don't even see where did you find "disk activity", you'd be running iotop, right?
Exactly my point, I can hear the disk activity - constant pattern of sound, precisely the same as when I save file. And of course the disk activity led is lit
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268
Rep:
You've never mentioned that. Does it still happen when you boot into it in rescue mode(no gui)? Does it still happen in livecd? Maybe the disk is dying btw. Or you just need to run iotop anyway. What does iotop say?
You've never mentioned that. Does it still happen when you boot into it in rescue mode(no gui)? Does it still happen in livecd? Maybe the disk is dying btw. Or you just need to run iotop anyway. What does iotop say?
I may be worrying about nothing! iotop doesn't show anything of too much concern, unless I'm using it incorrectly
In addition to logs ext4 journal commits happen every 5 seconds. You can increase the time but if you lose power that would be how much data you could lose.
In addition to logs ext4 journal commits happen every 5 seconds. You can increase the time but if you lose power that would be how much data you could lose.
I've looked up how to do this but it looks a bit too difficult, so I may hold off for now, unless there is a nice simple way, thanks for the info
Code:
jonk@dave:~$ more /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=6e725920-1c32-4931-bab9-fc8c12d01128 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=0628-D3D6 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
jonk@dave:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 5.9G 0 5.9G 0% /dev
tmpfs 1.2G 1.7M 1.2G 1% /run
/dev/sda5 1.8T 28G 1.7T 2% /
tmpfs 5.9G 129M 5.8G 3% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 5.9G 0 5.9G 0% /sys/fs/cgroup
/dev/sda1 511M 4.0K 511M 1% /boot/efi
tmpfs 1.2G 28K 1.2G 1% /run/user/1000
I was going to mention iotop would likely produce that for low level background I/O. It's a sampler that takes averages over time - you need something that logs (all) actual traffic. I set a kernel trace to trap it but other tools now exist in user-space, I'll see what my notes say.
The I/O scheduler commit time that michaelk mentions is more of a symptom of something else doing actual I/O - changing the time delta merely moves the goal posts.
OK - have a look at fatrace. It attaches ionotify for all mounted filesystems but ignores the pseudo filesystems like /proc. So it see calls to the I/O subsystem rather than actual physical I/O to the disk but should suffice. It'll tell you what processes are calling I/O to what files.
You'll be surprised how much I/O is going on all the time. On a (really) idle gnome system a 60 second run got 1976 hits - only 7 of which were writes, all by gvfs.
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268
Rep:
If even fatrace shows nothing there may be a reason to get concerned about it because the HDD may be failing, however it's still strange that the busy LED is on. I'd back up before posting to LQ initially if I were you.
Try live/other os/emergency mode to check if the symptoms are still there, if they are, also post
jonk@dave:~$ sudo smartctl --test=short /dev/sda1
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-40-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 1 minutes for test to complete.
Test will complete after Sun Jul 12 15:42:24 2020 BST
Use smartctl -X to abort test.
jonk@dave:~$
jonk@dave:~$ sudo smartctl --capabilities /dev/sda1
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-40-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
General SMART Values:
Offline data collection status: (0x85) Offline data collection activity
was aborted by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (20946) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 349) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
and ditto for sda5
Code:
jonk@dave:~$ sudo smartctl --test=short /dev/sda5
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-40-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF OFFLINE IMMEDIATE AND SELF-TEST SECTION ===
Sending command: "Execute SMART Short self-test routine immediately in off-line mode".
Drive command "Execute SMART Short self-test routine immediately in off-line mode" successful.
Testing has begun.
Please wait 1 minutes for test to complete.
Test will complete after Sun Jul 12 15:45:45 2020 BST
Use smartctl -X to abort test.
jonk@dave:~$ sudo smartctl --capabilities /dev/sda5
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-40-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF READ SMART DATA SECTION ===
General SMART Values:
Offline data collection status: (0x85) Offline data collection activity
was aborted by an interrupting command from host.
Auto Offline Data Collection: Enabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.