Что-то я совсем запутался. Если, при прописанных ip в ip.lst, вручную запустить sh rrd.sh то создается файл Unknown_Unknown.rrd и выпадает следующее сообщение:
Code:
Wed Mar 11 18:03:30 MSK 2009
Create started...
WAN Interface: vlan1
LAN Interface: vlan0
WLAN Interface: eth1
WAN -> in: 302576360   out: 2486910080
LAN -> in: 2300985512   out: 298696151
WLAN -> in: 767076   out: 3869963
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
iptables v1.2.7a: invalid mask `Unknown' specified
Try `iptables -h' or 'iptables --help' for more information.
Если запустить cron с содержимым:
Code:
#!/bin/sh
/opt/traffic/rrd.sh
То создаются файлы:
Code:
192.168.1.1_255.255.255.255.rrd
192.168.1.2_255.255.255.255.rrd
192.168.1.3_255.255.255.255.rrd
192.168.1.4_255.255.255.255.rrd
iptables -L in_traffic:
Chain in_traffic (1 references)
target prot opt source destination
all -- anywhere WL-001E8C3E0826
all -- anywhere 192.168.1.2
all -- anywhere 192.168.1.3
all -- anywhere 192.168.1.4
Однако картинок нет. С CreateGraphIP () все в порядке, вроде:
Code:
CreateGraphIP ()
{
	/opt/bin/rrdtool graph "${1}.new" -a PNG -R light -s -"${2}" -w 410 -h 100 -v "bytes/s" -l 0 --font DEFAULT:7 \
	'DEF:ds1='${3}':in:AVERAGE' \
	'DEF:ds2='${3}':out:AVERAGE' \
	'VDEF:sum_in=ds1,TOTAL' \
	'VDEF:sum_out=ds2,TOTAL' \
	'LINE1:ds1#00FF00:In' \
	GPRINT:ds1:MAX:"Max %6.2lf%s" \
	GPRINT:ds1:MIN:"Min %6.2lf%s" \
	GPRINT:ds1:AVERAGE:"Avg %6.2lf%s" \
	GPRINT:ds1:LAST:"Cur %6.2lf%s" \
	GPRINT:sum_in:"Total %6.2lf%s\n" \
	'LINE1:ds2#0000FF:Out' \
	GPRINT:ds2:MAX:"Max %6.2lf%s" \
	GPRINT:ds2:MIN:"Min %6.2lf%s" \
	GPRINT:ds2:AVERAGE:"Avg %6.2lf%s" \
	GPRINT:ds2:LAST:"Cur %6.2lf%s" \
	GPRINT:sum_out:"Total %6.2lf%s" \
	-t "${4}"
	mv -f "${1}.new" "${1}"
}
И еще вопрос, в index.cgi, ссылки на графики идут без /rrd/, соответственно приходится править, иначе не показываются. Что нужно подправить, в rrd.sh, что бы при создании index.cgi пути в нем были верными?