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

learn more… | top users | synonyms

3
votes
1answer
58 views

Find last shutdown time

This is the command I am using: last -x|grep shutdown | head -1 but it's giving me the duration with +2 hours: shutdown system down 3.14-1-amd64 Mon Jul 21 08:43 - 22:19 (13:36) the last ...
2
votes
1answer
49 views

How can I tell when a file was compressed?

I want to find out when my log files were compressed by logrotate because when I received them from cron in my email, the logs came in as text in the main body of the email instead. I did: ls -1la ...
3
votes
1answer
48 views

redirect output for a command that takes in multiple arguments

this command is to redirect output of time to with multiple args: $ time wc test >wc.out 2>time.out unix programming environment book shows that the error output of time redirects to ...
1
vote
0answers
38 views

How does an X86 Linux system maintain the system time, when no NTP etc. is in play?

When an x86 Linux system is powered up and running, how does it keep track of software time? E.g. is it incrementing a software counter based on hardware interrupts from the RTC, or is there some ...
1
vote
1answer
65 views

define own time in linux

how to set time in linux in that way: 1 second define as 10 seconds (10 second = 1 secods of own time) I want fool all processes runned there to use 10x faster time. so sleep(1) will last 0.1 real ...
0
votes
1answer
44 views

What's the difference between modification date and inode's modification date?

I've just found some interesting information for me in man stat: a, m, c, B The time file was last accessed or modified, of when the inode was last changed, or the birth time of the inode. But ...
2
votes
5answers
213 views

Listing files greater than particular timestamp in file name?

I have a directory in linux which has a list of log files where log files get auto generated if some job runs. Each log file gets appended with the timestamp like "JobName_TimeStamp" UPDATED: ...
2
votes
1answer
124 views

Obtain user and kernel time of a running process?

Is there way to determine using standard Linux/Unix tools how much a process has spent in User mode and how much waiting for kernel? In other words, exactly the "user" and "sys" values that you get ...
2
votes
2answers
100 views

Will I be prompted for the sudo password a second time?

This is what I plan to do: #!/bin/bash sudo -i <<'EOF' iptables-save | awk '/^[*]/ { print $1 } /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } /COMMIT/ { print $0; ...
0
votes
1answer
49 views

What is “system time” when using “time” in command line

Im using time to time a Perl script on standard terminal in Ubuntu 14.04. I have read that real time is stopwatch time; the time I, as a user, is spending looking at the program running from I start ...
3
votes
1answer
71 views

How can I get the wall clock time of a running process?

I started a hash check of a large file and don't want to restart it using time. How can I get the wall clock time without using time at the beginning or using date right before I invoke a command?
1
vote
1answer
43 views

How to know my server's time offset? [duplicate]

I have a few guest machines on VMware. Up until now I was keeping my time sync with ntpd inside guests. Now our VMware admins decided to setup VM hosts to keep time, so VMs don't have to. I disabled ...
1
vote
2answers
59 views

Redirect the output of a command in `time command`

I am trying to time something using: /usr/bin/time myCommand However, since /usr/bin/time writes to stderr, if myCommand also writes to stderr, I will get more than just time's output on the ...
2
votes
1answer
36 views

convert to epoch and back

I've used the following two perl command lines successfully: perl -e 'use Time::Local; print timelocal(7,51,10,22,3,2014), "\n";' which returns 1398163867, and perl -e 'print ...
3
votes
2answers
153 views

How to record the actual running time of a program with other programs running? [duplicate]

When timing the wall time performance of an OpenMP program on Linux while other programs are running, how can I get the actual running time?
4
votes
3answers
552 views

Disable daylight saving time in Debian Linux

I do not want my system to use daylight saving time. root@ali-debserver:~# cat /etc/timezone Asia/Tehran root@ali-debserver:~# cat /etc/default/rcS # # /etc/default/rcS # # Default settings for the ...
1
vote
2answers
43 views

Why my tabs are not expanding in TIMEFORMAT?

I need to measure the running time of an application, so I'm messing with TIMEFORMAT in order to print short format with the maximum precision available. From the Bash Refence Manual: TIMEFORMAT ...
15
votes
2answers
494 views

