HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to check process by age..
Operating System - HP-UX
1837893
Members
3546
Online
110122
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2004 07:03 PM
08-09-2004 07:03 PM
Hi can u tell me how can one check the processes by their age. I mean I want the new process on the top of the list. Also can we automatically divert the output to a file for further reference
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2004 07:21 PM
08-09-2004 07:21 PM
Solution
Hi
With unix95
1 echo memory usage per process
2 echo "----------------------------------------------"
3 UNIX95= ps -e -o stime,ruser,vsz,sz,pid,ppid,tty,args > /tmp/$PPID
4 head -n 1 /tmp/$PPID
5 tail -n +2 /tmp/$PPID|
6 sort -rn
7 /bin/rm /tmp/$PPID 2>/dev/null
Will do it
Steve Steel
With unix95
1 echo memory usage per process
2 echo "----------------------------------------------"
3 UNIX95= ps -e -o stime,ruser,vsz,sz,pid,ppid,tty,args > /tmp/$PPID
4 head -n 1 /tmp/$PPID
5 tail -n +2 /tmp/$PPID|
6 sort -rn
7 /bin/rm /tmp/$PPID 2>/dev/null
Will do it
Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2004 07:23 PM
08-09-2004 07:23 PM
Re: how to check process by age..
Check the following:
ps -eaf|sort -r -k 2,2
Redirect the output with > symbol such as
ps -eaf|sort -r -k 2,2 > filenm
sks
ps -eaf|sort -r -k 2,2
Redirect the output with > symbol such as
ps -eaf|sort -r -k 2,2 > filenm
sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2004 08:07 PM
08-09-2004 08:07 PM
Re: how to check process by age..
You can use top command to view all the process status with execution time.
If you want to redirect then ps is very good to keep track.
stime - gives the starting time of process
time - will give amount of time running
ps -ef | grep -v "STIME" | sort -r -k 7,7
It will give the details / redirect to any other file
If you want to redirect then ps is very good to keep track.
stime - gives the starting time of process
time - will give amount of time running
ps -ef | grep -v "STIME" | sort -r -k 7,7
It will give the details / redirect to any other file
Easy to suggest when don't know about the problem!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP