On Fri, 23 Oct 2020 22:15:27 +0200
Rafael Sadowski <raf...@sizeofvoid.org>:

> Please find below a diff to update vnstat to the latest stable version. I had
> an older version in my tree for a long time, time to push it out.
> 
> Latest test on em0 looks good:
> 
 diff --git a/net/vnstat/pkg/README-main b/net/vnstat/pkg/README-main
> index 825583a460b..4726e7cb603 100644
> --- a/net/vnstat/pkg/README-main
> +++ b/net/vnstat/pkg/README-main
> @@ -4,20 +4,20 @@ $OpenBSD: README-main,v 1.3 2018/09/04 12:46:19 espie Exp $
>  | Running ${PKGSTEM} on OpenBSD
>  +-----------------------------------------------------------------------
>  
> -1) Launch vnstat --iflist to see all the available interfaces.
> +1) Edit ${SYSCONFDIR}/vnstat.conf if necessary.
>  
> -2) For each interface that you want to monitor, launch this command:
> -    # su -m _vnstat -c "vnstat -i interface -u"
> -This will create the database for the specified interface.
> +2) Start the vnstatd daemon:
> +    # rcctl start vnstatd
>  
> -3) Edit ${SYSCONFDIR}/vnstat.conf if necessary.
> +3) Run "vnstat --iflist" to see all the available interfaces.
>  
> -4) Finally launch the vnstatd daemon:
> -    # ${RCDIR}/vnstatd start
> +4) For each interface that you want to monitor, launch this command:
> +    # doas -u _vnstat vnstat --add -i INTERFACE
> +This will create the database for the specified interface. Otherwise you can
> +also adjust "Interface" in ${SYSCONFDIR}/vnstat.conf.
>  
>  5) Create graphics with the command vnstati (you have to install vnstati)
>  
> -
>  Random hints:
>      * You can enable debug in ${SYSCONFDIR}/vnstat.conf and check
>        the logs in /var/log/vnstat/vnstat.log
> 


ok solene@ except for the README change bullet 4

you need a specific line in doas.conf to allow root to use doas.

The following command work with su: (which was used previously)
    # su -m  _vnstat -c  "vnstat --add -i INTERFACE"

Reply via email to