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

learn more… | top users | synonyms

1
vote
1answer
33 views

Checking how long a user has been logged in

Is it possible to check for how long a user has been logged in? Or when the user logged in on an Unix/Linux system? I logged in as another user on my system a while ago and I would like to now how ...
2
votes
3answers
33 views

Different 'time's called in similar environments in bash

I was told that people using bash will have to differentiate between the shell-builtin time and /usr/bin/time ( time(1) ). I had to time a program and also had to find ways to automate input, using ...
0
votes
2answers
21 views

Why I can't use the time command in verbose mode without specifying the whole command path?

Given that... ~$ which time time is a shell keyword time is /usr/bin/time Why this works? ~$ /usr/bin/time --verbose ./some_script.sh Command being timed: "./some_script.sh" User time (seconds): ...
0
votes
1answer
41 views

How do I run a batch file at a specific time?

I have tried using the batch and at commands with no luck. I have a batch file in a location, lets say "$DD/batchfile.batch". Here is what I have tried. batch -f $DD/batchfile.batch 10:00 today at -f ...
5
votes
1answer
45 views

Using the built-in “time” command in bash rather than the external command

Working with the time command, I came across a situation where I should use the built-in time rather than the external GNU time command /usr/bin/time. So, how can I do this? I saw somewhere that ...
1
vote
1answer
32 views

/usr/bin/time command -v not working

I know many questions have been asked/answered about the time command, but mine still seems to be not working. I have been doing like everyone suggests, and using /usr/bin/time, which seems to work, ...
2
votes
1answer
69 views

Is it possible to read PVclock from user space?

Is it possible to read clocksource xen or kvmclock using some user space tool? Referring to /sys/devices/system/clocksource/clocksource0/current_clocksource. Reading the actual value of the pvclock. ...
1
vote
0answers
17 views

date/time setting does not work after unplugging power adapter or sudden power cut

For some reason, I want to configure the date/time in my Linux (CentOS 6.5) to be different from the REAL date/time, but the setting won't work if I turn my computer(desktop not laptop if this ...
2
votes
1answer
48 views

Time is not synchronized in Linux VM

