BackupPC-users

Re: [BackupPC-users] how can I find out how much space a given host uses?

2009-12-02 09:56:52
Subject: Re: [BackupPC-users] how can I find out how much space a given host uses?
From: "Jeffrey J. Kosowsky" <backuppc AT kosowsky DOT org>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Wed, 02 Dec 2009 09:54:28 -0500
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 AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/