LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-26-2006, 11:00 AM   #1
ljmace1953
Member
 
Registered: Jan 2006
Distribution: suse
Posts: 38

Rep: Reputation: 0
wall clock time of a running process


I know with top I see cpu time but I want to know how long(wall clock)a process has been running. What is or is there a command for this??
thanks
Mace
 
Old 06-26-2006, 11:29 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
In Linux "time <command>" will give you usr, sys and real time for a command. real time being the one you're interested in.

Note: In most UNIX variants it is timex rather than time. (timex <command>)
 
Old 06-26-2006, 11:31 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Oops - on reread - you want to know how to get time of an existing process. You can get the time a process was started (see ps man page and look at "T" format option). You would then have to do the math by typing date to get current time and subtract the start time from the current to see how long it has been running.
 
Old 06-26-2006, 01:14 PM   #4
ljmace1953
Member
 
Registered: Jan 2006
Distribution: suse
Posts: 38

Original Poster
Rep: Reputation: 0
found it through some googling..but I'm goinf to look up the T parm also
ps -eo pid,user,start --sort pid
thx
Mace
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where does RH8 daily set system time to hardware clock time smartnorman Red Hat 1 05-24-2006 02:42 PM
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 09:58 PM
Running time active process js_valencia Linux - General 6 02-15-2006 10:14 AM
Clock keeps going out of time linksocc Linux - General 10 10-01-2003 08:05 AM
time clock jimval7 Linux - Distributions 2 03-21-2002 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration