Re: load ipfw table addresses from file

From: Alex Keda <admin_at_lissyara.su>
Date: Fri, 09 Apr 2010 12:02:51 +0400
09.04.2010 11:14, Hizel Ildar пишет:
> В Fri, 09 Apr 2010 10:57:31 +0400
> Alex Keda<admin_at_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_at_freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-current
>> To unsubscribe, send any mail to
>> "freebsd-current-unsubscribe_at_freebsd.org"
>>
>>      
> my variant:
>
> se_at_serv4 ~>wc -l ip2.txt
>     65536 ip2.txt
> se_at_serv4 ~>sudo ipfw table 25 flush
> se_at_serv4 ~>sudo time ipfw /home/se/ip2.txt
>          0.94 real         0.54 user         0.39 sys
> se_at_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 =)
Received on Fri Apr 09 2010 - 06:02:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:02 UTC