Well, this week i wanted to make a mirror for Mandriva Cooker with my PC because i will install Mandriva in several PCs next week but i didn't want to download the same files for each PC so i decided made a mirror in my PC for Mandriva Cooker. Looking for a program for this i found fmirror but i was needing look the log about mirroring in my desktop and then i made this script for karamba. The script is very simple:
KARAMBA X=561 Y=350 W=700 H=250 interval=30000 locked=false
defaultfont font="Bitstream Vera Sans Mono" fontsize=11 color=200,220,240 align="right"
text x=1 y=1 sensor=program program="tail -n 20 /var/log/fmirror.log | sed -e 's/r//g' -e 's/[ *[0-9]+ *]//g' ; echo -e 'n---------------nUsado : '$(du -sh /mnt/hda1/Cooker)'n'Espacio Libre : $(df -h | grep hda1 | cut -c 35- | cut -d ' ' -f 1) /dev/hda1" align="left" interval=30000
You need run fmirror with:
fmirror -V 2 -l /mnt/hda1/Cooker/ -r /mirrors/Linux/Mandrakelinux/devel/cooker/i586/ -s ftp.cica.es > /var/log/fmirror.log 2>&1 &
Of course, you will need change /mnt/hda1/Cooker for your folder for mirroring a server.
I put this code in Autostart folder from ~/.kde so when i login automatically in KDE, fmirror is running in background and superkaramba show the log in my desktop.
You can use this script for mirroring any server and see in your desktop the log.
P.S.: I speak spanish, so if i made a mistake, please excuse me.