vnstat [Solved]

Post here if you are a new Porteus member and you're looking for some help.
kihlstedt
White ninja
White ninja
Posts: 5
Joined: 16 Aug 2018, 15:00
Distribution: porteus 4.0

vnstat [Solved]

Post#1 by kihlstedt » 16 Aug 2018, 15:53

Hello,
i'm using Porteus 4.0, xfce, installed on HDD.
I have installed the vnstat module to count the traffic,
but it only runs when i start the vnstat daemon in the terminal, like: # vnstatd -d.
I want to have it automaticaly run at startup,
so i tried several commands like: chmod 0755 /etc/rc.d/ rc.vnstat,
what is suggested somewhere, but nothing worked.
Did somebody with more skills had this problem and worked it out
and is ready to tell me the solution?
thanks

User avatar
Blaze
DEV Team
DEV Team
Posts: 3870
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

vnstat

Post#2 by Blaze » 16 Aug 2018, 17:22

Hi kihlstedt,
how about

Code: Select all

su
toor
chmod 0755 /etc/rc.d/rc.vnstat
/etc/rc.d/rc.vnstat start
?
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

kihlstedt
White ninja
White ninja
Posts: 5
Joined: 16 Aug 2018, 15:00
Distribution: porteus 4.0

vnstat

Post#3 by kihlstedt » 16 Aug 2018, 20:33

Hi Blaze,
thanks for your reply,
your suggestion starts the daemon for the session
but after reboot the daemon doesn´t start automatically.
In the moment i think that, that is the problem:

guest@porteus:~$ /etc/rc.d/rc.vnstat start
Starting the vnstat daemon...
Error: pidfile: Permission denied

by the way: how do you create this nice frame and put the terminal quotes inside?
thanks

jssouza
Legendary
Legendary
Posts: 1165
Joined: 09 Jul 2015, 14:17
Distribution: Porteus x86 arm

vnstat

Post#4 by jssouza » 17 Aug 2018, 06:00

kihlstedt,
kihlstedt wrote:
16 Aug 2018, 20:33
but after reboot the daemon doesn´t start automatically.
You need to save the /etc/rc.d/ rc.vnstat as executable in your persistence, so that it survives a reboot.
kihlstedt wrote:
16 Aug 2018, 20:33
guest@porteus:~$ /etc/rc.d/rc.vnstat start
Starting the vnstat daemon...
Error: pidfile: Permission denied
You need to run this as root. Run the su command first that Blaze mentioned.
kihlstedt wrote:
16 Aug 2018, 20:33
by the way: how do you create this nice frame and put the terminal quotes inside?
Select the text that you want to quote and click Code display (The </> button) from the button list from the top when you edit your reply.

kihlstedt
White ninja
White ninja
Posts: 5
Joined: 16 Aug 2018, 15:00
Distribution: porteus 4.0

vnstat

Post#5 by kihlstedt » 17 Aug 2018, 10:57

Hi jssouza,
thanks for your answer.
jssouza wrote:
17 Aug 2018, 06:00
You need to save the /etc/rc.d/ rc.vnstat as executable in your persistence, so that it survives a reboot.
i´m not sure, if i understand the meaning of that,
i thought to now, that the chmod 0755... makes it executable
and save in the persistence means that it is saved in the porteus/change folder, what is the case.

kihlstedt
White ninja
White ninja
Posts: 5
Joined: 16 Aug 2018, 15:00
Distribution: porteus 4.0

vnstat

Post#6 by kihlstedt » 17 Aug 2018, 11:07

can there be a time problem,
when the the clock on the desktop shows, lets say 12 and i start the daemon, the pidfile shows, that is set up at 10

User avatar
Blaze
DEV Team
DEV Team
Posts: 3870
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

vnstat

Post#7 by Blaze » 17 Aug 2018, 12:37

Code: Select all

su
toor
chmod 0755 /etc/rc.d/rc.vnstat
echo '/etc/rc.d/rc.vnstat start' >> /etc/rc.d/rc.local
reboot
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

kihlstedt
White ninja
White ninja
Posts: 5
Joined: 16 Aug 2018, 15:00
Distribution: porteus 4.0

vnstat

Post#8 by kihlstedt » 17 Aug 2018, 19:15

Hi Blaze,
this was the missing link,
vnstat works fine now.

thanks for your help
all the best

Post Reply