LinuxQuestions.org
Register a domain and help support LQ
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
LQ Newbie
 
Registered: Jan 2006
Distribution: suse
Posts: 23

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
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
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
Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,007
Blog Entries: 5

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
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
LQ Newbie
 
Registered: Jan 2006
Distribution: suse
Posts: 23

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 07:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration