20. Maintenance tools
20.1 Filesystems
20.1.1 df - Available disk space
User: htuser
Command: df -h
Sample output:
Checks: Use% column and Avail column.
Thresholds: 90% use or more is not OK. Less than 2G of available disk space in /, /var/backup, /slides,
/var/applicative_data/vms or /logs is not OK
When a disk space problem is detected, the first question is: What takes up this disk space ? The answer
can be either large files or a large number of files.
20.1.2 du - Used disk space
User: htuser
Command: du –Lx | sort -n
Sample output (extract):
Checks: For each subdirectory listed in the last lines of the result, check the files present in this directory with
“ls –l <subdirectory>”. Look for core dumps, large files or large number of files. Find out how these files
were created / filled (owner, name and eventual naming scheme, location).
du –Lx / | sort -n
0 /dev
0 /misc
0 /net
0 /proc
0 /sys
2 /boot
4 /etc/.java/.systemPrefs
4 /etc/sysconfig/pgsql
...
4925836 /opt/Alcatel-Lucent/apache/htdocs
5593216 /opt/Alcatel-Lucent/apache
8516712 /usr
8896736 /opt/Alcatel-Lucent
10153252 /opt
20956792 /
[htuser@tsse090 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg01-rootvol
117G 91G 21G 82% /
/dev/mapper/vg01-logsvol
20G 1.4G 18G 8% /logs
/dev/cciss/c0d0p1 190M 19M 162M 11% /boot
tmpfs 7.9G 4.0K 7.9G 1% /dev/shm
/dev/mapper/vg01-_var_backupvol
56G 23G 30G 44% /var/backup
/dev/mapper/vg01-_slidesvol
7.4G 3.1G 4.0G 44% /slides
/dev/mapper/vg01-_var_applicative_data_vmsvol
12G 201M 11G 2% /var/applicative_data/vms