You are not logged in.

#1 2018-01-02 07:30:32

makh
Member
Registered: 2011-10-10
Posts: 305

[Discussed] Storing network consumtion from vnstat

Hi

I have made a simple cronjob to store this information in a local file. I couldnt locate such an option in /etc/vnstat

The option: --exportdb, is not exactly what I need.

But I wanted to know, if vnstat can automatically store a log of 6 months bandwidth consumtion, in some text file. I read in a blog, that it resets stored information, each month. But this is not mentioned in the arch wiki or the manual.


Thankyou

Last edited by makh (2018-01-14 17:18:22)


OS:  Arch  &/  Debian
System: LENOVO ThinkPad E14
Desktop: Xfce

Offline

#2 2018-01-02 12:21:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: [Discussed] Storing network consumtion from vnstat

makh wrote:

The option: --exportdb, is not exactly what I need.

In what way is it not what you need?  Do you mean it's not in the format you want?  It has the information you say you want.  A simple sed manipulation should get it in a better format - that is if you can define your goal.  There is also json output which would be easier if you're going into python or similar.

What about `vnstat -m`?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2018-01-04 16:25:06

makh
Member
Registered: 2011-10-10
Posts: 305

Re: [Discussed] Storing network consumtion from vnstat

Trilby wrote:

...

Sir
Hi
I think that either of -d or -m is okay, as long as it keeps data for 6 months. But I am storing the output in a separate file using cron. How much is the default storage time?

2ndly, I will need to check the sed manipulation. I dont know sed, yet.

Thankyou


OS:  Arch  &/  Debian
System: LENOVO ThinkPad E14
Desktop: Xfce

Offline

Board footer

Powered by FluxBB