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

learn more… | top users | synonyms

2
votes
1answer
430 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
941 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
1k 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
1k 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 ...
5
votes
4answers
3k views

Convert seconds 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
394 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
788 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
250 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
371 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
224 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
549 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
658 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
3k 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
906 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
241 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
225 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
74 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
6k 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 ...
17
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
293 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
166 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
7answers
18k views

How to check if NTPD updates Linux 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
411 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
1k 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
672 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
8k 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
241 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
3k 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
151 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
168 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 ...
24
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
191 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 ...
11
votes
3answers
24k views

How to measure time of program execution and store that inside a variable

In order to find out how long certain operations within a Bash (v4+) script take, I would like to parse the output from the time command "separately" and (ultimately) capture it within a Bash variable ...
7
votes
3answers
521 views

Forcing an 'added' alias to every command

Is it possible to forcibly add a timing alias (for lack of a better way to phrase it) to every command in bash? For example, I would like to have a specific user who whenever a command is run, it is ...
3
votes
2answers
1k views

How do I time a specific command?

(The linux equivalent of TimeThis.exe) Something like: timethis wget foo.com Receiving foo.com ... wget foo.com took 3 seconds.