From owner-freebsd-rc@FreeBSD.ORG Wed Sep 5 20:40:51 2012 Return-Path: Delivered-To: freebsd-rc@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 664) id A77161065678; Wed, 5 Sep 2012 20:40:51 +0000 (UTC) Date: Wed, 5 Sep 2012 13:40:50 -0700 From: David O'Brien To: Ian Lepore Message-ID: <20120905204050.GB820@dragon.NUXI.org> References: <201208222337.q7MNbORo017642@svn.freebsd.org> <5043E449.8050005@FreeBSD.org> <1346638718.1140.573.camel@revolution.hippie.lan> <50451041.9070302@FreeBSD.org> <1346789717.1140.675.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1346789717.1140.675.camel@revolution.hippie.lan> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Arthur Mesh , freebsd-security@FreeBSD.org, Doug Barton , freebsd-rc@FreeBSD.org, Mark Murray Subject: Re: svn commit: r239598 - head/etc/rc.d X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 20:40:51 -0000 On Tue, Sep 04, 2012 at 02:15:17PM -0600, Ian Lepore wrote: > pscmd="ps -fauxrH -o nwchan,nivcsw,nvcsw,time,re,sl" I do like the changes that this gives over 'ps -fauxww'. root 11 80.6 0.0 0 32 - RL 8:40AM 0:03.09 [idle] - 1078 1495 0:03.09 8 8 root 11 42.8 0.0 0 32 - RL 8:40AM 0:04.23 [idle] - 1401 1012 0:04.23 8 8 root 5 21.6 0.0 0 16 - DL 8:40AM 0:02.17 [xpt_thrd] ffffffff811931e0 104 1 0:02.17 8 4 -vs- root 11 121.9 0.0 0 32 - RL 8:40AM 0:06.48 [idle] root 5 21.6 0.0 0 16 - DL 8:40AM 0:00.00 [xpt_thrd] > The sysctl -a in the original initrandom sequence was part of the killer > for execution time. On a 180mhz arm chip that command alone takes like > 3 seconds, and it generates a lot of unchanging boilerplate text. I > remember picking a few select values that had a good chance of being > different from one run to the next. I've found that 'sysctl -a' can generate ~270K of output with very little of it differing between runs. I've checked the output across reboots at the point that 'initrandom' runs. I've found sysctl kern.cp_times kern.cp_time kern.geom kern.lastpid \ kern.timecounter kern.tty_nout kern.tty_nin vm vfs debug dev.cpu to concentrate the changes across reboots. However, I have not tested this on ARM or MIPS to ensure these MIB's exist. Just to double check, you're saying the 3 seconds was for 'sysctl -a > /dev/null' vs. feeding that amount of input into /dev/random? > Those commands still generated a fair amount of unchanging boilerplate > text, and it's mostly the numbers that change, so I fed all the output > through tr to strip out everything but the numbers. I would use "tr -Cd '0123456789xabcdef'" since many of the numbers are in hex, and would restrict to just the sysctl output. But otherwise I like this idea. Can you time some things on your ARM? 'sysctl -a' vs. my MIB list above? Also your shorter list? -- -- David (obrien@FreeBSD.org)