What's new

pfSense 2.3.2 - vnstat package - traffic totals...

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

sfx2000

Part of the Furniture
If you're running pfSense 2.3.2 - take note of the traffic totals package...

This is a "lost" function from the 2.2/2,1 builds with RRD - so nice to have it back...

Screen Shot 2016-08-12 at 9.38.54 PM.png


Add this in... and after a few hours/days...

Screen Shot 2016-08-12 at 9.39.22 PM.png


Do note that vnstat keeps data in /var

So if you want things to be persistent, might consider disabling the RAM disk for /var there... otherwise data will be lost over a reboot...
 
So if you want things to be persistent, might consider disabling the RAM disk for /var there... otherwise data will be lost over a reboot...
This (RAM disk thing) has become really annoying for me. It's SUPPOSED to retain RRD data. At least, that's what it says right there in the description of the checkbox: "RRD and DHCP Leases will be retained."

I did the whole "ram disk for /var and /tmp" to try and lower writes on the SSD. It sounded like a great idea at the time, considering I stuck 16 GB of RAM in this box, I could have a massive RAM disk, it would be used for constant writes.. and get backed up to (and restored from) SSD on shutdown/restart.

I'm starting to wish there was an "advanced" button on the "use RAM disks" thing, so I could be a bit more specific about what I want.

What might be good enough would be scripting hooks similar to what Merlin adds to his Asus firmware. If I could add a script that's run just after services are shutdown (but before umounts) and another after mounts (but before services), I could do all this myself.

Actually, I already have early shell commands... (shellcmd, earlyshellcmd, etc, via the "ShellCmd" package.) I just need some shutdown scripts. I guess it's time to for me to quit bitching and start learning freeBSD (and how pfSense works internally) so I can just add the support myself.

(It might be enough for me to just understand how the init procedure works in freebsd. If it's the same as or similar to what many different linux distros have been using, adding a shutdown script might be as easy as just writing a file someplace in /etc...)

hmmmm.....

(I'd post questions about it on the pfsense forum, but I'd surely attract trolls... again...)
 
Oh, sorry... what I really meant to reply with was:

I had played with this some a few days ago, but I noticed that it wasn't incredibly accurate. I don't know if it's because they use a sampling method (and so miss spike between samples) or what. (It might just be that I didn't give it enough time to "settle in.")
 
It appears this was already done and it sitting in the pfsense "pending review" pipeline:

https://github.com/pfsense/pfsense/pull/2902

The big deal is keeping certain data in the temporary file system in RAM, and some data shouldn't be these days - some items are expected to be persistent across boot sequences...

I did a write up about this on my learning by doing series...

/tmp - don't expect this to persist
/var/tmp - this should be persistent, so don't put that path into tmpfs...

Back in the day, when pfSense (and MonoWall which pfSense is a fork of), there was concerns about 2 things...
  • Writes to a CF Card - back in the day, flash wasn't as resilient as it is today
  • Storage on a floppy disk - Monowall could boot and run on a HD floppy, believe it or not...
 
The big deal is keeping certain data in the temporary file system in RAM, and some data shouldn't be these days - some items are expected to be persistent across boot sequences...
I think the patch mentioned above gives the best of both worlds. You can (ab)use the ram disk all you want, but it also makes things persistent for normal reboots.
 
I think the patch mentioned above gives the best of both worlds. You can (ab)use the ram disk all you want, but it also makes things persistent for normal reboots.

Agreed - my "persistent" storage is a Samsung EVO 850 mSata disk... which is

a) much more than needed - it's a 120GB disk - was handy at the time... and overkill for needs on pfSense
b) with TRIM, logs and file writes not a really big deal considering lifecycle concerns - the router will be obsolete before the drive comes into question...
 
Similar threads
Thread starter Title Forum Replies Date
C Pfsense wins awards Routers 34

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top