Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Hostens OpenVZ system hardware clock issue
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Hostens OpenVZ system hardware clock issue

jtkjtk Member

In my experience Hostens is both a decent provider and very responsive to inquires. I'm hoping someone here might know them well enough to relay what I hope will be clear in this post so something can be looked at and possibly fixed. Failing that, if anyone has a Hostens OpenVZ system and wants to verify what I'm seeing, that might be useful.

I seem to be have had trouble communicating what I think is an issue with the hardware clock of one of more of their OpenVZ systems. The clock in a container is set to UTC and is accurate and correct as far as that goes. However, a problem manifests itself with cron jobs.

For example, one container has an hourly job run at 17 minutes past the hour, but it will actually run at 42 minutes past the hour. If I change the job to run at 15 minutes past, it will then be run at 40 minutes past. This seems to pretty good evidence for what I think is the underlying problem. I believe crontabs on these OpenVZ containers will be run according to the hardware clock. I've asked if they can verify that the hardware clock is accurate, but so far the responses I've gotten are that something must be wrong with my config. And I don't think I have any way of interrogating the hardware clock from a container otherwise I'd verify this myself.

I provided a link to this IBM support page, which roughly describes the underlying problem, but that didn't seem to help convey the issue either. I can live with this mild inconsistency, but it would be nice if our friends at Hostens might be able to verify their hardware clock, and presuming I'm on the right track, correct them.

Comments

  • DPDP Administrator, The Domain Guy
  • jarjar Patron Provider, Top Host, Veteran
    edited November 2021

    I would think that clock issues would be visible inside of the container. So if you think the clock is intermittently wrong, you should be able to catch it.

    Just run a loop in a screen session like "date >> date.log && sleep 60" to output the time to a file every minute. My thought is that if this reveals no issues, either you're wrong about what's happening or your OS is damaged.

    If you're just looking for the output of a cron and not an actual log of the time it's running, there is most likely a gap in understanding between your expectations and the result of the cron. Check syslog to see if it's running when it's supposed to. Just because it's running doesn't mean it's consistently doing what you think it is or doing so quickly.

  • The clock in the container is different than the hardware clock. Running date shows the current and correct time, but it doesn't help if the cron jobs are run off the hardware clock.

  • jarjar Patron Provider, Top Host, Veteran
    edited November 2021

    Wouldn't it still be based on it? Timezone won't mask a hardware clock issue.

    Thanked by 1Clouvider
  • DBADBA Member
    edited November 2021

    For old style crontab files like hourly the jobs are run sequentially and in lexicographical order. Could other job(s) be delaying the job you are looking at? What does your crontab look like? What OS and release is running in the container?

Sign In or Register to comment.