From mboxrd@z Thu Jan  1 00:00:00 1970
From: Matthias Fischer <matthias.fischer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: vnstat 2.6 - testing
Date: Sun, 22 Mar 2020 14:16:02 +0100
Message-ID: <02a44b78-6ca9-fbbf-0585-5a1046a75eb2@ipfire.org>
In-Reply-To: <fec66a3e-fe99-c64e-f2e3-c96ed3877a1b@ipfire.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0310890652348493693=="
List-Id: <development.lists.ipfire.org>

--===============0310890652348493693==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit

Hi,

it seems that I found a (fast) solution for starting/stopping 'vnstatd':

1. In '/etc/init.d/vnstat' I changed:

start)
	if use_ramdisk; then
		boot_mesg "Mounting vnstat ramdisk..."
		mount_ramdisk "${VNSTATLOG}"
		evaluate_retval
	fi
	;;

To:

start)
	boot_mesg "Starting vnstatd..."
	loadproc /usr/sbin/vnstatd -d --alwaysadd
	sleep 2
	evaluate_retval

	if use_ramdisk; then
		boot_mesg "Mounting vnstat ramdisk..."
		mount_ramdisk "${VNSTATLOG}"
		evaluate_retval
	fi
	;;

2. Changed:

stop)
	umount_ramdisk "${VNSTATLOG}"
	;;

To:

stop)
	boot_mesg "Stopping vnstatd..."
	killproc /usr/sbin/vnstatd
	sleep 2
	evaluate_retval
	umount_ramdisk "${VNSTATLOG}"
	;;

Tested. Worked.

But this doesn't check whether the old interface files were imported
correctly...

Opinions?

Best,
Matthias

P.S.:
'cached memory' is now at 90.42%.
Used: 4.18%
Buffered: 1.39%
Free: 4.00%
On a 2 GB / 32bit-machine (offline).
Hm.

--===============0310890652348493693==--