Date: Fri, 6 May 2011 10:28:48 +0400 From: Sergey Kandaurov <pluknet@gmail.com> To: Garrett Cooper <yanegomi@gmail.com> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: Processes in swapped out states in recent CURRENT? Message-ID: <BANLkTintiLusbiCMoLBYt17tHQUg5MaBXA@mail.gmail.com> In-Reply-To: <BANLkTimaEoJJ33qR6L-9_FY20GaQeJm1yw@mail.gmail.com> References: <BANLkTimaEoJJ33qR6L-9_FY20GaQeJm1yw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 6 May 2011 00:33, Garrett Cooper <yanegomi@gmail.com> wrote: > =A0 =A0I was watching top output on my dev box and I noticed that there > are more swapped out processes present on the system, shortly after > boot (which doesn't make sense given that I'm not low on resources on > the box). Also, the os when I run os.waitpid() in python claims that > the child doesn't exist, so I'm wondering if there's an issue with the > processes reported via ps, top, etc. > =A0 =A0I'm noting this because it's a behavior change over my > 'stable'-ish workstation, running CURRENT/r220089/amd64, which is > spec'ed out the same as the dev box, minus some multimedia hardware. > Thanks, > -Garrett > > # uname -a > FreeBSD fallout.local 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r221219M: Thu > May =A05 12:09:37 PDT 2011 > root@fallout.local:/usr/obj/usr/src/sys/FALLOUT =A0amd6 > # fstat -p 1832 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 root / =A0 =A0 =A0 =A0 =A0 =A0 2 dr= wxr-xr-x =A0 =A01024 =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 wd / =A0 =A0 =A0 =A0 =A0 =A0 2 = drwxr-xr-x =A0 =A01024 =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 text /usr =A0 =A0 730118 -r-xr-xr-x= =A0240944 =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A00 /dev =A0 =A0 =A0 =A0 =A06 = crw-rw-rw- =A0 =A0null =A0r > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A01 /dev =A0 =A0 =A0 =A0 =A06 = crw-rw-rw- =A0 =A0null rw > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A02 /dev =A0 =A0 =A0 =A0 =A06 = crw-rw-rw- =A0 =A0null rw > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A03* internet stream tcp fffff= e01e56cf000 > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A04* pseudo-terminal master = =A0 =A0 =A0pts/1 rw > root =A0 =A0 sshd =A0 =A0 =A0 =A01832 =A0 =A05* local stream fffffe0008f7= 9960 <-> > fffffe0008f79a50 > # fstat -p 149 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > root =A0 =A0 adjkerntz =A0 =A0149 root / =A0 =A0 =A0 =A0 =A0 =A0 2 drwxr-= xr-x =A0 =A01024 =A0r > root =A0 =A0 adjkerntz =A0 =A0149 =A0 wd / =A0 =A0 =A0 =A0 =A0 =A0 2 drwx= r-xr-x =A0 =A01024 =A0r > root =A0 =A0 adjkerntz =A0 =A0149 text / =A0 =A0 =A0 =A0329805 -r-xr-xr-x= =A0 =A08792 =A0r > root =A0 =A0 adjkerntz =A0 =A0149 =A0 =A00 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 adjkerntz =A0 =A0149 =A0 =A01 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 adjkerntz =A0 =A0149 =A0 =A02 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > # fstat -p 1479 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > root =A0 =A0 syslogd =A0 =A0 1479 root / =A0 =A0 =A0 =A0 =A0 =A0 2 drwxr-= xr-x =A0 =A01024 =A0r > root =A0 =A0 syslogd =A0 =A0 1479 =A0 wd / =A0 =A0 =A0 =A0 =A0 =A0 2 drwx= r-xr-x =A0 =A01024 =A0r > root =A0 =A0 syslogd =A0 =A0 1479 text /usr =A0 =A0 739002 -r-xr-xr-x =A0= 39008 =A0r > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A00 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A01 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A02 /dev =A0 =A0 =A0 =A0 =A06 crw-= rw-rw- =A0 =A0null rw > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A03 /var =A0 =A0 353301 -rw-------= =A0 =A0 =A0 4 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A04* local dgram fffffe0008cd31e0 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A05* local dgram fffffe0008cd30f0 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A06* internet6 dgram udp fffffe000= 8ced540 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A07* internet dgram udp fffffe0008= ced3f0 > root =A0 =A0 syslogd =A0 =A0 1479 =A0 =A08 /dev =A0 =A0 =A0 =A0 29 crw---= ---- =A0 =A0klog =A0r > root =A0 =A0 syslogd =A0 =A0 1479 =A0 10 /var =A0 =A0 1389613 -rw-r--r-- = =A0 25389 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 11 /var =A0 =A0 1389579 -rw------- = =A0 =A0 =A062 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 12 /var =A0 =A0 1389572 -rw------- = =A0 10164 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 13 /var =A0 =A0 1389601 -rw-r----- = =A0 =A02814 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 14 /var =A0 =A0 1389575 -rw-r--r-- = =A0 =A0 =A062 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 15 /var =A0 =A0 1389580 -rw------- = =A0 =A0 =A062 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 16 /var =A0 =A0 1389577 -rw------- = =A0 57212 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 17 /var =A0 =A0 1389606 -rw------- = =A0 38046 =A0w > root =A0 =A0 syslogd =A0 =A0 1479 =A0 18 /var =A0 =A0 1389578 -rw-r----- = =A0 =A0 =A062 =A0w > # fstat -p 1829 > USER =A0 =A0 CMD =A0 =A0 =A0 =A0 =A0PID =A0 FD MOUNT =A0 =A0 =A0INUM MODE= =A0 =A0 =A0 =A0 SZ|DV R/W > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 root / =A0 =A0 =A0 =A0 =A0 =A0 2 dr= wxr-xr-x =A0 =A01024 =A0r > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 wd /usr =A0 =A0 1884160 drwxr-x= r-x =A0 =A01024 =A0r > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 text / =A0 =A0 =A0 =A0212057 -r-xr-= xr-x =A0131784 =A0r > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 =A00 /dev =A0 =A0 =A0 =A0127 cr= w--w---- =A0 pts/0 rw > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 =A01 /dev =A0 =A0 =A0 =A0127 cr= w--w---- =A0 pts/0 rw > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 =A02 /dev =A0 =A0 =A0 =A0127 cr= w--w---- =A0 pts/0 rw > gcooper =A0sh =A0 =A0 =A0 =A0 =A01829 =A0 10 /dev =A0 =A0 =A0 =A0127 crw-= -w---- =A0 pts/0 rw > > # python -c 'import os; os.waitpid(1825, 0)' > Traceback (most recent call last): > =A0File "<string>", line 1, in <module> > OSError: [Errno 10] No child processes But pid 1825 (sshd) is not a child process of the python process , isn't it= ? from waitpid(2): [ECHILD] The calling process has no existing unwaited-for ch= ild processes. Look at /sys/kern/kern_exit.c:kern_wait(). The function returns ECHILD if a specified process was not found among p->p_children children group. > # ps auxww | grep 1825 > root =A0 =A0 1825 =A0 0.0 =A00.0 =A047952 =A0 =A0 =A00 =A0?? =A0IWs =A0- = =A0 =A0 =A0 =A0 0:00.00 > sshd: gcooper [priv] (sshd) > root =A0 =A088213 =A0 0.0 =A00.0 =A016340 =A0 1356 =A0 3 =A0S+ =A0 =A01:2= 5PM =A0 0:00.00 grep 1825 > # top -b > last pid: 96740; =A0load averages: =A01.07, =A00.98, =A00.92 =A0up 0+01:1= 5:32 =A0 =A013:27:04 > 50 processes: =A02 running, 48 sleeping > > Mem: 56M Active, 23M Inact, 795M Wired, 1848K Cache, 1237M Buf, 11G Free > Swap: 24G Total, 832K Used, 24G Free > > > =A0PID USERNAME =A0THR PRI NICE =A0 SIZE =A0 =A0RES STATE =A0 C =A0 TIME = =A0 WCPU > COMMAND > =A01828 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03372K select =A06 =A0 = 0:02 =A00.00% sshd > 26295 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 =A09972K =A0 888K kqread =A02 = =A0 0:01 =A00.00% tail > 95888 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 14472K =A08092K wait =A0 =A01 = =A0 0:00 =A00.00% make > =A01729 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 20368K =A03000K select =A02 = =A0 0:00 =A00.00% sendmail > 59474 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03768K select =A07 =A0 0:= 00 =A00.00% sshd > 57339 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A01168K wait =A0 =A0= 1 =A0 0:00 =A00.00% make > 75210 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03816K select =A05 =A0 0:= 00 =A00.00% sshd > 82431 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A01148K wait =A0 =A0= 2 =A0 0:00 =A00.00% make > 94797 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A01164K wait =A0 =A0= 2 =A0 0:00 =A00.00% make > 59441 root =A0 =A0 =A0 =A01 =A021 =A0 =A00 47952K =A03772K sbwait =A04 = =A0 0:00 =A00.00% sshd > =A01825 root =A0 =A0 =A0 =A01 =A021 =A0 =A00 47952K =A0 =A0 0K sbwait =A0= 1 =A0 0:00 =A00.00% <sshd> > 75167 root =A0 =A0 =A0 =A01 =A021 =A0 =A00 47952K =A03820K sbwait =A01 = =A0 0:00 =A00.00% sshd > =A01832 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 47952K =A0 =A0 0K sbwait =A0= 1 =A0 0:00 =A00.00% <sshd> > 96738 root =A0 =A0 =A0 =A01 =A072 =A0 =A00 17184K =A09756K CPU0 =A0 =A00 = =A0 0:00 =A00.00% cc1 > =A01479 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 12228K =A01372K select =A04 = =A0 0:00 =A00.00% syslogd > 75237 root =A0 =A0 =A0 =A01 =A020 =A0 =A00 17612K =A02424K ttyin =A0 4 = =A0 0:00 =A00.00% bash > =A01835 gcooper =A0 =A0 1 =A020 =A0 =A00 47952K =A03284K select =A02 =A0 = 0:00 =A00.00% sshd > 57233 root =A0 =A0 =A0 =A01 =A052 =A0 =A00 =A06280K =A0 756K wait =A0 =A0= 2 =A0 0:00 =A00.00% make --=20 wbr, pluknet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTintiLusbiCMoLBYt17tHQUg5MaBXA>