Is there something like `time` that also records I/O and CPU?

I can pretty quickly monitor the running time of a process with time: x@y ~ $ time foo real 0m14.299s user 0m4.770s sys 0m0.440s Is there a way I can get the same data for ...
4
votes
1answer
135 views

When was file created [duplicate]

How can i see when a file was created. I have looked at man page ls -lc is for last modification of file status ls -lu for access time ls -l not exactly indicated which time, last changed? I ...
2
votes
1answer
110 views

How to do an automated measurement for the boot time for freshly build images?

I want to generate images for an embedded system and automatically measure the time they took for booting (especially for different systems). I'm using Buildroot to generate my Linux Images. I ...
1
vote
0answers
57 views

Changing file time using touch

Im trying to change the file time of a m#merge the files to a temporary file. mergecap -w "${dir_dcn}"/merge_dcn.pcap "${FILES_dcn[@]}" touch -r "${FILES_dcn[14]}" dcn_file ls -l dcn_file ...
0
votes
0answers
23 views

Boot Halts if Time if Reset

I have an old powerbook g4 with a dead battery & I am trying to run ubuntu 10.04 on it. Whenever the power cord gets unplugged the date gets set back to Dec. 31st 1969. Apparently when you ...
3
votes
2answers
152 views

Time running a Ruby script is different locally than over SSH

Has anyone else seen this behavior? I created a simple Ruby script for giggles to see how fast it would count up on a couple machines I have. Here's the source: for n in 1...1000000 do ...
1
vote
1answer
40 views

Is it possible to use the at command to schedule a job to run at a given timestamp?

I want to schedule a file to run using the at command, as described in this tutorial. I see that the at command supports the posix format -- but I don't see any mention of timestamps. Surely it is ...
9
votes
2answers
268 views

How can I redirect `time` output and command output to the same pipe?

Suppose I have a binary called foo. If I want to redirect the output of foo to some other process bar, I could write ./foo | bar. On the other hand, if I wanted to time foo, and redirect the output ...
1
vote
2answers
63 views

Is there a way to add some info about time/date to TTY prompt?

If you have a graphical display manager, you can notice date and time there, but I haven't seen such a thing when it comes to TTY. If I want to check the current time (or date) I have to log in. It's ...
0
votes
1answer
90 views

LXPanel time is wrong?

I just upgraded from Lubuntu 12.10 to 13.10, and it was a nightmare. When I logged in I had nothing but a background, no tray or anything. I finally just got the tray back, but it displays the wrong ...
1
vote
2answers
122 views

comparing user given time for log file time

Apologies straight away for bad-styled-question-and-heading.....learning unix and its command these days, m trying to figure out a solution for below scenario : Lets say i have a log file which ...
1
vote
3answers
266 views

Korn Shell: Show elapsed time in a specific format

In a log file, I need to print the Elapsed time, in the following format: "Process completed %s - Elapsed %s", <time now in HH:MM:SS format>, <difference from start date to end date in ...
1
vote
1answer
120 views

RTC clock time sync with the Linux time on Startup

The RTC remembers its time set, and how does the linux kernel gets this time from dev/rtc and set it as the linux time. In other words on boot up - when does kernel reads the rtc and updates its linux ...
0
votes
1answer
43 views

How to measure rlogin time?

I need to monitor the time it takes to rlogin from one HP-UX machine to another. So I wrote this: #!/bin/sh result=`rlogin 10.10.10.1 << EOF exit EOF` result2=`{ time $result >/dev/null; } ...
2
votes
3answers
196 views

Timezone setting in Linux [closed]

I'm setting the timezone to GMT+6 on my Linux machine by copying the zoneinfo file to /etc/localtime, but the date command is still showing the time as UTCtime-6. Can any one explain to me this ...
3
votes
2answers
183 views

How to control the time that users spend on

I need a solution that allows me to control the time that each user spend on the computer, excluding idle time (some kind of parental control). I've tried timekpr, but it doesn't work on Ubuntu 13.10. ...
2
votes
1answer
151 views

How long system has been awake / running / since restart

First and foremost I want to know how long my laptop (unix, apple, OSX 10.9 mavericks) has been 'awake' (i.e. how long its been open, or since it last 'slept'). I' also be interested in how long ...
3
votes
1answer
138 views

