Javier Martínez wrote:

>I have followed this script, but it reports me an error.
>What i do is this:
>
># /sbin/iptables -L vpn1-in -vxn
>Chain vpn1-in (6 references)
>     pkts      bytes target     prot opt in 
>out     source               destination
>    81172  4220945            all  --  ppp0   * 
>192.168.1.100        0.0.0.0/0
>        0        0            all  --  ppp0   * 
>192.168.1.101        0.0.0.0/0
>        0        0            all  --  ppp0   * 
>192.168.1.102        0.0.0.0/0
>        0        0            all  --  ppp0   * 
>192.168.1.103        0.0.0.0/0
>        0        0            all  --  ppp0   * 
>192.168.1.104        0.0.0.0/0
>        0        0            all  --  ppp0   * 
>192.168.1.105        0.0.0.0/0
>
>and i make a cron with this file, that respond me with an error:
>
>#sh javier1
>ERROR: expected 6 data source readings (got 1) from N:
>
>where the content of javier1 is:
>
># more javier1
>#
>/usr/bin/rrdtool update vpn1-in.rrd N:`/sbin/iptables -L vpn1-in -vxn | \
>    /usr/bin/awk 'BEGIN  { getline ; getline }
>         { print $2 }' | \
>  /usr/bin/tr '
>         ' ':' | /bin/sed -e 's/:$//'`

Try "bash -x javier1" and see what it's doing.

Also, check that there is nothing but a single 
newline between the single quote after "tr" and 
the closing quote on the next line (ie nothing 
after the quote, and nothing before the quote on 
the next line.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to