Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [time]

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

2
votes
3answers
55 views

Linux: Set timezone offset that doesn't exist?

Is it possible on any Linux to force a timezone offet that is outside the "valid" range -12 to +14? I'm looking for a way to temporarily simulate a "local time" (for testing purposes) that might be ...
0
votes
1answer
23 views

Offline time sync

Is there a reliable way to sync clock of a totally offline linux server, which is only occasionally connected to a client? I imagine passing a single "millis-since-epoch" number to the server may not ...
3
votes
1answer
41 views

Display “time” of process periodically

A week ago, I launched simulations as follows: make rebuild; time make run Using the command time I recorded the CPU time used in each case. A week later, the simulations finished but, much to my ...
2
votes
1answer
63 views

manually setting date in debian 8

When setting the date in Debian 8 it reverts to the current time after a few seconds. How to actually manually set date and time in Debian 8? NTP is not running. + set -x + sudo timedatectl set-time ...
0
votes
0answers
51 views

Data getting overwritten with same timestamp in InfluxDB

There are some data in a csv file and it is getting overwritten if the timestamp is same, for example: ip,time,name 1.1.1.1,2018-08-31 11:12:32,python 1.2.1.2,2018-08-31 11:05:28,oracle 1.3.1.3,2018-...
0
votes
1answer
41 views

Is there a way to restrict the application access to the system time in linux?

Is there a way to restrict the application access to the system time in linux? I want to make the application launch as much as possible abstracted from the environment. If you can restrict access to ...
-1
votes
1answer
15 views

Is it possible to measure the execution time with temporarily halt of the script with Ctrl + z?

I want to measure the execution time of my script, which I execute in the following way: time python script.py -n 11 However, I also want to stop the execution of the script temporarily, especially ...
0
votes
1answer
25 views

interpreting the overall time in ping results [closed]

I have two different machines I am doing pings on. The hosts setup of the machine (OS, installed software, etc.) are identical. The only difference is they are in two different networks. These ...
1
vote
1answer
55 views

Calculate Difference In Time Over Several Days

I've seen many questions and examples showing how to calculate the difference in two times by converting the times to epoch, and then converting the difference in seconds... However, what is the best ...
2
votes
2answers
56 views

Updating Linux system time programmatically

