Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Feb 2003 12:45:14 +1000
From:      Paul Koch <paul.koch@statscout.com>
To:        freebsd-stable@FreeBSD.ORG
Subject:   Invalid ps start time values for kernel processes ?
Message-ID:  <200302071245.14865.paul.koch@statscout.com>

next in thread | raw e-mail | index | archive | help

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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302071245.14865.paul.koch>