I am using one Linux VM through VNC viewer from my Windows machine. What I am seeing is that time between two is not synchronized, it seems that VM is somewhat 5 minutes delayed from Windows(windows ...
0
votes
2answers
33 views

Timing start up time for app launched via terminal command

I'd like to see how long it takes a certain app to fully start. Is there a way to do this launching the app via terminal using some command?
0
votes
2answers
92 views

How to find out last run time of shell script?

I am trying to find out at what time the shell script ran last time within the shell script. I tried: ls -laru ls -lart but all these commands give me the last modified time and last accessed ...
1
vote
1answer
38 views

Why is the localtime reset to the default timezone?

I use the following commands to set the timezone on our Amazon Linux (Centos) server: ls -al /etc/localtime -rw-r--r-- 1 root root 118 25 dec 2012 /etc/localtime sudo mv /etc/localtime ...
2
votes
1answer
49 views

Stable timing for shell scripts?

The run times of scripts vary quite much. I would like to find similar time -function as Matlab's timeit, described here. For instance, I am evaluating these commands here about counting quickly ...
1
vote
1answer
33 views

install date time picker on ubuntu server [closed]

I've recently created a kiosk which uses openbox and xorg in order to be able to show the browser. Is there also a way that I can run some command in the server and it will open a graphical date and ...
0
votes
1answer
24 views

How to redirect the time a task takes to complete into a log file, given that such task is already redirecting?

I have a shell script running a python task, whose stdout is being redirected to a log file: python script.py >> log.txt I wish to also log the time this task takes to complete, into the same ...
0
votes
1answer
64 views

set my system date & time via terminal

I don't why a + sign appears in the my program: <ns1:ST>2015-05-23T18:00:00+04:00</ns1:ST> <ns1:ET>2015-05-23T18:15:00+04:00</ns1:ET> this is when I run the program in my ...
5
votes
5answers
1k views

How to get system time with microsecond Resolution

I want to know current system time with microsecond Resolution. date +%s returns Time in seconds since epoch(1-1-1970). How can I get time in microseconds Resolution. How much delay is in querying ...
0
votes
0answers
34 views

Run Loop between starttime and endtime and get data from url

I want to check two conduction and run a loop for every one minute. There should be three variable start_time, end_time and current_time Conduction's: start_time should be greater than ...
0
votes
0answers
16 views

Where does missing `time` go? [duplicate]

I ran the time command on one of my scripts, and this was the result: real 0m2.736s user 0m2.014s sys 0m0.228s If I add up user and sys, it's 2.242, which is 0.494 different from the real ...
3
votes
1answer
472 views

bash time with nohup

I want to know how much time it takes to run something in nohup. I know this works: $ time sleep 2 real 0m2.001s user 0m0.000s sys 0m0.001s But why it doesn't work with nohup? $ nohup ...
4
votes
2answers
71 views

Force time to stay put

The time on my Linux machine will not stay put. I need to test an issue with our server that only occurs on Saturdays. CentOS 6.5 64-bit I have NTPD off. (service ntpd stop and chkconfig ntpd off) ...
3
votes
0answers
46 views

Linux Mint system clock is days ahead after an overnight laptop suspend

I'm a long-time Ubuntu user, who recently started trying out Linux Mint on a laptop. This is not a dual-boot setup, Mint is the only OS on the machine. When I suspend the laptop (i.e. close the ...
1
vote
1answer
125 views

Unpacking of initramfs is very slow

I am trying to improve the kernel boot time of my device and I would like some help. I am using OMAPL138 with kernel version 2.6.37 and it takes about 50 seconds until the boot process is finished, ...
2
votes
3answers
63 views

Can system time be paused?

This may or may not be the right approach, but it's feasibility was requested of me: We have a demo server that we update from time to time in order to keep the statistical calculations up-to-date. ...
3
votes
5answers
142 views

Get PID of process started by time

Say I run time ./a.out, then I can get the PID of time by the variable $!. But how do I get the PID of a.out? Of course, I could parse the output of ps, but I want a more elegant solution. I've ...
2
votes
2answers
81 views

Best way of keeping clock accurate in LInux

I have researched many different of ways to accurately keep time in Linux, but there are so many programs and ways of doing it. I would like to know what you guys think is the best way to keep the ...
1
vote
1answer
16 views

Both time `rsync` and get its exit value?

If I want to time the running of rsync by time rsync -a /media/t/1/ ./, after it finishes, does $? report the exit value for time not for rsync? How can I both time rsync and get its exit value?
0
votes
1answer
65 views

Understand the big difference between real and usr+sys time used by rsync?

I started running rsync in three programs at the same time to transfer data between my external hard drive and my internal one. When they finished, I have their timing results: $ time rsync -a ...
6
votes
1answer
249 views

stat: print time in “long-iso” format

For my script, I would like to have stat command to print time in a nice, human friendly, way: 2015-02-04 00:48:31. ls calls this format long-iso and it can be used like this: $ ls -lA ...
9
votes
4answers
843 views

How can measure how long it takes my script to run AND include that in an email it generates?

I have a simple bash script that runs a series of checks (ping, nslookup, etc) and then sends an email report with the output of that data. I'd like the email to include information on how long it ...
4
votes
4answers
365 views

How to sum time using bash?

I want to know the total amount of time that a series of processes would take in my computer to decide if I should running there or in a stronger computer. So, i am forecasting the running time of ...
5
votes
3answers
276 views

How to measure Firefox's startup time?

I would like to measure how much time it takes for some softwares to start. I know the command time but in the case of firefox (iceweasel for me on Debian), this command prints only the time I let ...
0
votes
0answers
76 views

timedatectl not persisting time when set manually

Configuration before any attempts to modify it as per timedatectl: Then, I set the time manually timedatectl --adjust-system-clock set-time "2010-04-20 04:30:50": Nice, works! Now, I rerun ...
2
votes
0answers
41 views

Improve kernel boot time

I am using OMAPL138 and kernel version 2.6.37 and I would like to improve the boot time. By analyzing the kernel boot process I think it is taking a long time at MII PHY CONFIGURATION. The printscreen ...
0
votes
1answer
29 views

Many files in folder - time difference while accessing file with fullpath

Folder /var/log/something may have 1 file (test.log) in it or 1000000 different files (and test.log of course). Is there a time difference while accessing file test.log with realpath between those ...
4
votes
2answers
286 views

How long will NTP take to adjust the clock if it doesn't immediately set it?

I'm using SNTP to sync my Debian based system. SNTP has two ways to set the clock: -s, --settod Set (step) the time with settimeofday(). -j, --adjtime Set (slew) the time with adjtime(). The ...
1
vote
0answers
97 views

Variations in Ubuntu 12.04 /usr/bin/time statistics

I have a command line tool which I run on Ubuntu 12.04.5 LTS. I need to calculate the cpu time for this program. I have been checking /usr/bin/time function. command: /usr/bin/time -v -a -o ...
9
votes
2answers
200 views

How can I conditionally pass a subshell through 'time'?

I have a setup script for a Vagrant box where I used to measure single steps with time. Now I would like to conditionally enable or disable the time measurements. For example, previously a line would ...
0
votes
0answers
224 views

Get CPU time for Benchmark in Bash Script

I'm using this Method here: http://giantdorks.org/alain/how-to-benchmark-individual-shell-script-sections-to-identify-slow-parts/ to Benchmark my Bashscript: RuntimePrint() { duration=$(echo ...
0
votes
0answers
368 views

System CPU Time and User CPU Time Calculation for a Process in Linux

I want to calculate CPU time consumption of a particular process in system mode and user mode using statistics present in /proc/<PID>. There are two fields utime and stime in ...
7
votes
1answer
124 views

NTP and NTPD Nanokernel

I had a couple of questions about the NTP Nanokernel as explained here: http://www.eecis.udel.edu/~mills/database/brief/nano/nano.pdf The big question is how does this Nanokernel manage to deliver an ...
3
votes
1answer
70 views

Get the output of the time command

I have the following command time compare -metric rmse -subimage-search -dissimilarity-threshold 1 -similarity-threshold 0.99 $page \( -size 1x1 xc:black \) null: which produces the following ...
1
vote
1answer
62 views

To print execution time of Script from Script?

I'm searching PDF files in all directories except those in .texpadtmp by code originally based on this discussion. function findpdfs() { find . -iname '*.pdf' -not -path "*.texpadtmp*" | while read ...
1
vote
1answer
127 views

How can I use '-v' option in time command?

I read the man pages and the '-v' option(short for --verbose) is there and I'm sure this should work: time -v ls However, the output is: -v: Command not found. 0.000u 0.000s 0:00.00 0.0% ...
3
votes
1answer
61 views

Why does unbuffer command affect time command?

I noticed something odd when using the unbuffer command with time command. Here I just want to see how long takes to find a certain file in my system: time find . -name unixstuff output is : ...
4
votes
1answer
81 views

bash's builtin time accepts %E - what's going on?

The bash man page lists three and only three format codes recognized by the shell's builtin version of time: %R for the real time, %U for the time spent in userspace, and %S for time spent in system ...
3
votes
1answer
170 views

Why does the 'user' and 'sys' time vary on multiple executions?

There is a nice question and answer explaining the relationships between 'real', 'user' and 'sys'. It explains the reasons why 'real' can vary, and defines the 'user' and 'sys' as times the process ...
0
votes
1answer
622 views

How to move system clock time forward/backward?

I know commands for setting specific time and/or date, but can't find ones which move the time relative to the current time. What are the commands to move the time forward/backward x ...
1
vote
2answers
81 views

How can I count the time that needs systemd to boot a default target and then graph it?

When I wanted to know how long systemd actually needed to boot the default target, how would I do that ? An then, is it possible to create a graph to show which unit takes how much time to initialize ...
2
votes
1answer
257 views

system clock is off by one hour after every reboot

Every time I start my laptop, the clock is off by exactly one hour. I have to run ntpdate to fix it. Next time I restart the laptop, it will be off again. I have timezone set up correctly. I am ...