I have a system of 3 or 4 different Linux Ubuntu machines that I would like to be time synced. My plan is to use one of them (let's call it master) as the NTP server that serves time to the 3 other ...
11
votes
1answer
258 views

Bash has performance trouble using argument lists?

Background For background (and understanding (and trying to avoid the downvotes this question seems to attract)) I'll explain the path which got me to this issue (well, the best I can recall two ...
6
votes
0answers
72 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 ...
11
votes
2answers
2k views

Why is `time` not in the GNU Bash manual?

[fakename]$ help time time: time [-p] pipeline Report time consumed by pipeline's execution... From this, it seems that time is a Bash builtin. However, I cannot find a description of it on this ...
2
votes
0answers
70 views

Time measurment in Linux kernel: how are clock_gettime, gettimeofday and getrusage related?

I am trying to understand how time is measured by the Linux kernel. I tried to go through the kernel code, but I miss the big picture to understand the code that I'm reading, even if this article ...
3
votes
1answer
37 views

Is an optimal user-time to real-time ratio an indicator for efficient parallelization?

In some unix shells there is the time command which prints how much time a given command takes to be executed. The output looks like real  1m0.000s user 10m0.000s sys   0m0....
0
votes
0answers
66 views

system-wide timezone question -red hat enterprise 7

For my user account I explicitly export the TZ variable to be america/chicago in my .bash_profile file, so when I type: date, I get the date in CST. However I have not set the TZ variable for any ...
0
votes
0answers
7 views

sched_deadline behaviour

I've studied the sched_deadline and i have some questions: 1) Is a portion of CPU assigned to sched_deadline algorithm at precise time intervals ? If yes, who decide how much Utilization Factor ...
1
vote
2answers
64 views

How to get execution millisecond time of a command in zsh?

The time only print the the execution second time of a command. If there is a solution like IPython's powerful timeit magic command, great.
0
votes
2answers
41 views

Date changes to 11 Feb 2016 and 1 Jan 2014 when I set the date before it and restart

I want to set the date to "1990-??-??" on my PC, but when I reboot it, I see: On Ubuntu 1604 the system date is "11 Feb 2016" but the RTC is "1990-??-??". On Ubuntu 1404 both of them are "1 ...
0
votes
0answers
13 views

FreeNas share showing wrong modified time on MAC

I have a FreeNas server that we use as a network file share. Nothing fancy. Unfortunately, machines connecting to it report different times for file modification times. SSHing in and running date ...
0
votes
0answers
30 views

users with the most processes within the last x amount of seconds

I am trying to find out how to get the users with the most amount of processes within the last 10 seconds or 20 or whatever. I know I can use something like ps hax -o user | sort | uniq -c | sort -n ...
-2
votes
1answer
80 views

How can we make `time` apply to a pipeline or its component? [duplicate]

time command1 | command2 Does time apply to command1 or command1 | command2? If your answer is one of the two, how would you specify the other? Could you explain your answer based on the grammar ...
0
votes
3answers
86 views

Is each `time` in these examples a keyword or `/usr/bin/time`?

In the following examples, is each time a keyword or /usr/bin/time? Why, or how do you find it out? can a keyword be a command? Or does the keyword time apply to an empty command? (I might have ...
-2
votes
1answer
51 views

How to schedule a C program to execute at a certain time then email output?

How would one go about scheduling a C program to execute at a certain time, then email the output to someone upon completion? I'm personally working in ubuntu, but even a general answer would be great ...
0
votes
3answers
116 views

Using nohup and time with different outputs

I want to run an executable main and redirect all outputs to /dev/null, meanwhile I measure its runtime with time and write the results to runtime.out. Since the task is long I also have to run the ...
0
votes
0answers
35 views

How are the redirections set up in this command?

From https://unix.stackexchange.com/a/126057/674 In ksh, bash and zsh, time is a keyword, not a builtin. Redirections on the same line apply only to the command being timed, not to the output ...
0
votes
2answers
95 views

How to do parsing of Elapsed time in seconds in linux

I want to do parsing of Elapsed time in seconds .Time formats given below: 1) 3 day 18h 2) 3 day 3) 3h 15min 4) 3h 5) 15min 10sec 6) 15min 7) 10sec i'm getting values from systemctl status ...
1
vote
1answer
52 views

how to verify difference time between linux machines not greater than 5 seconds

How may I verify that all machines, appolo01 - mars3, are less than 5 seconds offset from each other? ssh appolo01 date ; ssh appolo02 date ; ssh appolo03 date ; ssh mars1 date ; ssh mars2 date ; ssh ...
0
votes
0answers
47 views

What are the possible cause of “__rtc_set_alarm: err=-22” error message in dmesg?

What are the possible cause of "__rtc_set_alarm: err=-22" error message in dmesg? I am seeing this in my log files but I do not try to set the alarm or schedule it anywhere.
1
vote
0answers
43 views

Statusbar Time Display [closed]

I am using i3 on Arch Linux. My statusbar is i3blocks, which works well, except for one problem. I am using the date command to get the system time. My problem with that is that I use my clock to ...
1
vote
1answer
74 views

How to capture stderr of a bash keyword (e.g. time)?

I want to time reading bash history and put the result into a variable. Unfortunately, time (which is a shell keyword) prints the result to stderr, and apparently redirecting stderr from shell ...
0
votes
0answers
29 views

Laptop clock time advanced when booting to Linux [duplicate]

Everytime I log into Linux mint, the laptop internal clock advances an hour. When i log out and back into Windows the time stays advanced and I have to manually change the time back one hour. Anyone ...
2
votes
2answers
102 views

`time echo` got no output

I'm using Mac, and I'm trying to time the command execution. If I do time echo it doesn't have any output But If I do time ls it does give me the output of time function Any idea why that ...
0
votes
1answer
82 views

