From owner-freebsd-stable Thu Feb 6 18:45:37 2003 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 328AD37B401 for ; Thu, 6 Feb 2003 18:45:34 -0800 (PST) Received: from wally.statscout.com (wally.statscout.com [203.39.101.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6D9243FA3 for ; Thu, 6 Feb 2003 18:45:24 -0800 (PST) (envelope-from pak@statscout.com) Received: from speedy.statscout.com (speedy.statscout.com [10.1.1.100]) by wally.statscout.com (8.11.6/8.11.3av) with ESMTP id h172jD226505 for ; Fri, 7 Feb 2003 12:45:13 +1000 (EST) (envelope-from pak@statscout.com) Received: from speedy.statscout.com (localhost.statscout.com [127.0.0.1]) by speedy.statscout.com (8.12.6/8.12.6) with ESMTP id h172jFAu001495 for ; Fri, 7 Feb 2003 12:45:15 +1000 (EST) (envelope-from pak@speedy.statscout.com) Received: (from pak@localhost) by speedy.statscout.com (8.12.6/8.12.6/Submit) id h172jFON001494 for freebsd-stable@FreeBSD.ORG; Fri, 7 Feb 2003 12:45:15 +1000 (EST) Content-Type: text/plain; charset="us-ascii" From: Paul Koch Organization: Statscout To: freebsd-stable@FreeBSD.ORG Subject: Invalid ps start time values for kernel processes ? Date: Fri, 7 Feb 2003 12:45:14 +1000 User-Agent: KMail/1.4.3 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200302071245.14865.paul.koch@statscout.com> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The ps output value for STARTED appears to be incorrect for kernel started processes. I found this while writing a tiny ps for our freebsd based network appliance. The start time returned from /proc/{normal pid}/status (man procfs) appears to be in=20 UTC while the start time for a kernel process appears to be localtime (or the other way round). This gave me wild values. Is this correct behaviour ? $ uname -a FreeBSD speedy.statscout.com 4.7-RELEASE FreeBSD 4.7-RELEASE #0:=20 Tue Dec 17 08:22:00 EST 2002 root@speedy.statscout.com:/usr/src/sys/comp= ile/BSD47 i386 $ date Fri Feb 7 12:31:33 EST 2003 $ uptime 12:31PM up 3:56, 4 users, load averages: 0.15, 0.17, 0.09 My timezone is +10hours. $ ps -aux USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 193 1.0 11.3 29936 14308 ?? Ss 8:35AM 2:56.69 /usr/X11R6= /bin/XFree86 -auth /usr/X11R6/lib/X11/xdm/authdir/authfiles/A:0-vZLPV9 root 1 0.0 0.1 552 72 ?? ILs 6:35PM 0:00.01 /sbin/init = -- root 2 0.0 0.0 0 0 ?? DL 6:35PM 0:03.44 (pagedaemo= n) root 3 0.0 0.0 0 0 ?? DL 6:35PM 0:00.78 (vmdaemon) root 4 0.0 0.0 0 0 ?? DL 6:35PM 0:00.10 (bufdaemon= ) root 5 0.0 0.0 0 0 ?? DL 6:35PM 0:00.09 (vnlru) root 6 0.0 0.0 0 0 ?? DL 6:35PM 0:01.34 (syncer) root 23 0.0 0.0 212 0 ?? IWs - 0:00.00 adjkerntz -= i root 71 0.0 0.2 944 248 ?? Ss 8:35AM 0:00.08 /usr/sbin/s= yslogd -s daemon 74 0.0 0.0 944 0 ?? IWs - 0:00.00 /usr/sbin/p= ortmap root 76 0.0 0.0 500 0 ?? IWs - 0:00.00 mountd -r root 79 0.0 0.0 368 0 ?? IWs - 0:00.00 nfsd: maste= r (nfsd) root 81 0.0 0.0 360 0 ?? IW - 0:00.00 nfsd: serve= r (nfsd) root 82 0.0 0.0 360 0 ?? IW - 0:00.00 nfsd: serve= r (nfsd) root 83 0.0 0.0 360 0 ?? IW - 0:00.00 nfsd: serve= r (nfsd) root 84 0.0 0.0 360 0 ?? IW - 0:00.00 nfsd: serve= r (nfsd) root 86 0.0 0.0 263084 0 ?? IWs - 0:00.00 rpc.statd root 91 0.0 0.0 212 0 ?? IW - 0:00.00 nfsiod -n 4 root 92 0.0 0.0 212 0 ?? IW - 0:00.00 nfsiod -n 4 root 93 0.0 0.0 212 0 ?? IW - 0:00.00 nfsiod -n 4 root 94 0.0 0.0 212 0 ?? IW - 0:00.00 nfsiod -n 4 root 100 0.0 0.0 1076 0 ?? IWs - 0:00.00 /usr/sbin/i= netd -wW root 102 0.0 0.2 996 192 ?? Is 8:35AM 0:00.05 /usr/sbin/c= ron root 105 0.0 0.0 968 0 ?? IWs - 0:00.00 /usr/sbin/l= pd root 107 0.0 0.1 968 100 ?? S 8:35AM 0:00.03 /usr/sbin/l= pd root 108 0.0 0.0 2740 0 ?? IWs - 0:00.00 /usr/sbin/s= shd root 110 0.0 0.1 916 88 ?? Ss 8:35AM 0:00.02 /usr/sbin/u= sbd root 113 0.0 0.4 2660 460 ?? Ss 8:35AM 0:00.51 sendmail: a= ccepting connections (sendmail) smmsp 116 0.0 0.4 2660 440 ?? Is 8:35AM 0:00.01 sendmail: Q= ueue runner@00:30:00 for /var/spool/clientmqueue (sendmail) root 133 0.0 0.1 912 72 ?? Is 8:35AM 0:03.49 moused -p /= dev/psm0 -t auto root 146 0.0 0.2 2128 220 ?? Ss 8:35AM 0:00.46 /usr/local/= sbin/httpd www 162 0.0 0.0 2128 0 ?? IW - 0:00.00 /usr/local/= sbin/httpd www 163 0.0 0.0 2152 0 ?? IW - 0:00.00 /usr/local/= sbin/httpd www 164 0.0 0.0 2152 0 ?? IW - 0:00.00 /usr/local/= sbin/httpd www 165 0.0 0.0 2152 0 ?? IW - 0:00.00 /usr/local/= sbin/httpd www 166 0.0 0.0 2188 0 ?? IW - 0:00.00 /usr/local/= sbin/httpd root 179 0.0 0.0 3408 0 con- IW+ - 0:00.00 /usr/local/= sbin/snmpd root 182 0.0 0.0 948 0 v0 IWs+ - 0:00.00 /usr/libexe= c/getty Pc ttyv0 root 183 0.0 0.0 948 0 v1 IWs+ - 0:00.00 /usr/libexe= c/getty Pc ttyv1 root 184 0.0 0.0 948 0 v2 IWs+ - 0:00.00 /usr/libexe= c/getty Pc ttyv2 root 185 0.0 0.0 948 0 v3 IWs+ - 0:00.00 /usr/libexe= c/getty Pc ttyv3 root 186 0.0 0.0 948 0 v4 IWs+ - 0:00.00 /usr/libexe= c/getty Pc ttyv4 etc...... Paul Koch (CTO Statscout Pty Ltd) Email: paul.koch@statscout.com Phone: +61 7 32117115 Fax: +61 7 32117829 7th Floor, 300 Adelaide St, Brisbane, Australia To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message