From owner-freebsd-current@FreeBSD.ORG Fri Apr 9 08:02:55 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E98C8106564A for ; Fri, 9 Apr 2010 08:02:54 +0000 (UTC) (envelope-from admin@lissyara.su) Received: from hosting.lissyara.su (hosting.lissyara.su [77.221.149.162]) by mx1.freebsd.org (Postfix) with ESMTP id 76E298FC13 for ; Fri, 9 Apr 2010 08:02:53 +0000 (UTC) Received: from [195.93.240.104] (port=29106 helo=lissyara.moskb.local) by hosting.lissyara.su with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1O09Ax-000HsI-2f for freebsd-current@freebsd.org; Fri, 09 Apr 2010 12:02:51 +0400 Message-ID: <4BBEDF2B.5020102@lissyara.su> Date: Fri, 09 Apr 2010 12:02:51 +0400 From: Alex Keda User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; ru-RU; rv:1.8.1.23) Gecko/20091202 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4BBECFDB.6080001@lissyara.su> <20100409111412.11e340b7@hzwork.vyborg.ru> In-Reply-To: <20100409111412.11e340b7@hzwork.vyborg.ru> X-White-List: YES X-Spam-Description: if spam count > 60 - this is spam X-Spam-Count: 0 X-Descriptions: powered by www.lissyara.su X-Bounce-ID: hosting.lissyara.su Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: load ipfw table addresses from file X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2010 08:02:55 -0000 09.04.2010 11:14, Hizel Ildar пишет: > В Fri, 09 Apr 2010 10:57:31 +0400 > Alex Keda пишет: > > >> 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 =)