Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
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) –  medigeek Sep 29 '12 at 11:43
add comment

3 Answers

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

share|improve this answer
add comment

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.