Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^4: Unix disk space reports

by Corion (Patriarch)
on Feb 10, 2009 at 09:36 UTC ( #742701=note: print w/replies, xml ) Need Help??

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

You could start by showing us where in your code you have difficulties. As the program currently just displays the status quo, I imagine you have to collect the disk space report over time. Then, create your report from that.

Personally, I would store that data in a database, for example DBD::SQLite, and then create the reports from that database using Querylet. But you can get by without a relational database if you hardcode the reporting logic into your script.

Replies are listed 'Best First'.
Re^5: Unix disk space reports
by Anonymous Monk on Feb 10, 2009 at 10:10 UTC
    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" < 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

      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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://742701]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2023-03-21 05:24 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (59 votes). Check out past polls.