`time` is a command line utility for running another program and summarizing resource usage
6
votes
3answers
1k 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
596 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
198 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
178 views
Why doesn't *nix keep track of file creation time?
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 ...
-1
votes
1answer
61 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 ...
14
votes
2answers
2k 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?
3
votes
2answers
1k 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 ...
8
votes
1answer
533 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
171 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
1k 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
133 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 ...
8
votes
1answer
535 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. ...
5
votes
4answers
8k 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
256 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 ...
0
votes
1answer
696 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 ...
6
votes
2answers
373 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 ...
6
votes
1answer
2k 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
4k 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?
1
vote
1answer
150 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, ...
3
votes
4answers
2k 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
1k 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
100 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
137 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 ...
23
votes
1answer
1k 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
110 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 ...
9
votes
3answers
7k 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 ...
4
votes
3answers
254 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
309 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.