Page 1 of 1

[Solved] network accounting does nothing

PostPosted: Dec 25th, '12, 23:19
by bazyli
Since the release of Mageia 1 can not be read by web statistics vnstat (works only if we spend the appropriate console commands: see man vnstat), thus it does not work the Show detailed network statistics in Network Monitor.
Looking for reasons stated that vnstat daemon (runs) does not know whether to initiate an interface has enabled monitoring.
The error was a typo contained in the vnstat_ip-up files in the /etc/sysconfig/network-scripts/ifup.d/ vnstat_ip-down and in /etc/sysconfig/network-scripts/ifdown.d/. In both files in a row instead of <if no.4 ["a$ACCOUNTING" = "ayes" ]; then>
should be <if ["a $ ACCOUNTING" = "yes"] then>
.
After removing the 'a' vnstat correctly detected on the interface and writes the data to the database.

Similar errors are found in the package scripts net_monitor.
Typos are netmonitor_up files in the /etc/sysconfig/network-scripts/ifup.d/ and netmonitor_down in /etc/sysconfig/network-scripts/ifdown.d/.

After removing redundant 'a' Network Monitor shows traffic statistics correctly on interfaces for configuring the monitor turned on the option.

Errors in packets and net_monitor vnstat are in Mga1, Mga2 and repository for Mga3 cauldron (yet appeared in Mandriva).

Repair is particularly important for those using the links at the limit of data transfer.


The same situation (the remainder of Mandriva) is 01_network file in the /etc/netprofile/modules/ nr20 line is probably a typo.
Instead of /etc/resonvconf/ should probably be /etc/resolvconf/. 01_network file is packaged netprofile-plugin-network.

Can someone confirm these errors and report them if necessary. See PS :-).

PS
Sorry for the spelling, post translated by google translate.

Re: network accounting does nothing

PostPosted: Dec 26th, '12, 00:09
by doktor5000
Nope, cannot confirm that, only the general problem, this was found after Mageia 2 was released and i've documented in https://wiki.mageia.org/en/Mageia_2_Errata#net_applet_-_Monitor_Network.2Fnetwork_accounting_does_nothing
After installing the two packages, accounting worked for me.

Re: network accounting does nothing

PostPosted: Dec 26th, '12, 00:27
by bazyli
Insist on errors in packages whose names I gave.
Please download the specified packages (vnstat, net_monitor, netprofile-plugin-network), unpack it and check for errors that occur in the specified files.
I do not know what effect an error in the package netprofile-plugin-network.
I checked packages from Mandriva 2010.2 and Mageia.
I have backed up your /etc with Mandriva 2010.2, and there also found these errors.

Re: network accounting does nothing

PostPosted: Dec 26th, '12, 12:25
by bazyli
doktor5000 probably do not understand the (my mistake in the topic, sorry), the subject should be: "Show detailed network statistics does not work".
Package installation: vnstat and net_monitor Network Monitoring provides performance when you right-click on the network applet.
But you can not see the network statistics for the interface, or rather does not show the actual data: Summary, Hourly traffic, Daily Traffic, Top 10 traffic days.
Vnstat should probably update the database every 5 minutes.

This problem can be seen in the post: viewtopic.php?f=15&t=2183 # p16389

For me, the problem appeared on the desktop Mageia2 32bit and on a laptop Mageia2 64bit. Therefore, especially for desktop Mageia3 beta1 32bit installed (installation not an upgrade).
As for Mageia3 beta1, you're right. Just check whether the packages are installed vnstat and net_monitor and everything should work, with one exception in the MCC - the system - management of system services enable vnstat had at the start.

However, on my laptop I'm still here Mageia2 64bit and checked again: installed vnstat and net_monitor, vnstat service is running.
However, without changing the "ayes" to "yes" in vnstat_ip-up files in the /etc/sysconfig/network-scripts/ifup.d/ vnstat_ip-down and in /etc/sysconfig/network-scripts/ifdown.d/, Traffic in accounting - Show detailed network statistics can not see any changes (vnstat not credited to the base of the current traffic in the /var/lib/vnstat).
Vnstat package - vnstat-1.10-3.mga2.x86_64.rpm

netmonitor_up file changes in /etc/sysconfig/network-scripts/ifup.d/ and netmonitor_down in /etc/sysconfig/network-scripts/ifdown.d/ are unnecessary.

Carried out the changes in the files, i used the internet and did restart the system, i did not use either the console (normally seem to vnstat-i ppp0), or MCC, not to make a fuss.
I do not know where he is wrong, but if Magei3 work, I think that the topic can be closed.

Thank you for your interest, quick response and effort in reading messages (google translate).

Yours.