SSH diagnostics*
If you want to know how much disk space you have and exactly what it is occupied by, you can use the following command df and du with different keys.
Command df
Find out how much and how much space we have in total:
# df -h /
File System Size Used Totally Used% Mounted to
/dev/vda1 9.8G 3.5G 5.9G 38% /
-
Size is the total size of the disk,
-
Used - space used,
-
Available - available disk space.
Command du
Find out which directory takes the most space:
# du -hs /*
0 /bin
100M /boot
0 /dev
39M /etc
4,0K /home
0 /lib
0 /lib64
16K /lost+found
4,0K /media
4,0K /mnt
4,0K /mnt2
156K /opt
0 /proc
128K /root
29M /run
0 /sbin
4,0K /srv
40M /swapfile
0 /sys
72K /tmp
2,3G /usr
1008M /var
``
After finding a directory that takes a lot, but specifying as parameters the desired directory and see what takes up the most space.
`
# du -hs /usr/*
170M /usr/bin
4,0K /usr/etc
4,0K /usr/games
44K /usr/include
582M /usr/lib
219M /usr/lib64
38M /usr/libexec
869M /usr/local
49M /usr/sbin
412M /usr/share
12K /usr/src
0 /usr/tmp
Also combine the command with others, for example grep, to output only directories larger than a gigabyte (M in the size column)
# du -hs /usr/* | grep M
170M /usr/bin
582M /usr/lib
219M /usr/lib64
38M /usr/libexec
869M /usr/local
49M /usr/sbin
412M /usr/share
Command repquota
Repquota will display user quota, current status and its limit. ISPmanager considers quota by user group, so the command will look like this:
# repquota -g / | grep user21
user211 -- 254948 0 5242880 1756 0
user212 -- 2622280 0 5242880 37930 0
user213 -- 668776 0 5242880 35090 0 0
user214 -- 43860 0 5242880 2507 0 0
user215 -- 75788 0 5242880 8950 0 0
user216 -- 24864532 0 78643200 267 0 0
user217 -- 297576 0 5242880 1820 0
user218 -- 129208 0 5242880 11305 0
user219 -- 411052 0 5242880 15262 0 0