From owner-freebsd-questions@freebsd.org Thu Apr 6 21:14:14 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD5E0D327CC for ; Thu, 6 Apr 2017 21:14:14 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8DA8A97F for ; Thu, 6 Apr 2017 21:14:14 +0000 (UTC) (envelope-from luzar722@gmail.com) Received: by mail-io0-x244.google.com with SMTP id b140so762014iof.0 for ; Thu, 06 Apr 2017 14:14:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-transfer-encoding; bh=ocq8oFL3n5yZs3bNyOfCbrUX4Vy+FKIdFZ+PTq6gjWA=; b=E45vaYY0r2PHmLutwz+Wsv8LwXhJFStXWzIQLZP/B3a7MLwrCKEUz869kjqaLfdtMc ISrHevQlIDd7k2LnrF0vygObTSW1y9Zv72I5e7TUQ8p/FWYHgFFCFChT1UF0jli9XS+y DnEil3YpAqkC1Y+bCzmv2MGSbLt8YSXWjgyT8ZB9UjZO1ZMHXxtOOnUUfyiJHhV4xfvF MQWuc7jPbCYeC46U9gMneJ0rbhQoajzLqRf2m3J768ZiLRTG7Ylj7F45Vc5CugJnzEC2 x9jz6hmrmpXP/XemzZKaf0f98n6QpVUiec/rteS98F/vGX83Mid+gC/HKB6JkcMJSYyZ sGVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-transfer-encoding; bh=ocq8oFL3n5yZs3bNyOfCbrUX4Vy+FKIdFZ+PTq6gjWA=; b=fWUogvqgoHX9Nfv+PYbfMwk/3AR3V8A+AS49Q9CyxoKco3hBYmcxIGvDTRuOx+TaUI +wmDCLb9QbS9CbuiemNeTlzBgXEomLfF4XS87WBkT+tr3x19Qc8UX4T9Go1ilM/dSb35 BNvK31ILk3cn1Vs+YUqRfW/h8u4ze63uD8WuGGqI+Bht1kB/q391YP9Nx7DWexWnGZIY M0vW1rNJSFV3By736RcNvkrXu8UGn+mDAx7EOfgeN501Ln8ioDaLsohxZFLTZRzNBNyJ pgqgKOOnXO97yLtjNd309weWkc3W++Xs3wbo4L+5iDa304clqhfNNZhP+jyu3X+39wN8 9U4w== X-Gm-Message-State: AFeK/H2WG2eKruAsV43ZSZvMZWhUb+Ps/2i/MzWWSA3wACXjf/y+ozizM/GnSci9qG7bWw== X-Received: by 10.107.172.134 with SMTP id v128mr39526863ioe.49.1491513253893; Thu, 06 Apr 2017 14:14:13 -0700 (PDT) Received: from [10.0.10.3] (cpe-74-141-88-57.neo.res.rr.com. [74.141.88.57]) by smtp.googlemail.com with ESMTPSA id c91sm1521994iod.18.2017.04.06.14.14.12 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 06 Apr 2017 14:14:13 -0700 (PDT) Message-ID: <58E6AFC0.2080404@gmail.com> Date: Thu, 06 Apr 2017 17:14:40 -0400 From: Ernie Luzar User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Steve O'Hara-Smith CC: freebsd-questions@freebsd.org Subject: Re: Is there a database built into the base system References: <58E696BD.6050503@gmail.com> <69607026-F68C-4D9D-A826-3EFE9ECE12AB@mac.com> <58E69E59.6020108@gmail.com> <20170406210516.c63644064eb99f7b60dbd8f4@sohara.org> In-Reply-To: <20170406210516.c63644064eb99f7b60dbd8f4@sohara.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 21:14:14 -0000 Steve O'Hara-Smith wrote: > On Thu, 06 Apr 2017 16:00:25 -0400 > Ernie Luzar wrote: > >> Chuck Swiger wrote: >>> On Apr 6, 2017, at 12:27 PM, Ernie Luzar wrote: >>>> Looking for a simple database thats comes with the base system, is >>>> there one? >>> There's likely an old flavor of BerkeleyDB around if you just need a >>> key-value store. >>> >>> If you're looking for a SQL database, start with SQLite (cf >>> databases/sqlite3 port), and then look towards MySQL or Postgres. >>> >>> Regards, >> BerkeleyDB sounds like something to look at. Did a "locate Berkeley" cmd >> and nothing popped out. Is it called something else? > > man db > > Will get you all the details. > >> Writing csh scripts manipulating text files containing lists of IP >> address. Don't want any port as a required dependent. I though I > > Hmm Berkeley DB is a C API so perhaps not so convenient in csh, > what do you want a database to do for you ? > Here is the project description. analyze the unsolicited traffic hitting my front door to determine if the same source ip address is cycling through a range of ip address on a hourly, daily, weekly basis. My test box ipfilter firewall uses "keep state" on everything that is allowed out. Nothing is allowed in. Using ipfilter ippool in-core ip address table to capture count of times said unsolicited inbound source ip address hits my front door. Have 3 flat text files containing about 2000 ip address having a record size of 30 bytes. I am afraid I may be approaching the max file size that csh can handle. Thinking of simple db where the 3 files are indexed and can be read/written with out sequentially process all the records. At the proof of concept stage. I have programmed in pear script before where I can open a file and process a record sequentially where only the next record is buffered. csh does not have that kind of file handling that I know of. You have any suggestions?