jablonka.czprosek.czf

netmap

Subversion Repositories:
[/] [gen_onestat_fping] - Blame information for rev 92

 

Line No. Rev Author Line
11simandl#!/bin/sh
2 
3# (c)2003 by Jan Krupa (krupaj@mobilnews.cz)
4# http://www.mobilnews.cz/honza/
5 
6PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin
7export PATH
8 
9 
10FPING_PATH=/usr/sbin/fping
11 
12ping_host_all="";
13 
14for LINE in `/bin/cat $1`; do
15 ping_host=`/bin/echo -n $LINE | /bin/awk -F\; '{ printf "%s", $2 }'`;
16 ping_host_all="${ping_host_all} ${ping_host}";
17done
18 
19$FPING_PATH -e $ping_host_all | /bin/awk -F\ '{ printf "%s;", $1; if ($3=="alive") printf "1;%s;\n", substr($4, 2, (length($4)-1)); else printf "0;0;\n"; }';

Powered by WebSVN 2.2.1