[Dirvish] Utility to show incremental usage per image within a vault
dirvish at rain4us.net
Fri May 5 20:46:29 UTC 2006
Matthew Pressly wrote:
>I've looked for something to do this, but have not been able to find
>anything. Is there a utility that will run on linux that
>can be used to determine the incremental disk usage of all images
>within a vault, starting with the most recent image and going back
>in time, counting each file's size only once, regardless of the
>number of hard links to it?
>I.e., something that would produce output similar to:
> latest 1.2GB
> 20060429 23MB
> 20060428 25MB
> 20060427 26MB
>Is there some way to do this with 'du', or is there another tool
>that will do this?
Well, one COULD make a utility called /usr/local/sbin/dirvish-imagesizes
and put in something like...
echo > $FILE
for INSTANCE in * ; do
echo "$INSTANCE - `zcat $INSTANCE/log.gz | grep \"Total bytes
written:\" | cut -d : -f2`"
smtp=smtp cat $FILE | mail -s "File sizes for image `pwd`"
adminuser at example.com
Realizing of course that this only gives the size of the transfers..and
not the base size. I'd have to modify it to do a 'du' of the last
image... and of course one would have to run this FROM the actual vault
More information about the Dirvish