We have an ssh server on Ubuntu and we want a disk usage report using ssh of whole network.Is there any utility, command, or script available to accomplish this?

  • 2
    Have you considered network monitor services like nagios, zabbix, cacti etc? alternativeto.net/software/nagios/… -- On the other hand, you could set a cron script to email you the data per server (it's much safer, since it doesn't require password or key logins) Commented Sep 29, 2012 at 11:43

3 Answers 3


You can use df -h to see the free space, used space, and total space of all partitions on the system.


Are you wanting to see the disk usage on the SSH remotely? As in, "log in to SSH server and then show the disk usage"?

If so...

ssh user@host "df -h"

That's assuming you have key logins enabled so it doesn't prompt you for a password.

  • great: it's so SIMPLE; use it for volume calculation in a backup script; Commented May 20 at 17:40

ssh to your host then:

to show all folder sizes for the current directory recursively, with their sizes:

du -h

If you run this from a high-level directory, it can take a while to complete.

Show a disk use summary for the current directory:

du -sh

Again, this can take a little while if you're running it in a high-level directory.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .