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

learn more… | top users | synonyms

3
votes
2answers
349 views

linux disk caching affects access times reported by stat?

On Ubuntu 12.04 I did the following stat a file cat the same file stat the file again cat the file again after 5 min stat the file The access time reported at 3. reflects the point at which 2. was ...
4
votes
1answer
807 views

Countdown timer in panel

Is there some widget that I can put in the panel of my Xubuntu system that will show me a countdown of time? I've tried pystopwatch, but although it minimizes, it doesn't show me how long I have left. ...
2
votes
1answer
172 views

Will select() return before next jiffy if waiting on a high resolution timerfd?

If I have A kernel with CONFIG_HIGH_RES_TIMERS=y, A coarse CONFIG_HZ (say, 100) and a file descriptor from timerfd_create with a sub-jiffy expiration Should a call to select() on this timer ...
0
votes
2answers
273 views

Fluxbox time is wrong?

I'm using fluxbox on Arch, and the time is displayed incorrectly in the panel. The time works in XFCE, so I'm not sure why it isn't working in fluxbox. Is there a way to set the time in fluxbox from ...
12
votes
2answers
7k views

How to run time on multiple commands AND write the time output to file?

I want to run time command to measure time of several commands. What I want to do is: Measure the time of running of all of them added together Write the time output to a file Write the STDERR from ...
1
vote
2answers
16k views

How can I set the time in Centos so that resetting the OS doesn't revert to its default value?

I have a VPS running on Cent Os 5.8 (x86). There are situations in which we are forced to reset the entire VPS (it hangs and the only way to get it back on is to reset it). When we do so, the time is ...
24
votes
1answer
1k views

Why does echo >file use more real time than echo | sed >file?

The example, below, surprised me. It seems to be counter intuitive... aside from the fact that there is a whisker more user time for the echo | sed combo. Why is echo using so much sys time when it ...
4
votes
4answers
775 views

How to prevent atd from running past jobs?

The at daemon is a great tool! However, if a job is scheduled for 8:00 am and the machine is off at that time, at will run the job whenever the machine is booted. What I would like to do is stop it ...
4
votes
2answers
512 views

FreeBSD and Windows show different times

In a dual-boot system, I usually use FreeBSD 9 but when I boot to Windows 7 my system time in both OS automatically change and show incorrect time. What's the problem and How can I solve it?
9
votes
2answers
3k views

Why real time can be lower than user time

I have a script converting video files and I run it at server on test data and measure its time by time. In result I saw: real 2m48.326s user 6m57.498s sys 0m3.120s Why real time is that ...
2
votes
1answer
477 views

How to get the maximum virtual set size of a unix process during its lifetime?

The time command includes a format parameter "M", which according to the time man page on Linux is used for the following: Maximum resident set size of the process during its lifetime, in Kilobytes. ...
4
votes
1answer
983 views

bash terminal [\t] (time) is not same timezone as 'date'

In my .bashrc file I configured how I would like my prompt to be displayed. My .bashrc is sourced in .bash_profile. The command in the .bashrc file is: PS1='[\t] \u@\h is $PWD :: ' I switched the ...
5
votes
3answers
1k views

How can I profile a shell script?

I have several programs that i'm executing in a shell script: ./myprogram1 ./myprogram2 ... I know that I can profile each individual program by editing the sourcecode, but I wanted to know if ...
3
votes
1answer
2k views

Debian and system clock change?

If I change my system time on Debian which files would be modified? Would it be /etc/default/rcS? Also, is default time on Debian Dec 31 1969?
3
votes
2answers
2k views

How can I force a bash loop to end if it runs x times in x seconds?

I'm trying to grab batches of input from a remote pipe via ssh. My script below works ok, but I would like to add some sort of check into it so that if something were to go wrong or break the loop ...
6
votes
4answers
3k views

Convert linux sysuptime to well format date

I want to display /proc/uptime in well format as: DD:HH:MM:SS /proc/uptime give me up time of system in seconds, is there a standard solution that convert seconds to this format?
4
votes
1answer
419 views

