http://qs321.pair.com?node_id=742705


in reply to Re^4: Unix disk space reports
in thread Unix disk space reports

Thanks for replying me! Corion.
for i in 1 2 3 4 5;do echo boxname$i;ssh lms@boxname$i df -kh | grep s +an; done > commandout.txt mail -s "Auto Diskspace check" emailid@xyz.com < output.txt
Above the simple script which gives me report when i run it everyday, but now i need output for a month... Am sorry this could be simle but am ab handicap on shel scrpit.. need help.

20090210 Janitored by Corion: Added formatting, code tags, as per Writeup Formatting Tips

Replies are listed 'Best First'.
Re^6: Unix disk space reports
by Corion (Pope) on Feb 10, 2009 at 10:19 UTC

    So you have step one done, collecting the time series data. You seem to have an error in your shell script because you create a file commandout.txt but mail a file output.txt.

    The next steps would be

    1. Create a data structure from the report files
    2. Create reports from the data structure

    Note that this site is not a program-request site. We will gladly help you with your programming problems, but we rarely provide programs that solve a complete problem.

      got it! thanks for your help. God bless you.