LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-11-2020, 05:40 PM   #1
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Linux Mint - constant disk activity?


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
Code:
jonk@dave:~$ cat /proc/sys/vm/swappiness
10
jonk@dave:~$
and
Code:
jonk@dave:~$ free -h
              total        used        free      shared  buff/cache   available
Mem:           11Gi       1.8Gi       7.8Gi       191Mi       2.1Gi       9.4Gi
Swap:         2.0Gi          0B       2.0Gi
jonk@dave:~$
and a bit more info about the disk
Code:
jonk@dave:~$ sudo fdisk -l
[sudo] password for jonk:##########
Disk /dev/sda: 1.84 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: Hitachi HUA72302
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x289f73ed

Device     Boot   Start        End    Sectors  Size Id Type
/dev/sda1  *       2048    1050623    1048576  512M  b W95 FAT32
/dev/sda2       1052670 3907028991 3905976322  1.8T  5 Extended
/dev/sda5       1052672 3907028991 3905976320  1.8T 83 Linux


Disk /dev/sdb: 7.28 TiB, 8001563221504 bytes, 15628053167 sectors
Disk model: Backup+ Hub BK  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: D42CC68E-B160-4AE4-B6C6-828F95D96FBC

Device     Start         End     Sectors  Size Type
/dev/sdb1   2048 15628052479 15628050432  7.3T Linux filesystem
jonk@dave:~$
and about the cpu
Code:
jonk@dave:~$ lscpu
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   40 bits physical, 48 bits virtual
CPU(s):                          16
On-line CPU(s) list:             0-15
Thread(s) per core:              2
Core(s) per socket:              4
Socket(s):                       2
NUMA node(s):                    2
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           44
Model name:                      Intel(R) Xeon(R) CPU           E5620  @ 2.40GHz
Stepping:                        2
Frequency boost:                 enabled
CPU MHz:                         1600.231
CPU max MHz:                     2395.0000
CPU min MHz:                     1596.0000
BogoMIPS:                        4800.56
Virtualisation:                  VT-x
L1d cache:                       256 KiB
L1i cache:                       256 KiB
L2 cache:                        2 MiB
L3 cache:                        24 MiB
and its running Mint 20 XFCE
Code:
jonk@dave:~$ uname -a
Linux dave 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
jonk@dave:~$ 
jonk@dave:~$ cat /etc/os-release
NAME="Linux Mint"
VERSION="20 (Ulyana)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20"
VERSION_ID="20"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=ulyana
UBUNTU_CODENAME=focal
jonk@dave:~$
Attached Thumbnails
Click image for larger version

Name:	HTOP.png
Views:	35
Size:	150.2 KB
ID:	33636  

Last edited by GPGAgent; 07-11-2020 at 05:50 PM.
 
Old 07-11-2020, 08:01 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
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.

You might find this article helpful: https://www.cyberciti.biz/faq/find-o...ound-on-linux/

Last edited by frankbell; 07-11-2020 at 08:04 PM.
 
2 members found this post helpful.
Old 07-11-2020, 08:50 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by GPGAgent View Post
I've attached htop output
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.
 
1 members found this post helpful.
Old 07-11-2020, 08:57 PM   #4
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
Wait, what? I don't even see where did you find "disk activity", you'd be running iotop, right?
 
Old 07-12-2020, 03:06 AM   #5
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by tinfoil3d View Post
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

Last edited by GPGAgent; 07-12-2020 at 04:26 AM.
 
Old 07-12-2020, 06:25 AM   #6
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
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?
 
1 members found this post helpful.
Old 07-12-2020, 06:49 AM   #7
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by tinfoil3d View Post
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
Code:
jonk@dave:~$ sudo iotop
and iostat
Code:
jonk@dave:~$ iostat -h
Linux 5.4.0-40-generic (dave) 	12/07/20 	_x86_64_	(16 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           1.9%    0.0%    0.5%    0.5%    0.0%   97.0%

      tps    kB_read/s    kB_wrtn/s    kB_dscd/s    kB_read    kB_wrtn    kB_dscd Device
    13.26       302.3k       222.3k         0.0k     876.4M     644.6M       0.0k sda


jonk@dave:~$
Attached Thumbnails
Click image for larger version

Name:	IOTOP.png
Views:	41
Size:	77.1 KB
ID:	33637  

Last edited by GPGAgent; 07-12-2020 at 06:56 AM.
 
Old 07-12-2020, 07:04 AM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,694

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
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.
 
Old 07-12-2020, 07:21 AM   #9
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Quote:
Originally Posted by michaelk View Post
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

Last edited by GPGAgent; 07-12-2020 at 07:31 AM.
 
Old 07-12-2020, 07:37 AM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
1 members found this post helpful.
Old 07-12-2020, 07:57 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,125

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
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.
 
1 members found this post helpful.
Old 07-12-2020, 09:01 AM   #12
tinfoil3d
Member
 
Registered: Apr 2020
Location: Japan/RJCC
Distribution: debian, lfs, whatever else i need in qemu
Posts: 268

Rep: Reputation: 75
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
Code:
smartctl --all /dev/sda
. After backing up, that is.
 
1 members found this post helpful.
Old 07-12-2020, 09:48 AM   #13
GPGAgent
Senior Member
 
Registered: Oct 2018
Location: Surrey UK
Distribution: Mint 20 xfce 64bit
Posts: 1,026

Original Poster
Blog Entries: 3

Rep: Reputation: 133Reputation: 133
Well all seems okay after a short test
Code:
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.
and a quick df -h
Code:
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  163M  5.7G   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   16K  1.2G   1% /run/user/1000
jonk@dave:~$
So I think I'll just keep an eye on it - cheers for the tips folks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lubuntu 15.04 "error: invalid string constant "thunar-statusbar", expected valid string constant" error knobby67 Ubuntu 1 12-09-2016 12:19 AM
Mobius H/W RAID5 constant disk light activity when mounted r_lafauce Linux - Server 1 03-03-2016 04:40 PM
Laptop hard disk constant activity mutexe Slackware 2 07-14-2009 11:57 AM
Constant disk activity... Bonk Fedora 14 07-06-2004 03:42 PM
Constant network activity? GetCool Linux - Networking 5 11-20-2003 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration