From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,290b626fc464a8cc X-Google-Attributes: gidfee84,public From: duane@magma.uucp (Andrew Duane USG) Subject: Re: How can I get process start time on OSF1? Date: 2000/02/25 Message-ID: <896gup$6f5$1@lead.zk3.dec.com>#1/1 X-Deja-AN: 589955154 References: <38B3B548.C8E70D51@iona.com> X-Complaints-To: iass@lead.zk3.dec.com X-Trace: lead.zk3.dec.com 951502617 6629 16.140.48.243 (25 Feb 2000 18:16:57 GMT) Organization: Digital Equipment Corporation NNTP-Posting-Date: 25 Feb 2000 18:16:57 GMT Newsgroups: comp.unix.osf.osf1 In article <38B3B548.C8E70D51@iona.com> Brian Buckley writes: >I am trying to get a c function call for what should be really simple - >getting the start time of a process (any process, i.e. of which I am not >the owner). > >This is no problem in SVR4 systems with a procfs (solaris, IRIX, Linux) >- just stat() the corresponding /proc entry for the process. Even AIX >which has no procfs at least has a getprocs() system call. My system >here has a procfs but for some reason which baffles me it updates the >creation time of the /proc entries every minute (does anyone know >why???) - so stat() is useless. I have searched the documentation for >something like AIX's getprocs() to no avail. Brian, The procfs file system in Tru64 Unix sets all three fields (mtime, atime, and ctime) to the current time. This is the behaviour you're seeing. You can use table(TBL_UAREA) to get the U area for a process, which contains a field u_start. -- Andrew L. Duane (JOT-7) duane@zk3.dec.com Compaq Computer Corporation (603)-884-1294 110 Spit Brook Road M/S ZKO3-3/U14 Nashua, NH 03062-2698