weighted average summary of file size + age

Discussion in 'Ruby' started by Bil Kleb, Apr 7, 2008.

  1. Bil Kleb

    Bil Kleb Guest

    Hi,

    Do any system admins have a utility lying around to
    compute some sort of weighted average summary of
    file size and age?

    Our cluster home space needs some cleaning and I suspect
    some of the files folks are keeping on there are quite old
    and would like to drive the point home with more than
    just a `du -h /users/*` listing.

    So something like,

    User Usage <Age> Hog score

    kleb 102GB 195 19.9GB-Kdays
    frank 56GB 32 1.8GB-Kdays
    hamly 354GB 454 160.7GB-Kdays

    where <Age> is the average age in days, something like,

    sum( file.size * file.age ) / ( total_size * total_age )

    and Hog Score is Usage x <Age> in GB-kilodays.

    Later,
    --
    Bil Kleb
    http://fun3d.larc.nasa.gov
    Bil Kleb, Apr 7, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Meena Lalwani
    Replies:
    1
    Views:
    1,113
    Kevin Spencer
    Aug 31, 2005
  2. =?iso-8859-1?B?bW9vcJk=?=
    Replies:
    7
    Views:
    802
    Roedy Green
    Jan 2, 2006
  3. cylin
    Replies:
    6
    Views:
    563
    Mike Wahler
    Aug 19, 2003
  4. C Barrington-Leigh
    Replies:
    1
    Views:
    1,173
    Tim Leslie
    Sep 10, 2010
  5. Ross
    Replies:
    20
    Views:
    283
    Eric Schwartz
    Aug 25, 2005
Loading...

Share This Page