Querying the current time of a city from terminal

I have friends all over the globe and before calling them I need to know their current time. Is there an application in Linux where one can query a city (if exists) in terminal (something like this): ...
2
votes
1answer
1k views

How to measure an operation's duration in terminal, not in code

For example, I need to do "make " for some software. I want to measurement how long this is going take. Is there easy and accurate way to do so?
-3
votes
1answer
1k views

How to show the percentage progress of script execution in Unix?

Suppose you run some script such as a perl or tcl. For example, $ ./script.sh; ./script.pl; source script.tcl. It takes some time to get executed and return to prompt. How to display the percentage ...
1
vote
1answer
256 views

Tools to dump entries from arbitrary sets of log files between 2 dates

I had a outage incident a few days ago and the support team has asked for any available logs for the period, while thinking about how to do this, it occurred to me that it would be generally handy to ...
4
votes
1answer
395 views

Renaming files from bash in linux

There is a bunch of files of the following format hh-mm-ss.png where hh, mm, ss are hour, minute and second. How can I rename all these files in the directory in a sequential way from 1.png til n.png ...
4
votes
3answers
3k views

Time synchronization in XFCE 4.8

Apparently there is no gui in XFCE (as there was in gnome) to synchronize time with NTP (if there is one, please let me know the name of the application). So, how can I synch with the time servers? ...
2
votes
1answer
251 views

How to cat a file for a certain number of seconds? [duplicate]

Possible Duplicate: Run a command for a specified time and then abort if time exceeds Looked all over and I can't find the answer... Simple question: How can I cat a large file for, lets ...
4
votes
2answers
612 views

how does time command work

So when I type time <some_program> I have nice CPU time measurement. But exactly how is this achieved? Also does this have any performance impact on the some_program?
7
votes
3answers
750 views

How to average time commands?

I am timeing some of my commands. Now to average the measures, I'd like to run and time my commands a specified number of times, and get the results with a calculated mean and standard deviation. The ...
7
votes
3answers
4k views

Why is my EC2 server's time off by ~10 seconds every day?

I have what I believe is a system file, /etc/cron.daily/ntpupdate which runs ntpdate ntp.ubuntu.com daily to sync with the network time. Every day it generates output very similar to this: ...
6
votes
1answer
951 views

Why bash time is more precise then GNU time?

The buitin bash command time gives milisecond precision of execution and GNU time (usually /usr/bin/time) gives centisecond precision. The times(2) syscall gives times in clocks, and 100 clocks = 1 ...
0
votes
1answer
251 views

Setting system/hardware clock under Debian

I have installed a system with a London timezone, instead of using Central European Time. The problem is, that hwclock says the time is 11:00, date says the time is 11:00. I have changed the timezone ...
3
votes
1answer
243 views

Why doesn't *nix keep track of file creation time? [closed]

I know about ctime and mtime and that their behavior is platform dependent. As I understand it, *nix does not have any way of keeping track of file creation time. Is this a historical accident? If ...
0
votes
1answer
77 views

Some really insane values in sys part of process' timing

real 108m1.284s user 108m51.617s sys 307445734m57.875s — 307445734 min 57.875s is something really went crazy. Linux kernel 3.1.5 x86_64. A pitty thing regarding this issue is it's hard to ...
20
votes
3answers
8k views

Why does Unix time start at 1970-01-01

Why does Unix time start at 1970-01-01? Why not 1971-01-01 or any other date?
4
votes
2answers
2k views

/etc/shadow date of last password change—UTC or local time?

man 5 shadow gives the following description of the third field in each line: The date of the last password change, expressed as the number of days since Jan 1, 1970. The value 0 has a ...
18
votes
1answer
2k views

Run a command for a specified time and then abort if time exceeds

I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.
2
votes
2answers
313 views

Padding day / time values to ensure 3 digit length

