If the reason for the threading is performance, then it seems to me that you are recalculating the statvfs structure, which is more readily available via the module
Filesys::Statvfs (or one of its brothers).
The *nix command df -k uses that same system-internal structure, reporting it back one line per file systems as device, blocks, #used, #available, %capacity and mount_point.
On a huge Sun Solaris system with hundreds of file systems, I just got the result back from df -k in only 0.02 seconds and would expect a Perl program using such a Filesys module to perform comparably well.
Update: If your needs are indeed limited to what df does, Filesys::Df will be easier to use or Filesys::DfPortable if the code also has to run on any of Mac OS X, Unix, Linux, Windows 95 or later and so on.
More update: In addition, to get per user per file-system stats, you could also enable disk usage quotas, without actually limiting usage, but to enable retrieval of such information via the Quota module.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.