12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

404CHAPTER 20Monitoring System ResourcesDetermining Filesystem UsageTo determine how much disk space is being used for a given partition, logical volume, orNFS mount, use the df command. If no arguments are given to the command, disk usagefor all mounted partitions is displayed in 1 kilobyte blocks. Listing 20.1 shows outputfrom two logical volumes: the /boot partition and an NFS mounted directory from theproduction.example.com server.LISTING 20.1Disk Space UsageFilesystem 1K-blocks Used Available Use% Mounted on/dev/mapper/VolGroup00-LogVol0013140720 3097624 9364800 25% //dev/sda1 101086 18536 77331 20% /boottmpfs 962696 0 962696 0% /dev/shm/dev/mapper/VolGroup00-LogVol0179354688 60896492 14362196 81% /homeproduction.example.com:/vol38587596 26164688 1242290784 68% /dataTo display the output in “human readable” format, use the -h argument to df. The outputis then displayed in kilobytes, megabytes, gigabytes, or terabytes depending on the size ofthe filesystem. The same mount points from Listing 20.1 are shown in Listing 20.2 inhuman readable format.LISTING 20.2Disk Space Usage in Human Readable FormatFilesystemSize Used Avail Use% Mounted on/dev/mapper/VolGroup00-LogVol0013G 3.0G 9.0G 25% //dev/sda1 99M 19M 76M 20% /boottmpfs 941M 0 941M 0% /dev/shm/dev/mapper/VolGroup00-LogVol0176G 59G 14G 81% /homeproduction.example.com:/vol3.6T 2.5T 1.2T 68% /dataThe default output includes the size of the partition, how much space is used, how muchspace is available, the percentage of space used, and on what directory the filesystem ismounted. To display the filesystem type as well, such as ext3 or nfs, use the -T argument.To limit the output to specific filesystem types, use the -t= option. To excludecertain filesystem types from the output, use the -x- argument.Some of the mounted filesystems might not be local such as NFS mounts. To limit theoutput to local filesystems, use the -l option. To calculate disk usage for a specific partition,include it as an argument to the command such as df /dev/sda1.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!