public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Matthias Fischer <matthias.fischer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Updating 'vnstat' to 2.6 - need some help with necessary changes
Date: Mon, 23 Mar 2020 21:43:01 +0100	[thread overview]
Message-ID: <55fba60f-0126-2144-44eb-a93b2e5924bb@ipfire.org> (raw)
In-Reply-To: <41B80EB9-24FB-48C4-967C-6268CCC1098D@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 2596 bytes --]

On 23.03.2020 09:29, Michael Tremer wrote:
> Hi,

Hi,

> Thanks for looking into this.

No problem - had fun. ;-)

>> On 22 Mar 2020, at 12:08, Matthias Fischer <matthias.fischer(a)ipfire.org> wrote:
>> 
>> Hi,
>> 
>> I successfully built 'vnstat 2.6' under Core 142/32bit.
>> ...
>> start section would need:
>> 'vnstatd -d --alwaysadd'
> 
> Yes, you can simply use the standard functions that our initscripts have here.
> 
> https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=src/initscripts/system/template;h=69dc2a6a2202fb30da61a7fff6625aea531802e9;hb=HEAD

Thanks. Will take a deeper look at this. I already implemented loadproc
and killproc. Works.

> ...
> 
> Should we add a function to the initscript that checks if any files like that exist and then run a conversion command?
> 
> That would be safe, even if people restore an older backup.

Will take a look at this. It looks as if a conversion command will not
be necessary for upgrading. If 'vnstatd' finds old interface files, they
will be automatically converted and a new 'vnstat.db' will be created.
Worked here.

>> 8. Since the graphs are no longer updated through 'makegraphs', I
>> created a symlink in '/etc/fcron.minutely' to '/var/usr/sbin/vnstat'
>> (*No* parameters, '-u' doesn't exist anymore).
> 
> Makegraphs does some other things, too. I am not sure if we can remove the symlink, yet.

I just commented the 'vnstat' command. The '-u'-parameter is no longer
needed/supported.

>> Now every minute 'vnstat' now grabs the data collected by'vnstatd'.
> 
> The vnstat call can of course be removed.

Yes. Of course. ;-)

That was a mistake on my part.

Removed. Works...

>> 
>> 9. Edited 'traffic.cgi', changed:
>> 
>> system("/usr/bin/vnstati -c 5
>> 
>> To:
>> 
>> system("/usr/bin/vnstati -c 2
>> 
>> This keeps the graphs a bit more "updated".
>> From 'man vnstat':
>> '-c (--cache-time) => Update output file only if at least *time* minutes
>> have passed since the previous file update.
> 
> I think once a minute is cool too. It does not take a lot to generate those and I think it is valuable that they are recent.

Changed to '1'. Works.

>> Attachments:
>> Screenshot fomr my testmachine after importing the old interface files
>> from my production machine.
>> I made some minor adjustments to 'vnstat.conf', attached.
> 
> What are those?

E.g., I removed interface "green0". I left it empty, but I will test if
we really can change this to: Interface "".

I'll send the other changes in a seperate mail.

Best,
Matthias

      reply	other threads:[~2020-03-23 20:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d561d3ac-9a7e-5158-947e-2c5f69bda7bf@ipfire.org>
2020-03-23  8:29 ` Michael Tremer
2020-03-23 20:43   ` Matthias Fischer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55fba60f-0126-2144-44eb-a93b2e5924bb@ipfire.org \
    --to=matthias.fischer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox