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

1
vote
0answers
13 views

What do the ntp options “restrict default nopeer” do?

NTP version installed: ntp-4.2.6p5-5 I'm trying to understand the usage and meaning of the ntp restrict along with restrict default nopeer Quoting the NTP documentation: nopeer: Deny packets ...
0
votes
0answers
29 views

What time format to use

I am trying to parse an XML-fromatted file. There is a time item with this example format: 2018-11-04T11:01:04.000 What format is this? I need to use a data structure (in Java) to store this format.
0
votes
2answers
48 views

Get time of the last session in seconds

I'm getting the time of the last session of an specific user using the last command like below: last -aiF -n 1 fakeuser The output of this command is something like: fakeuser pts/0 Tue Nov 27 11:...
2
votes
1answer
32 views

How can I sum the time based on usernames?

Basically, I want to see how much time every user spent logged in. (username) pts/0 (IP adress) Tue Dec 12 17:51 - 18:14 (00:22) - this is how one line looks in the last command. The ...
0
votes
1answer
28 views

Manjaro OS shows wrong time

I am using Manjaro OS (Arch Linux based distro) on my HP Notebook 15 with Pentium IV processor. I have tried changing timezones using "Orange Globaltime" built into the distro but despite being ...
2
votes
1answer
33 views

Uptime command misconception with suspend and resume states

The definition for uptime is "Tell how long the system has been running." but if you change your system power state to suspend or resume: # uptime 09:50:33 up 8 min, 2 users, load average: 0,24, 0,...
2
votes
3answers
80 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
38 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 ...
2
votes
1answer
46 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
102 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
1answer
135 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
42 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
26 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
57 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
76 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 ...
12
votes
1answer
263 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 ...
9
votes
3answers
101 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
107 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
38 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
1answer
107 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
135 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
44 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
14 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 ...
0
votes
1answer
96 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
88 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
174 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
112 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
53 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
56 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
48 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
84 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 ...
3
votes
2answers
157 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
116 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
65 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
657 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
143 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
324 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
225 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
813 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
102 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 ...