Date: Fri, 10 Jun 2011 17:20:56 +0400 From: Sergey Kandaurov <pluknet@gmail.com> To: Jim Bryant <kc5vdj.freebsd@gmail.com> Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: kvm_open errors on /proc/*/mem in top Message-ID: <BANLkTikpFr6gte1Hr-o3YR%2BxjN3EnjRVRw@mail.gmail.com> In-Reply-To: <4DF126B5.8040800@gmail.com> References: <4DF126B5.8040800@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10 June 2011 00:01, Jim Bryant <kc5vdj.freebsd@gmail.com> wrote: > i'm not sure which list this belongs to, so i'm posting to -hackers and > -stable. > > i've noticed for a while now that during heavy activity (for instance > buildworld), that top will get these kvm_read errors when reading proc > mem entries. Hi. I think that is a question of whether it's acceptable to hide all errors originated in kvm(3): Index: usr.bin/top/machine.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- usr.bin/top/machine.c (revision 222893) +++ usr.bin/top/machine.c (working copy) @@ -265,7 +265,7 @@ else if (namelength > UPUNAMELEN) namelength =3D UPUNAMELEN; - kd =3D kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open"); + kd =3D kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, NULL); if (kd =3D=3D NULL) return (-1); Or rewrite top(1) a little more to open kvm with kvm_openfiles(), to let the caller decide itself in what places it needs to print an error with kvm_geterr(). > > i have included a screenshot of what happens during such events... > > last pid: 92024; =A0load averages: =A04.79, =A04.58, > 4.10 > up 0+00:49:07 =A015:30:53 > 225 processes: 10 running, 197 sleeping, 18 waiting > CPU: 90.6% user, =A00.0% nice, =A09.4% system, =A00.0% interrupt, =A00.0%= idle > Mem: 493M Active, 1337M Inact, 604M Wired, 632K Cache, 315M Buf, 524M Fre= e > Swap: 4097M Total, 4097M Free > kvm_open: cannot open /proc/86755/mem > =A0PID USERNAME =A0 =A0THR PRI NICE =A0 SIZE =A0 =A0RES STATE =A0 C =A0 T= IME =A0 WCPU COMMAND > 91943 root =A0 =A0 =A0 =A0 =A01 =A097 =A0 =A00 39536K 33620K RUN =A0 =A0 = 1 =A0 0:01 =A07.37% > [cc1plus] > 2859 jbryant =A0 =A0 =A0 1 =A048 =A0 =A00 =A0 406M 72332K select =A00 =A0= 3:10 =A05.96% > kwin -session 1028b2382461f5000127042056000000019550000_13 > 2747 root =A0 =A0 =A0 =A0 =A01 =A046 =A0 =A00 =A0 419M =A0 370M select = =A00 =A0 1:43 =A04.39% > /usr/local/bin/X :0 -nolisten tcp -auth /var/run/xauth/A:0 > 1464 root =A0 =A0 =A0 =A0 =A01 =A044 =A0 =A00 =A08068K =A01384K select = =A00 =A0 0:03 =A00.39% > /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.u > 11219 jbryant =A0 =A0 =A0 7 =A044 =A0 =A00 =A0 299M =A0 109M select =A01 = =A0 0:17 =A00.29% > /usr/local/lib/thunderbird/thunderbird-bin > 2865 jbryant =A0 =A0 =A0 1 =A045 =A0 =A00 =A0 453M 86140K select =A00 =A0= 0:21 =A00.20% > kdeinit4: kdeinit4: plasma-desktop (kdeinit4) > 2882 jbryant =A0 =A0 =A0 1 =A044 =A0 =A00 =A0 391M 60996K select =A00 =A0= 0:17 =A00.10% > kdeinit4: kdeinit4: kmix -session 102511e52251c60001304471 > 92001 root =A0 =A0 =A0 =A0 =A01 =A097 =A0 =A00 23452K 22256K CPU1 =A0 =A0= 1 =A0 0:00 =A00.00% [cc1] > 92017 root =A0 =A0 =A0 =A0 =A01 =A096 =A0 =A00 16172K 13440K RUN =A0 =A0 = 0 =A0 0:00 =A00.00% [cc1] > [snip] --=20 wbr, pluknet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BANLkTikpFr6gte1Hr-o3YR%2BxjN3EnjRVRw>