- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to find the process started date with year
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО04-20-2010 02:56 AM
тАО04-20-2010 02:56 AM
I am not able to see the started the date (with date and year) of the process using the command "ps -ef | more".
For example:
#ps -ef | more
UID PID PPID C STIME TTY TIME COMMAND
root 0 0 0 Nov 12 ? 3:34 swapper
root 1 0 0 Nov 12 ? 19:36 init
root 2 0 0 Nov 12 ? 1954:12 vhand
root 3 0 1 Nov 12 ? 1585:25 statdaemon
In above command, it is showing only month and date under STIME (start time) but not year.
I want to view the date with year.
Is it possible?
How to see that?
Solved! Go to Solution.
- Tags:
- PS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 03:31 AM
тАО04-20-2010 03:31 AM
Re: How to find the process started date with year
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 04:10 AM
тАО04-20-2010 04:10 AM
Re: How to find the process started date with year
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 04:13 AM
тАО04-20-2010 04:13 AM
Re: How to find the process started date with year
> In above command, it is showing only month and date under STIME (start time) but not year. I want to view the date with year.
The manpages suggest that you will have to filter the output to reformat things. I'm not sure why you want the year displayed.
You might map the month name to its ordinal value. Compare that value to the current month ordinal. If the first value is greater than the current month, then the year is year-1. In your example, Nov(ember) [11] is greater than Apr(il) [4], so we might assume that the process started in 2010-1 or 2009.
Again, why do you care?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 04:27 AM
тАО04-20-2010 04:27 AM
Re: How to find the process started date with year
If it's an app process that has a mmmdd for STIME, based on the last time the server was booted you could get a good idea of the year when the app process started.
Other than that the man page for ps states that after 24 hours,the starting date for a process is displayed, obviously without the year.
beers,
robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 04:53 AM
тАО04-20-2010 04:53 AM
Re: How to find the process started date with year
These are primary process and starts during system startup,
root 0 0 0 Nov 12 ? 3:34 swapper
root 1 0 0 Nov 12 ? 19:36 init
root 2 0 0 Nov 12 ? 1954:12 vhand
Use uptime to determine the process start time, [ Current date - server uptime date ]
# uptime
You can try:
# UNIX95=1 ps -e -o pid,ppid,time,etime,args | more
etime will show the : Elapsed time of the processes. under the field ELAPSED.
Hth,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 05:40 PM
тАО04-20-2010 05:40 PM
SolutionThis thread wanted to know the start time in minutes and seconds. I assume adding the year is trivial.
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1395780
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 09:25 PM
тАО04-20-2010 09:25 PM
Re: How to find the process started date with year
>>want to view the date with year.
I dont think so we can see the year
>>Is it possible?
yes for time its possible
>>How to see that?
I am using this below command
UNIX95= ps -e -o time,etime,pid,ppid,args
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 10:43 PM
тАО04-20-2010 10:43 PM
Re: How to find the process started date with year
Better you compare the ps -ef out put and the uptime (TIME )in "top" utility for same PID
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-20-2010 11:14 PM
тАО04-20-2010 11:14 PM
Re: How to find the process started date with year
Raj : "etime will show the : Elapsed time of the processes. under the field ELAPSED"
for many process it shows as "122-04:20:13" , how to comprehend that ?
Regards ,