I have a script which renders timestamps in the format YYYY'DDD'TTT where Y = year, D = day out of 365 and T = time in 1000th's of the day: #!/bin/bash clear s=$(($(date +"%H*3600+%M*60+%S"))) ...
1
vote
1answer
2k views

Timezone, Time setting in Linux using shellscript

I really need your help on a job of setting timezone and time on a router using Linux OS remotely from Web ( Linux OS based on Linux Kernel 2.6.30). For fulfilling this job, I use CGI and ...
4
votes
1answer
171 views

linux patches related to time measurement accuracy?

Is there a set of patches around for linux kernel that address accuracy of (system, rather than user) process time? i've heard about RTLinux, but i don't really need the actual real-time scheduling ...
9
votes
1answer
1k views

Measuring disk I/O usage of a program

time is a brilliant command if you want to figure out how much CPU time a given command takes. I am looking for something similar that can measure the disk I/O of the program and any children. ...
9
votes
8answers
22k views

How to check if NTPD updates machine's time successfully using shell?

I'm trying to use NTPD to update my Linux machine's time to a specified NTP server. Here is the scenario: Each time the Linux machine starts up, I want to update the time from NTP server and if ...
0
votes
1answer
450 views

Syncing time with Windows Server Dual Booting systems

I am about to work on getting the workstations on my network here to be connected to the Active Directory on my Windows 2003 server using Likewise Identity Service. One of the security requirements is ...
1
vote
1answer
2k views

RHEL Time Changes Automatically

I Have a RHEL 6.1 server and it's date/time changes automatically even after I change the time settings. Could someone point out how to fix this issue? Note** I suspect this happens when rhn ...
8
votes
2answers
726 views

Measuring time within a script

This thread shows how to measure the time it takes to run a script. In my case, I am interested in measuring time between two points within a script. Here is an example of how I would like to use ...
8
votes
1answer
3k views

Is there a way to adjust the formatting of the date/time in the GNOME 3 login screen and desktop?

I'm specifically looking to change the formatting in two places: On the desktop, the date/time reads "Sat 21:05". I would like it to read "23-Jul-11 21:05" or "23 Jul 11 21:05". In other words, I ...
2
votes
2answers
9k views

How to change timezone to UTC without rebooting AIX

# oslevel 6.1.0.0 From smitty it say's it needs a reboot, but I don't want to reboot. How can I change the TimeZone to UTC without rebooting?
2
votes
1answer
251 views

Command to monitor elapsed time in background?

I've been trying to find a decent way to monitor elapsed time in the shell. Basically, I'm asking for a stopwatch. The end result is easy enough to accomplish; I've seen examples of using time read, ...
4
votes
4answers
4k views

How to make an Ubuntu time zone change stick?

I'd like to reset the timezone through editing /etc/timezone. However, after I am done editing and save the file, the system time would not change accordingly. On the other hand, when I take ...
-1
votes
1answer
2k views

Sum of grep results

I need to output the sum of a grep results for a certain time, for now i hard coded the time grep but any help will be very much appreciated, my problem is i cant output the results on the script. If ...
2
votes
2answers
173 views

Retrieve countries timezones

What is the best way to retrieve the current time zones of a number of countries, on a daily basis? (that would take into account DST changes, of course) Reliably If possible the Linux way (i.e. ...
5
votes
2answers
173 views

NTP tool for showing deviance to a certain server

I am searching for a command-line that allows me to check the system time deviance to a NTP server specified on the command-line. I don't want to change/adapt the system time - only displays the ...
25
votes
1answer
2k views

Why does “ls *” take so much longer than “ls”?

I have a couple of files in a directory: $ ls | wc -l 9376 Can anybody explain why there is such a huge time difference in using ls * and ls? $ time ls > /dev/null real 0m0.118s user ...
1
vote
2answers
210 views

Program to track and analyze usage

I would like to get my computer usage statistics (what programs I ran, for how long and etc. More is better). I used to use wakoopa but I'm not willing to throw statistics out to the web. I've tried ...