.168.23.14 202.152.243.92 1131
.168.23.14 178.67.60.119 1131
.168.23.14 77.77.44.16 1131
.168.23.196 192.168.23.201 2873 186687
.168.23.201 192.168.23.196 4274 3838143
data age is 4data age exact 269data saved 1305215070eth1: received 375320822, 5 m average 41518 bytes / sec, 60
pkts / secentries made: 569cached flows: 27usage: 0% (63728 from 10485760) slots for rsh clients: 9
IPCAD uptime is 49 days 51 minutes
????? ????????? ?? ???? ????? ???????,?? ? ????????? ????????? ??????? ?? ????? ??????? ?????? ???????????? ??????. ??? ??????? ???? ???????? ????? ??????? ??????? ??? -?????????. ??? ?????????? ? ??????? ????? ???????? ? ???? ?????? ???? MySql. ??????? ???? ?????? stat? ?????? ??? ??????? (Users, download, upload, tmp),? ??????? ????? ?????????? ??????????.
???????? ?????? stat.sh,??????? ????? ????????? ??????? ????????? ?????????? ? ?????????? ????????? ? ????,? ????? ????????? ?????? collect.pl,?????????? ?? ?????????? ?????????? ? ???? ??????.
?????? stats.sh:
#! / bin/bash127.0.0.1 clear ip accounting>/Dev/null127.0.0.1 show ip accounting checkpoint>/Tmp / ipcad.stat
/ usr / local / etc / collect.pl / tmp / ipcad.stat
????? ??????? collect.pl:
#! / usr / bin / perlDBI;
#????? /??????
$ dbuser=«root»;
$ dbpassword=«password»;=DBI-> connect («DBI: mysql: stat: localhost», $ dbuser, $ dbpassword) or
die «can't connect to database», $ dbh-> errstr, __ LINE__; (FIL, «/ tmp / ipcad.stat») | | die; ($ line= ) {
@ mass=split («», $ line);
$ dbh -> do ("INSERT INTO` tmp `(` id `,` date `,` time `,` src `,` srcp `,` dst `
, `dstp`, `bytes`, `proto`, `class`) VALUES ("", CURDATE (), CURTIME (
) $
}
close (FIL);
?????? stat.sh????? ????????? ?????? 20-25?????,??????? ????????? ?????? ? cron:
router> crontab-e
, 20,40,55 **** / usr / local / etc / stat
?????? ??? ?????? ?????? ????????? ? ???? ??????,???????? ?????? ???????? ?? ?? ????. ??? ????? ????????????? ????????? web-???????. ??? ??????? ???????? index.php????????? ? ?????????? 3.? ????? ???????? ??????? ???????? ??????? ? ??????? ????????? ???? (?. 3.4.1),?? ?????????? ?????????????:
·???? ?????? ??????? ??? ??????? ???????????? ????????;
·????????? ?????? ???????,??? ?????????? ???????? ?? ????? ?????????? ?????????????? ???????? ?????????.
??? .3.4.1??????? ????????????? ???????? ???????
??????????
? ?????????? ?????????? ????????? ?????? ???????? ????????? ??????????:
1. ????????? ?????????? ??...