script to report disk usuage from all storage devices

I need a script to report disk usage of network storage and local filesysystem
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

What kind of report?  Something beyond just"df"?
huzzakAuthor Commented:
yeah space usage..."df" would work...but I have 31 aix servers and want to get report from all the servers...
huzzakAuthor Commented:
also if the output can be generated to be viewed in Excel (csv format)
it's HP SAN storage filesystem...and need the disk usage report of all the LUNs
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Don't know AIX, but this could be a start. You will have an extra column on the end but can be handled if needed.
do you have a host table?
Do you have an user with ssh-keygen authorized to login into the other systems?  The user does not need to be root.


echo " To: <youremailaddress>
From: <senderinformation.
Subject: Disk Usage Report
cat host_table_file | while read a; do
echo "Checking Server: $a"
/usr/bin/ssh limiteduser@$a /bin/df -k | /usr/bin/perl -e 'while (<STDIN>) { chomp(); @array=split(/\s+/,$_); foreach $key (@array) { print "$key,";} }'
echo "Finished checking Server: $a"
done )| /usr/bin/sendmail -t -oi

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
huzzakAuthor Commented:
yes I have the list of servers....thank you, I'll give this a try
Have you heard of pssh?  You could write a script, and have pssh run the command on all servers at the same time.  There's more to it than just "set it up", but this sounds like something that you could benefit from.
primeiro tens que instalar o ssh no ubuntu
# sudo apt-get install openssh-server openssh-client

depois tens de criar um NAT no teu router a porta 22 para o ip do teu servidor.
please, ignore my last comment.
huzzakAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Shell Scripting

From novice to tech pro — start learning today.