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: Brian Buckley Subject: Re: How can I get process start time on OSF1? Date: 2000/03/02 Message-ID: <38BE6C9A.100E94BA@iona.com>#1/1 X-Deja-AN: 592217380 Content-Transfer-Encoding: 7bit References: <38B3B548.C8E70D51@iona.com> <896gup$6f5$1@lead.zk3.dec.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@bvweb.dublin.iona.ie X-Trace: bvweb.dublin.iona.ie 952003830 26416 10.2.1.22 (2 Mar 2000 13:30:30 GMT) Organization: Iona Technologies Mime-Version: 1.0 NNTP-Posting-Date: 2 Mar 2000 13:30:30 GMT Newsgroups: comp.unix.osf.osf1 Hi Andrew, Thanks for the info. I tried table(TBL_UAREA) in a little test programme and it fails with EPERM unless I run as root. Is there any way to get process info for any process if I am running as a regular user? Brian. Andrew Duane USG wrote: > 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