|
|
| Author |
Message |
Dunkelzahn
Joined: 31 May 2007 Posts: 4
|
Posted: Thu May 31, 2007 8:47 am Post subject: CactiEZ loosing time in vmware Server on Windows 2003 |
|
|
Hi,
I now had CactiEZ running for some weeks and as looking through the graphs we recognized, that the date and times are wrong. After checking the local time regularly it seems, that the vm is loosing almost 50% of the time, so afte one hour, cacti showed only half of it, making all graphs a bit useless.
Searching the internet and this forum showed up some common problems with linux in vmware server going to fast or to slow, but nothing was helpfull so far. As the easiest solution, I tried to get ntp up an running, but after some updates it gets a huge jitter on all ntp server (External and internal) and keeps on using the local clock.
Has anyone here had this before and are there any ideas how to solve it? One suggested installing vmware tools. How can I do this in CactiEZ?
I really appreciate any help you can give me, as this is a bit frustrating.
Regards
Maik |
|
| Back to top |
|
 |
rony Developer/Forum Admin
Joined: 17 Nov 2003 Posts: 5443 Location: Wisconsin, USA
|
Posted: Thu May 31, 2007 9:15 am Post subject: |
|
|
| Install the VMware tools and enable host time sync. |
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 972
|
Posted: Thu May 31, 2007 9:29 am Post subject: |
|
|
| Faling that, set a CRON job that syncs the time with ntp.pool.org, for example. I ran CactiEZCD for a while on a VM machine, and had set a CRON job that ran every minute to keep the time correct ! |
|
| Back to top |
|
 |
Dunkelzahn
Joined: 31 May 2007 Posts: 4
|
Posted: Thu May 31, 2007 10:44 am Post subject: |
|
|
@rony I know it is a stupid question, but how do I install vmware tools?
@mcutting I tried to set ntpd up with several External and even internal ntp servers. Latest after the 3rd or 4th pull I have a jitter of 40000+. Can you tell me, what CRON job you ran?
I just try to get a foot into this and what sounds easy for you is a real task for me. But anyway thanks for your help so far |
|
| Back to top |
|
 |
mcutting Cacti Pro User
Joined: 16 Oct 2006 Posts: 972
|
Posted: Thu May 31, 2007 10:49 am Post subject: |
|
|
| Dunkelzahn wrote: | @rony I know it is a stupid question, but how do I install vmware tools?
@mcutting I tried to set ntpd up with several External and even internal ntp servers. Latest after the 3rd or 4th pull I have a jitter of 40000+. Can you tell me, what CRON job you ran?
I just try to get a foot into this and what sounds easy for you is a real task for me. But anyway thanks for your help so far |
You'll need to issue a command like
ntpdate -u 0.pool.ntp.org
To set the time.
Have a look at http://cactiusers.org/wiki/CactiEZTips |
|
| Back to top |
|
 |
Dunkelzahn
Joined: 31 May 2007 Posts: 4
|
Posted: Thu May 31, 2007 12:01 pm Post subject: |
|
|
Thanks, thats exactly what solved my problem. Not a really good solution, as I still loose 10-20 seconds per minute, but nobody will see it in the cacti graphs  |
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 945 Location: B/CS Texas
|
Posted: Fri Jun 01, 2007 6:44 pm Post subject: |
|
|
| Yep, this is a known issue with VMWare and the kernel that is used in CentOS 4.0. CentOS 5.0 has a newer kernel which takes care of this issue for you, or you can install VMWare Tools or there is a simple kernel parameter that you can use to fix it. |
|
| Back to top |
|
 |
Mika2006 Cacti User
Joined: 03 May 2007 Posts: 165
|
Posted: Sat Jun 02, 2007 3:51 am Post subject: |
|
|
| interrestinf topic |
|
| Back to top |
|
 |
streaker69 Cacti Pro User
Joined: 27 Mar 2006 Posts: 647 Location: Psychic Amish Network Administrator
|
Posted: Mon Jun 04, 2007 11:43 am Post subject: |
|
|
| cigamit wrote: | | Yep, this is a known issue with VMWare and the kernel that is used in CentOS 4.0. CentOS 5.0 has a newer kernel which takes care of this issue for you, or you can install VMWare Tools or there is a simple kernel parameter that you can use to fix it. |
It's not only in CentOS, but also in FreeBSD. I ran into the problem when I was using FreeBSD in VmWare. The only real solution is to install the VmWare tools. Running a Cron job to update your time to an internet time source every minute is a good way to get your IP banned from said internet time source. |
|
| Back to top |
|
 |
laffen99
Joined: 18 Jun 2007 Posts: 1 Location: Norway
|
Posted: Mon Jun 18, 2007 5:25 am Post subject: |
|
|
| We have this problem with various Linux distributions and FreeBSD 5.x/6.x. Solution was to run ntpdate every minute in cron against our internal NTP server. |
|
| Back to top |
|
 |
