O'Reilly logo

PostgreSQL High Performance Cookbook by Dinesh Kumar, Chitij Chauhan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Monitoring disk space

In this recipe, we are going to show the commands that are used to monitor disk space.

How to do it...

We can use the df command with various switches to monitor disk space. To make the output more understandable, we often use the -h switch with the df command as follows:

bash-3.2$ df -h Filesystem size used avail capacity Mounted on 132G 80G 50G 62% / /devices 0K 0K 0K 0% /devices ctfs 0K 0K 0K 0% /system/contract proc 0K 0K 0K 0% /proc mnttab 0K 0K 0K 0% /etc/mnttab swap 418G 488K 418G 1% /etc/svc/volatile swap 418G 38M 418G 1% /tmp swap 418G 152K 418G 1% /var/run /dev/dsk/c20t60000970000192602156533030374242d0s0 236G 240M 234G 1% /peterdata/cm_new /dev/dsk/c20t60000970000192602156533032353441d0s0 30G 30M 29G 1% /peterdata/native ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required