Setting time with clock_settime without having root access

I have written a C program that syncs the time with the time from a GPS reciever. The computer is running Ubuntu 16.04 LTS. The program uses clock_settime(CLOCK_REALTIME, &timespec) to set the ...
0
votes
3answers
63 views

Need to get the Timezone details

I was in the process of getting the time zone details from the some of the machine in the infrastructure. And some machines have timedatectl and getting the required details seems to be quite easy ...
3
votes
1answer
27 views

how to time several background processes

I have a script s: echo a & echo b & echo c & Now I want to know how much time it will take for the script to finish. I try time bash s But it gives me an immediate result which is not ...
11
votes
1answer
629 views

Why doesn't `strace` show this process is waiting for something?

The mighty strace has let me down. How is this possible? time foo shows that foo takes several seconds to run ("real"), but uses negligible cpu time, both in userspace ("user") and in the kernel ("...
0
votes
1answer
136 views

Change date on an OpenVZ VPS

I have a cheap OpenVZ VPS, and I noticed the time is a lot wrong. Each time I try: ntpdate -s time.nist.gov it silently returns as if it was successful, but nothing changes. When I do: date -s 11:...
0
votes
0answers
284 views

Which aspect of simple system call (getTimeOfDay) to Linux Kernel is most expensive in terms of required CPU time?

Is it entering and exiting the Kernel? or executing the actual system routine to determine the time, or is it making the function call, or is it storing the system call's returned value?
0
votes
0answers
56 views

How to speed up the machine time?

I am developing a web application (NodeJs and Angular) which depends on the day and weeks. For example, some functionality runs on Saturday which required those particular weeks data. Now I wanna test ...
5
votes
1answer
190 views

Why do `time` and `strace -c` differ?

To my understanding, time would record the total amount of time spend in syscalls. Then I would expect the cumulative totals for sys time as reported by time and strace -fc to be the same. But they ...
1
vote
1answer
756 views

Should ntpd be used on Raspbian Stretch?

It was installed by default on the previous distributions (jessie, wheezy, etc), but it is not so on stretch. Before installing it, I wish to know whether there is some other preferred means to ...
1
vote
1answer
88 views

Why is the number of ticks inaccurate?

I checked the numbers in proc/stat to the the number of clock ticks the CPU has had and I saw that the sum of the numbers in CPU1-4 is not equal to the numbers written in front of CPU as a whole. Why ...
0
votes
1answer
1k views

Linux `time` command in hour format

Linux time command will produce the output in minute and second format. Is it possible to change it to hour format? [user@Linux ~]$ time ./script.sh real 394m30.145s user 388m20.129s sys ...
1
vote
2answers
452 views

Make date change permanent in EC2

How can I manually set date and time to future in EC2 instance and make it permanent, so it won't reset after reboot ? I can change date using this command: $ sudo timedatectl set-time "2017-12-09 ...
3
votes
1answer
85 views

Bash time keyword result only with second piped command, explain why

I have a bash time keyword command which I cannot fully explain, but it works for me. My Goal: to find the execution time of some python script, which takes a variable btw, from within a bash ...
-2
votes
1answer
43 views

On which systems does the time() function act as a system call? [closed]

According to the POSIX.1-2008 standards, time() is implemented as a system call in some systems. In which systems would this be the case? My concern is that, when time() is a system call, all dates ...
0
votes
1answer
49 views

Measuring DNS queries, socket connection, etc

As a clumsy approximation, I can measure the process of resolving a DNS name with: time getent hosts server.com and beautifully see how a uncached query can take about 50ms and cached queries about ...
0
votes
0answers
209 views

How do I keep a log of all commands and how long it took

I know I can currently run time ls and get the time it took to run that command. I can also output that to a file easily. How do I automatically do this for every command?
0
votes
1answer
64 views

What is the package and background process for network time in Fedora 26?

Exactly the same question as this one, but for Fedora 26 in 2017: https://askubuntu.com/questions/217463/what-is-the-package-and-background-process-for-network-time#232486 In Fedora 26 Workstation (...