Removing obsolete openvpn stats graphs

Open VPN pere road warrior stats can be a pain and can be removed by the following steps (a knowledge of Linux is required) :

  1. enable ssh access
  2. log into your ipfire machine
  3. su to root if you haven’t logged in a such (why is sshing in as root even possible?).
  4. run /etc/init.d/collectd stop
  5. cd /var/log/rrd/collectd/localhost to where the files are
  6. rm -r the appropriately named directory(ies) (be sure you are certain you have have not make an error in the command…it can be very destructive)
    If worried:
    6.1) cd in to the appropriately named directory
    6.2) rm the files there one at a time
    6.3) cd …
    6.4) rmdir the appropriately named directory
    6.5) run /etc/init.d/collectd start
    6.5) check the result is as expected.
    6.6) run /etc/init.d/collectd stop
    6.6) repeat as needed.
  7. run /etc/init.d/collectd start

NOTE: this is a not a perfect solution, but does work. In my experience.

note: all command line stuff is copied, so my bad typing/spelling will not effect them. sorry for my bad english…I’m kinda a semi-glot. (only do one language…but not so good @ it :stuck_out_tongue: )

Post by FischerM » Sun Sep 02, 2018 8:31 am


Correct…but please consider that you have to stop/restart ‘collectd’ and/or ‘vnstat’ before doing this:

Code: Select all

/etc/init.d/collectd stop
/etc/init.d/vnstat stop         <== ONLY IF NEEDED
rm -rf /var/log/rrd/*           <== PUT FILES YOU WANT TO DELETE HERE
rm -f /var/log/vnstat/*         <== ONLY IF NEEDED
/etc/init.d/collectd start
/etc/init.d/vnstat start        <== ONLY IF NEEDED

This problem has been covered a few times before - if in doubt, use forum search… ;)

rm -rf /var/log/rrd/* ..yeah no one is going to wonder what happened if they read do the rote thing...

rm -r is dangerous ..-rf is insane. 

rm -rf /anything/* anywhere is dangerous..never tell people to do that, rm -r is risky enough, you never know if they have a hard or symbolic link somewhere..

If you don’t know linux well…rm -rf… is basically a ICMB nuke war (be extremely sure when you use it…it will nuke your system (and brick some)) if you typo…don’t use that…basically it is never a good idea. rm -r if you screw up…less bad…but not so good.

-r means recursive (so will run up any directory tree…but linux will stop it doing really stupid things)
-f means force…yeah it will nuke anything
-rf means if you typo it will wipe out anything…never use that unless your damn sure you know exactly what your doing…I have never used it and I’m an admin/sysop.