Pieter Wuille wrote at about 01:11:27 +0100 on Wednesday, December 2, 2009: > See attachment. You can run eg.: > > ./diffsize.pl /var/lib/backuppc/pc/* > > to see values per host, and a total.
I ran it on a small 'testmachine' backup and I got either perl errors or long floating point numbers for sizes (which doesn't make sense): $ ./diffsize.pl /var/lib/backuppc/pc/testmachine Use of uninitialized value in bitwise and (&) at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/Fcntl.pm line 213. Use of uninitialized value in bitwise and (&) at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/Fcntl.pm line 212. /var/lib/BackupPC/testmachine: total: $ cd /var/lib/backuppc/pc $ ./diffsize.pl testmachine testmachine: alloc=185535.999147519 dalloc=45056 dentries=100 dsize=45056 falloc=140479.999147519 fcount=36.791192973693 fsize=30388.0693956044 total: alloc=185535.999147519 dalloc=45056 dentries=100 dsize=45056 falloc=140479.999147519 fcount=36.791192973693 fsize=30388.0693956044 Also, I think there is a slight optimization possible since you don't need to tabulate $size{alloc} on each file & dir since you can just do once for each machine: $size{alloc} = $size{falloc} + $size{dalloc} Finally, it might also be nice to tabulate separately the number of (regular) files vs. directories (you currently just tabulate dentries which nominally is equal to the number of directories plus regular files though technically it could include non-regular files but there shouldn't be any of those...) Nice script... ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/