Questions tagged [time]
Time is a dimension in which events can be ordered from the past through the present into the future, and also the measure of durations of events and the intervals between them.
485
questions
377
votes
20
answers
614k
views
How do I get the current Unix time in milliseconds in Bash?
How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
134
votes
14
answers
1.2m
views
How do I force sync the time on Windows Workstation or Server?
What is the command to sync a Windows workstation or server to its configured time source?
64
votes
7
answers
116k
views
How to convert 'dmesg' time format to 'real' time format
I have (for example) this log entry in dmesg output:
[600711.395348] do_trap: 6 callbacks suppressed
Is there a possibility to convert this 'dmesg' time to 'real' time to know, when this event ...
45
votes
4
answers
148k
views
What time zone is a cron job using?
I'm guessing there's a difference between my PHP time and the server time.
When I check the current time in PHP, it's showing that MST is being used. However, cron jobs aren't running at the correct ...
45
votes
3
answers
74k
views
How to set system time dynamically in a Docker container
Is there any way to set a Docker containers system time dynamically (at run time) without effecting the host machine?
Using
hwclock --set --date "Sat Aug 17 08:31:24 PDT 2016"
gives the following ...
43
votes
5
answers
21k
views
Faking the date for a specific shell session
I'm certainly trying to achieve something weird here, but I want to fake the date locally for a shell session on GNU/Linux.
I need to black-box test how a program behaves at different dates, and ...
42
votes
4
answers
44k
views
Windows Server unable to synchronize NTP time reliably
Why does Windows Server (2008, in this case, but I've seen the same problem in 2003) seem to have problem synchronizing time? I've seen this error in my System log across a variety of servers:
The ...
34
votes
4
answers
90k
views
How can I compare an ntp server's time to my server's time?
I have ntpd running on a box. I want to see how the time on the box compares to the time retrieved from ntp.ubuntu.com. Is there an easy way to do this?
32
votes
1
answer
4k
views
Why is the year in this ISO timestamp not 2019?
For a simple app I'm using to test a devops pipeline I'm outputting the start time of a build to the homepage. On my development machine the year of the ISO-8601 timestamp I expect, 2019, is printed (...
27
votes
3
answers
6k
views
Risk of starting NTP on database server?
I've heard rumors of bad things happening to database and mail servers if you change the system time while they are running. However, I'm having a hard time finding any concrete information on actual ...
26
votes
13
answers
105k
views
Need leading zero for batch script using %time% variable
I came across a bug in my DOS script that uses date and time data for file naming. The problem was I ended up with a gap because the time variable didn't automatically provide leading zero for hour &...
26
votes
2
answers
7k
views
Weird syslog order
Have you ever seen wrong order in /var/log/syslog ? I think that it causes only crontab.
Jun 28 22:20:01 alex CRON[2327]: (root) CMD (something > /dev/null)
Jun 28 22:21:01 alex CRON[2700]: (root) ...
25
votes
9
answers
151k
views
Why is ntpd not updating the time on my server?
I have ntpd running on my server. It's all the default settings, except I commented out its ability to be a server to other machines:
# restrict -4 default kod notrap nomodify nopeer noquery ...
24
votes
10
answers
29k
views
Compare NTPD and ntpdate
What are the pros and cons between these two ways to synchronize your server?
It seems to me that your server would probably not drift more than 1 second every day, so ntpdate on a crontab would be ...
23
votes
4
answers
19k
views
dmesg time vs system time time isn't correct
I hope that here is somebody that can help me with this strange problem.
I think that i know why it is happening but i don't know how to solve it. Maybe it is because the BIOS time isn't set correct ...
23
votes
3
answers
31k
views
Kill process with high CPU usage after X time? [closed]
Running Linux I have a few processes which tend to crash occasionally (game servers), which end up using 100% cpu.
I'm looking for a program or script to check the cpu usage of a list of processes by ...
22
votes
2
answers
20k
views
What is the clock frequency inside 10Gb and 100Gb Ethernet cards?
As I understand, a 10Gb Ethernet card is capable of putting 10Gb every second on (say) a fibre optics cable. Now naively, for this to happen in hardware, one will need a 10GHz clock running the ...
22
votes
3
answers
134k
views
DHCP Options for Network Time Server
It looks like there are two options for providing network time settings to a DHCP client; option 004 and option 042. The description for 004 is "Time Server", while 042 specifies NTP. Is there a ...
22
votes
8
answers
70k
views
Should servers have their timezone set to GMT/UTC? [closed]
This may not be a big deal for smaller shops that only have one or a few site, but for larger organizations this is something I'm curious about.
What are the pros and cons have having all/most of ...
18
votes
7
answers
50k
views
How to make Jenkins CI use Local time instead of UTC on debian squeeze
I have a Jenkins-ci installation on a debian squeeze.
Current default time zone: 'America/Toronto'
Local time is now: Mon Jul 9 16:00:57 EDT 2012.
Universal Time is now: Mon Jul 9 20:00:57 ...
18
votes
3
answers
34k
views
What is the best way to measure latency via a "telnet to port" test, preferably with built-in Linux tools?
I'm writing a Graphite/Diamond collector measuring network latency. Specifically it should measure the time it takes to open up a connection to a port on a remote server. And it needs to work via ...
18
votes
3
answers
8k
views
What is the largest hardware clock update the Linux kernel "11-minute mode" can make?
When certain time-related programs (like ntpd) are running on a Linux system, the kernel will switch into so-called "eleven minute mode" (see the hwclock man page) whereby it will automatically update ...
15
votes
2
answers
5k
views
What is the strategy for detecting time drift in a linux based data centre?
What is the strategy for detecting time drift in all linux based data centre? This is a more difficult problem than it seems at first.
Time drift can cause serious problems for certain applications ...
15
votes
4
answers
7k
views
Easy way to get the International Atomic Time on linux?
My system uses UTC for the system clock, which I don't particularly feel like changing. Is there an easy way to get the current TAI time? (preferably a command line tool or flag)
15
votes
2
answers
3k
views
Linux kernel detecting wrong processor frequency
After a cold boot of a 6.0.8 Debian server (HP ProLiant), ntpd played havoc with system time: offset and jitter with respect to the usual and reliable reference time servers growing without limit. (...
14
votes
2
answers
93k
views
date: cannot set date: Operation not permitted [duplicate]
I have received an interesting problem during I tried to set my Server time either with NTD or manually using date command.
First of all I have tried to use NTD. I have succesfully installed the ...
14
votes
3
answers
15k
views
Synchronize clock with NTP while online, and with RTC while offline?
Is there a existing mechanism that synchronizes a linux system with NTP while online, and with a predictably drifting RTC while offline?
We operate remote "collectors": embedded Linux ...
13
votes
3
answers
21k
views
What is a ToD server, "Time of Day" (Not NTP)
I got a simple task: Setup a ToD server... It is not NTP. It runs on port 37. It seems to be bundled with inetd or xinetd.
Shall be installed on Debian or CentOS. Alternatively FreeBSD (pfsense ...
13
votes
2
answers
56k
views
Correcting CentOS System Clock
Using the time C function (number of seconds since the Epoch) shows that the time on my current CentOS 6 server is about 7 hours behind compared to another server with the correct time. How can I ...
12
votes
9
answers
17k
views
Time drift
How do you deal with server time drift?
12
votes
7
answers
16k
views
Local or public NTP servers?
For a relatively large network (thousands of hosts) - what are the arguments for and against running a locally managed (pool of) NTP server(s) (perhaps periodically set via some public NTP server) and ...
11
votes
6
answers
2k
views
Replacing sick NTP server source and re-synching (with internal time currently 2 minutes late)
One of the external NTP servers (the primary one--currently) we're using as source seems to not be responding to NTP calls. Unfortunately, on our core router (Cisco 6509), the NTP functionality hasn'...
11
votes
6
answers
1k
views
Local timezones on servers considered harmful? [closed]
I'm curious as to what other administrators' experiences with timezones, in the context of remotely administered servers, are. In my career I've come across several conventions;
Always, always, ...
11
votes
1
answer
6k
views
server restart after timezone change
Is it required that the server should be rebooted once I change the time?
I ran into trouble when I changed the datetime and did not restart crond.
Is there any other service that may have issues ...
10
votes
7
answers
27k
views
Setting time zone on linux (ubuntu)
Here in the UK we are UTC+1. I set the time using 'date'. However it keeps resetting back to standard UTC, I'm guessing via a NTP time server.
I've tried setting the timezone with tzselect but it ...
10
votes
3
answers
54k
views
How to temporarily stop time syncing with domain controller?
I wish to do some testing on my local machine which requires me to put the date forward a year. So I can test some stuff in SQL Server (i've found it not possible to override the sql server time).
...
10
votes
11
answers
1k
views
What sort of time management system do you use?
System and network administrators are usually very busy people. Juggling projects, meetings, support tickets, and verbal requests from people in the hallways can make a real mess. We've discussed ...
9
votes
3
answers
18k
views
How to keep the time on multiple servers in sync
I want a cluster of servers to have the exact same time.
All are using UTC time zone.
Using NTP currently, i still see they seem to be off by 10-20 miliseconds each.
Whats the best way to have them ...
9
votes
3
answers
855
views
Managing multi-timezone servers
What would be an ideal time and timezone setup for multi-country servers? Especially considering one central IT team managing these servers.
Currently we have each server using a local timezone. e.g. ...
9
votes
1
answer
7k
views
Single NTP server on isolate network
I have two linux machines (A and B) on an isolated network. They must be time-synchronized. Machine A is powered intermittently and must serve the time, as it is connected to an authoritative time ...
8
votes
6
answers
7k
views
What consequences / implications can arise from a wrong system clock?
What issues can you think of that may arise from a wrong system clock setting ?
Primarily interested in potential problems affecting servers and Linux or UNIX-like systems in particular.
And how ...
8
votes
6
answers
22k
views
Domain Controller time is incorrect
I have a domain controller running in VM on Hyper-V, the time seems to be steadily getting faster, over the X-mas period it's 5 faster, which seems odd!
I know how to change the time and I belive we ...
8
votes
1
answer
2k
views
Changing time or offsetting it in OpenVZ contained server
I am trying to run a VPS, a Debian box contained in an OpenVZ container. Obviously, I cannot use time --set or any such command, as the time must be set via the parent node. The owner of the parent ...
8
votes
2
answers
2k
views
linux system time temporally jumps
I saw a strange system time changing behavior in some (hardware) servers: in /var/logs/syslog, the date time preceding each log message sometimes change to a random one and gets back to normal in the ...
7
votes
5
answers
13k
views
"Issued certificate not yet valid." with wget?
I am getting the following error when using wget to fetch a file:
Issued certificate not yet valid.
To connect to www.atlassian.com insecurely, use ‘--no-check-certificate’.
Testing with openssl ...
7
votes
3
answers
12k
views
Allow Facebook access only in specific hours of the day with squid
I've been able to install squid on my Ubuntu Server with basic authentication and everything works perfectly.
Recently the boss asked to block facebook access and I did it with no problems.
Now it ...
7
votes
4
answers
80k
views
How to synchronize the clock of a windows server 2003 domain server?
Given a windows server 2003 domain server, I'd like to sync it's time to (any) external time services (it's off a couple of minutes). How to do this 1, manually; 2, in an automated manner every week?
7
votes
1
answer
12k
views
Is it better to use the systemd service unit's Restart & RestartSec, or use a systemd timer unit?
I have a couple of in-house automated scripts running at periodic intervals. One is every five minutes, the other is every minute. They don't really need to be ran on-the-dot; e.g. I don't care if ...
7
votes
2
answers
6k
views
Redirecting time.windows.com to internal server
In a corporate environment most machines will be domain joined and therefore get their time from the DCs. However, sometimes you get a machine that isn't in the domain. By default these machines will ...
7
votes
7
answers
4k
views
Why is the time messed up on my Ubuntu Server VPS?
A month back loads of services on my VPS stopped working. After messing about for an hour or so i worked out that the time had frozen. I gather it was some sort of virtualization bug and a reboot soon ...