Alix 2d3 Embedded / Nanobsd support for traffic logging? (darkstat / bandwidthd)



  • I'm not sure if this is the right forum, or packages, but I'll start here.

    I'm new to pfsense and coming from a DDWRT router that kept bandwidth traffic logs over time.  I purchased Alix 2D3 hardware to run embedded PFSense, not realizing that this function was unsupported in an embedded / nanobsd build.  That said, after digging through various pages, it looks like it may be possible by either running a full install or manually setting up a package.

    In fact, I was able to get darkstat and bandwidthd to install and to launch them manually.  Bandwidthd starts up but doesn't keep any data / graphs, not sure why.  I gave up and tried darkstat which works fine but doesn't auto-restart after rebooting and the stats are lost.  Thus, I assume is due to RO filesystem.

    First question: Is there a supported package for nanobsd or embedded that offers daily/monthly traffic logging similar to what I've seen in DDWRT?  If so I'll go down that route.

    Second Question:  If not, any tips / links to pages that walk through modifying the system on startup for allowing the data to be saved?  I tried editing FSTAB and setting it to RW but that didn't seem to work, and probably isn't a great idea anyway–so I put it back.  Instead, I mounted a usb stick and can get that to work as RW across a reboot but couldn't figure out which file to modify so that darkstat would startup with --chroot to that folder (/mnt/usb/darkstat).

    Honestly, this is more for small office use and for my education--performance seems fine.  I don't think either program is going to write enough data to make me worry about the flash filesystem deterioration but I'm not 100% sure how either program operates in realtime [docs seem to be lacking there].  If they can be setup to keep persistent data in ram, and then write a log on restart that'd be ideal.  I don't care if I lose a days worth of data, I'm on a UPS so it's unlikely that'd be an issue anyway.

    I've done a fair amount of searching but so far not much luck, I was close with darkstat but I think I need to know which file controls the darkstat startup options.  There was a darkstat.sh file that I changed but it lost it's settings.


  • Rebel Alliance Developer Netgate

    Is there something wrong with the graphs under Status > RRD Graphs?



  • @jimp:

    Is there something wrong with the graphs under Status > RRD Graphs?

    Thanks, missed that one.  that'll indeed work for the DDWRT equivalent.

    I've been playing around with darkstat and like the extra level of detail… if there's a way to get that working it would be nice.  It seems to install ok but it won't start unless I run etc/rc.conf_mount_rw first.  After that it has been fine.  I think telling it to use a RW Directory with the --chroot parm would fix the problem if someone can tell me which config file to edit that launches it?

    I had previously edited the darkstat.sh file in the /usr/local/etc/rc.d folder but it was changed back on next boot.  Might be my fault, maybe I triggered it with the web page.  Is that the only one?



  • If you want to monitor your usage in more deteils than what can be done with RRD graphs I suspect you have some kind of server locally, right?
    You could use external logging then, which has the benefit of not wearing out your CF card with lots of write cycles.



  • I let most of my PC's go into sleep mode to save on power, so, would prefer to use internal logging.  I have darkstat working fine EXCEPT that after reboot it won't restart unless I run etc/rc.conf_mount_rw and then go into the darkstat settings and set it to WAN, save, and back to LAN.  Then it works fine until the next boot.

    Thus, I believe setting it to use a RW folder on startup or setting the filesystem to rw (less desireable) on startup would fix it.  I'm sure that's been covered somewhere so I'll keep experimenting / searching.


  • Rebel Alliance Developer Netgate

    It may just need to switch to rw while it saves its rc script, then can go back to rw. If I get some time this week (or weekend, more likely) I might be able to tinker with it.

    Or if you want to mess around, in /usr/local/pkg, find its .inc file and add conf_mount_rw(); on a line before it tries to write anything, and conf_mount_ro(); after it has finished (or just at the beginning and end of the sync and/or start function).



  • @jimp:

    It may just need to switch to rw while it saves its rc script, then can go back to rw. If I get some time this week (or weekend, more likely) I might be able to tinker with it.

    Or if you want to mess around, in /usr/local/pkg, find its .inc file and add conf_mount_rw(); on a line before it tries to write anything, and conf_mount_ro(); after it has finished (or just at the beginning and end of the sync and/or start function).

    Thanks, I will look into it.  I did some more searching and others had similar problems, http://forum.pfsense.org/index.php/topic,15332.0.html

    As in that thread, I was able to get it to start simply by changing the interface, saving, (and optionally changing it back ) without having to run rc.conf_mount_rw.

    Update:  I reinstalled and did a search, there's no "darkstat.inc" file or any files generated recently in that usr/local/pkg folder.  I did a find / -name "*.inc" and didn't see anything that looked close.  I checked out the darkstat.xml file but that's getting in over my head.


  • Rebel Alliance Developer Netgate

    Sounds like there may be some other issues with the package in general then.


Log in to reply