CPU is free, yet bash script not utilizing all CPU resources

I ran a simple script to generate a large (10000000 lines) csv file with 6 fields in which some fields changed in each line/row, using a while loop. The machine had all (32) CPUs free, lot of RAM (~31 ...
7
votes
2answers
58 views

How can other processes affect measurements made with `time`?

If I time a process using the time command, I get output for 'real', 'user', and 'sys'. My understanding from this discussion is that 'real' is wall time, whereas 'user' and 'sys' are process time. ...
0
votes
2answers
148 views

Calculating CPU time of process in RHEL 5.3

For a process management,I would need to remove a process that exceeds a certain amount of CPU time, for example 1 hour.In PS command ,it has TIME parameter shows the total CPU time of a process .So ...
5
votes
2answers
99 views

How to report time and other information on all bash commands? [duplicate]

Most of the things I run in the terminal take a long time to compute and I would like to have bash output a time report at the end of every command entered into the terminal. Is there something I can ...
3
votes
1answer
159 views

Why a sleep 300 (5 minutes) can last several hours some time? [closed]

I have a MiniMac with the OSX system. My script is: while true do echo "Sleep 300 seconds = 5 minutes" date sleep 300 echo "end of sleep" date done I want it to repeat every 5 minutes; ...
2
votes
2answers
101 views

How come Debian has no time(1) manpage?

Searching for manpage for time command does not yield any result (search form). As a sidenote, it appears to be a BASH built-in command since dpkg --search bin/time cannot find it. Perhaps such ...
3
votes
2answers
403 views

Setting time through GPS dongle

There is this code that claims to set the time of your linux environment, http://blog.petrilopia.net/linux/raspberry-pi-set-time-gps-dongle/ date -s '01/01/2014 00:01' sleep 1 pkill ntpd pkill gpsd ...
4
votes
1answer
160 views

Execution time and resources after processes that has been running for so long

This might be a basic question, but I am getting hard time finding an answer to it. I am using RHEL6. After running any process that takes significant cpu time, I get a line that tells (I guess) the ...
0
votes
2answers
792 views

Sleep until next occurrence of specific time

I need a series of commands or a single command that sleeps until the next occurrence of a specific time like "4:00" occurs. How would I do that? The at command or a cronjob is not a option because ...
2
votes
4answers
579 views

how to convert number to time format in shell script?

I want to cut a video into about 10 minute parts like this. ffmpeg -i video.mp4 -ss 00:00:00 -t 00:10:00 -c copy 01.mp4 ffmpeg -i video.mp4 -ss 00:10:00 -t 00:10:00 -c copy 02.mp4 ffmpeg -i video.mp4 ...
1
vote
1answer
254 views

NTP is synced properly but still doesn't update the time?

I wanted to test if ntp was working on my machine, so I set the time back 5 minutes and restarted ntp $ sudo service ntp stop $ sudo date -s "9:40 AM" # This time was 5 minutes ago $ sudo service ntp ...
7
votes
1answer
73 views

Time all executions in bash [duplicate]

Is there a way to run all commands in bash as if they were invoked with time in front? I want that I could type $ some_command and this will actually invoke $ time some_command.
10
votes
3answers
789 views

What is the recommended way to synchronize time using NTP?

This question has come up a number of times in a localized way, this question is meant to provide the preferred/best method for synchronizing a system's clock using NTP. The solution should handle ...
-1
votes
3answers
112 views

I need to learn how to convert regular time and date format into unix time format

I am trying to edit a URL on google locatiion history. I need to know how to enter february 15 2013 in unix time format (the 10 digit format) I'm not a computer whiz so if anyone can just give me the ...
3
votes
2answers
271 views

Memory usage command with syntax similar to the time command

What command shows the memory usage of a program, i am looking for a command that is simple to use and has similar syntax to the time command. I am trying to find the memory usage of a md5 hashing ...
1
vote
1answer
133 views

How do I time how long my pg_restore takes in the command line?

I'm trying to track the amount of time the process takes for when I move around my data and upgrade my web app. From the command line, how would I track the amount of time elapsed from when the ...