Traffic stats of ifconfig ~4Gb -> 0Gb.
Hi, I had the issue and could find google entries for that writing that it is usual that while running, the statistics of the network traffic displayed via ifconfig could be reseted easily by itself and is "normal" to have an overrun around 4Gb-s, where the counter starts again from zero! I read suggestions for such a case to not to let you fooled by ifconfig and use vnstat or similar, measuring perfectly. Any ideas, how "normal" this kind of statistics zeroing on SUSE 10.0 is and how to avoid that? Is vnstat displaying well in that case, when the ifconfig-counter goes to zero several times? Extra question to vnstat: does anyone know, what happens e.g. when changin' the system time via ntp? Does vnstat give a correct output also if not only few seconds, but minutes were corrected? I mean e.g. now it is 20:21, so used internet for 22 minutes and then let's say via ntp the time will be set to 20:11. Then there will be ten more minutes in the hour, alltogether 70 minutes, ruining likely all of the stats. Maybe overwriting them, because there will be this time twice 22:21 and so on. Maybe getting too late already, thanks for any thoughts, Pelibali
On Friday 06 October 2006 20:34, pelibali wrote:
I read suggestions for such a case to not to let you fooled by ifconfig and use vnstat or similar, measuring perfectly. Any ideas, how "normal" this kind of statistics zeroing on SUSE 10.0 is and how to avoid that? Is vnstat displaying well in that case, when the ifconfig-counter goes to zero several times?
It sounds as if ifconfig is using a 32-bit integer for the counting, which will overflow (wrap around to 0) once it hits 4G. This is normal behaviour for 32-bit integers. -- ----- stephan@s11n.net http://s11n.net "...pleasure is a grace and is not obedient to the commands of the will." -- Alan W. Watts
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2006-10-06 at 20:34 +0200, pelibali wrote:
Extra question to vnstat: does anyone know, what happens e.g. when changin' the system time via ntp? Does vnstat give a correct output also if not only few seconds, but minutes were corrected? I mean e.g. now it is 20:21, so used internet for 22 minutes and then let's say via ntp the time will be set to 20:11. Then there will be ten more minutes in the hour, alltogether 70 minutes, ruining likely all of the stats. Maybe overwriting them, because there will be this time twice 22:21 and so on.
If ntp is running continuously, there will be no problem: it doesn't "set" the time, but adjusts very slowly the clock's speed till it syncs with the real time. There is no suden change, no missing "seconds". On the other hand, when you start the service via "rcntp start", the first step the script does is to set the clock directly, then it will start the daemon with the clock already set. This should not be normally a problem because the script is called at boot time, but it could be if call it manuall during running time. The last sentence must be qualified, because in that case ntpdate is called in such a way that it automatically decides to "slew" or "set" the clock: it is "set" if the error is more than 128 ms (see man ntpdate and the script). In other words, if the clock is nearly in sync, there will be no jump; if the difference is bigger, there will be one. Thus, if you require ensuring those jumps to never occur, you have to modify the script slightly if you will be calling it during normal running time (but remember that if the clock error is big, the daemon will refuse to run). I hope I have not "obscured" things too much ;-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFJrEjtTMYHG2NR9URAt7QAJ0ZPeyM4fZQVyd6TgvfT2E8eF2o+wCferBS oo1O50pWbSwSms8W0IHVCNY= =Ht9i -----END PGP SIGNATURE-----
Hi, On Fri, 6 Oct 2006 21:40:08 +0200 (CEST) "Carlos E. R." <.> wrote: <...>
Thus, if you require ensuring those jumps to never occur, you have to modify the script slightly if you will be calling it during normal running time (but remember that if the clock error is big, the daemon will refuse to run).
I hope I have not "obscured" things too much ;-)
Thank you for the detailed answer Carlos! I'm curious, so will likely check this story further up, but was specially useful to hear about the different aspects. This ntp-related is one of the several topics, where I could still improve myself a lot... Cheers, Pelibali
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2006-10-08 at 18:54 +0200, pelibali wrote:
I hope I have not "obscured" things too much ;-)
Thank you for the detailed answer Carlos! I'm curious, so will likely check this story further up, but was specially useful to hear about the different aspects. This ntp-related is one of the several topics, where I could still improve myself a lot...
I wrote something time ago that you might find useful, things have not changed that much: http://susefaq.sourceforge.net/howto/time.html that was before I used ntpd, so that part is missing there. Then, you can also install xntp-doc and read the complete manual there (or online somewhere). - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFKpketTMYHG2NR9URAiJpAJ0fznOjmzZUIQ+/BVA9KLQg0VkLfACgiODW XaW5dIoJslmJLShCjcZKP3s= =8IKN -----END PGP SIGNATURE-----
participants (3)
-
Carlos E. R.
-
pelibali
-
stephan beal