Date: Fri, 09 Apr 2010 12:02:51 +0400 From: Alex Keda <admin@lissyara.su> To: freebsd-current@freebsd.org Subject: Re: load ipfw table addresses from file Message-ID: <4BBEDF2B.5020102@lissyara.su> In-Reply-To: <20100409111412.11e340b7@hzwork.vyborg.ru> References: <4BBECFDB.6080001@lissyara.su> <20100409111412.11e340b7@hzwork.vyborg.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
09.04.2010 11:14, Hizel Ildar пишет: > В Fri, 09 Apr 2010 10:57:31 +0400 > Alex Keda<admin@lissyara.su> пишет: > > >> hi! >> is there any plans to implement such opportunities? >> for large files (we have 60k lines) it's very slow work >> >> srv1# sh -E >> # wc -l /root/scripts/db/table.25.txt >> 61073 /root/scripts/db/table.25.txt >> # date&& for i in `cat /root/scripts/db/table.25.txt`; do ipfw table >> 25 add $i; done&& date >> пятница, 9 апреля 2010 г. 10:42:01 (MSD) >> пятница, 9 апреля 2010 г. 10:52:43 (MSD) >> # >> it took more than 10 minutes on busy server =( >> _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to >> "freebsd-current-unsubscribe@freebsd.org" >> >> > my variant: > > se@serv4 ~>wc -l ip2.txt > 65536 ip2.txt > se@serv4 ~>sudo ipfw table 25 flush > se@serv4 ~>sudo time ipfw /home/se/ip2.txt > 0.94 real 0.54 user 0.39 sys > se@serv4 ~>sudo ipfw table 25 list | wc -l > 65536 > > but file like: > table 25 add 192.168.0.36 > table 25 add 192.168.0.37 > table 25 add 192.168.0.38 > thanks, it is faster, but - this is a crutch =)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BBEDF2B.5020102>
