Date: Fri, 9 Apr 2010 11:14:12 +0400 From: Hizel Ildar <hizel@vyborg.ru> To: freebsd-current@freebsd.org Subject: Re: load ipfw table addresses from file Message-ID: <20100409111412.11e340b7@hzwork.vyborg.ru> In-Reply-To: <4BBECFDB.6080001@lissyara.su> References: <4BBECFDB.6080001@lissyara.su>
next in thread | previous in thread | raw e-mail | index | archive | help
=D0=92 Fri, 09 Apr 2010 10:57:31 +0400 Alex Keda <admin@lissyara.su> =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > hi! > is there any plans to implement such opportunities? > for large files (we have 60k lines) it's very slow work >=20 > 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 > =D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 9 =D0=B0=D0=BF=D1=80=D0=B5= =D0=BB=D1=8F 2010 =D0=B3. 10:42:01 (MSD) > =D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 9 =D0=B0=D0=BF=D1=80=D0=B5= =D0=BB=D1=8F 2010 =D0=B3. 10:52:43 (MSD) > # > it took more than 10 minutes on busy server =3D( > _______________________________________________ > 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" >=20 my variant: se@serv4 ~ >wc -l ip2.txt=20 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 table 25 add 192.168.0.39 table 25 add 192.168.0.40 table 25 add 192.168.0.41 table 25 add 192.168.0.42
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100409111412.11e340b7>
