Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
RemoteUser
Contributor
Jump to solution

Difference between show system disk usage and df -H

Hi,

What is the difference between these two commands, and why is the output different?

show system disk usage
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current 32G 14G 19G 42% /
/dev/md0 291M 92M 185M 34% /boot
/dev/md3 60M 11M 50M 18% /boot/efi
/dev/mapper/vg_splat-lv_log 582G 8.3G 574G 2% /var/log
tmpfs 94G 891M 94G 1% /dev/shm

 df -H
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current 35G 15G 21G 42% /
/dev/md0 305M 96M 194M 34% /boot
/dev/md3 63M 11M 52M 18% /boot/efi
/dev/mapper/vg_splat-lv_log 625G 8.9G 616G 2% /var/log
tmpfs 101G 934M 100G 1% /dev/shm

0 Kudos
1 Solution

Accepted Solutions
AkosBakos
Leader Leader
Leader

In my LAB the outputs are same if I use "-h" switch:

[Expert@mgmt-sakos-lab:0]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current 26G 20G 7.0G 74% /
/dev/sda2 291M 61M 215M 23% /boot
/dev/mapper/vg_splat-lv_log 20G 16G 5.0G 76% /var/log
tmpfs 7.8G 11M 7.8G 1% /dev/shm
cgroup 7.8G 0 7.8G 0% /sys/fs/cgroup

[Expert@mgmt-sakos-lab:0]# clish -c "show system disk usage"
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current 26G 20G 7.0G 74% /
/dev/sda2 291M 61M 215M 23% /boot
/dev/mapper/vg_splat-lv_log 20G 16G 5.0G 76% /var/log
tmpfs 7.8G 11M 7.8G 1% /dev/shm
cgroup 7.8G 0 7.8G 0% /sys/fs/cgroup

And the help said:

[Expert@mgmt-sakos-lab:0]# df --help
Usage: df [OPTION]... [FILE]...
Show information about the file system on which each FILE resides,
or all file systems by default.

Mandatory arguments to long options are mandatory for short options too.
-a, --all include dummy file systems
-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,
'-BM' prints sizes in units of 1,048,576 bytes;
see SIZE format below
--direct show statistics for a file instead of mount point
--total produce a grand total
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-i, --inodes list inode information instead of block usage

This maybe aswer to your question.

----------------
\m/_(>_<)_\m/

View solution in original post

6 Replies
AkosBakos
Leader Leader
Leader

Hi @RemoteUser 

According to this sk: https://support.checkpoint.com/results/sk/sk144112

This command should be equivalent.

From my point  of view, I always use df -h 🙂

Akos

----------------
\m/_(>_<)_\m/
AkosBakos
Leader Leader
Leader

In my LAB the outputs are same if I use "-h" switch:

[Expert@mgmt-sakos-lab:0]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current 26G 20G 7.0G 74% /
/dev/sda2 291M 61M 215M 23% /boot
/dev/mapper/vg_splat-lv_log 20G 16G 5.0G 76% /var/log
tmpfs 7.8G 11M 7.8G 1% /dev/shm
cgroup 7.8G 0 7.8G 0% /sys/fs/cgroup

[Expert@mgmt-sakos-lab:0]# clish -c "show system disk usage"
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current 26G 20G 7.0G 74% /
/dev/sda2 291M 61M 215M 23% /boot
/dev/mapper/vg_splat-lv_log 20G 16G 5.0G 76% /var/log
tmpfs 7.8G 11M 7.8G 1% /dev/shm
cgroup 7.8G 0 7.8G 0% /sys/fs/cgroup

And the help said:

[Expert@mgmt-sakos-lab:0]# df --help
Usage: df [OPTION]... [FILE]...
Show information about the file system on which each FILE resides,
or all file systems by default.

Mandatory arguments to long options are mandatory for short options too.
-a, --all include dummy file systems
-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,
'-BM' prints sizes in units of 1,048,576 bytes;
see SIZE format below
--direct show statistics for a file instead of mount point
--total produce a grand total
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
-H, --si likewise, but use powers of 1000 not 1024
-i, --inodes list inode information instead of block usage

This maybe aswer to your question.

----------------
\m/_(>_<)_\m/
the_rock
Legend
Legend

As @AkosBakos indicated, I also tested in R81.20 and R82 labs, and outputs were exactly the SAME. I wish I had logical explanation why yours are different.

Andy

G_W_Albrecht
Legend Legend
Legend

Which CP version is this ? As the percent values are the same, this could be caused by using the different calculation models binary/decimal:

4,7 GB = 4,38 GiB

E.g. Windows Explorer shows GiB numbers but calls it GB...

CCSP - CCSE / CCTE / CTPS / CCME / CCSM Elite / SMB Specialist
0 Kudos
AkosBakos
Leader Leader
Leader

Hi @G_W_Albrecht 

From the help:

-H, --si likewise, but use powers of 1000 not 1024

Akos

----------------
\m/_(>_<)_\m/
the_rock
Legend
Legend

That makes sense.

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events