Mihai Maties wrote: >On Tuesday 17 May 2005 15:09, Radu Radoveneanu wrote: > > >>am un >># ping gw > /tmp/ping.log & >>ce ruleaza bine merci >> >>[root:pts/1][/etc/cron.daily]# killall -s SIGQUIT ping >>136/136 packets, 0% loss, min/avg/ewma/max = 0.304/0.507/0.395/9.340 ms >>[root:pts/1][/etc/cron.daily]# killall -s SIGQUIT ping > /tmp/ping.log2 >>152/152 packets, 0% loss, min/avg/ewma/max = 0.304/0.497/0.423/9.340 ms >>[root:pts/1][/etc/cron.daily]# cat /tmp/ping.log2 >>[root:pts/1][/etc/cron.daily]# >> >>cum fac sa "prind" output-ul de la killall intr-un fisier ? >> >> > >Heh, partea frumoasa e ca nu e vorba de output-ul lui killall ci al lui ping. > >ping-ul e cel care intercepteaza SIGQUIT si afiseaza pe stderr linia >respectiva asa ca trebuie sa faci o chestie de genul: > ># ping gw >/tmp/log1 2>/tmp/log2 & ># killall -s SIGQUIT ping ># cat /tmp/log2 > > >Mihai > > > > sarumana :D ping gw >/dev/null 2>/tmp/pinglog & echo `date` >> /tmp/pinglog2 killall -s SIGQUIT ping tail -n1 /tmp/pinglog >> /tmp/pinglog2 cat /tmp/pinglog2
[root:pts/1][~]# /etc/cron.hourly/pingu Tue May 17 18:13:56 EEST 2005 48/1 packets, 97% loss, min/avg/ewma/max = 0.324/0.324/0.324/0.324 ms Tue May 17 18:14:21 EEST 2005 73/23 packets, 68% loss, min/avg/ewma/max = 0.292/0.341/0.330/0.726 ms --- Detalii despre listele noastre de mail: http://www.lug.ro/