cigamit Developer
Joined: 07 Apr 2005 Posts: 945 Location: B/CS Texas
|
Posted: Wed Jul 04, 2007 12:07 pm Post subject: |
|
|
In theory there is a issue with running an update every minute. Since you are losing time (I lost 1 sec for every 2 secs) the time between cron jobs isnt exactly a minute, in my case it was 1.5 mins.
You are trying to use a time based tool (cron) to fix a time loss issue, which isn't going to work well. |
|
| Back to top |
|
 |
Cova
Joined: 27 Nov 2006 Posts: 15
|
Posted: Thu Jul 05, 2007 11:24 am Post subject: |
|
|
It's an issue with VMWare, not the guest OS running inside the VM - all virtualization software will have this problem in some way. Basically, the OS running inside the VM is not getting timer-ticks during the time it's not actively scheduled, and so it doesn't know how much time has passed. It also causes per-process CPU usage reporting in the guest OS to be wrong, as when the VM does get scheduled again VMWare will send a bunch of timer-ticks all at once to help it catch up, and the guest OS will assume that whatever process is running at the time got a LOT of CPU time even though it didn't really.
And the best way to fix it is to use VMWare tools installed into the guest OS, which will keep the clock in sync with the host OS. How to install the tools is slightly different for every guest OS, but almost always starts with choosing "Install VMWare Tools" (or something like that) from the VMWare console, which will mount a cd iso into the VMs cdrom with the tools on it. For linux there is both an RPM and a tarball of the tools - windows guests that CD will autorun and start the tools install. |
|
| Back to top |
|
 |
jpharvey
Joined: 21 Aug 2007 Posts: 1
|
Posted: Tue Aug 21, 2007 3:33 am Post subject: |
|
|
It is an issue with VMWare.
I used to do the NTP thing every minute but let's face it it's an ugly solution.
There is a sure fire way to resolve it (which I have done), which is to recompile the kernel with a lower timer interrupt rate. This URL tells you what to set it to:
http://kb.vmware.com/selfservice/viewContent.do?externalId=1420
Note: None of the other suggestions in the preceeding article worked for me. Recompiling the kernel is the silver bullet - I'd recommend going straight to it.
This URL tells you everything you need to know about recompiling the CentOS kernel:
http://www.howtoforge.com/kernel_compilation_centos
It's a bit fiddly but really quite easy, although building the kernel can take a few hours.
JP |
|
| Back to top |
|
 |
knebb Cacti User
Joined: 19 Sep 2006 Posts: 59
|
Posted: Fri Sep 14, 2007 6:05 pm Post subject: |
|
|
| jpharvey wrote: |
There is a sure fire way to resolve it (which I have done), which is to recompile the kernel with a lower timer interrupt rate. This URL tells you what to set it to:
http://kb.vmware.com/selfservice/viewContent.do?externalId=1420
Note: None of the other suggestions in the preceeding article worked for me. Recompiling the kernel is the silver bullet - I'd recommend going straight to it.
|
This would solve the issue if you're having timesync issues. But this seems not be the case here!
I bet, there is something in the BIOS enabled like "AMDPowerNow" or something similar. Disable it an you will perhaps loos some seconds, but not as before.
I had the same issue. Just disable power management.
Anyway, the above link helps you out when the time in continiously ahead or behind. Not, if it's "jumping" like mentioned in the original post. |
|
| Back to top |
|
 |
fxef79
Joined: 08 Jun 2007 Posts: 8
|
Posted: Tue Oct 02, 2007 12:20 pm Post subject: |
|
|
The absolute quickest way I've found to correct this is to grab an updated kernel that's already compiled to 100 Hz. There's a reference to CentOS specific kernels here:
http://wiki.centos.org/TipsAndTricks/VMWare_Server
(which leads you here for a kernel that works on our wonderful CentOS 4.x based CactiEZ installs: http://people.centos.org/~hughesjr/vmware-kernels/4/i686/)
I've built several virtual cacti systems using cactiez on Windows 2003 hosts (VMWare Server 1.0.3), and within minutes can just download and install the kernel-2.6.9-55.0.2.EL.100HZ.i686.rpm.
I'm NOT a linux guy, by any means... so the mechanics of having to download/install all the additional bits and pieces necessary to recompile my own kernel on the already stripped down CactiEZ base is really "out of scope".
This fixes exactly the problem mentioned in the original post - which is that the virtual machine clock seems to run at about 1/2 speed.
I generally also add the various clock settings found in a bunch of the relavant VMware KB articles... particularly I append "noapic nosmp nolapic clock=pit acpi=no" to the kernel line in grub. However these clock settings, by themselves, have never fixed the problem. Only replacing the kernel has ever solved it outright for me.
This keeps the time darn near right on, without having to resort to running ntp once every minute or other crazy solutions, and without even having to install vmtools. |
|
| Back to top |
|
 |
|