Page 1 of 1
vnstat [Solved]
Posted: 16 Aug 2018, 15:53
by kihlstedt
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
vnstat
Posted: 16 Aug 2018, 17:22
by Blaze
Hi
kihlstedt,
how about
Code: Select all
su
toor
chmod 0755 /etc/rc.d/rc.vnstat
/etc/rc.d/rc.vnstat start
?
vnstat
Posted: 16 Aug 2018, 20:33
by kihlstedt
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
vnstat
Posted: 17 Aug 2018, 06:00
by jssouza
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.
vnstat
Posted: 17 Aug 2018, 10:57
by kihlstedt
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.
vnstat
Posted: 17 Aug 2018, 11:07
by kihlstedt
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
vnstat
Posted: 17 Aug 2018, 12:37
by Blaze
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
vnstat
Posted: 17 Aug 2018, 19:15
by kihlstedt
Hi Blaze,
this was the missing link,
vnstat works fine now.
thanks for your help
all the best