[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#530660: ITP: agedu -- a Unix utility for tracking down wasted disk space



Maximiliano Curia wrote:
>> * Package name    : agedu
>>   Version         : N/A
>>   Upstream Author : Simon Tatham <anakin@pobox.com>
>> * URL             : http://www.chiark.greenend.org.uk/~sgtatham/agedu/
>> * License         : MIT
>>   Programming Lang: C
>>   Description     : a Unix utility for tracking down wasted disk space
[snip]
> 
> I've been looking at the agedu project and from my point of view it has some
> design flaws:
>  - It creates an index database file prior any query can be made, and the
>    index database is loaded fully into memory on every query.

Yes, but the typical query needs all the information anyway, so I see no
problem with loading the whole index into memory and then running the query.

A typical query needs all the information anyway because to know the
average age of files in / you need the average age of files in /home,
/var, ... etc traversing your whole file system recursively.

It would be an improvement however to calculate the age bottom up. Eg
first do it for /home, then just remember the result and free that part
of the index from memory and then in the end you just have to take one
average again.

This could be done to improve scalability. I don't consider this loading
the index at once before-hand a design flaw, but yes it limits scalability.

>  - Unix utilities are based on the idea of, do one thing, but do it well, a du
>    that has an embedded web server cannot call itself a Unix utility.

Ok, I can agree on that :) I took the description from the author's
webpage, but I can remove the wording 'Unix utility'.

>  - The web interface listens on:
>    127.randrange(0-255).randrange(0-255).randrange(2-255):randrange(1025-65535)
>    on behalf of "security" so other users can't see your agedu, however any user
>    can type: netstat -l to see where agedu is listening

For authenticating the user when connecting to the built-in webserver it
has several options:

-"Magic" authentication as the author calls it: agedu looks up if the
connection is coming from the local machine and then tries to find the
entry in /proc/net/tcp. There it can find the uid of the connection
initiator, to verify it's the same uid as the one running the webserver.

-If you don't like that, you can use basic http authentication.

-It also "supports" no authentication :)

Picking a random (local) ip address is just something extra.

>  - The use of a random ip can be quite troublesome in certain firewalls
>    setups.

Luckily you can override the ip address it has to listen on with
--address ip:port.

>  - It depends on the use of atime, currently considered as a unix desing flaw
>    among kernel programmers [1] and the move towards relatime and nodiratime as
>    default is quite possible in the near future [2], it even polutes the 
>    planet [3]. :)

I predict it will happily keep working with relatime. Using --mtime you
can also make it use mtime instead of atime.

> For all these reasons I don't think this software should go into the Debian
> archive.

I believe I made some worthy arguments against that. Besides that, I
really found the program useful, and probably so do probably many other
people.

> Anyway, the basic idea "to have an index of files and directories sorted by
> size and age" can be quite useful, and probably a worthy hack to merge with
> mlocate, which would be (of course) based on mtime instead of atime, which is
> a plus.

Sure, but in the mean time I'll stick to agedu ;)

Using mtime instead of atime really gives another view. I have many
files which I never write to but I do read them alot. If I wouldn't have
atime or relatime, then I wouldn't be able to find files I forgot about.

I hope I was able to change your mind about inclusion of agedu in the
Debian archive. If not, let me know ;)

Btw, I'm still looking for a sponsor (see my posting on debian-mentors).

Regards,

Alexander



Reply to: