On 10/02/14 21:49, Adam Brenner wrote: > On Thu, Oct 2, 2014 at 12:01 PM, Chris Hunter <[email protected]> wrote: >> Does anyone have alternate ideas for reports by file age ? >> >> regards, >> chris hunter >> yale hpc group >> > Go ahead and query the MySQL database directly. What version of RBH > are you using? For the older versions, like 2.4.3, everything is > stored in the ENTIRES table. You can see the sort of queries it > produces using the -l FULL flag. > > /adam > Here is a query we use for age profiling:
SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; START TRANSACTION; SELECT count(*) as cnt, sum(size) as vol, ROUND(LOG(10,UNIX_TIMESTAMP(NOW())-last_access),0) as logage FROM ENTRIES group by age; COMMIT; Displaying LOG(N) of age is convenient to deal with a wide range of dates. If you want more or less values in your output you can change the first log parameter (10 in my example). Here is an example of output: +---------+-------------------+--------+ | cnt | vol | logage | +---------+-------------------+--------+ | 7 | 5157043497 | 1 | | 4042 | 142109394704 | 2 | | 25606 | 1269601700899 | 3 | | 146951 | 4789029277529 | 4 | | 32819 | 39290924149114 | 5 | | 386692 | 407028626133397 | 6 | | 2358308 | 4458175715745348 | 7 | | 7831503 | 13112482439101033 | 8 | | 24785 | 15406928299641 | 9 | The related age for each row is around "age^10" (in seconds). "SET SESSION... / START ... / COMMIT " all this stuff is to avoid an agressive locking of the whole robinhood DB while robinhood is currently working on it! Regards Thomas ------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ robinhood-support mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/robinhood-support
