People have done this, yes. Often part as larger system tracking tool. Mrtg for instance, or its successor (cricket?). HP Openview in combination with Crystal Reports does more than you want to know. And then there are a billion system administrators each rolling their own. No doubt some of it was written in Perl.

I've used mrtg, HP Openview, Big brother, and a handful of solution written by myself to track disk (or rather, volume) usage. Some of it written in Perl. But also in C and shell/awk.

But none of it was based on File::Find, or on find(1). Summing the sizes of files reported this way doesn't give you accurate information - hard links are counted twice, sparse files are counted for way too much, open, but deleted files are not counted at all, it's too easy to forget counting the size of a directory, and special files are a problem. And 1000 files of one character take a lot more space than a single file containing 1000 characters. Just ask your OS, or your volume manager how space is in use. And don't forget to record your inode usage - data blocks aren't the only thing that can cause a filesystem to fill up.


In reply to Re: Disk size manager in perl? by Anonymous Monk
in thread Disk size manager in perl? by tphyahoo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.