Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Apr 2017 17:14:40 -0400
From:      Ernie Luzar <luzar722@gmail.com>
To:        Steve O'Hara-Smith <steve@sohara.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Is there a database built into the base system
Message-ID:  <58E6AFC0.2080404@gmail.com>
In-Reply-To: <20170406210516.c63644064eb99f7b60dbd8f4@sohara.org>
References:  <58E696BD.6050503@gmail.com> <69607026-F68C-4D9D-A826-3EFE9ECE12AB@mac.com> <58E69E59.6020108@gmail.com> <20170406210516.c63644064eb99f7b60dbd8f4@sohara.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Steve O'Hara-Smith wrote:
> On Thu, 06 Apr 2017 16:00:25 -0400
> Ernie Luzar <luzar722@gmail.com> wrote:
> 
>> Chuck Swiger wrote:
>>> On Apr 6, 2017, at 12:27 PM, Ernie Luzar <luzar722@gmail.com> 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?













Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58E6AFC0.2080404>