The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find command takes a lot of time ( can I skip directories) knijjar Shell Programming and Scripting 3 08-12-2008 08:08 PM
shell script takes long time to complete ozzman Shell Programming and Scripting 12 02-05-2007 11:25 PM
Killing a process that takes too long WeezelDs Shell Programming and Scripting 3 04-10-2006 03:33 PM
Interrupt signal Control C takes too long to terminate a process paqui UNIX for Advanced & Expert Users 8 10-17-2005 10:30 AM
fwrite takes extremely long time inna High Level Programming 5 07-06-2005 06:19 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-05-2001
cfoxwell cfoxwell is offline
Registered User
  
 

Join Date: Mar 2001
Location: UK
Posts: 20
Question Finding out how long a command takes to run

Hi I am trying to find out the best way to find out how long a command takes to run in miliseconds ..

Is there such a way of doing this in Unix ?

Thanks
  #2 (permalink)  
Old 11-05-2001
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
There is a time command and a times sytem call that can be used to time a process. But the resolution is usually 1/100 second.
  #3 (permalink)  
Old 11-21-2001
ystee ystee is offline
Registered User
  
 

Join Date: Nov 2001
Posts: 6
Question

Quote:
Originally posted by Perderabo
There is a time command and a times sytem call that can be used to time a process. But the resolution is usually 1/100 second.
Is there a difference between unix and linux.
Actually which version of unix are we talking about? I did a man on time on Linux and the resolution is in terms of seconds rather than miliseconds.
  #4 (permalink)  
Old 11-22-2001
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
Well, I've found that command is kind of wierd... On a Slackware Linux system (I'm using the bash shell), I ran `time ls` and got:
Code:
real     0m0.012s
user     0m0.010s
sys      0m0.000s
But there is also /usr/bin/time... (I think the previous example is a shell builtin). This is the output from `/usr/bin/time ls`:
Code:
0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (102major+15minor)pagefaults 0swaps
Much different.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:21 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0