On 11/13/15 15:28, Nathan Dauchy - NOAA Affiliate wrote:
Greetings!
I'm curious if anyone on this list has looked at "agedu", in the
context of integrating it with Robinhood or adding similar
functionality to the RBH web interface:
http://www.chiark.greenend.org.uk/~sgtatham/agedu/
<http://www.chiark.greenend.org.uk/%7Esgtatham/agedu/>
"Suppose you're running low on disk space. You need to free some up,
by finding something that's a waste of space and deleting it (or
moving it to an archive medium). How do you find the right stuff to
delete, that saves you the maximum space at the cost of minimum
inconvenience?"... agedu... "does basically the same sort of disk scan
as |du|, but it also records the last-access times of everything it
scans. Then it builds an index that lets it efficiently generate
reports giving a summary of the results for each subdirectory, and
then it produces those reports on demand."
Hi,
This kind of report looks interesting. Thanks for highlighting this.
I think there is all needed information in robinhood DB to build such
report, so it should be quite easy to report additional information in
"rbh-du". Displaying it as a web page may require more work.
This reminds me "FS temperature" charts that were implemented based on
robinhood DB.
The following script generates a SQL request that can be injected to a
monitoring/graphing tool (rrdtool, grafana...) for graphical presentation.
ages=( 0 900 3600 21600 86400 604800 2592000 5184000 7776000 )
precision=5
sql="SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
START TRANSACTION;
SELECT age, SUM(c) AS cnt, SUM(v) AS vol FROM (
SELECT c, v, CASE\n"
prev=0
num_i=${#ages[@]}
for i in $(seq 1 $((num_i-1))); do
(($i==1)) && prev=-1 || prev=${ages[$((i-1))]}
cur=${ages[$i]}
sql+=" WHEN log_age < ROUND(LOG(10,$cur),$precision) THEN
'r_$((i-1))' \n"
done
sql+=" ELSE 'r_$i' END AS age FROM (
SELECT ROUND(LOG(10,UNIX_TIMESTAMP(NOW())-last_access),$precision)
AS log_age,
COUNT(*) AS c, IFNULL(SUM(size),0) AS v FROM ENTRIES
$has_status GROUP BY log_age ) AS ps
) AS stats GROUP BY age;
COMMIT; \n"
In the script above change last_access to last_mod to monitor write
instead of read.
The scanning part sounds like Robinhood, right? I have tried it and
found it to be pretty slick on a small local file system, but it is
terribly inefficient when scaling up to a large file system.
Indeed that's the problem with any POSIX scan based tools.
I think that integrating it with Robinhood would improve performance
and the functionality would be very useful to users in managing their
data.
Regards,
Nathan
Regards,
Thomas
------------------------------------------------------------------------------
_______________________________________________
robinhood-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/robinhood-support