Koozali.org: home of the SME Server
Obsolete Releases => SME 7.x Contribs => Topic started by: ourspolaire on November 29, 2009, 04:47:26 PM
-
Hi,
http://wiki.contribs.org/Vnstat
I have an error here:
******************************************************
# $iface_list = array('eth0', 'eth1');
-bash: syntax error near unexpected token `('
******************************************************
How to fit that?
-
ourspolaire: you have to edit config.php that is a php file..
I've edited wiki's page because it was not clear
HTH
-
Stefano,
I edited the config.php file.
It works but not at 100%:
Every minutes I receive an email of Cron Daemon saying:
Error: Unable create database backup "/var/lib/vnstat/.eth0".
How can I fix that?
Could I remove the applications (uninstall) related to vnstat and then redo the install again? How to do that?
-
edit /etc/cron.d/vnstat and change nobody to root
then restart cron service with
service crond restart
it should work
Ciao
-
Ok, emails from Cron Daemon has stopped.
*********************************************************
Next bug:
eth1 seems not operational.
eth0 seems record internet activity & the data exchange between my workstation and my SME server, all together.
# vnstat
rx / tx / total / estimated
eth1: Not enough data available yet.
eth0:
today 1.69 GiB / 490.02 MiB / 2.17 GiB / 2.62 GiB
-
please post the output of
ifconfig
-
# ifconfig
bond0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:1.1.1.1 Bcast:1.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth0 Link encap:Ethernet HWaddr 00:0D:88:36:A7:45
inet addr:192.168.77.1 Bcast:192.168.77.255 Mask:255.255.255.0
UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1
RX packets:12302728 errors:14 dropped:0 overruns:0 frame:0
TX packets:14296277 errors:0 dropped:0 overruns:0 carrier:0
collisions:94585 txqueuelen:1000
RX bytes:2228787906 (2.0 GiB) TX bytes:852964101 (813.4 MiB)
Interrupt:50 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:E0:29:40:B0:8D
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:13686764 errors:0 dropped:0 overruns:0 frame:0
TX packets:11046207 errors:0 dropped:0 overruns:0 carrier:0
collisions:170005 txqueuelen:1000
RX bytes:913108543 (870.8 MiB) TX bytes:571477392 (545.0 MiB)
Interrupt:217 Base address:0x6000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:19008 errors:0 dropped:0 overruns:0 frame:0
TX packets:19008 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2159765 (2.0 MiB) TX bytes:2159765 (2.0 MiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:74.13.144.232 P-t-P:64.230.197.42 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:13677883 errors:0 dropped:0 overruns:0 frame:0
TX packets:11037326 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:611631758 (583.2 MiB) TX bytes:328101480 (312.9 MiB)
-
well, I think that you should edit your config.php and use eth0 and ppp0 interfaces
-
Ok I will test that.
Just in case:
How to uninstall everything about Vnstat?
-
To test, I did:
# vnstat -u -i eth0
# vnstat -u -i eth1
# vnstat -u -i ppp0
# vnstat -u -i bond0
Result:
# vnstat
rx / tx / total / estimated
bond0: Not enough data available yet.
eth1: Not enough data available yet.
eth0:
today 48.10 MiB / 67.63 MiB / 115.74 MiB / 147 MiB
ppp0: Not enough data available yet.
Strange: ppp0 is not displayed.
-
I can confirm ppp0 is not showing, I've just set it up here and am seeing the same results..
-
Could we get this info added into the vnstat wiki page?
edit the "/etc/cron.d/vnstat" config file and change "nobody" to "root"
then restart the cron service with
"service crond restart"
as that is what I also needed to do to get it to work.
-
How can I go about figuring out why my eth1 interface numbers are not updating? Phpsysinfo shows the correct usage.
-
Update....If I manually run the following command it will update but if I do not manually run this command the application only updates the eth0 interface info??
# vnstat -u
Where do I find the script that is doing the updating to see if something is wrong the and only calling for the eth0 instead of both the eth0 & eth1 to both update?
Thanks in advance for any help.
Update at 9:52am I am thinking the problem is in the file -------/etc/sysconfig/vnstat--------
VNSTAT_OPTIONS="-i eth0" (this was the original and it's only calling for the eth0 interface to be updated) Do I just clear that line?
Update at 1:43pm I seem to have it working and what I did was in the file listed above I changed the line to read VNSTAT_OPTIONS="-u"
and now both interfaces seem to be consistantly updating for the past 4 hours.