Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [time]

`time` is a command line utility for running another program and summarizing resource usage

Filter by
Sorted by
Tagged with
2 votes
1 answer
55 views

RTC / systemd time drift

I do see the following behaviour on a SUSE SLE 15 VM (VMWare ESXi, location setting is Europe / Germany) and getting confused the more I think about it. I have shortened the journal-log output to the ...
MMAX's user avatar
  • 276
0 votes
2 answers
88 views

What explains the measured overhead when timing a command in zsh?

When timing a command with time, there is inevitably some overhead (from the CPU, operating system, shell and so on). Running the following code, from a tty text mode virtual console with all ...
Markus Klyver's user avatar
-1 votes
1 answer
67 views

Merge two different times in cron format

I want to combine two different times which are in cron format into single time in bash shell script: e.g. time1 = 15 03 * * 1-5 time2 = 15 03 * * 6 result should be 15 03 * * 1-6 or e.g. time1 = ...
Vishal's user avatar
  • 1
0 votes
2 answers
541 views

how and when does Linux read or change hardware (BIOS) clock

Scenario: a Dell R740 server for example whose BIOS clock is first set, and it is set to UTC time but incorrectly and it is off 30 minutes. Then, a clean installation of Linux is performed (Redhat-8....
ron's user avatar
  • 9,175
0 votes
1 answer
116 views

why non network (no NTP) computer does not keep accurate time

what causes a computer to not keep accurate time? case in point a Dell server, r540/640/740 type having RHEL-8.10 installed, no network connection. It is standalone, there is no NTP or chrony in use, ...
ron's user avatar
  • 9,175
0 votes
1 answer
226 views

Do I still need to set my server's time zone to UTC?

OS is Raspberry Pi OS 12. It looks like timedatectl shows the date both in UTC and my local timezone. Since it looks like the OS keeps track of UTC explicitly, is there any reason to not set the ...
cat pants's user avatar
  • 167
4 votes
2 answers
423 views

Invalid date when setting one computer's clock from another

I have the following code in a Bash script, which takes the current date/time and sets it via SSH on a target computer: ssh <user>@<target> "date --set '$(date)'" This was ...
Richard Whitehead's user avatar
0 votes
0 answers
59 views

How to set the time so that it lags by 1 second

I need the time to lag exactly by 1 second. That is, so that the time is synchronized, but lags. Now I use timedatectl set-ntp on. How can this be achieved? Maybe there is a possibility to set the ...
SkyN's user avatar
  • 109
0 votes
1 answer
203 views

How to set keyboard shortcut to insert a timestamp (time & date) in KWrite?

KWrite is included as the default text editor in several popular Linux distros (such as Fedora KDE). Inserting a timestamp is a basic feature of text editors. How can one set a keyboard shortcut to ...
Amazon Dies In Darkness's user avatar
3 votes
0 answers
93 views

Linux clock source from FPGA

I'm trying to get the Linux kernel (and system as a whole) to sync to a monotonically incrementing clock from a FPGA register in memory. The clock is 64-bits wide and divided into two 32-bit sections: ...
Ryan Sherlock's user avatar
1 vote
1 answer
170 views

Where can I find the configuration/setting for NTP to explain the specific behavior observed in an NTP client?

I have recently been doing a specific timing analysis of the performance of NTP under controlled conditions.  The experiment I performed was conceptually quite simple.  I have an NTP server running ...
Denis Barkats's user avatar
0 votes
1 answer
173 views

start command at given time interactively in terminal

is there similar command to sleep, but where I can specify given time, so that my command will start at given time, INTERACTIVELY in my current open terminal window? I know about at command, but that ...
Martin Vegter's user avatar
18 votes
6 answers
10k views

How does a Linux operating system stand going back in time (when applying winter time for example)? Going back a second, would it be the same problem?

I'm asking myself after having read on papers that around the year 2035, we, on the earth and our computers by the way, might have to correct our time by one second back to comply with astronomical ...
Marc Le Bihan's user avatar
1 vote
1 answer
1k views

Can I configure tmux to show seconds of current time upon Prefix t?

On Prefix t (by default Ctrl+b t), tmux displays the time, and it looks something like this: Is there any way to configure this, e.g. to show the seconds, too? I tried setting export LC_TIME="%H:...
Vince Varga's user avatar
3 votes
1 answer
136 views

how to format `time` output [duplicate]

I'm using Ubuntu 23.10 x64. The time program has an -f flag but when I run it says -f command not found. time -f "%Uu %Ss %er %MkB %C" ./countwords hamlet.txt I'm trying to get the time ...
Leahcim's user avatar
  • 309
1 vote
1 answer
80 views

Why does /usr/bin/time coupled with GNU parallel output results before command's output rather than after command's output?

Scenario: $ cat libs.txt lib.a lib1.a $ cat t1a.sh f1() { local lib=$1 stdbuf -o0 printf "job for $lib started\n" sleep 2 stdbuf -o0 printf "job for $...
pmor's user avatar
  • 757
0 votes
2 answers
153 views

Speeding up time flow for stability testing

Is it possible to speed up time flow in Linux system? Doesn't matter if virtualized or on bare metal. I need to test if my program could have uptime for ~10 years. So accelerating about 4000 times of ...
Libor Tomsik's user avatar
1 vote
2 answers
9k views

What is the command to change the 'System clock synchronized:' setting from 'no' to 'yes' in photon os

I have a VM running Photon OS 3.0. NTP is not configured and it is using the hardware clock. It has fallen out of sync. The hardware clock hwclock is in sync with the hypervisor time, but when I run ...
Anand's user avatar
  • 31
35 votes
2 answers
4k views

Why is filesystem time always some msecs behind system time in Linux?

In Linux, it seems that filesystem time is always some milliseconds behind system time, leading to inconsistencies if you want to check if a file has been modified before or after a given time in very ...
Alberto Pianon's user avatar
9 votes
3 answers
6k views

Unix time, leap seconds, and converting Unix time to a date

I read many, many posts about Unix time and many say that a day is 86400 seconds. But pages like this talk about leap seconds. And this made me confused. And I read that Unix time is based on UTC, and ...
Okoba's user avatar
  • 93
-3 votes
1 answer
141 views

What is the difference between the ip address with which I access a remote server vs the ip address which is shown in "ip a" command output?

It's bothering me. I'm an amateur at Linux networking so pardon me on that. I've heard terms like NATTED IP from others. But I am not sure what do they mean. A serious issue has arouse. And I need to ...
achhainsan's user avatar
-1 votes
1 answer
362 views

Dualboot | After synced time on windows linux time is wrong

After i synced the windows time my hardware clock time is bad. timedatectl Local time: Sun 2023-10-01 15:38:05 CEST Universal time: Sun 2023-10-01 13:38:05 UTC ...
AutisticAllosaurus's user avatar
6 votes
2 answers
2k views

How can I set a time zone on a Linux machine that has only very minimal cmds available?

I have a Linux machine that only has very minimal cmds available on it, for example the /bin looks like this: /bin# ls ash chattr clockdiff dd dumpkmap ...
Henry's user avatar
  • 215
8 votes
2 answers
2k views

How to automatically set the modification (or creation) time of a Quicktime video file based on its meta data?

In a shell, how to automatically set the modification (or creation) date and time of a Quicktime video file based on the metadata in the file with a single command (or a single command line)? For JPG ...
user avatar
2 votes
1 answer
118 views

Is there a command to make another command or process complete faster?

Background I was using sudo renice -20 -p <pid> thinking it would make my videos convert faster. On testing the time it had no effect and then I found out that speed has nothing to do with ...
Nickotine's user avatar
  • 554
1 vote
1 answer
1k views

Raspberry Pi timedatectl fails with "Transport endpoint is not connected" and ".service files" errors

I am encountering an issue on my Raspberry Pi when trying to use the timedatectl command. When I execute timedatectl status I get the following error message: spaikon@raspberrypi:~ $ timedatectl ...
Nir Vana's user avatar
  • 188
0 votes
0 answers
181 views

Time, Memory Limit and Timeout for Python Command Only

I want to enforce timeout of 5s to python command and at the same time want to measure the execution time for python command (taking into account that python3 command memory limit is 256 MB), what I ...
Albert Einstein's user avatar
0 votes
0 answers
752 views

How accurate is the PPS device?

I am doing research in timing synchronization, and want to measure how time synchronization is impacted by injecting various faults into a system. I understand that the PPS devices on linux machines ...
stochasticlover1's user avatar
0 votes
2 answers
624 views

Measuring execution time of BASH and custom shell

I have written simple shell in C with job control and piping/redirection functionality. How can I compare execution time(real,user and sys) of this shell with BASH ? I tried to measure time of ...
Marko Brodanac's user avatar
0 votes
1 answer
74 views

Set explicit time with date

When I tried to set time with $(date +%s -d "2022-04-10 12:12:12") I get the time 2022-04-10 19:12:12 How can I set the time explicit?
Timestamp's user avatar
1 vote
3 answers
261 views

Get user's login duration time without time of locked screen

I'd like to get information about "utilization time" of users on linux sytems for specific days. This means the time, an user has an unlocked screen. In contrast the command ac displays the ...
Richard's user avatar
  • 11
1 vote
1 answer
2k views

Where is timedatectl information stored?

I am working on an embedded system without RTC battery. The time is synchronized via NTP when internet connection is available (which does not always happen). When the device is shut down, the time is ...
firion's user avatar
  • 149
0 votes
1 answer
140 views

How to add time in my script

I have 3 scripts to build OpenWrt but I can't set it up to have time at the end. Here's what the script gives and the script. openwrt-snapshot-r22256+29-14334c222e-ipq806x-generic-linksys_ea8500-...
James78's user avatar
  • 189
3 votes
2 answers
808 views

Why does higher CPU-usage slow down a task?

I am using whisper.cpp to transcribe some sound files. It is a very CPU heavy process so I try to find some optimal settings and therefore I have done some tests with the thread setting (-t) but the ...
d-b's user avatar
  • 2,077
0 votes
0 answers
32 views

How to find the user input time lies between which two time frame stored in array in bash script [duplicate]

let the given array is array=(12:45 01:30 02:02 02:55 03:55) so how to find the time let, 12:50 is lie between which two time frame(with index) is bash script array=(12:45 01:30 02:02 02:55 03:55) ...
Bhawishya Khanal's user avatar
0 votes
1 answer
1k views

How to check how long is used to download a file from a linux server by using curl command?

I am testing the latency between 2 linux servers. A linux server is server and B linux server is client. I can download the file successfully by using curl command. But the time is too quick could be ...
Michael's user avatar
-1 votes
1 answer
347 views

my clock doesnt work

My RTC clock doesn't work, on a particularly old piece of hardware, with equally old software. this messes with various processes like /proc/stat and ps, but it also throws errors ever time I try to ...
j0h's user avatar
  • 3,979
0 votes
1 answer
236 views

Add one second to yyyymmddhhmmss with awk

I have this file where the seventh field is a yyyymmddhhmmss. I need to increase just one second this number. So far, I've come up with: awk 'BEGIN{FS=OFS="|"} $7=$7+1 ' <file> And ...
Alan Mackey's user avatar
0 votes
2 answers
714 views

Last logins during last hour

OK, so basically I'm trying to give a specific date and time and I want to see all the logins that were made during the hour range, e.g. last hour or two last hours from the time and date given. I ...
kuska's user avatar
  • 1
0 votes
2 answers
1k views

missing btime in /proc/stat how do i fix it?

what does misning btime mean? # ps aux | grep ssh missing btime in /proc/stat I'm on an embedded system (ts-7600)running a Debian version via UART. #uname -a Linux ts7600-4aa86d 2.6.35.3-571-gcca29a0+...
j0h's user avatar
  • 3,979
3 votes
2 answers
91 views

On Linux, how to get the elapsed time for any shell command being executed?

I'm compiling a big project where it could take hours to build it. While the project is being compiled, I would like to view the time it has taken so far since the compilation was started. There is a ...
Vicky's user avatar
  • 131
2 votes
1 answer
1k views

How to show seconds in time format of KDE lock screen?

I am using Russian locale and I use KDE. When locking screen with Meta + L, you see the current date and time on it. The time is in format "12:34". I want to change it to "12:34:56"...
Ashark's user avatar
  • 1,209
0 votes
1 answer
590 views

How to save execution time of a script to variable while printing script's stdout to console?

I would like to measure time spent on a script and save it to a variable. This is my current code: time_spent=$(time ./script.sh) ... echo $time_spent Here is how it should work: The script output ...
Qwerty-uiop's user avatar
1 vote
1 answer
56 views

Can `cal` show other Gregorian adoptions?

On my host I can show the adoption of the Gregorian calendar as it occurred for Great Britain and its colonies in 1752: $ cal september 1752 September 1752 Su Mo Tu We Th Fr Sa 1 2 ...
therealneil's user avatar
1 vote
0 answers
1k views

Failed to start Network Time Synchronization

Can anyone let me know why I am facing Failed to start Network Time Synchronization at the kernel logs? When I run timedatectl command I get the message Failed to query server: Connection timed out ...
Sukanya U's user avatar
0 votes
2 answers
1k views

Issue with timedatectl

Hi can any help me how timedatctl works my understanding are if system clock sysnc with NTP serivce through internet system time will be updated to current date and time. If system clock sync with ...
Sukanya U's user avatar
2 votes
1 answer
117 views

How do you make every loop take exactly the same time?

ENV : GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu) (It's old) I want every loop takes equal time. The loop never stops The api_call function normally takes about 1s~5s. The API call ...
Lunartist's user avatar
  • 405
2 votes
2 answers
667 views

How can the time command compute one millisecond from 4 ms timer ticks?

From the bash time command on different stock Ubuntu systems (both real hardware and VMs) all with CONFIG_HZ=250, I'm sometimes getting real 0m0.001s, user 0m0.001s or sys 0m0.001s as well ...
Juergen's user avatar
  • 754
0 votes
2 answers
308 views

Compare Execution Times of Two Functions

I am attempting to write a function which will take two commands as inputs, time the executions of both of them, then output those times to a text file. After reading this post, I got most of the way ...
David Robie's user avatar
5 votes
4 answers
817 views

How can I make time measurement DRY in my bash scripts?

Based on this answer, to measure the time in my bash scripts I can use: start_time="$(date -u +%s.%N)" sleep 5 end_time="$(date -u +%s.%N)" elapsed="$(bc <<<"$...
Saeed Neamati's user avatar

1
2 3 4 5
11