C++ CSS HTML Java JavaScript MySQL Oracle PERL PHP SQL Unix VBScript XHTML XML Сети
File Systems
 

26.3. File Systems

The df command reports the system's disk space usage. If you type the command df at a shell prompt, the output looks similar to the following:

            20722644   2664256  17005732  14% /home
none                    256796         0    256796   0% /dev/shm

df -h. The -h argument stands for human-readable format. The output looks similar to the following:


none                  251M     0  250M   0% /dev/shm

In the list of partitions, there is an entry for /dev/shm. This entry represents the system's virtual memory file system.

The du command displays the estimated amount of space being used by files in a directory. If you type du the list. If you do not want to see the totals for all the subdirectories, use the command du -hs to see only the grand total for the directory in human-readable format. Use the du --help command to see more options.

To view the system's partitions and disk space usage in a graphical format, use the System Monitor tab as shown at the bottom of Figure 26-2.

TipTip
 

For information on implementing disk quotas, refer to Chapter 6 Implementing Disk Quotas.

26.3.1. Monitoring File Systems

Red Hat Linux provides a utility called diskcheck To use this utility, you must have the diskcheck RPM package installed.

This utility is run as an hourly cron [1] task.

The following variables can be defined in /etc/diskcheck.conf:

You do not have to restart a service if you change the configuration file because it is read each time the cron task is run. You must have the crond service running for cron tasks to be executed. To determine if the daemon is running, use the command /sbin/service crond status. It is recommended that you start the service at boot time. Refer to Chapter 14 Controlling Access to Services for details on starting the cron service automatically at boot time.

Notes

[1]

Refer to Chapter 28 Automated Tasks for more information on cron.

Главная