-----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-----