Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
diffspace
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
69719
l33t
l33t


Joined: 20 Sep 2004
Posts: 865

PostPosted: Mon Oct 19, 2009 12:08 pm    Post subject: diffspace Reply with quote

Servus, da bei uns immer mal das Storage vollläuft und keiner genau weiß woher die Daten kommen, habe ich ein Tool geschrieben, welches die Änderungen am Filesystem protokolliert. Das ganze habe ich mal diffspace genannt und baut auf sqlite3 und findutils auf. Findutils daher, da die fts_* Funktionen aus der glibc irgendwie mist machen und plötzlich abbrechen. Die Laufzeit für ein Laufwerk mit ~94000 Ordnern in unsere Umgebung beträgt ~45 Minuten. Am Ende jedes Laufes werden html Dokumente (http://homeunix.de/diffspace/sample.html) erstellt. Diese Änderungen beziehen sich immer auf den Tag davor.
Starten lasse ich das Programm mittels Cronjob alle 15 Minuten.
Code:

*/15 * * * * /home/oswald/diffspace/diffspace &> /dev/null

Falls das Programm zu diesen Zeitpunkt noch läuft beendet sich die neu gestartete Anwedung von alleine.
Angepasst werden kann das ganze über die diffspace.conf. Momentan können maximal 20 Pfade angegeben werden. Dies ist aber durch ändern der config.c erweiterbar.
Vielleicht bin ich ja nicht der einzigste der so etwas nützlich findet.

Zu finden gibts das ganze unter http://homeunix.de/diffspace/.
;)
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Mon Oct 19, 2009 1:50 pm    Post subject: Reply with quote

Hätte man das nicht auch mit inotify lösen können, so dass man das Dateisystem nicht immer per Hand durchsuchen muss?
_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
69719
l33t
l33t


Joined: 20 Sep 2004
Posts: 865

PostPosted: Mon Oct 19, 2009 2:02 pm    Post subject: Reply with quote

Nein, da ich nur die events meiner Workstation empfange und die restlichen 300 Workstations senden mir nix.
Dnotify kommt auch nicht in frage, da es bei 255 o.Ä. file descriptors keine weiteren mehr anfordern kann.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum