[ale] gnu time

Lightner, Jeff jlightner at water.com
Wed Feb 17 13:57:22 EST 2010


I think its using a shell built in.  Try doing "which time" (should be
in /usr/bin/time) and using full path name for time so it doesn't use
the shell built in.

 

________________________________

From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Jim
Kinney
Sent: Wednesday, February 17, 2010 1:21 PM
To: Atlanta Linux Enthusiasts - Yes! We run Linux!
Subject: [ale] gnu time

 

The "time" command is a useful tool to keep track of health issues for
long processes. By tracking how long a process takes to complete (such
as a large database query that outputs to a file on a cron job), stats
can be churned that give good insite into overall performance, health,
yada yada...

EXCEPT that the gnu time in RHEL 5.3 (and also in Fedora 11 and12) seems
to not accept the -f format flag!

I would like to have time -f "%E %M %F %W %I %O"
big_honkin_sql_query_script be used to track runtime stats on the
process.

But the -f seems to be not understood by time. This is, of course,
opposite the man pages and the info pages.

So I go and blather around and am getting a bit cross(er than usual) and
start looking at my test system for major screwups.

I verify that time is /usr/bin/time and look at the command using
strings /usr/bin/time. How strange! It claims to also provide a bit of
help data on usage if one enters time --help.

But my system does do that. So to make sure I don't have a spurious path
issue, I enter /usr/bin/time --help 

Imagine my surprise when I get back what I saw in strings! So I do it
again but drop the full path. No joy. I run 'which time' and get back
/usr/bin/time. 
?????????????????????????????????WTF?????????????????????????????????

man time also refers to man (2) times. There is also a bash built-in
called times. But so far I have found no bash built-in for time.

So here's some puzzling info:
$ rpm -q --whatprovides $(which time)
time-1.7-35.fc11.i586
$ which time
/usr/bin/time
$ rpm -ql time-1.7-35.fc11.i586
/usr/bin/time
/usr/share/doc/time-1.7
/usr/share/doc/time-1.7/COPYING
/usr/share/doc/time-1.7/NEWS
/usr/share/doc/time-1.7/README
/usr/share/info/time.info.gz

There is no man page loaded from the time package. It loaded from the
man pages package. The info page is far more informative than the man
page (sometimes gnu is irritating - man vs info is worse than vi vs
emacs since vi and emacs can both get you to the same end result. man
and info now provide different results).

What is being called when I exclude the full path? A locate produced
lots of stuff with "time" in the name but only the /usr/bin/time was an
executable.

-- 
-- 
James P. Kinney III
Actively in pursuit of Life, Liberty and Happiness
 
Proud partner. Susan G. Komen for the Cure.
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.ale.org/pipermail/ale/attachments/20100217/5bd98d21/attachment.html 


More information about the Ale mailing list