INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

sorting "etimes" on ps output

sorting "etimes" on ps output

(OP)

hello,

"ps -ef -o etime" command on AIX returns the elapsed time since the process started.

[[ dd-]hh:]mm:ss

and returns, for example:

CODE

18:22
57-10:09:09
52-04:03:56
10-13:29:12
   04:19:02
52-04:02:33
      18:22
      06:54
15-17:36:56
      03:40
      03:40
 4-05:16:38
      06:47
57-10:08:29
      03:39
17-18:04:31
52-04:03:56
   12:59:24
52-04:02:36
82-23:19:40
52-04:03:33
   04:34:33
17-18:04:34
      51:31
13-21:26:04
 3-23:02:04
52-04:02:40
82-23:19:40
52-04:04:23
52-04:02:42
      00:05
      08:30
41-04:52:56
52-04:03:57
52-03:43:34
   04:34:27 


Q: How to sort output to get "etimes" listed from the oldest to the latest?


regards,m.

RE: sorting "etimes" on ps output

(OP)
it is perfect!
thank you.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close