1

When I start a terminal, I see this:

Welcome to Ubuntu 20.04.6 LTS (GNU/Linux 5.4.0-165-generic x86_64)
...
System information as of jeu 26 oct 2023 11:16:34 CEST

System load: 0.45 Usage of /: 49.7% of 455.20GB Memory usage: 50% Swap usage: 19% Processes: 182 Users logged in: 0

=> /bu is using 91.9% of 1.79TB

But when I use du or df, I get:

$ df
Sys. de fichiers            blocs de 1K    Utilisé Disponible Uti% Monté sur
udev                             457888          0     457888   0% /dev
tmpfs                             97128       3040      94088   4% /run
...
/dev/sdc                     1920645740 1765707476   57348560  97% /bu
...
~$ sudo du /bu
4       /bu/lost+found
1765707472      /bu

The results given by du and df (97% used) are identical but very different from the value given by system information (91.9% used). Why is this?

The results (at least in %) are identical for various forms of df:

$ df --si
Sys. de fichiers            Taille Utilisé Dispo Uti% Monté sur
...
/dev/sdc                      2,0T    1,9T   59G  97% /bu
$ df -H
Sys. de fichiers            Taille Utilisé Dispo Uti% Monté sur
...
/dev/sdc                      2,0T    1,9T   59G  97% /bu
~$ df -h
Sys. de fichiers            Taille Utilisé Dispo Uti% Monté sur
...
/dev/sdc                      1,8T    1,7T   55G  97% /bu

------ Edit - Results of lsbk ---- As askeh by Hannu, here is the output. This time, FSUSE% is at 92%, conform to motd. So, it seems the content of the 'MOTD' is based on some extraction of lsblkid. I updated the question title accordingly.

 lsblk -ap -o +MOUNTPOINT,FSTYPE,LABEL,PARTLABEL,FSUSE%,STATE,MODEL
NAME                     MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT     MOUNTPOINT     FSTYPE      LABEL                         PARTLABEL FSUSE% STATE   MODEL
/dev/loop0                 7:0    0         0 loop
...
/dev/loop7                 7:7    0         0 loop
/dev/sda                   8:0    0 465,8G  0 disk                                                                                          running WDC_WD5003ABYX-18WERA0
├─/dev/sda1                8:1    0   243M  0 part /boot          /boot          ext2                                                   60%
├─/dev/sda2                8:2    0     1K  0 part
└─/dev/sda5                8:5    0 465,5G  0 part                               LVM2_member
  ├─/dev/mapper/servamtex2-root
  │                      253:0    0 462,7G  0 lvm  /              /              ext4                                                   50% running
  └─/dev/mapper/servamtex2-swap_1
                         253:2    0   2,8G  0 lvm  [SWAP]         [SWAP]         swap                                                       running
/dev/sdb                   8:16   0 465,8G  0 disk                                                                                          running WDC_WD5002ABYS-18B1B0
├─/dev/sdb2                8:18   0     1K  0 part
└─/dev/sdb5                8:21   0 465,5G  0 part                               LVM2_member
  ├─/dev/mapper/servamtex-root
  │                      253:1    0 462,7G  0 lvm  /servamtex-old /servamtex-old ext4                                                   12% running
  └─/dev/mapper/servamtex-swap_1
                         253:3    0   2,8G  0 lvm                                swap                                                       running
/dev/sdc                   8:32   0   1,8T  0 disk /bu            /bu            ext4                                                   92% running ST2000NM0033-9ZM175

------ Edit 2 df used space ----

My question does not relate to interpretation of df results but why is there a discrepancy between MOTD system information and df information. A possible cause is the difference of 5% as pointed out by @muru

  • The MOTD is not updated every login, but once per boot or once a day or something like that. If df and du agree, then the MOTD is simply too old. – muru Oct 26 '23 at 10:20
  • @muru It is possible and I will keep an eye on it but bu is used exsclusively for backup, and changes once a day, in the evening. The system I am working on is off every evening and restarts in the morning. – Marc Vanhoomissen Oct 26 '23 at 13:48
  • 1
    Hmm, actually 1765707476÷1920645740 (from the output of df) is ~92%, so I think this is just the ext4 reserved blocks in action. – muru Nov 02 '23 at 15:10
  • 1
  • "My question does not relate to interpretation of df results" ... It does - you're looking at one column of df output, which says 97%, and ignoring another column which implies 92% utilisation. The discrepancy in the MOTD output depends on which column you're looking at. – muru Nov 03 '23 at 12:06

1 Answers1

1

The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). Binary prefixes can be used, too: KiB=K, MiB=M, and so on.

check the options there is -h and -H for read diiferent: -h, --human-readable print sizes in powers of 1024 (e.g., 1023M) -H, --si print sizes in powers of 1000 (e.g., 1.1G)

HBtools
  • 29
  • 1
    Thank you for your suggestion. I added the results of the various forms you give. No difference in %, and a small difference of 5G used on 1900 G, meaning less than 0.3% of the available total. – Marc Vanhoomissen Oct 26 '23 at 10:11
  • Note / includes all storage that resides and is mounted in the filesystem, /dev/sdc is most likely not the same, maybe just a portion of it even if the main one. Ponder on the output of lsblk -ap -o +MOUNTPOINT,FSTYPE,LABEL,PARTLABEL,FSUSE%,STATE,MODEL – Hannu Oct 26 '23 at 17:42
  • @Hannu: good point, I added the results in my question. – Marc Vanhoomissen Nov 02 '23 at 14:44