From: Rodney Pont on
When I do a system shutdown darkstat isn't writing it's memory to disk
as it should. If I do a stop (darkstat stop) from within
/usr/local/etc/rc.d it does write the data file and picks it up when I
start it again.

Shutdown is running the rc.d script, I've added a df just to make sure
the filesystems are still mounted.

Any suggestions on where to look next?

I'm running FreeBSD 7.1.

--
Regards - Rodney Pont
The from address exists but is mostly dumped,
please send any emails to the address below
e-mail rpont (at) gmail (dot) com



From: Warren Block on
Rodney Pont <r.pont(a)infohit.fsnet.co.uk> wrote:
> When I do a system shutdown darkstat isn't writing it's memory to disk
> as it should. If I do a stop (darkstat stop) from within
> /usr/local/etc/rc.d it does write the data file and picks it up when I
> start it again.
>
> Shutdown is running the rc.d script, I've added a df just to make sure
> the filesystems are still mounted.
>
> Any suggestions on where to look next?
>
> I'm running FreeBSD 7.1.

What do you have for darkstat_flags in /etc/rc.conf?

I've just now added "--import darkstat.db --export darkstat.db" and it
seems to work starting and stopping the script, but I haven't done a
full shutdown or restart yet.

If you're using reboot(8) to restart, it doesn't run the shutdown
scripts (I think), where shutdown -r now does.
From: Rodney Pont on
On 12 Aug 2010 01:51:40 GMT, Warren Block wrote:

>Rodney Pont <r.pont(a)infohit.fsnet.co.uk> wrote:
>> When I do a system shutdown darkstat isn't writing it's memory to disk
>> as it should. If I do a stop (darkstat stop) from within
>> /usr/local/etc/rc.d it does write the data file and picks it up when I
>> start it again.
>
>What do you have for darkstat_flags in /etc/rc.conf?
>
>I've just now added "--import darkstat.db --export darkstat.db" and it
>seems to work starting and stopping the script, but I haven't done a
>full shutdown or restart yet.
>
>If you're using reboot(8) to restart, it doesn't run the shutdown
>scripts (I think), where shutdown -r now does.

# darkstat
darkstat_enable="YES"
darkstat_interface="fxp0" # change to suit your configuration
darkstat_dir="/var/run/darkstat"
darkstat_pidname="darkstat.pid"
darkstat_dropuser="nobody"
darkstat_flags="-p 10667 -l 90.155.77.208/255.255.255.240 --daylog
daylog --import datafxp0 --export datafxp0"

I know it's running the script because I see the df I put in it on both
shutdown and reboot in the console.log.

It works when running the script here as well, it just doesn't create
the datafxp0 file on shutdown. If I run the script it creates the file
on shutdown, loads it on restart but a reboot removes the file.

--
Regards - Rodney Pont
The from address exists but is mostly dumped,
please send any emails to the address below
e-mail rpont (at) gmail (dot) com



From: Warren Block on
Rodney Pont <r.pont(a)infohit.fsnet.co.uk> wrote:
>
> It works when running the script here as well, it just doesn't create
> the datafxp0 file on shutdown. If I run the script it creates the file
> on shutdown, loads it on restart but a reboot removes the file.

Just tested, and no history on startup. Probably best to start with the
port maintainer.
From: Rodney Pont on
On 12 Aug 2010 13:27:07 GMT, Warren Block wrote:

>Rodney Pont <r.pont(a)infohit.fsnet.co.uk> wrote:
>>
>> It works when running the script here as well, it just doesn't create
>> the datafxp0 file on shutdown. If I run the script it creates the file
>> on shutdown, loads it on restart but a reboot removes the file.
>
>Just tested, and no history on startup. Probably best to start with the
>port maintainer.

At least I now know it's not just me so I will contact the port
maintainer, thanks.

--
Regards - Rodney Pont
The from address exists but is mostly dumped,
please send any emails to the address below
e-mail rpont (at) gmail (dot) com