From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 14:27:15 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 694781065691 for ; Sun, 4 Jan 2009 14:27:15 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forwards4.yandex.ru (forwards4.yandex.ru [77.88.32.20]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1E48FC22 for ; Sun, 4 Jan 2009 14:27:14 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from smtp5.yandex.ru (smtp5.yandex.ru [77.88.32.24]) by forwards4.yandex.ru (Yandex) with ESMTP id 45B9F4C513D for ; Sun, 4 Jan 2009 17:05:17 +0300 (MSK) Received: from 171-127-178-94.pool.ukrtel.net ([94.178.127.171]:3593 "EHLO HOMEUSER" smtp-auth: "kes-kes" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S6144116AbZADOFH (ORCPT ); Sun, 4 Jan 2009 17:05:07 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp5 X-Yandex-TimeMark: 1231077907 X-BornDate: 1149541200 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 4 X-Comment: RFC 2476 MSA function at smtp5.yandex.ru logged sender identity as: kes-kes Date: Sun, 4 Jan 2009 16:05:00 +0200 From: KES X-Mailer: The Bat! (v4.0.24) Professional Organization: SaftTen X-Priority: 3 (Normal) Message-ID: <179479624.20090104160500@yandex.ru> To: hackers@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Sun, 04 Jan 2009 15:09:33 +0000 Cc: Subject: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: KES List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 14:27:16 -0000 Здравствуйте, Questions. There will be very usefull to have options for tcpdump to monitor incomint or outgoing traffic regardless of src/dst IPs or ports or protocol For example: kes# tcpdump -n -i rl4 out EXPECTED: show traffic outgoing on rl4 ACTUAL: tcpdump: syntax error kes# tcpdump -n -i rl4 in EXPECTED: show traffic incoming on rl4 ACTUAL: tcpdump: syntax error -- С уважением, KES mailto:kes-kes@yandex.ru From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 16:26:17 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33DB51065688 for ; Sun, 4 Jan 2009 16:26:17 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 92CD58FC18 for ; Sun, 4 Jan 2009 16:26:16 +0000 (UTC) (envelope-from eugen@kuzbass.ru) Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id n04FucOV077032; Sun, 4 Jan 2009 22:56:38 +0700 (KRAT) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from eugen@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id n04FucD1077031; Sun, 4 Jan 2009 22:56:38 +0700 (KRAT) (envelope-from eugen) Date: Sun, 4 Jan 2009 22:56:38 +0700 From: Eugene Grosbein To: KES Message-ID: <20090104155638.GA76773@svzserv.kemerovo.su> References: <179479624.20090104160500@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <179479624.20090104160500@yandex.ru> User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Sun, 04 Jan 2009 17:01:47 +0000 Cc: hackers@freebsd.org Subject: Re: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 16:26:17 -0000 On Sun, Jan 04, 2009 at 04:05:00PM +0200, KES wrote: > There will be very usefull to have options for tcpdump to monitor > incomint or outgoing traffic regardless of src/dst IPs or ports or protocol > > For example: > > kes# tcpdump -n -i rl4 out > EXPECTED: show traffic outgoing on rl4 > ACTUAL: tcpdump: syntax error > > kes# tcpdump -n -i rl4 in > EXPECTED: show traffic incoming on rl4 > ACTUAL: tcpdump: syntax error Hi! I use following trick for that: tcpdump -n -p -i rl4 ether src me-rl4 # for outgoing tcpdump -n -p -i tl4 not ether src me-rl4 # for incoming And add MAC-address of rl4 to /etc/ethers with name 'me-rl4' or just 'me' if you need not watch other interfaces this way. Eugene Grosbein From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 20:54:22 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A11B1065675 for ; Sun, 4 Jan 2009 20:54:22 +0000 (UTC) (envelope-from kitchetech@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id E4D018FC12 for ; Sun, 4 Jan 2009 20:54:21 +0000 (UTC) (envelope-from kitchetech@gmail.com) Received: by bwz12 with SMTP id 12so19160706bwz.19 for ; Sun, 04 Jan 2009 12:54:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=OfRMldUykQcs56jpfic5xeEgqVEJuTUfyVoVus1CdC0=; b=s7iUh1YU3y4lwNTMUvjMsiiNshmKawpC2p9TlWirxvMDvMY87O0uFZ1RhLHL9E2y96 9Q/H2vbmQwhHYwjCkqxxByrYH22AYT2RozEUJTcBuVQYa3DtPY09gCYa21inqLMF1a6s zFXL3rb3oPAra7i27IeR+4libiJQzttb4JcCw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=fLS9xQOEJAhN1ZjUPs16MMjiBNsYw0ZCFVIiWtODM4KyCXaDYDcVWFYrJang3fqFFE Heub/SfuajZ3imzxhVP1PtEO5DX5kOYzg8YysEyeGCiptvhpdd++Woqe+d9BYx0DHqjV /EHBwBheQAtRFvyTec2u0kJ84UM1cZwXXLW+o= Received: by 10.181.197.1 with SMTP id z1mr7793145bkp.118.1231100596607; Sun, 04 Jan 2009 12:23:16 -0800 (PST) Received: by 10.181.14.6 with HTTP; Sun, 4 Jan 2009 12:23:16 -0800 (PST) Message-ID: <28283d910901041223x7210db5lcf8df9ef5f1da56b@mail.gmail.com> Date: Sun, 4 Jan 2009 15:23:16 -0500 From: "matt donovan" To: "Eugene Grosbein" In-Reply-To: <20090104155638.GA76773@svzserv.kemerovo.su> MIME-Version: 1.0 References: <179479624.20090104160500@yandex.ru> <20090104155638.GA76773@svzserv.kemerovo.su> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: KES , hackers@freebsd.org Subject: Re: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 20:54:23 -0000 On Sun, Jan 4, 2009 at 10:56 AM, Eugene Grosbein wrote: > On Sun, Jan 04, 2009 at 04:05:00PM +0200, KES wrote: > > > There will be very usefull to have options for tcpdump to monitor > > incomint or outgoing traffic regardless of src/dst IPs or ports or > protocol > > > > For example: > > > > kes# tcpdump -n -i rl4 out > > EXPECTED: show traffic outgoing on rl4 > > ACTUAL: tcpdump: syntax error > > > > kes# tcpdump -n -i rl4 in > > EXPECTED: show traffic incoming on rl4 > > ACTUAL: tcpdump: syntax error > > Hi! > > I use following trick for that: > > tcpdump -n -p -i rl4 ether src me-rl4 # for outgoing > tcpdump -n -p -i tl4 not ether src me-rl4 # for incoming > > And add MAC-address of rl4 to /etc/ethers with name 'me-rl4' > or just 'me' if you need not watch other interfaces this way. > > Eugene Grosbein > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > don't even need an option you just have to filter the traffic correctly using tcpdump which Eugene already point out From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 20:56:57 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4E2F1065677 for ; Sun, 4 Jan 2009 20:56:57 +0000 (UTC) (envelope-from ru@freebsd.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id 6A5DB8FC13 for ; Sun, 4 Jan 2009 20:56:57 +0000 (UTC) (envelope-from ru@freebsd.org) Received: from [10.100.124.199] (port=64389 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LJZcZ-000BcA-3M; Sun, 04 Jan 2009 23:30:51 +0300 Date: Sun, 4 Jan 2009 23:30:42 +0300 From: Ruslan Ermilov To: Doug Barton Message-ID: <20090104203042.GA59395@edoofus.dev.vega.ru> References: <495DC554.9030408@dougbarton.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <495DC554.9030408@dougbarton.us> Cc: freebsd-hackers@freebsd.org Subject: Re: bsd.obj.mk does not set CANONICALOBJDIR correctly when TARGET_ARCH and MAKEOBJDIRPREFIX are set X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 20:56:58 -0000 Hi, On Thu, Jan 01, 2009 at 11:42:12PM -0800, Doug Barton wrote: > In working on cross-platform support for mergemaster I came across the > following problem. I set MAKEOBJDIRPREFIX to be that of the temproot > environment, which works fine when you do not specify a TARGET_ARCH. > When you do specify TARGET_ARCH there is a conflict between > src/Makefile.inc1 and share/mk/bsd.obj.mk. > The former does this: > > .if ${MACHINE} == ${TARGET} && !defined(CROSS_BUILD_TESTING) > OBJTREE= ${MAKEOBJDIRPREFIX} > .else > OBJTREE= ${MAKEOBJDIRPREFIX}/${TARGET} > .endif OBJTREE is a variable internal to Makefile.inc1; it's then assigned to a MAKEOBJDIRPREFIX environment variable which make(1) understands and uses to find the actual object directory. > however the latter does this: > > .if defined(MAKEOBJDIRPREFIX) > CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > .else > CANONICALOBJDIR:=/usr/obj${.CURDIR} > .endif CANONICALOBJDIR is what we (BSD, FreeBSD) choose to be a canonical object directory out of the list of possible object directories make(1) understands; the list is documented in the manpage: : 1. ${MAKEOBJDIRPREFIX}/`pwd` : 2. ${MAKEOBJDIR} : 3. obj.${MACHINE} : 4. obj : 5. /usr/obj/`pwd` That is, 1 and 5. There's no conflict between bsd.obj.mk and Makefile.inc1; the former creates a canonical object directory with the default "obj" target, ${MAKEOBJDIRPREFIX}/`pwd` or /usr/obj/`pwd`, and Makefile.inc1 only changes the value of MAKEOBJDIRPREFIX environment variable. bsd.obj.mk doesn't (and shouldn't) know anything about OBJTREE which is internal to Makefile.inc1. > When trying to install the stuff in src/etc/sendmail install(1) cannot > find the file because it is built in /obj but it's looking for it > in /obj/$target You should set MAKEOBJDIRPREFIX to the same value for "build" and "install" targets. If you set it only for the "install" target, you'll get what you describe; let's see... > The simplest fix I found was to do the following in bsd.obj.mk: > > Index: bsd.obj.mk > =================================================================== > --- bsd.obj.mk (revision 186676) > +++ bsd.obj.mk (working copy) > @@ -43,7 +43,7 @@ > .include > > .if defined(MAKEOBJDIRPREFIX) > -CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > +CANONICALOBJDIR:=${OBJTREE}${.CURDIR} > .else > CANONICALOBJDIR:=/usr/obj${.CURDIR} > .endif This change is plain wrong and shouldn't be committed. > However I would be happy with any solution that makes it work. It's > trivial to test with 'mergemaster -i -D -A arm' The problem is that Makefile.inc1 sets MAKEOBJDIRPREFIX for world- related targets specially, taking into account the value of ${TARGET}, to be able to use a single directory to build worlds for different architectures. mergemaster.sh uses "obj" and "all" targets which aren't cross-build aware (don't take ${TARGET} into account) to build etc/ bits, and then "distribution" target (which is cross-build aware) to install then. The effect of this is that you end up with "build" and "install" targets having different ideas of MAKEOBJDIRPREFIX. The fix is to use cross-aware versions of "obj" and "all" targets: %%% Index: mergemaster.sh =================================================================== RCS file: /home/ncvs/src/usr.sbin/mergemaster/mergemaster.sh,v retrieving revision 1.63 diff -u -p -r1.63 mergemaster.sh --- mergemaster.sh 2 Jan 2009 00:37:59 -0000 1.63 +++ mergemaster.sh 4 Jan 2009 20:18:40 -0000 @@ -588,8 +588,8 @@ case "${RERUN}" in ;; esac ${MM_MAKE} DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} obj SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} all SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} everything SUBDIR_OVERRIDE=etc && MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} \ DESTDIR=${TEMPROOT} distribution;} || { echo ''; %%% Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 21:25:34 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FAAE10656C1 for ; Sun, 4 Jan 2009 21:25:34 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-28-76-114.eur.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E607D8FC08; Sun, 4 Jan 2009 21:25:33 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4961294D.8080200@FreeBSD.org> Date: Sun, 04 Jan 2009 21:25:33 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Christian Weisgerber References: <20081230004747.GA55542@lorvorc.mips.inka.de> <20081230020524.2563a6ac@gluon> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: lzo2 shows insane speed gap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 21:25:34 -0000 Christian Weisgerber wrote: > Bruce Cran wrote: > >> I'm running 8.0-CURRENT amd64 here on a Turion64 X2 machine. Without >> malloc debugging (malloc.conf -> aj) 'make test' takes 25s; after >> removing malloc.conf thus turning on debugging, it takes over 10 >> minutes. > > Wow! That. Is. It. > > Toggling malloc debugging option J makes the "slow" machines "fast" > and vice versa. > >>> Athlon 64 X2 5200+ 2.6 GHz, FreeBSD 8.0-CURRENT amd64 ~60 min > > 19 seconds. > > I guess that falls under the "obvious" configuration differences > to check, but since it usually doesn't cause a significant slowdown > I completely forgot about it. Embarrassing. > > But still. Two orders of magnitude? That is a pathological case. > Probably it means that lzo2 is doing pathological numbers of mallocs. Kris From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 21:36:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E25C106566C for ; Sun, 4 Jan 2009 21:36:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id EDF9B8FC17 for ; Sun, 4 Jan 2009 21:36:58 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 18550 invoked by uid 399); 4 Jan 2009 21:10:19 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 4 Jan 2009 21:10:19 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <496125BA.1080902@FreeBSD.org> Date: Sun, 04 Jan 2009 13:10:18 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: bsd.obj.mk does not set CANONICALOBJDIR correctly when TARGET_ARCH and MAKEOBJDIRPREFIX are set X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 21:36:59 -0000 Ruslan Ermilov wrote: > mergemaster.sh uses "obj" and "all" targets which aren't cross-build > aware (don't take ${TARGET} into account) to build etc/ bits, and then > "distribution" target (which is cross-build aware) to install then. > The effect of this is that you end up with "build" and "install" targets > having different ideas of MAKEOBJDIRPREFIX. The fix is to use cross-aware > versions of "obj" and "all" targets: Thanks for responding. I was working on this the other day and discovered that the reason my suggested change "worked" was really an unintended side effect. Your suggestion works great, so I've committed it. Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 23:36:27 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03BFC106564A; Sun, 4 Jan 2009 23:36:27 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 58E0E8FC0C; Sun, 4 Jan 2009 23:36:26 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (Inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n04NO3WN091563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 09:54:04 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 5 Jan 2009 09:54:00 +1030 User-Agent: KMail/1.9.10 References: <179479624.20090104160500@yandex.ru> <20090104155638.GA76773@svzserv.kemerovo.su> In-Reply-To: <20090104155638.GA76773@svzserv.kemerovo.su> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7560732.2q0FUUBk8o"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200901050954.02759.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: KES , hackers@freebsd.org, Eugene Grosbein Subject: Re: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 23:36:27 -0000 --nextPart7560732.2q0FUUBk8o Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 05 January 2009 02:26:38 Eugene Grosbein wrote: > On Sun, Jan 04, 2009 at 04:05:00PM +0200, KES wrote: > > There will be very usefull to have options for tcpdump to monitor > > incomint or outgoing traffic regardless of src/dst IPs or ports or > > protocol > > > > For example: > > > > kes# tcpdump -n -i rl4 out > > EXPECTED: show traffic outgoing on rl4 > > ACTUAL: tcpdump: syntax error > > > > kes# tcpdump -n -i rl4 in > > EXPECTED: show traffic incoming on rl4 > > ACTUAL: tcpdump: syntax error > > Hi! > > I use following trick for that: > > tcpdump -n -p -i rl4 ether src me-rl4 # for outgoing > tcpdump -n -p -i tl4 not ether src me-rl4 # for incoming > > And add MAC-address of rl4 to /etc/ethers with name 'me-rl4' > or just 'me' if you need not watch other interfaces this way. I think it's more a question for the tcpdump maintainers. Also, in & out don't necessarily mean traffic from your MAC address or the= =20 inverse. eg if you are running a bridge then in & out will mean something=20 different. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart7560732.2q0FUUBk8o Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBJYUUS5ZPcIHs/zowRAn1pAJ9zj2/jSuRjWMQqV/UbsZovqF9DCQCcC9yi WdSZL4c4WbeZGZRTc+7kP6s= =7vUT -----END PGP SIGNATURE----- --nextPart7560732.2q0FUUBk8o-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jan 4 23:36:27 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03BFC106564A; Sun, 4 Jan 2009 23:36:27 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 58E0E8FC0C; Sun, 4 Jan 2009 23:36:26 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (Inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n04NO3WN091563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 09:54:04 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Mon, 5 Jan 2009 09:54:00 +1030 User-Agent: KMail/1.9.10 References: <179479624.20090104160500@yandex.ru> <20090104155638.GA76773@svzserv.kemerovo.su> In-Reply-To: <20090104155638.GA76773@svzserv.kemerovo.su> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart7560732.2q0FUUBk8o"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200901050954.02759.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: KES , hackers@freebsd.org, Eugene Grosbein Subject: Re: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 23:36:27 -0000 --nextPart7560732.2q0FUUBk8o Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 05 January 2009 02:26:38 Eugene Grosbein wrote: > On Sun, Jan 04, 2009 at 04:05:00PM +0200, KES wrote: > > There will be very usefull to have options for tcpdump to monitor > > incomint or outgoing traffic regardless of src/dst IPs or ports or > > protocol > > > > For example: > > > > kes# tcpdump -n -i rl4 out > > EXPECTED: show traffic outgoing on rl4 > > ACTUAL: tcpdump: syntax error > > > > kes# tcpdump -n -i rl4 in > > EXPECTED: show traffic incoming on rl4 > > ACTUAL: tcpdump: syntax error > > Hi! > > I use following trick for that: > > tcpdump -n -p -i rl4 ether src me-rl4 # for outgoing > tcpdump -n -p -i tl4 not ether src me-rl4 # for incoming > > And add MAC-address of rl4 to /etc/ethers with name 'me-rl4' > or just 'me' if you need not watch other interfaces this way. I think it's more a question for the tcpdump maintainers. Also, in & out don't necessarily mean traffic from your MAC address or the= =20 inverse. eg if you are running a bridge then in & out will mean something=20 different. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart7560732.2q0FUUBk8o Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQBJYUUS5ZPcIHs/zowRAn1pAJ9zj2/jSuRjWMQqV/UbsZovqF9DCQCcC9yi WdSZL4c4WbeZGZRTc+7kP6s= =7vUT -----END PGP SIGNATURE----- --nextPart7560732.2q0FUUBk8o-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 5 15:33:24 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2907C106564A for ; Mon, 5 Jan 2009 15:33:24 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id D9D158FC17 for ; Mon, 5 Jan 2009 15:33:23 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id C07A06D43F; Mon, 5 Jan 2009 15:33:22 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9C2B4844FE; Mon, 5 Jan 2009 16:33:22 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Eugene Grosbein References: <387210.21917.qm@web45407.mail.sp1.yahoo.com> <20090102082117.GA78125@svzserv.kemerovo.su> Date: Mon, 05 Jan 2009 16:33:22 +0100 In-Reply-To: <20090102082117.GA78125@svzserv.kemerovo.su> (Eugene Grosbein's message of "Fri, 2 Jan 2009 15:21:17 +0700") Message-ID: <86fxjxkbst.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Kamlesh Patel , freebsd-questions@freebsd.org Subject: Re: FreeBSD kernel Debugging tools for Virtual Memory Module X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:33:24 -0000 Eugene Grosbein writes: > First, you need to recompile source you change for sure :-) > But you have not rebuild all other files all the time. > You need to add to your /etc/src.conf (or /etc/make.conf for 6.x and earl= ier): > > MODULES_WITH_WORLD=3Dyes > > This will skip rebuilding of all modules during 'make buildkernel' > but you MUST to copy all modules from /boot/kernel to /boot/modules > (all files other than /boot/kernel/kernel*) if you do this. What is the point, if you use NO_KERNELCLEAN as recommended below? The modules won't be rebuilt either unless something that affects them has changed. Running a new kernel with old modules is a great way to shoot yourself in the foot. If you absolutely want to skip modules, build your kernel with -DNO_MODULES, but install it normally, or use reinstallkernel instead of installkernel. The latter will overwrite your running kernel - but you should keep an unmodified kernel around anyway. You can boot entirely without modules if you include everything you need (including acpi) in your kernel config. > Then, if you do not change kernel config file, > recompile your changes with command (only second time and then): > > cd /usr/src; make NO_KERNELDEPEND=3Dyes NO_KERNELCLEAN=3Dyes buildkernel You should not use -DNO_KERNELDEPEND unless you know for sure that no #include directives have been added or removed and no kernel options have changed. It is safe to use -DNO_KERNELCLEAN, but not -DNO_KERNELDEPEND, even if your config file changed. > Second, you should use some kind of virtual machine (like qemu from > ports) to speedup your development cycle even more: install the system > into virtual machine and you'll need not another box to debug the > kernel and need not rebuild your development box. Test your changes > with the system installed into VM and reboot it only. Use ddb or kgdb > already noted here. The best solution by far is to use actual hardware and netboot from your development machine. It's easy to set up, and you don't lose context every time you reboot the test system. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 5 15:37:27 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B483106566C for ; Mon, 5 Jan 2009 15:37:27 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 37F158FC20 for ; Mon, 5 Jan 2009 15:37:27 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 835426D44C; Mon, 5 Jan 2009 15:37:26 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 5B1EC844F2; Mon, 5 Jan 2009 16:37:26 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Daniel O'Connor" References: <179479624.20090104160500@yandex.ru> <20090104155638.GA76773@svzserv.kemerovo.su> <200901050954.02759.doconnor@gsoft.com.au> Date: Mon, 05 Jan 2009 16:37:26 +0100 In-Reply-To: <200901050954.02759.doconnor@gsoft.com.au> (Daniel O'Connor's message of "Mon, 5 Jan 2009 09:54:00 +1030") Message-ID: <86bpulkbm1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, KES , hackers@freebsd.org, Eugene Grosbein Subject: Re: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:37:27 -0000 "Daniel O'Connor" writes: > I think it's more a question for the tcpdump maintainers. tcpdump does not parse the filter expression, it just passes it along to libpcap. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 5 15:55:08 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C761B106564A for ; Mon, 5 Jan 2009 15:55:08 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 87B5E8FC18 for ; Mon, 5 Jan 2009 15:55:08 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 835426D44C; Mon, 5 Jan 2009 15:37:26 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 5B1EC844F2; Mon, 5 Jan 2009 16:37:26 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Daniel O'Connor" References: <179479624.20090104160500@yandex.ru> <20090104155638.GA76773@svzserv.kemerovo.su> <200901050954.02759.doconnor@gsoft.com.au> Date: Mon, 05 Jan 2009 16:37:26 +0100 In-Reply-To: <200901050954.02759.doconnor@gsoft.com.au> (Daniel O'Connor's message of "Mon, 5 Jan 2009 09:54:00 +1030") Message-ID: <86bpulkbm1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, KES , hackers@freebsd.org, Eugene Grosbein Subject: Re: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:55:09 -0000 "Daniel O'Connor" writes: > I think it's more a question for the tcpdump maintainers. tcpdump does not parse the filter expression, it just passes it along to libpcap. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jan 5 16:53:29 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1377A10656EA for ; Mon, 5 Jan 2009 16:53:29 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from forwards4.yandex.ru (forwards4.yandex.ru [77.88.32.20]) by mx1.freebsd.org (Postfix) with ESMTP id 6BBBA8FC08 for ; Mon, 5 Jan 2009 16:53:28 +0000 (UTC) (envelope-from kes-kes@yandex.ru) Received: from smtp12.yandex.ru (smtp12.yandex.ru [77.88.32.82]) by forwards4.yandex.ru (Yandex) with ESMTP id EE8294C52E0; Mon, 5 Jan 2009 19:53:26 +0300 (MSK) Received: from 38-83-113-92.pool.ukrtel.net ([92.113.83.38]:51204 "EHLO HOMEUSER" smtp-auth: "kes-kes" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S5325796AbZAEQxY (ORCPT + 2 others); Mon, 5 Jan 2009 19:53:24 +0300 X-Yandex-Spam: 1 X-Yandex-Front: smtp12 X-Yandex-TimeMark: 1231174404 X-BornDate: 1149541200 X-Yandex-Karma: 0 X-Yandex-KarmaStatus: 0 X-MsgDayCount: 8 X-Comment: RFC 2476 MSA function at smtp12.yandex.ru logged sender identity as: kes-kes Date: Mon, 5 Jan 2009 18:53:24 +0200 From: KES X-Mailer: The Bat! (v4.0.24) Professional Organization: SaftTen X-Priority: 3 (Normal) Message-ID: <1873024003.20090105185324@yandex.ru> To: "matt donovan" In-Reply-To: <28283d910901041223x7210db5lcf8df9ef5f1da56b@mail.gmail.com> References: <179479624.20090104160500@yandex.ru> <20090104155638.GA76773@svzserv.kemerovo.su> <28283d910901041223x7210db5lcf8df9ef5f1da56b@mail.gmail.com> Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 05 Jan 2009 17:23:54 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: hackers@freebsd.org, Eugene Grosbein Subject: Re[2]: tcpdump filter for out/in traffic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: KES List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:53:29 -0000 Zdravstvujte, matt. Vy pisali 4 yanvarya 2009 g., 22:23:16: > On Sun, Jan 4, 2009 at 10:56 AM, Eugene Grosbein <[1]eugen@kuzbass.ru> wrote: On Sun, Jan 04, 2009 at 04:05:00PM +0200, KES wrote: > There will be very usefull to have options for tcpdump to monitor > incomint or outgoing traffic regardless of src/dst IPs or ports or protocol > > For example: > > kes# tcpdump -n -i rl4 out > EXPECTED: show traffic outgoing on rl4 > ACTUAL: tcpdump: syntax error > > kes# tcpdump -n -i rl4 in > EXPECTED: show traffic incoming on rl4 > ACTUAL: tcpdump: syntax error Hi! I use following trick for that: tcpdump -n -p -i rl4 ether src me-rl4 # for outgoing tcpdump -n -p -i tl4 not ether src me-rl4 # for incoming And add MAC-address of rl4 to /etc/ethers with name 'me-rl4' or just 'me' if you need not watch other interfaces this way. Eugene Grosbein _______________________________________________ [2]freebsd-hackers@freebsd.org mailing list [3]http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[4]freebsd-hackers-unsubscribe@freebsd.org" don't even need an option you just have to filter the traffic correctly using tcpdump which Eugene already point out >tcpdump -n -p -i rl4 ether src me-rl4 # for outgoing >tcpdump -n -p -i tl4 not ether src me-rl4 # for incoming That will not help I can not add ether because of this is PPPoE interface. I can not use 'me' because of I need to view going through traffic. It is not originated from 'me'. For example I have mpd5. I set up PPPoE connection with my ISP. (ng0) I have VPN server for LAN users it also mpd5 (ng1 ng2 ng3 .... etc) I do NAT with MPD. so when I do tcpdump -n -i ng0 I get: 18:52:11.781281 IP 192.168.5.11.2348 > 95.57.143.109.64350: P 1853247053:1853247057(4) ack 1650009540 win 17080 18:52:11.783777 IP 81.19.80.166.80 > 192.168.4.5.2839: . 11790:13150(1360) ack 0 win 65535 18:52:11.784218 IP 192.168.4.9.3298 > 82.144.223.61.80: . ack 21761 win 17680 18:52:11.787732 IP 81.19.80.166.80 > 192.168.4.5.2839: . 13150:14510(1360) ack 0 win 65535 18:52:11.789122 IP 192.168.5.15.2903 > 89.178.118.23.16562: . 13601:14961(1360) ack 0 win 16659 18:52:11.790065 IP 192.168.5.15.1386 > 78.106.215.39.18155: . ack 18981 win 17680 18:52:11.791181 IP 192.168.5.15.1311 > 79.174.64.193.80: . ack 5441 win 17680 18:52:11.791889 IP 81.19.80.166.80 > 192.168.4.5.2839: . 14510:15870(1360) ack 0 win 65535 18:52:11.792176 IP 192.168.5.15.4969 > 87.241.174.129.41954: . ack 18 win 16635 18:52:11.792200 IP 192.168.8.13.1616 > 217.20.174.228.80: . ack 1361 win65535 So 'in/out' ouptions will help. -- S uvazheniem, KES [5]mailto:kes-kes@yandex.ru References 1. mailto:eugen@kuzbass.ru 2. mailto:freebsd-hackers@freebsd.org 3. http://lists.freebsd.org/mailman/listinfo/freebsd-hackers 4. mailto:freebsd-hackers-unsubscribe@freebsd.org 5. mailto:kes-kes@yandex.ru From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 6 19:52:42 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4C1B106566B for ; Tue, 6 Jan 2009 19:52:42 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mx1.freebsd.org (Postfix) with ESMTP id 85A2C8FC13 for ; Tue, 6 Jan 2009 19:52:42 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: by wf-out-1314.google.com with SMTP id 24so10601921wfg.7 for ; Tue, 06 Jan 2009 11:52:41 -0800 (PST) Received: by 10.142.203.19 with SMTP id a19mr9282835wfg.310.1231271559888; Tue, 06 Jan 2009 11:52:39 -0800 (PST) Received: by 10.142.199.18 with HTTP; Tue, 6 Jan 2009 11:52:39 -0800 (PST) Message-ID: Date: Tue, 6 Jan 2009 11:52:39 -0800 From: "Sheldon Givens" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:52:43 -0000 Hello everyone, It occurs to me that FreeBSD ps lacks the ability to disable header. This seems like a really obvious feature, and I may have simply missed it's existence (despite my relentlessly searching the man page) but here is a small patch that sets the flag 'n' to disable header output. Diff from CURRENT: http://sigsegv.ca/sheldon/ps.c-diff http://sigsegv.ca/sheldon/ps.1-diff Happy New Year, everyone! From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 05:43:57 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AE2C106566B for ; Wed, 7 Jan 2009 05:43:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 9BEAC8FC08 for ; Wed, 7 Jan 2009 05:43:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 19130 invoked by uid 399); 7 Jan 2009 05:37:16 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 7 Jan 2009 05:37:16 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <49643F8B.1010904@FreeBSD.org> Date: Tue, 06 Jan 2009 21:37:15 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: Sheldon Givens References: In-Reply-To: X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 05:43:57 -0000 Sheldon Givens wrote: > Hello everyone, > > It occurs to me that FreeBSD ps lacks the ability to disable header. Why is this necessary? Doug -- This .signature sanitized for your protection From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 08:29:13 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 521191065686 for ; Wed, 7 Jan 2009 08:29:13 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.189]) by mx1.freebsd.org (Postfix) with ESMTP id DFA278FC13 for ; Wed, 7 Jan 2009 08:29:12 +0000 (UTC) (envelope-from wsw1wsw2@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so6004790tib.3 for ; Wed, 07 Jan 2009 00:29:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=8DRUVBc8Uo7EJnJtWm7Sj5Cn3d0ZS6md08JlW3gP5ng=; b=I5Wr6IrizmCEyI5a5xM2+uyWTytTo5QfiJipmKNefay6R+Ob7SHDTTDCV2fRpkx6B5 2yG8OZ60K3bhIAJBflrDPx7zqgNrfhlFC0FxW0DBtHoa0/3LFJFBSNE4vBWsn9HJzfDk 1GnrnNZG0xchTfr+YeFt3T/546F/gypZKHR4M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=U/FUjB/j/gdINlf/L5Zsw0UU6zVpzih/a46K4Ctq3HfP18v1gwPqP/+eXPAoClg5LV KZjNOn1NJTNa/lRROVXXYIJdQnhZr9RvNttIebYoQ/scNwPYSsDfbRBCacK9LFmXrfjq OAkX62/SaGlUoS82rGBrvbTaAm/iyF/SP8bk8= Received: by 10.110.61.18 with SMTP id j18mr34775067tia.49.1231315540645; Wed, 07 Jan 2009 00:05:40 -0800 (PST) Received: by 10.110.57.7 with HTTP; Wed, 7 Jan 2009 00:05:40 -0800 (PST) Message-ID: <2e566b9e0901070005s630c2212k44a0e59a1bcf69aa@mail.gmail.com> Date: Wed, 7 Jan 2009 16:05:40 +0800 From: "Shaowei Wang (wsw)" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: A patch of HPTIOP driver for 7.1-RELEASE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 08:29:13 -0000 SGksIGd1eXMKCmhwdGlvcCBkcml2ZXIgaW4gdGhlIDcuMSByZWxlYXNlIGhhcyBhIGxpdHRsZSBi dWcuCkJlY2F1c2UgdGhpcyBpc3N1ZSB0aGUgUmFpZC1tYW5hZ2UgR1VJIHByb2dyYW0gd2hpY2gg d2UgcHJvdmlkZWQgY2FuIE5PVAp3b3JrIGFueW1vcmUuCgpTbyB3ZSBnaXZlIHRoZSBwYXRjaDoK CkluZGV4OiBocHRpb3AuaAo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBocHRpb3AuaCAgICAocmV2aXNpb24gMTg2 ODUxKQorKysgaHB0aW9wLmggICAgKHdvcmtpbmcgY29weSkKQEAgLTI2MCw3ICsyNjAsNyBAQAog ICAgIHVuc2lnbmVkIGxvbmcgICAgbHBPdXRCdWZmZXI7ICAgICAgICAgICAvKiBvdXRwdXQgZGF0 YSBidWZmZXIgKi8KICAgICB1X2ludDMyX3QgICAgICAgIG5PdXRCdWZmZXJTaXplOyAgICAgICAg Lyogc2l6ZSBvZiBvdXRwdXQgZGF0YSBidWZmZXIKKi8KICAgICB1bnNpZ25lZCBsb25nICAgIGxw Qnl0ZXNSZXR1cm5lZDsgICAgICAgLyogY291bnQgb2YgSFBUX1U4cyByZXR1cm5lZCAqLwotfTsK K31fX2F0dHJpYnV0ZV9fKChwYWNrZWQpKTsKCiAjZGVmaW5lIEhQVF9JT0NUTF9GTEFHX09QRU4g MQogI2RlZmluZSBIUFRfQ1RMX0NPREVfQlNEX1RPX0lPUCh4KSAoKHgpLTB4ZmYwMCkKCj09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09Cgotd3N3CgovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwoK5aSn5a625aW977yaCgpocHRpb3DnmoTp qbHliqjlnKg3LjHlj5HooYzniYjkuK3mnInkuKrlsI/plJnor6/jgIIK6L+Z5Liq5bCP6ZSZ6K+v 5a+86Ie05LqG5oiR5Lus5o+Q5L6b55qE6Zi15YiX566h55CG56iL5bqP5peg5rOV6L+Q6KGM44CC CgrmiJHku6znu5nlh7rkuobooaXkuIHvvJoKCkluZGV4OiBocHRpb3AuaAo9PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0t LSBocHRpb3AuaCAgICAocmV2aXNpb24gMTg2ODUxKQorKysgaHB0aW9wLmggICAgKHdvcmtpbmcg Y29weSkKQEAgLTI2MCw3ICsyNjAsNyBAQAogICAgIHVuc2lnbmVkIGxvbmcgICAgbHBPdXRCdWZm ZXI7ICAgICAgICAgICAvKiBvdXRwdXQgZGF0YSBidWZmZXIgKi8KICAgICB1X2ludDMyX3QgICAg ICAgIG5PdXRCdWZmZXJTaXplOyAgICAgICAgLyogc2l6ZSBvZiBvdXRwdXQgZGF0YSBidWZmZXIK Ki8KICAgICB1bnNpZ25lZCBsb25nICAgIGxwQnl0ZXNSZXR1cm5lZDsgICAgICAgLyogY291bnQg b2YgSFBUX1U4cyByZXR1cm5lZCAqLwotfTsKK31fX2F0dHJpYnV0ZV9fKChwYWNrZWQpKTsKCiAj ZGVmaW5lIEhQVF9JT0NUTF9GTEFHX09QRU4gMQogI2RlZmluZSBIUFRfQ1RMX0NPREVfQlNEX1RP X0lPUCh4KSAoKHgpLTB4ZmYwMCkKCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Cgotd3N3Cg== From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 11:57:38 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC1AC1065672 for ; Wed, 7 Jan 2009 11:57:38 +0000 (UTC) (envelope-from eitans@mellanox.co.il) Received: from mellanox.co.il (mail.mellanox.co.il [194.90.237.43]) by mx1.freebsd.org (Postfix) with ESMTP id DDC2E8FC18 for ; Wed, 7 Jan 2009 11:57:37 +0000 (UTC) (envelope-from eitans@mellanox.co.il) Received: from Internal Mail-Server by MTLPINE1 (envelope-from eitans@mellanox.co.il) with SMTP; 7 Jan 2009 13:30:53 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Date: Wed, 7 Jan 2009 13:30:20 +0200 Message-ID: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: "/var/log/messages" logs appear in the output of "sysctl -a" Thread-Index: Aclwu1K4wAmexMqMQv6vwzOfiurXxw== From: "Eitan Shefi" To: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: "/var/log/messages" logs appear in the output of "sysctl -a" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 11:57:39 -0000 I am testing a NIC driver. I found it's logs and "/var/log/messages" logs in the output of "sysctl -a": I run "sysctl -a | less", and there I find: =20 kern.devstat.version: 6 kern.devstat.generation: 137 kern.devstat.numdevs: 1 kern.kobj_methodcount: 143 kern.log_wakeups_per_second: 5 kern.msgbuf_clear: 0 kern.msgbuf: ound file system checks in 60 seconds. <118> mtnic0: FW version:2.6.0 mtnic0: Board ID: mtnic0: Using 1 tx rings for port:1 [4096] mtnic0: Using 4 rx rings for port:1 [1024] mtnic0: Using 1 tx rings for port:2 [4096] mtnic0: Using 4 rx rings for port:2 [1024] mtnic0: Initializing MSIX mtnic0: Enabling MSI-X (11 vectors) mtnic0: Board ID:MT_0BD0110004 mtnic0: [ITHREAD] mtnic0: Activating port:1 mtnic0: Ethernet address: 00:02:c9:03:35:20 mtnic0: Activating port:2 mtnic1: Ethernet address: 00:02:c9:03:35:21 mtnic0: [ITHREAD] mtnic0: [ITHREAD] mtnic0: mtnic0: mtnic0: mtnic0: Port 1 - link up mtnic0: [ITHREAD] mtnic0: [ITHREAD] mtnic0: [ITHREAD] Limiting icmp ping response from 300 to 200 packets/sec Limiting icmp ping response from 300 to 200 packets/sec Limiting icmp ping response from 1497 to 200 packets/sec Limiting icmp ping response from 1500 to 200 packets/sec Limiting icmp ping response from 1498 to 200 packets/sec Limiting icmp ping response from 1500 to 200 packets/sec =20 =20 Any idea how can such logs apear in "sysctl -a" ? =20 =20 Thanks, Eitan From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 12:14:23 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CAB106566C; Wed, 7 Jan 2009 12:14:23 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout3.freenet.de (mout3.freenet.de [IPv6:2001:748:100:40::2:5]) by mx1.freebsd.org (Postfix) with ESMTP id E084C8FC0C; Wed, 7 Jan 2009 12:14:22 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.22] (helo=12.mx.freenet.de) by mout3.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #76) id 1LKXIi-0001Dx-G6; Wed, 07 Jan 2009 13:14:20 +0100 Received: from te816.t.pppool.de ([89.55.232.22]:58023 helo=ernst.jennejohn.org) by 12.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #76) id 1LKXIi-0007iu-8a; Wed, 07 Jan 2009 13:14:20 +0100 Date: Wed, 7 Jan 2009 13:14:17 +0100 From: Gary Jennejohn To: "Eitan Shefi" Message-ID: <20090107131417.609c602d@ernst.jennejohn.org> In-Reply-To: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> References: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: "/var/log/messages" logs appear in the output of "sysctl -a" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:14:23 -0000 On Wed, 7 Jan 2009 13:30:20 +0200 "Eitan Shefi" wrote: > I am testing a NIC driver. > I found it's logs and "/var/log/messages" logs in the output of "sysctl > -a": > I run "sysctl -a | less", and there I find: > > kern.devstat.version: 6 > kern.devstat.generation: 137 > kern.devstat.numdevs: 1 > kern.kobj_methodcount: 143 > kern.log_wakeups_per_second: 5 > kern.msgbuf_clear: 0 > kern.msgbuf: ound file system checks in 60 seconds. > <118> > mtnic0: FW version:2.6.0 > mtnic0: Board ID: > mtnic0: Using 1 tx rings for port:1 [4096] > mtnic0: Using 4 rx rings for port:1 [1024] > mtnic0: Using 1 tx rings for port:2 [4096] > mtnic0: Using 4 rx rings for port:2 [1024] > mtnic0: Initializing MSIX > mtnic0: Enabling MSI-X (11 vectors) > mtnic0: Board ID:MT_0BD0110004 > mtnic0: [ITHREAD] > mtnic0: Activating port:1 > mtnic0: Ethernet address: 00:02:c9:03:35:20 > mtnic0: Activating port:2 > mtnic1: Ethernet address: 00:02:c9:03:35:21 > mtnic0: [ITHREAD] > mtnic0: [ITHREAD] > mtnic0: > mtnic0: > mtnic0: > mtnic0: Port 1 - link up > mtnic0: [ITHREAD] > mtnic0: [ITHREAD] > mtnic0: [ITHREAD] > Limiting icmp ping response from 300 to 200 packets/sec > Limiting icmp ping response from 300 to 200 packets/sec > Limiting icmp ping response from 1497 to 200 packets/sec > Limiting icmp ping response from 1500 to 200 packets/sec > Limiting icmp ping response from 1498 to 200 packets/sec > Limiting icmp ping response from 1500 to 200 packets/sec > > > Any idea how can such logs apear in "sysctl -a" ? > If you were viewing this as root on the console then you were simply seeing kernel output interleaved with the output from sysctl. --- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 12:21:30 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56336106566C; Wed, 7 Jan 2009 12:21:30 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from mp2.macomnet.net (cl-2958.ham-01.de.sixxs.net [IPv6:2001:6f8:900:b8d::2]) by mx1.freebsd.org (Postfix) with ESMTP id B52628FC18; Wed, 7 Jan 2009 12:21:29 +0000 (UTC) (envelope-from maxim@macomnet.ru) Received: from localhost (localhost [127.0.0.1]) by mp2.macomnet.net (8.14.2/8.14.2) with ESMTP id n07CLSSL025117; Wed, 7 Jan 2009 15:21:28 +0300 (MSK) (envelope-from maxim@macomnet.ru) Date: Wed, 7 Jan 2009 15:21:28 +0300 (MSK) From: Maxim Konovalov To: Gary Jennejohn In-Reply-To: <20090107131417.609c602d@ernst.jennejohn.org> Message-ID: <20090107152107.F7116@mp2.macomnet.net> References: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> <20090107131417.609c602d@ernst.jennejohn.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Eitan Shefi , freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: "/var/log/messages" logs appear in the output of "sysctl -a" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:21:31 -0000 On Wed, 7 Jan 2009, 13:14+0100, Gary Jennejohn wrote: > On Wed, 7 Jan 2009 13:30:20 +0200 > "Eitan Shefi" wrote: > > > I am testing a NIC driver. > > I found it's logs and "/var/log/messages" logs in the output of "sysctl > > -a": > > I run "sysctl -a | less", and there I find: > > > > kern.devstat.version: 6 > > kern.devstat.generation: 137 > > kern.devstat.numdevs: 1 > > kern.kobj_methodcount: 143 > > kern.log_wakeups_per_second: 5 > > kern.msgbuf_clear: 0 > > kern.msgbuf: ound file system checks in 60 seconds. > > <118> > > mtnic0: FW version:2.6.0 > > mtnic0: Board ID: > > mtnic0: Using 1 tx rings for port:1 [4096] > > mtnic0: Using 4 rx rings for port:1 [1024] > > mtnic0: Using 1 tx rings for port:2 [4096] > > mtnic0: Using 4 rx rings for port:2 [1024] > > mtnic0: Initializing MSIX > > mtnic0: Enabling MSI-X (11 vectors) > > mtnic0: Board ID:MT_0BD0110004 > > mtnic0: [ITHREAD] > > mtnic0: Activating port:1 > > mtnic0: Ethernet address: 00:02:c9:03:35:20 > > mtnic0: Activating port:2 > > mtnic1: Ethernet address: 00:02:c9:03:35:21 > > mtnic0: [ITHREAD] > > mtnic0: [ITHREAD] > > mtnic0: > > mtnic0: > > mtnic0: > > mtnic0: Port 1 - link up > > mtnic0: [ITHREAD] > > mtnic0: [ITHREAD] > > mtnic0: [ITHREAD] > > Limiting icmp ping response from 300 to 200 packets/sec > > Limiting icmp ping response from 300 to 200 packets/sec > > Limiting icmp ping response from 1497 to 200 packets/sec > > Limiting icmp ping response from 1500 to 200 packets/sec > > Limiting icmp ping response from 1498 to 200 packets/sec > > Limiting icmp ping response from 1500 to 200 packets/sec > > > > > > Any idea how can such logs apear in "sysctl -a" ? > > > > If you were viewing this as root on the console then you were simply > seeing kernel output interleaved with the output from sysctl. > This is just an output from sysctl kern.msgbuf. -- Maxim Konovalov From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 12:25:05 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D810106566B for ; Wed, 7 Jan 2009 12:25:05 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 934738FC18 for ; Wed, 7 Jan 2009 12:25:04 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so2701480fgb.35 for ; Wed, 07 Jan 2009 04:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:from; bh=D0aKMOsg7J9Ux5GVO+bcGeasDYEccnOC7SojGtNE8NI=; b=UrSDzx03FZJ4UkXvAEVDvR7JOTWEplYGHK1PJF8SgnhK/Tlgq06SmgnOLqBnNP/7yb 8YQ3UrS9lix+N2qivWVtKhE9nc2bsU7CVAqbSq2sf7ie5r3SIgYMPfT2C4v5oHWStX6e yduRkh4wmgfFNdRPoM+jDjANiAZ/CPYzkv0EM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:cc:subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to:user-agent:from; b=R+1lLaPKidcG7DhDTeSLkXl9VGvRB1SGizpkpax7w81o+3GcLTL7N8lu7KRUQgkwuX ERSGRqta2Yy8gaUz4bkkDhfWPyoZd4QnWKqXX3DazJ0gLJ43XT7/R7bggP8F3KRpmr7k qu29DUcbrBGNSJNtb6btGcdudkfUe3eH90wJs= Received: by 10.86.91.3 with SMTP id o3mr11955779fgb.35.1231331103518; Wed, 07 Jan 2009 04:25:03 -0800 (PST) Received: from gmail.com (sdferwer192.net.autocom.pl [77.236.1.49]) by mx.google.com with ESMTPS id e11sm25985357fga.12.2009.01.07.04.25.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Jan 2009 04:25:03 -0800 (PST) Date: Wed, 7 Jan 2009 13:25:03 +0100 To: Eitan Shefi Message-ID: <20090107122503.GA12470@skucha> References: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline In-Reply-To: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> User-Agent: Mutt/1.5.18 (2008-05-17) From: Mateusz Guzik Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: "/var/log/messages" logs appear in the output of "sysctl -a" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:25:05 -0000 On Wed, Jan 07, 2009 at 01:30:20PM +0200, Eitan Shefi wrote: > I am testing a NIC driver. > I found it's logs and "/var/log/messages" logs in the output of "sysctl > -a": > I run "sysctl -a | less", and there I find: > [..] > kern.msgbuf: ound file system checks in 60 seconds. > <118> > mtnic0: FW version:2.6.0 > mtnic0: Board ID: > mtnic0: Using 1 tx rings for port:1 [4096] > mtnic0: Using 4 rx rings for port:1 [1024] > mtnic0: Using 1 tx rings for port:2 [4096] > mtnic0: Using 4 rx rings for port:2 [1024] [..] > > Any idea how can such logs apear in "sysctl -a" ? > kern.msgbuf dumps so called 'message buf' containing messages printed by the kernel (for example by a NIC driver). It's accessible also via /dev/klog and syslogd uses it as a source for /var/log/messages. -- Mateusz Guzik From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 12:30:03 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A33E106566B; Wed, 7 Jan 2009 12:30:03 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from websrv01.jr-hosting.nl (websrv01.jr-hosting.nl [78.47.69.233]) by mx1.freebsd.org (Postfix) with ESMTP id 2190C8FC19; Wed, 7 Jan 2009 12:30:03 +0000 (UTC) (envelope-from remko@elvandar.org) Received: from [195.64.94.120] (helo=[10.0.2.153]) by websrv01.jr-hosting.nl with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LKXEd-0009kl-16; Wed, 07 Jan 2009 13:10:07 +0100 Message-Id: <013A849A-9F3C-4414-B022-61A87AADB478@elvandar.org> From: Remko Lodder To: "Eitan Shefi" In-Reply-To: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 7 Jan 2009 13:10:03 +0100 References: <5D49E7A8952DC44FB38C38FA0D758EAD0164F6D6@mtlexch01.mtl.com> X-Mailer: Apple Mail (2.930.3) Cc: freebsd-hackers@freebsd.org, freebsd-questions@freebsd.org Subject: Re: "/var/log/messages" logs appear in the output of "sysctl -a" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:30:03 -0000 You are looking at the kernel message buffer with 'sysctl -a'. (kern.msgbuf). Nothing wrong with that. //Remko -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 13:06:44 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1816610656C1 for ; Wed, 7 Jan 2009 13:06:44 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id 94FF18FC08 for ; Wed, 7 Jan 2009 13:06:43 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180153120.adsl.alicedsl.de [85.180.153.120]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id n07D6eaH067312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Jan 2009 14:06:40 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n07Cw0KT004474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Jan 2009 13:58:00 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n07CvxUu004473; Wed, 7 Jan 2009 13:57:59 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Wed, 7 Jan 2009 13:57:59 +0100 From: Ulrich Spoerlein To: Sheldon Givens Message-ID: <20090107125759.GA1462@roadrunner.spoerlein.net> Mail-Followup-To: Sheldon Givens , freebsd-hackers@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 13:06:44 -0000 On Tue, 06.01.2009 at 11:52:39 -0800, Sheldon Givens wrote: > Hello everyone, > > It occurs to me that FreeBSD ps lacks the ability to disable header. This > seems like a really obvious feature, and I may have simply missed it's > existence (despite my relentlessly searching the man page) but here is a > small patch that sets the flag 'n' to disable header output. You've missed it, probably because it is non-obvious: % ps -p 1 -o pid,cpu PID CPU 1 0 % ps -p 1 -o pid= -o cpu= 1 0 % Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 15:24:43 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 956321065679 for ; Wed, 7 Jan 2009 15:24:43 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.freebsd.org (Postfix) with ESMTP id 580168FC18 for ; Wed, 7 Jan 2009 15:24:43 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from thor.farley.org (HPooka@thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.3/8.14.3) with ESMTP id n07Esf1D034540; Wed, 7 Jan 2009 08:54:41 -0600 (CST) (envelope-from scf@FreeBSD.org) Date: Wed, 7 Jan 2009 08:54:41 -0600 (CST) From: "Sean C. Farley" To: Ulrich Spoerlein In-Reply-To: <20090107125759.GA1462@roadrunner.spoerlein.net> Message-ID: References: <20090107125759.GA1462@roadrunner.spoerlein.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-4.3 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.farley.org Cc: freebsd-hackers@FreeBSD.org, Sheldon Givens Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 15:24:44 -0000 On Wed, 7 Jan 2009, Ulrich Spoerlein wrote: > On Tue, 06.01.2009 at 11:52:39 -0800, Sheldon Givens wrote: >> Hello everyone, >> >> It occurs to me that FreeBSD ps lacks the ability to disable header. >> This seems like a really obvious feature, and I may have simply >> missed it's existence (despite my relentlessly searching the man >> page) but here is a small patch that sets the flag 'n' to disable >> header output. > > You've missed it, probably because it is non-obvious: > > % ps -p 1 -o pid,cpu > PID CPU > 1 0 > % ps -p 1 -o pid= -o cpu= > 1 0 > % Another way: ps | tail +2 Sean -- scf@FreeBSD.org From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 15:49:00 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8DE7106564A; Wed, 7 Jan 2009 15:49:00 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id D24218FC19; Wed, 7 Jan 2009 15:48:59 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180153120.adsl.alicedsl.de [85.180.153.120]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id n07Fmv2M069586 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Jan 2009 16:48:58 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n07Fmtql007298 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 7 Jan 2009 16:48:55 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n07FmsKN007297; Wed, 7 Jan 2009 16:48:54 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Wed, 7 Jan 2009 16:48:54 +0100 From: Ulrich Spoerlein To: "Sean C. Farley" Message-ID: <20090107154854.GC1462@roadrunner.spoerlein.net> Mail-Followup-To: "Sean C. Farley" , Sheldon Givens , freebsd-hackers@FreeBSD.org References: <20090107125759.GA1462@roadrunner.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@FreeBSD.org, Sheldon Givens Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 15:49:00 -0000 On Wed, 07.01.2009 at 08:54:41 -0600, Sean C. Farley wrote: > On Wed, 7 Jan 2009, Ulrich Spoerlein wrote: > > > On Tue, 06.01.2009 at 11:52:39 -0800, Sheldon Givens wrote: > >> Hello everyone, > >> > >> It occurs to me that FreeBSD ps lacks the ability to disable header. > >> This seems like a really obvious feature, and I may have simply > >> missed it's existence (despite my relentlessly searching the man > >> page) but here is a small patch that sets the flag 'n' to disable > >> header output. > > > > You've missed it, probably because it is non-obvious: > > > > % ps -p 1 -o pid,cpu > > PID CPU > > 1 0 > > % ps -p 1 -o pid= -o cpu= > > 1 0 > > % > > Another way: > ps | tail +2 I'm not sure about the portability of tail +N, I seem to remember that AIX doesn't support it. Therefore I'd rather use % ps | sed 1d which is way more portable. Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 17:09:57 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9AE41065687 for ; Wed, 7 Jan 2009 17:09:56 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) Received: from mx1.corp.idatanet.com (mx1.corp.idatanet.com [85.115.136.170]) by mx1.freebsd.org (Postfix) with ESMTP id C884F8FC34 for ; Wed, 7 Jan 2009 17:09:55 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168 Received: from gibsvwin008.partygaming.local ([10.3.10.32]) by mx1.corp.idatanet.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 7 Jan 2009 17:52:36 +0100 Received: from GIBSVWIN004X.partygaming.local ([10.3.10.229]) by gibsvwin008.partygaming.local with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Jan 2009 17:52:34 +0100 Received: from SOFSVWIN004X.partygaming.local ([10.4.10.228]) by GIBSVWIN004X.partygaming.local with Microsoft SMTPSVC(6.0.3790.3959); Wed, 7 Jan 2009 17:52:34 +0100 Received: from 10.4.71.11 ([10.4.71.11]) by SOFSVWIN004X.partygaming.local ([10.4.10.230]) via Exchange Front-End Server corp.mail.partygaming.com ([10.3.10.32]) with Microsoft Exchange Server HTTP-DAV ; Wed, 7 Jan 2009 16:52:32 +0000 Received: from daemon2.partygaming.local by corp.mail.partygaming.com; 07 Jan 2009 18:52:32 +0200 From: Vladimir Terziev To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Organization: GB Servicves Ltd. Date: Wed, 07 Jan 2009 18:52:31 +0200 Message-ID: <1231347151.49524.19.camel@daemon2.partygaming.local> MIME-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-OriginalArrivalTime: 07 Jan 2009 16:52:34.0328 (UTC) FILETIME=[56888180:01C970E8] Subject: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 17:10:03 -0000 Hi Hackers, i have a workstation equipped with "Intel 82801G High Definition Audio Controller". The workstation is running FreeBSD 7.0 Release i386. I built a custom kernel and compiled the driver into it, using the following lines in the kernel configuration file: device sound device snd_hda The driver seems to recognize the controller: $ dmesg | grep pcm pcm0: mem 0xe04c0000-0xe04c3fff irq 21 at device 27.0 on pci0 pcm0: [ITHREAD] pcm0: pcm0: This is also confirmed here: $ cat /dev/sndstat=20 FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386) Installed devices: pcm0: at memory 0xe04c0000 irq 21 [20071129_0050] [MPSAFE] (1p:1v/1r:1v channels duplex default) Now the problem ... The strange thing is all audio related devices are missing in /dev $ ls -l /dev/audio* /dev/dsp* ls: /dev/audio*: No such file or directory ls: /dev/dsp*: No such file or directory Respectively i have no working sound support :( Could someone help we with this issue? Any ideas are appreciated! Thanks in advance! Vladimir This email and any attachments are confidential, and may be legally = privileged and protected by copyright. If you are not the intended = recipient dissemination or copying of this email is prohibited. If you = have received this in error, please notify the sender by replying by = email and then delete the email completely from your system.=20 Any views or opinions are solely those of the sender. This = communication is not intended to form a binding contract unless = expressly indicated to the contrary and properly authorised. Any actions = taken on the basis of this email are at the recipient's own risk. From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 17:27:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81CC5106566C for ; Wed, 7 Jan 2009 17:27:25 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mx1.freebsd.org (Postfix) with ESMTP id 5D5958FC16 for ; Wed, 7 Jan 2009 17:27:25 +0000 (UTC) (envelope-from sheldon@sigsegv.ca) Received: by wf-out-1314.google.com with SMTP id 24so11143717wfg.7 for ; Wed, 07 Jan 2009 09:27:24 -0800 (PST) Received: by 10.142.224.5 with SMTP id w5mr1213972wfg.206.1231349244711; Wed, 07 Jan 2009 09:27:24 -0800 (PST) Received: by 10.142.199.18 with HTTP; Wed, 7 Jan 2009 09:27:24 -0800 (PST) Message-ID: Date: Wed, 7 Jan 2009 09:27:24 -0800 From: "Sheldon Givens" To: freebsd-hackers@freebsd.org In-Reply-To: <20090107154854.GC1462@roadrunner.spoerlein.net> MIME-Version: 1.0 References: <20090107125759.GA1462@roadrunner.spoerlein.net> <20090107154854.GC1462@roadrunner.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 17:27:25 -0000 On Wed, Jan 7, 2009 at 7:48 AM, Ulrich Spoerlein wrote: > On Wed, 07.01.2009 at 08:54:41 -0600, Sean C. Farley wrote: > > On Wed, 7 Jan 2009, Ulrich Spoerlein wrote: > > > > > On Tue, 06.01.2009 at 11:52:39 -0800, Sheldon Givens wrote: > > >> Hello everyone, > > >> > > >> It occurs to me that FreeBSD ps lacks the ability to disable header. > > >> This seems like a really obvious feature, and I may have simply > > >> missed it's existence (despite my relentlessly searching the man > > >> page) but here is a small patch that sets the flag 'n' to disable > > >> header output. > > > > > > You've missed it, probably because it is non-obvious: > > > > > > % ps -p 1 -o pid,cpu > > > PID CPU > > > 1 0 > > > % ps -p 1 -o pid= -o cpu= > > > 1 0 > > > % > > > > Another way: > > ps | tail +2 > > I'm not sure about the portability of tail +N, I seem to remember that > AIX doesn't support it. Therefore I'd rather use > > % ps | sed 1d > > which is way more portable. > > Cheers, > Ulrich Spoerlein > -- > It is better to remain silent and be thought a fool, > than to speak, and remove all doubt. > Hello everybody, Ulrich: I appreciate your solution, but it ends up being a pretty ridiculous command when you start desiring 6 or 7 fields. Sean: Ulrich is right in saying that tail +val is unreliable when coding for portability. And I guess I just feel like running a second command to do what should be possible to do with the first command (and is, on many platforms. ps --no-headers on linux for example) is a problem and presents opportunity for continued refinement of the utility. Sheldon From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 18:15:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 417C2106566C for ; Wed, 7 Jan 2009 18:15:37 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (hunter.sisis.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id A11EC8FC1A for ; Wed, 7 Jan 2009 18:15:36 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id TAA29297; Wed, 7 Jan 2009 19:01:57 +0100 (CET) (envelope-from matthias.apitz@oclc.org) Received: from ppp-88-217-52-120.dynamic.mnet-online.de(88.217.52.120) by hunter.Sisis.de via smap (V2.1) id xma029279; Wed, 7 Jan 09 19:01:29 +0100 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id n07IAWpv002863; Wed, 7 Jan 2009 19:10:32 +0100 (CET) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Wed, 7 Jan 2009 19:10:32 +0100 From: Matthias Apitz To: Vladimir Terziev Message-ID: <20090107181032.GA2808@rebelion.Sisis.de> References: <1231347151.49524.19.camel@daemon2.partygaming.local> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1231347151.49524.19.camel@daemon2.partygaming.local> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-STABLE (i386) Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:15:37 -0000 El dнa Wednesday, January 07, 2009 a las 06:52:31PM +0200, Vladimir Terziev escribiу: ... > device sound > device snd_hda > > > The driver seems to recognize the controller: > > $ dmesg | grep pcm > > pcm0: mem > 0xe04c0000-0xe04c3fff irq 21 at device 27.0 on pci0 > pcm0: [ITHREAD] > pcm0: > pcm0: > > > This is also confirmed here: > > $ cat /dev/sndstat > FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386) > Installed devices: > pcm0: at memory > 0xe04c0000 irq 21 [20071129_0050] [MPSAFE] (1p:1v/1r:1v channels duplex > default) all fine until here; > > Now the problem ... > The strange thing is all audio related devices are missing in /dev > > $ ls -l /dev/audio* /dev/dsp* > ls: /dev/audio*: No such file or directory > ls: /dev/dsp*: No such file or directory fine too; you will not see /dev/dsp* with ls(1), just open the device /dev/dsp with some application and it will appear; > Respectively i have no working sound support :( what you mean exactly with 'i have no working sound support'? try changing the values with the mixer(1) command if no sound is coming out from apps; matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ SPAMer of the year: Subject: Alle Software ist Deutsche Sprachen >From: -40 % die Neujahrsaktion From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 18:33:14 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 991EE1065674 for ; Wed, 7 Jan 2009 18:33:14 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6E2EA8FC14 for ; Wed, 7 Jan 2009 18:33:14 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.23] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id n07IXBtv045338; Wed, 7 Jan 2009 10:33:11 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4964F565.2080201@freebsd.org> Date: Wed, 07 Jan 2009 10:33:09 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Kennaway References: <20081230004747.GA55542@lorvorc.mips.inka.de> <20081230020524.2563a6ac@gluon> <4961294D.8080200@FreeBSD.org> In-Reply-To: <4961294D.8080200@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Christian Weisgerber Subject: Re: lzo2 shows insane speed gap X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:33:15 -0000 Kris Kennaway wrote: > Christian Weisgerber wrote: >> Bruce Cran wrote: >> >>> I'm running 8.0-CURRENT amd64 here on a Turion64 X2 machine. Without >>> malloc debugging (malloc.conf -> aj) 'make test' takes 25s; after >>> removing malloc.conf thus turning on debugging, it takes over 10 >>> minutes. >> ... >> >> But still. Two orders of magnitude? That is a pathological case. > > Probably it means that lzo2 is doing pathological numbers of mallocs. Rather, the lzo2 test suite. Test suites do tend to hammer malloc() pretty hard. I see similar variations for the libarchive test suite with malloc debugging. Tim From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 7 18:58:49 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41E6E106566B for ; Wed, 7 Jan 2009 18:58:49 +0000 (UTC) (envelope-from xistence@0x58.com) Received: from mailexchange.osnn.net (1e.66.5646.static.theplanet.com [70.86.102.30]) by mx1.freebsd.org (Postfix) with SMTP id 0CCF28FC12 for ; Wed, 7 Jan 2009 18:58:48 +0000 (UTC) (envelope-from xistence@0x58.com) Received: (qmail 66076 invoked by uid 0); 7 Jan 2009 18:32:07 -0000 Received: from unknown (HELO ?10.10.10.248?) (xistence@0x58.com@68.3.6.222) by mailexchange.osnn.net with SMTP; 7 Jan 2009 18:32:07 -0000 Message-Id: <5E170DCF-F139-4CBC-A343-EA91CE3BD458@0x58.com> From: Bert JW Regeer To: Sheldon Givens In-Reply-To: Content-Type: multipart/signed; boundary=Apple-Mail-2--357143904; micalg=sha1; protocol="application/pkcs7-signature" Mime-Version: 1.0 (Apple Message framework v930.3) Date: Wed, 7 Jan 2009 11:32:06 -0700 References: <20090107125759.GA1462@roadrunner.spoerlein.net> <20090107154854.GC1462@roadrunner.spoerlein.net> X-Mailer: Apple Mail (2.930.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:58:49 -0000 --Apple-Mail-2--357143904 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On Jan 7, 2009, at 10:27 , Sheldon Givens wrote: > On Wed, Jan 7, 2009 at 7:48 AM, Ulrich Spoerlein > wrote: > >> On Wed, 07.01.2009 at 08:54:41 -0600, Sean C. Farley wrote: >>> On Wed, 7 Jan 2009, Ulrich Spoerlein wrote: >>> >>>> On Tue, 06.01.2009 at 11:52:39 -0800, Sheldon Givens wrote: >>>>> Hello everyone, >>>>> >>>>> It occurs to me that FreeBSD ps lacks the ability to disable >>>>> header. >>>>> This seems like a really obvious feature, and I may have simply >>>>> missed it's existence (despite my relentlessly searching the man >>>>> page) but here is a small patch that sets the flag 'n' to disable >>>>> header output. >>>> >>>> You've missed it, probably because it is non-obvious: >>>> >>>> % ps -p 1 -o pid,cpu >>>> PID CPU >>>> 1 0 >>>> % ps -p 1 -o pid= -o cpu= >>>> 1 0 >>>> % >>> >>> Another way: >>> ps | tail +2 >> >> I'm not sure about the portability of tail +N, I seem to remember >> that >> AIX doesn't support it. Therefore I'd rather use >> >> % ps | sed 1d >> >> which is way more portable. The three solutions above all work on my OpenSolaris machine (other than cpu=, since the field is named pcpu). I don't currently have access to HP-UX or AIX to test which do and do not work. >> >> >> Cheers, >> Ulrich Spoerlein >> -- >> It is better to remain silent and be thought a fool, >> than to speak, and remove all doubt. >> > > Hello everybody, > > Ulrich: I appreciate your solution, but it ends up being a pretty > ridiculous > command when you start desiring 6 or 7 fields. Yes, which is why the sed/tail will do exactly what you want. UNIX was built on the fact that small tools together will work together to do something larger, no need to move all of the functionality into one tool, that creates maintenance nightmares and just complicates otherwise simple code. > > > > Sean: Ulrich is right in saying that tail +val is unreliable when > coding for > portability. > > > And I guess I just feel like running a second command to do what > should be > possible to do with the first command (and is, on many platforms. ps > --no-headers on linux for example) is a problem and presents > opportunity for > continued refinement of the utility. What other platforms besides Linux distributions? Just because they exist by the hundreds does not mean they are different platforms. xistence@Keyhole.network.lan:~$ ps -AflZ --no-headers ps: illegal option -- no-headers usage: ps [ -aAdefHlcjLPyZ ] [ -o format ] [ -t termlist ] [ -u userlist ] [ -U userlist ] [ -G grouplist ] [ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ] [-h lgrplist] 'format' is one or more of: user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid f s c lwp nlwp psr tty addr wchan fname comm args projid project pset lgrp xistence@Keyhole.network.lan:~$ uname -a SunOS Keyhole.network.lan 5.11 snv_101b i86pc i386 i86pc Solaris I also read the entire man page for ps that is included and could not find a single way to not include a header by using a simple flag, in the man page they list the -o format as the only way to remove the header. HP-UX man page does not include an option either, besides the aforementioned -o format option: http://docs.hp.com/en/B2355-90690/ps.1.html Same goes for IBM's AIX system: http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds4/ps.htm Just because Linux has it does not mean it is an improvement that should be imported. I think it is rather dumb idea really. What if in the future we add a new field to the output of ps to give more information (on Solaris for example, the -Z function lists what Zone the command is running in (global, or non-global)), this changes the amounts of fields that are listed. Now lets say some shell script that was written a few years ago requires a certain option to be located in field 7, and now that is moved over to field 8 it could cause all kinds of issues, instead if the command is written out with -o pid=, it is static and it won't change even if a new field is introduced to ps, thereby decreasing future issues, and increasing portability since you can select only the fields you require, making it more portable (if using standardised fields) because now the field will always be in the same place, no matter the platform. > > > Sheldon Linuxisms that are bad should not be imported into FreeBSD. There is a valid and documented way to suppress the header information using ps, use it. If you are using this in a script of some sort, writing it out once will save you a lot of headache and trouble later. Bert JW Regeer --Apple-Mail-2--357143904-- From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 07:07:10 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2DD51065670 for ; Thu, 8 Jan 2009 07:07:10 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) Received: from mx1.corp.idatanet.com (mx1.corp.idatanet.com [85.115.136.170]) by mx1.freebsd.org (Postfix) with ESMTP id 624DC8FC1B for ; Thu, 8 Jan 2009 07:07:09 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168 Received: from gibsvwin008.partygaming.local ([10.3.10.32]) by mx1.corp.idatanet.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Jan 2009 08:06:47 +0100 Received: from SOFSVWIN004X.partygaming.local ([10.4.10.228]) by gibsvwin008.partygaming.local with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jan 2009 08:06:48 +0100 Received: from 10.4.71.11 ([10.4.71.11]) by SOFSVWIN004X.partygaming.local ([10.4.10.230]) via Exchange Front-End Server corp.mail.partygaming.com ([10.3.10.32]) with Microsoft Exchange Server HTTP-DAV ; Thu, 8 Jan 2009 07:06:46 +0000 Received: from daemon2.partygaming.local by corp.mail.partygaming.com; 08 Jan 2009 09:06:46 +0200 From: Vladimir Terziev To: Matthias Apitz In-Reply-To: <20090107181032.GA2808@rebelion.Sisis.de> References: <20090107181032.GA2808@rebelion.Sisis.de> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Organization: GB Servicves Ltd. Date: Thu, 08 Jan 2009 09:06:45 +0200 Message-ID: <1231398405.2842.1.camel@daemon2.partygaming.local> MIME-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-OriginalArrivalTime: 08 Jan 2009 07:06:48.0391 (UTC) FILETIME=[AC55DD70:01C9715F] Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 07:07:11 -0000 Hi Matthias, i configured Ekiga and during the configuration process it didn't find any Audio device, so i think /dev/dsp* devices must be present, isn't it ? Regards, Vladimir On Wed, 2009-01-07 at 20:10 +0200, Matthias Apitz wrote: > El d=EDa Wednesday, January 07, 2009 a las 06:52:31PM +0200, Vladimir > Terziev escribi=F3: >=20 > ... >=20 > > device sound > > device snd_hda > > > > > > The driver seems to recognize the controller: > > > > $ dmesg | grep pcm > > > > pcm0: mem > > 0xe04c0000-0xe04c3fff irq 21 at device 27.0 on pci0 > > pcm0: [ITHREAD] > > pcm0: > > pcm0: > > > > > > This is also confirmed here: > > > > $ cat /dev/sndstat > > FreeBSD Audio Driver (newpcm: 32bit 2007061600/i386) > > Installed devices: > > pcm0: at memory > > 0xe04c0000 irq 21 [20071129_0050] [MPSAFE] (1p:1v/1r:1v channels > duplex > > default) >=20 > all fine until here; >=20 > > > > Now the problem ... > > The strange thing is all audio related devices are missing in /dev > > > > $ ls -l /dev/audio* /dev/dsp* > > ls: /dev/audio*: No such file or directory > > ls: /dev/dsp*: No such file or directory >=20 > fine too; you will not see /dev/dsp* with ls(1), just open the device > /dev/dsp with some application and it will appear; >=20 > > Respectively i have no working sound support :( >=20 > what you mean exactly with 'i have no working sound support'? > try changing the values with the mixer(1) command if no sound is > coming > out from apps; >=20 > matthias > -- > Matthias Apitz > Manager Technical Support - OCLC GmbH > Gruenwalder Weg 28g - 82041 Oberhaching - Germany > t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 > e - w http://www.oclc.org/ > http://www.UnixArea.de/ > b http://gurucubano.blogspot.com/ >=20 > SPAMer of the year: Subject: Alle Software ist Deutsche Sprachen > >From: -40 % die Neujahrsaktion >=20 >=20 This email and any attachments are confidential, and may be legally = privileged and protected by copyright. If you are not the intended = recipient dissemination or copying of this email is prohibited. If you = have received this in error, please notify the sender by replying by = email and then delete the email completely from your system.=20 Any views or opinions are solely those of the sender. This = communication is not intended to form a binding contract unless = expressly indicated to the contrary and properly authorised. Any actions = taken on the basis of this email are at the recipient's own risk. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 08:16:10 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 066B9106566C for ; Thu, 8 Jan 2009 08:16:10 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id 801318FC1B for ; Thu, 8 Jan 2009 08:16:09 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180182004.adsl.alicedsl.de [85.180.182.4]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id n088G6KC084048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 8 Jan 2009 09:16:07 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n08878Bn023924 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 8 Jan 2009 09:07:08 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n08878Wp023923; Thu, 8 Jan 2009 09:07:08 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Thu, 8 Jan 2009 09:07:08 +0100 From: Ulrich Spoerlein To: Vladimir Terziev Message-ID: <20090108080708.GE1462@roadrunner.spoerlein.net> Mail-Followup-To: Vladimir Terziev , Matthias Apitz , freebsd-hackers@freebsd.org References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1231398405.2842.1.camel@daemon2.partygaming.local> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org, Matthias Apitz Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 08:16:10 -0000 On Thu, 08.01.2009 at 09:06:45 +0200, Vladimir Terziev wrote: > Hi Matthias, > > i configured Ekiga and during the configuration process it didn't find > any Audio device, so i think /dev/dsp* devices must be present, isn't > it ? Please run % cat /dev/sndstat % ls -l /dev/dsp0 /dev/dsp0.0 The reason you are not seeing them with 'ls /dev/dsp*' is because devfs is creating the nodes when they are open(2)'ed. Using shell globbing will search the output of readdir(2) for matches to dsp* where devfs has no way of dynamically creating nodes (which ones should it create anyway?) This is a FAQ really. Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 08:29:12 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2130C1065745 for ; Thu, 8 Jan 2009 08:29:12 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) Received: from mx1.corp.idatanet.com (mx1.corp.idatanet.com [85.115.136.170]) by mx1.freebsd.org (Postfix) with ESMTP id 931DB8FC13 for ; Thu, 8 Jan 2009 08:29:11 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168 Received: from gibsvwin008.partygaming.local ([10.3.10.32]) by mx1.corp.idatanet.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Jan 2009 09:28:58 +0100 Received: from SOFSVWIN004X.partygaming.local ([10.4.10.228]) by gibsvwin008.partygaming.local with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jan 2009 09:29:00 +0100 Received: from 10.4.71.11 ([10.4.71.11]) by SOFSVWIN004X.partygaming.local ([10.4.10.230]) via Exchange Front-End Server corp.mail.partygaming.com ([10.3.10.32]) with Microsoft Exchange Server HTTP-DAV ; Thu, 8 Jan 2009 08:28:58 +0000 Received: from daemon2.partygaming.local by corp.mail.partygaming.com; 08 Jan 2009 10:28:57 +0200 From: Vladimir Terziev To: Ulrich Spoerlein In-Reply-To: <20090108080708.GE1462@roadrunner.spoerlein.net> References: <20090108080708.GE1462@roadrunner.spoerlein.net> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Organization: GB Servicves Ltd. Date: Thu, 08 Jan 2009 10:28:57 +0200 Message-ID: <1231403337.2842.7.camel@daemon2.partygaming.local> MIME-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-OriginalArrivalTime: 08 Jan 2009 08:29:00.0062 (UTC) FILETIME=[27D723E0:01C9716B] Cc: freebsd-hackers@freebsd.org, Matthias Apitz Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 08:29:13 -0000 Thank you very much Ulrich! After running "ls -l /dev/dsp0 /dev/dsp0.0" the devices are present and Ekiga has found them. The reasonable question is why Ekiga was not able to discover them without the hack you suggested. Regards, Vladimir On Thu, 2009-01-08 at 10:07 +0200, Ulrich Spoerlein wrote: > On Thu, 08.01.2009 at 09:06:45 +0200, Vladimir Terziev wrote: > > Hi Matthias, > > > > i configured Ekiga and during the configuration process it didn't > find > > any Audio device, so i think /dev/dsp* devices must be present, > isn't > > it ? >=20 > Please run > % cat /dev/sndstat > % ls -l /dev/dsp0 /dev/dsp0.0 >=20 > The reason you are not seeing them with 'ls /dev/dsp*' is because > devfs > is creating the nodes when they are open(2)'ed. Using shell globbing > will > search the output of readdir(2) for matches to dsp* where devfs has no > way of dynamically creating nodes (which ones should it create > anyway?) >=20 > This is a FAQ really. >=20 > Cheers, > Ulrich Spoerlein > -- > It is better to remain silent and be thought a fool, > than to speak, and remove all doubt. >=20 >=20 This email and any attachments are confidential, and may be legally = privileged and protected by copyright. If you are not the intended = recipient dissemination or copying of this email is prohibited. If you = have received this in error, please notify the sender by replying by = email and then delete the email completely from your system.=20 Any views or opinions are solely those of the sender. This = communication is not intended to form a binding contract unless = expressly indicated to the contrary and properly authorised. Any actions = taken on the basis of this email are at the recipient's own risk. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 08:42:23 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 658B8106566B for ; Thu, 8 Jan 2009 08:42:23 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) Received: from mx1.corp.idatanet.com (mx1.corp.idatanet.com [85.115.136.170]) by mx1.freebsd.org (Postfix) with ESMTP id D84E68FC18 for ; Thu, 8 Jan 2009 08:42:22 +0000 (UTC) (envelope-from vladimirt@PartyGaming.com) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168 Received: from gibsvwin008.partygaming.local ([10.3.10.32]) by mx1.corp.idatanet.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Jan 2009 09:42:16 +0100 Received: from GIBSVWIN004.partygaming.local ([10.3.10.26]) by gibsvwin008.partygaming.local with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jan 2009 09:42:18 +0100 Received: from SOFSVWIN004X.partygaming.local ([10.4.10.228]) by GIBSVWIN004.partygaming.local with Microsoft SMTPSVC(6.0.3790.1830); Thu, 8 Jan 2009 09:42:17 +0100 Received: from 10.4.71.11 ([10.4.71.11]) by SOFSVWIN004X.partygaming.local ([10.4.10.230]) via Exchange Front-End Server corp.mail.partygaming.com ([10.3.10.32]) with Microsoft Exchange Server HTTP-DAV ; Thu, 8 Jan 2009 08:42:15 +0000 Received: from daemon2.partygaming.local by corp.mail.partygaming.com; 08 Jan 2009 10:42:15 +0200 From: Vladimir Terziev To: Matthias Apitz In-Reply-To: <20090108083106.GA1717@rebelion.Sisis.de> References: <20090108083106.GA1717@rebelion.Sisis.de> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable Organization: GB Servicves Ltd. Date: Thu, 08 Jan 2009 10:42:14 +0200 Message-ID: <1231404134.2842.10.camel@daemon2.partygaming.local> MIME-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-OriginalArrivalTime: 08 Jan 2009 08:42:17.0714 (UTC) FILETIME=[03472D20:01C9716D] Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 08:42:23 -0000 Hi Matthias, the version of Ekiga i'm exploring is built from ports and it's ekiga-2.0.11_4 . Regards, Vladimir On Thu, 2009-01-08 at 10:31 +0200, Matthias Apitz wrote: > El d=EDa Thursday, January 08, 2009 a las 09:06:45AM +0200, Vladimir > Terziev escribi=F3: >=20 > > Hi Matthias, > > > > i configured Ekiga and during the configuration process it didn't > find > > any Audio device, so i think /dev/dsp* devices must be present, > isn't > > it ? > > > > Regards, > > > > Vladimir >=20 > Which version of Ekiga you are using? In the past I've send patches to > the Ekiga maintainer to make /dev/dsp working. I don't know if they > made > it, for example, into the version the 7.0 port is using. >=20 > matthias >=20 > -- > Matthias Apitz > Manager Technical Support - OCLC GmbH > Gruenwalder Weg 28g - 82041 Oberhaching - Germany > t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 > e - w http://www.oclc.org/ > http://www.UnixArea.de/ > b http://gurucubano.blogspot.com/ >=20 > SPAMer of the year: Subject: Alle Software ist Deutsche Sprachen > >From: -40 % die Neujahrsaktion >=20 >=20 This email and any attachments are confidential, and may be legally = privileged and protected by copyright. If you are not the intended = recipient dissemination or copying of this email is prohibited. If you = have received this in error, please notify the sender by replying by = email and then delete the email completely from your system.=20 Any views or opinions are solely those of the sender. This = communication is not intended to form a binding contract unless = expressly indicated to the contrary and properly authorised. Any actions = taken on the basis of this email are at the recipient's own risk. From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 08:43:12 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14603106564A for ; Thu, 8 Jan 2009 08:43:12 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id A13F38FC13 for ; Thu, 8 Jan 2009 08:43:11 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([10.0.1.29]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Thu, 8 Jan 2009 09:31:07 +0100 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id n088V6aj001787; Thu, 8 Jan 2009 09:31:06 +0100 (CET) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Thu, 8 Jan 2009 09:31:06 +0100 From: Matthias Apitz To: Vladimir Terziev Message-ID: <20090108083106.GA1717@rebelion.Sisis.de> References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1231398405.2842.1.camel@daemon2.partygaming.local> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-STABLE (i386) X-OriginalArrivalTime: 08 Jan 2009 08:31:07.0884 (UTC) FILETIME=[74073AC0:01C9716B] Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 08:43:12 -0000 El dнa Thursday, January 08, 2009 a las 09:06:45AM +0200, Vladimir Terziev escribiу: > Hi Matthias, > > i configured Ekiga and during the configuration process it didn't find > any Audio device, so i think /dev/dsp* devices must be present, isn't > it ? > > Regards, > > Vladimir Which version of Ekiga you are using? In the past I've send patches to the Ekiga maintainer to make /dev/dsp working. I don't know if they made it, for example, into the version the 7.0 port is using. matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ SPAMer of the year: Subject: Alle Software ist Deutsche Sprachen >From: -40 % die Neujahrsaktion From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 09:43:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A69FC1065677 for ; Thu, 8 Jan 2009 09:43:59 +0000 (UTC) (envelope-from aksoy.for.research@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.189]) by mx1.freebsd.org (Postfix) with ESMTP id 35D068FC56 for ; Thu, 8 Jan 2009 09:43:59 +0000 (UTC) (envelope-from aksoy.for.research@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so5857106fkk.11 for ; Thu, 08 Jan 2009 01:43:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=1UCvuoikmQdjrQuPv+jxj2yl1r9aJawkAL0ZJyq5qXk=; b=NkeHcM2sP8n+59ufOFQVyvhER2OUvub5F98Uv02zbhZ6uQd+cVOXWfAduRXY6qeUPg DVprhKEFRIXbPV7Hj3BoBrW9yjBUCV38KS7TeFJwomOj7azCP4Y7Er4au9HRer/cRo1p SoIuzVXa1E+MiFnMMbYySSIyGXz+hcV/96cug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=mJZwAw9afkU1Xz4/mLTbXoXTXX30dy71JJYlrRtBbgcpD2ZzmtGuDM4N3hCsH6vehR n+Si1woB8Uh5neABM1pyx4aItI25OTD5pKwVZ+2CZBQQeRtYxrcTV6OOzUPoH1XvjUQ+ vMLGVyDrwaRmBgH8FZCHnt3U8iOmgwBv5ufXg= Received: by 10.181.220.19 with SMTP id x19mr9258772bkq.136.1231406588680; Thu, 08 Jan 2009 01:23:08 -0800 (PST) Received: by 10.181.153.11 with HTTP; Thu, 8 Jan 2009 01:23:08 -0800 (PST) Message-ID: <14ded62c0901080123u7268055epb3e17d84aa757051@mail.gmail.com> Date: Thu, 8 Jan 2009 04:23:08 -0500 From: "=?ISO-8859-1?Q?Mehmet_Ali_Aksoy_T=DCYS=DCZ?=" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Threads and SMP kernel scheduling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 09:44:00 -0000 Hi all, After I had a bit googling I got confused. My questions are simple and they are as follows : 1-) "Are pthreads (or threads in general) of one process scheduled to different cores on multi-core systems running Linux or BSD?" 2-) What if there are multiple processes which have multiple threads? Does it change the answer of (1)? I found some answers but they are not sharp. Somebody says "can be scheduled" but "can be" is not a precise answer (in my opinion.) Thanks everybody in advance. Mehmet From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 14:08:12 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68F8F1065676 for ; Thu, 8 Jan 2009 14:08:12 +0000 (UTC) (envelope-from ulf.lilleengen@gmail.com) Received: from bene2.itea.ntnu.no (bene2.itea.ntnu.no [IPv6:2001:700:300:3::57]) by mx1.freebsd.org (Postfix) with ESMTP id 0CBB28FC35 for ; Thu, 8 Jan 2009 14:08:11 +0000 (UTC) (envelope-from ulf.lilleengen@gmail.com) Received: from localhost (localhost [127.0.0.1]) by bene2.itea.ntnu.no (Postfix) with ESMTP id 9197790004; Thu, 8 Jan 2009 15:08:09 +0100 (CET) Received: from carrot (unknown [IPv6:2001:700:300:3::184]) by bene2.itea.ntnu.no (Postfix) with ESMTP id 396CB90002; Thu, 8 Jan 2009 15:08:09 +0100 (CET) Date: Thu, 8 Jan 2009 16:08:08 +0100 From: Ulf Lilleengen To: Mehmet Ali Aksoy =?iso-8859-1?B?VNxZU9xa?= Message-ID: <20090108150807.GA1264@carrot.pvv.ntnu.no> References: <14ded62c0901080123u7268055epb3e17d84aa757051@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <14ded62c0901080123u7268055epb3e17d84aa757051@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Debian amavisd-new at bene2.itea.ntnu.no Cc: freebsd-hackers@freebsd.org Subject: Re: Threads and SMP kernel scheduling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 14:08:12 -0000 On Thu, Jan 08, 2009 at 04:23:08AM -0500, Mehmet Ali Aksoy TЬYSЬZ wrote: > Hi all, > > After I had a bit googling I got confused. > > My questions are simple and they are as follows : > > 1-) "Are pthreads (or threads in general) of one process scheduled to > different cores on multi-core systems running Linux or BSD?" > The standard threading library in FreeBSD will use a 1:1 mapping between userland threads(pthreads) and kernel threads. This means that each thread may run on a different core than other threads. > 2-) What if there are multiple processes which have multiple threads? Does > it change the answer of (1)? No, the same mapping applies. Although threads of one process may preferably run on the same core, each thread of a process may run on any of the cores available. > > I found some answers but they are not sharp. Somebody says "can be > scheduled" but "can be" is not a precise answer (in my opinion.) Well, it means that there are more factors deciding where a thread is put. If you look at a factor such as affinity, one thread may preferable be scheduled to the same core since the cache may contain data relevant to the thread. > > Thanks everybody in advance. > Hope everything is at least a bit clearer. -- Ulf Lilleengen From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 14:16:28 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7A9D106566C for ; Thu, 8 Jan 2009 14:16:27 +0000 (UTC) (envelope-from aksoy.for.research@gmail.com) Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by mx1.freebsd.org (Postfix) with ESMTP id 661498FC17 for ; Thu, 8 Jan 2009 14:16:27 +0000 (UTC) (envelope-from aksoy.for.research@gmail.com) Received: by bwz13 with SMTP id 13so806626bwz.19 for ; Thu, 08 Jan 2009 06:16:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=OsKrMIVQlswR782QVxZxvLMuty8fSOoTRh4aF7fTfmA=; b=C1tjnYxEcZ2wvMdW0IJh4+A7i9kiUfJ4pRbHF0UIjWajrFZE9Q4WcR2WTEMhdFuL7e kI1AVXk89PA8EEIF1oids96zEgaUSG82z8M02fpXMchf3Ksi7sM9FJEA8fwuomRviJo+ A0uTQp9+4pj25M1YGaXlbcse56SNUuinkh6BQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=DPyE0tsZd8OuBj1Q7W7d/EcQsR4oOMqrNmBDa/+wCunzDELgaMgFiah1ACiP75E9Gp D0uvKC2OGOmguTsMeijtELdEJxjyZA06kDbeXNfkEfK0OF2gSxD4xm8jD0JUZav1SQCS mJG4ULyQ7qD2Iq0/cIJbIWW9dzJVzgqU6kpsk= Received: by 10.181.149.7 with SMTP id b7mr9335540bko.210.1231424186197; Thu, 08 Jan 2009 06:16:26 -0800 (PST) Received: by 10.181.153.11 with HTTP; Thu, 8 Jan 2009 06:16:26 -0800 (PST) Message-ID: <14ded62c0901080616o68bad18cg256fa10f12c4560b@mail.gmail.com> Date: Thu, 8 Jan 2009 09:16:26 -0500 From: "=?ISO-8859-1?Q?Mehmet_Ali_Aksoy_T=DCYS=DCZ?=" To: freebsd-hackers@freebsd.org In-Reply-To: <20090108150807.GA1264@carrot.pvv.ntnu.no> MIME-Version: 1.0 References: <14ded62c0901080123u7268055epb3e17d84aa757051@mail.gmail.com> <20090108150807.GA1264@carrot.pvv.ntnu.no> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Threads and SMP kernel scheduling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 14:16:28 -0000 Hi, Thank you very much for your response Ulf. It is a very clear answer. Thank= s again. By the way, any information for the Linux case? Regards, Mehmet On Thu, Jan 8, 2009 at 10:08 AM, Ulf Lilleengen w= rote: > On Thu, Jan 08, 2009 at 04:23:08AM -0500, Mehmet Ali Aksoy T=DCYS=DCZ wro= te: > > Hi all, > > > > After I had a bit googling I got confused. > > > > My questions are simple and they are as follows : > > > > 1-) "Are pthreads (or threads in general) of one process scheduled to > > different cores on multi-core systems running Linux or BSD?" > > > The standard threading library in FreeBSD will use a 1:1 mapping between > userland threads(pthreads) and kernel threads. This means that each threa= d > may run on a different core than other threads. > > > 2-) What if there are multiple processes which have multiple threads? > Does > > it change the answer of (1)? > No, the same mapping applies. Although threads of one process may > preferably > run on the same core, each thread of a process may run on any of the core= s > available. > > > > > I found some answers but they are not sharp. Somebody says "can be > > scheduled" but "can be" is not a precise answer (in my opinion.) > Well, it means that there are more factors deciding where a thread is put= . > If > you look at a factor such as affinity, one thread may preferable be > scheduled > to the same core since the cache may contain data relevant to the thread. > > > > > Thanks everybody in advance. > > > Hope everything is at least a bit clearer. > > -- > Ulf Lilleengen > From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 8 20:59:18 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D7311065695 for ; Thu, 8 Jan 2009 20:59:18 +0000 (UTC) (envelope-from ulf.lilleengen@gmail.com) Received: from bene2.itea.ntnu.no (bene2.itea.ntnu.no [IPv6:2001:700:300:3::57]) by mx1.freebsd.org (Postfix) with ESMTP id 8E1668FC0C for ; Thu, 8 Jan 2009 20:59:17 +0000 (UTC) (envelope-from ulf.lilleengen@gmail.com) Received: from localhost (localhost [127.0.0.1]) by bene2.itea.ntnu.no (Postfix) with ESMTP id 210E090003; Thu, 8 Jan 2009 21:59:16 +0100 (CET) Received: from carrot (unknown [IPv6:2001:700:300:3::184]) by bene2.itea.ntnu.no (Postfix) with ESMTP id B239790002; Thu, 8 Jan 2009 21:59:15 +0100 (CET) Date: Thu, 8 Jan 2009 22:59:17 +0100 From: Ulf Lilleengen To: Mehmet Ali Aksoy =?iso-8859-1?B?VNxZU9xa?= Message-ID: <20090108215917.GA1375@carrot.default.net> References: <14ded62c0901080123u7268055epb3e17d84aa757051@mail.gmail.com> <20090108150807.GA1264@carrot.pvv.ntnu.no> <14ded62c0901080616o68bad18cg256fa10f12c4560b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <14ded62c0901080616o68bad18cg256fa10f12c4560b@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Debian amavisd-new at bene2.itea.ntnu.no Cc: freebsd-hackers@freebsd.org Subject: Re: Threads and SMP kernel scheduling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 20:59:19 -0000 On tor, jan 08, 2009 at 09:16:26am -0500, Mehmet Ali Aksoy TЬYSЬZ wrote: > Hi, > > Thank you very much for your response Ulf. It is a very clear answer. Thanks > again. > > By the way, any information for the Linux case? > I think this applies to Linux as well, since it's NPTL(Native Posix Threading Library) uses a 1:1 mapping also. I'm not 100% sure, so you might want to ask on a linux mailing list. -- Ulf Lilleengen From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 03:30:09 2009 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 849EF1065670; Fri, 9 Jan 2009 03:30:09 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green.homeunix.org [66.92.150.152]) by mx1.freebsd.org (Postfix) with ESMTP id 3C0278FC0C; Fri, 9 Jan 2009 03:30:08 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (obama@localhost [127.0.0.1]) by green.homeunix.org (8.14.3/8.14.1) with ESMTP id n093JiIA036464; Thu, 8 Jan 2009 22:19:44 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.14.3/8.14.1/Submit) id n093Jhad036463; Thu, 8 Jan 2009 22:19:43 -0500 (EST) (envelope-from green) Date: Thu, 8 Jan 2009 22:19:43 -0500 From: Brian Fundakowski Feldman To: hackers@FreeBSD.org, jasone@FreeBSD.org Message-ID: <20090109031942.GA2825@green.homeunix.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="VbJkn9YxBvnuCH5J" Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:30:09 -0000 --VbJkn9YxBvnuCH5J Content-Type: text/plain; charset=us-ascii Content-Disposition: inline It appears that the post-fork hooks for malloc(3) are somewhat broken such that when a threaded program forks, and then its child attempts to go threaded, it deadlocks because it already appears to have locks held. I am not familiar enough with the current libthr/libc/rtld-elf interaction that I've been able to fix it myself, unfortunately. I discovered this today upgrading my work box from 7.0 to 7.1, but I can easily reproduce it at home on a stale -CURRENT as well. Testing on an OS X box to make sure, the regression test does exit 0 there. Has anyone happened to have fixed this already locally? -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ --VbJkn9YxBvnuCH5J-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 03:58:40 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF345106564A; Fri, 9 Jan 2009 03:58:40 +0000 (UTC) (envelope-from eischen@vigrid.com) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6B4878FC1C; Fri, 9 Jan 2009 03:58:40 +0000 (UTC) (envelope-from eischen@vigrid.com) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n093iKDP001057; Thu, 8 Jan 2009 22:44:20 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Thu, 08 Jan 2009 22:44:20 -0500 (EST) Date: Thu, 8 Jan 2009 22:44:20 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Brian Fundakowski Feldman In-Reply-To: <20090109031942.GA2825@green.homeunix.org> Message-ID: References: <20090109031942.GA2825@green.homeunix.org> MIME-Version: 1.0 Content-Type: MULTIPART/Mixed; boundary=VbJkn9YxBvnuCH5J Content-ID: Content-Disposition: inline Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:58:40 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --VbJkn9YxBvnuCH5J Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-ID: Content-Disposition: inline On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: > It appears that the post-fork hooks for malloc(3) are somewhat broken such that > when a threaded program forks, and then its child attempts to go threaded, it > deadlocks because it already appears to have locks held. I am not familiar > enough with the current libthr/libc/rtld-elf interaction that I've been able > to fix it myself, unfortunately. There's really nothing to fix - according to POSIX you are only allowed to call async-signal-safe functions in the child forked from a threaded process. If you are trying to do anything other than that, it may or may not work on FreeBSD, but it is not guaranteed and is not portable. The rationale is that what is the point of forking and creating more threads, when you can just as easily create more threads in the parent without forking? The only reason to fork from a threaded process is to call one of the exec() functions. -- DE --VbJkn9YxBvnuCH5J Content-Type: TEXT/PLAIN; charset=us-ascii Content-ID: Content-Description: Content-Disposition: inline _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --VbJkn9YxBvnuCH5J-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 04:22:11 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87C8D1065674 for ; Fri, 9 Jan 2009 04:22:11 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email1.allantgroup.com (email1.emsphone.com [199.67.51.115]) by mx1.freebsd.org (Postfix) with ESMTP id 38EB08FC22 for ; Fri, 9 Jan 2009 04:22:11 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan-a.emsphone.com [199.67.51.107]) by email1.allantgroup.com (8.14.0/8.14.0) with ESMTP id n094BanW044874 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Jan 2009 22:11:37 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id n094BaJa052313 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 Jan 2009 22:11:36 -0600 (CST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id n094AcUm051455; Thu, 8 Jan 2009 22:10:38 -0600 (CST) (envelope-from dan) Date: Thu, 8 Jan 2009 22:10:38 -0600 From: Dan Nelson To: Daniel Eischen Message-ID: <20090109041038.GA52729@dan.emsphone.com> References: <20090109031942.GA2825@green.homeunix.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV version 0.94.1, clamav-milter version 0.94.1 on email1.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (email1.allantgroup.com [199.67.51.78]); Thu, 08 Jan 2009 22:11:37 -0600 (CST) X-Scanned-By: MIMEDefang 2.45 Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 04:22:12 -0000 In the last episode (Jan 08), Daniel Eischen said: > On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: > > It appears that the post-fork hooks for malloc(3) are somewhat > > broken such that when a threaded program forks, and then its child > > attempts to go threaded, it deadlocks because it already appears to > > have locks held. I am not familiar enough with the current > > libthr/libc/rtld-elf interaction that I've been able to fix it > > myself, unfortunately. > > There's really nothing to fix - according to POSIX you are only > allowed to call async-signal-safe functions in the child forked from > a threaded process. If you are trying to do anything other than > that, it may or may not work on FreeBSD, but it is not guaranteed and > is not portable. The Rationale section of the pthread_atfork() page is a good read here, too. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 05:31:20 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66F9D106564A; Fri, 9 Jan 2009 05:31:20 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green.homeunix.org [66.92.150.152]) by mx1.freebsd.org (Postfix) with ESMTP id DB8BA8FC14; Fri, 9 Jan 2009 05:31:19 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (obama@localhost [127.0.0.1]) by green.homeunix.org (8.14.3/8.14.1) with ESMTP id n095VIlo037849; Fri, 9 Jan 2009 00:31:18 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.14.3/8.14.1/Submit) id n095VHLa037848; Fri, 9 Jan 2009 00:31:17 -0500 (EST) (envelope-from green) Date: Fri, 9 Jan 2009 00:31:17 -0500 From: Brian Fundakowski Feldman To: Daniel Eischen Message-ID: <20090109053117.GB2825@green.homeunix.org> References: <20090109031942.GA2825@green.homeunix.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 05:31:20 -0000 On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: > On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: > >> It appears that the post-fork hooks for malloc(3) are somewhat broken such that >> when a threaded program forks, and then its child attempts to go threaded, it >> deadlocks because it already appears to have locks held. I am not familiar >> enough with the current libthr/libc/rtld-elf interaction that I've been able >> to fix it myself, unfortunately. > > There's really nothing to fix - according to POSIX you are only > allowed to call async-signal-safe functions in the child forked > from a threaded process. If you are trying to do anything other > than that, it may or may not work on FreeBSD, but it is not > guaranteed and is not portable. > > The rationale is that what is the point of forking and creating > more threads, when you can just as easily create more threads in > the parent without forking? The only reason to fork from a threaded > process is to call one of the exec() functions. Well, it worked until the last major set of changes to malloc. For me, the point was that I was able to have transparent background worker threads in any program regardless of its architecture, using the standard pthread fork hooks. Could you point me to the POSIX section covering fork and threads? If it's really not supposed to work then that's fine, but there's an awful lot of code there dedicated to support going threaded again after a fork. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 06:01:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A837106566B for ; Fri, 9 Jan 2009 06:01:02 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 0637F8FC12 for ; Fri, 9 Jan 2009 06:01:01 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id n0960xfM078889 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 8 Jan 2009 22:01:00 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id n0960xnw078888; Thu, 8 Jan 2009 22:00:59 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA26322; Thu, 8 Jan 09 21:48:34 PST Date: Thu, 08 Jan 2009 21:50:47 -0800 From: perryh@pluto.rain.com To: uspoerlein@gmail.com Message-Id: <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> In-Reply-To: <20090108080708.GE1462@roadrunner.spoerlein.net> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, guru@unixarea.de, vladimirt@partygaming.com Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 06:01:02 -0000 Ulrich Spoerlein wrote: > Please run > % cat /dev/sndstat > % ls -l /dev/dsp0 /dev/dsp0.0 > > The reason you are not seeing them with 'ls /dev/dsp*' is because > devfs is creating the nodes when they are open(2)'ed. Using shell > globbing will search the output of readdir(2) for matches to dsp* > where devfs has no way of dynamically creating nodes (which ones > should it create anyway?) In principle, everything that would be successfully created if open(2)'ed. It doesn't necessarily need to actually create them, but the results from readdir(2) should be as if they had been created. The whole point of things like ls(1) and readdir(2) is to find out what-all is available to be opened, without having to already know the answer. > This is a FAQ really. It may be an FAQ, but it is also a bug, granted one that may not be easy to fix. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 06:39:30 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70A0A1065733; Fri, 9 Jan 2009 06:39:30 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id EFC378FC1B; Fri, 9 Jan 2009 06:39:29 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.23] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id n096ODtv055374; Thu, 8 Jan 2009 22:24:13 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4966ED8A.4080307@freebsd.org> Date: Thu, 08 Jan 2009 22:24:10 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Brian Fundakowski Feldman References: <20090109031942.GA2825@green.homeunix.org> <20090109053117.GB2825@green.homeunix.org> In-Reply-To: <20090109053117.GB2825@green.homeunix.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 06:39:31 -0000 Brian Fundakowski Feldman wrote: > On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: >>On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: >> >>>It appears that the post-fork hooks for malloc(3) are somewhat broken such that >>>when a threaded program forks, and then its child attempts to go threaded, it >>>deadlocks because it already appears to have locks held. I am not familiar >>>enough with the current libthr/libc/rtld-elf interaction that I've been able >>>to fix it myself, unfortunately. What version of FreeBSD? I've only glanced through the relevant code, but the malloc() implementation in -CURRENT certainly tries to claim all malloc locks before the fork and releases them all (in both child and parent) just after the fork, so the scenario you describe shouldn't happen. Of course, there may be other locks getting in the way. Tim From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 07:20:31 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF894106564A; Fri, 9 Jan 2009 07:20:31 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id A349E8FC0C; Fri, 9 Jan 2009 07:20:31 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.63]) by smtp-outbound.ironport.com with ESMTP; 08 Jan 2009 23:09:16 -0800 Message-ID: <4966F81C.3070406@elischer.org> Date: Thu, 08 Jan 2009 23:09:16 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Brian Fundakowski Feldman References: <20090109031942.GA2825@green.homeunix.org> <20090109053117.GB2825@green.homeunix.org> In-Reply-To: <20090109053117.GB2825@green.homeunix.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 07:20:32 -0000 Brian Fundakowski Feldman wrote: > On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: >> On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: >> >>> It appears that the post-fork hooks for malloc(3) are somewhat broken such that >>> when a threaded program forks, and then its child attempts to go threaded, it >>> deadlocks because it already appears to have locks held. I am not familiar >>> enough with the current libthr/libc/rtld-elf interaction that I've been able >>> to fix it myself, unfortunately. >> There's really nothing to fix - according to POSIX you are only >> allowed to call async-signal-safe functions in the child forked >> from a threaded process. If you are trying to do anything other >> than that, it may or may not work on FreeBSD, but it is not >> guaranteed and is not portable. >> >> The rationale is that what is the point of forking and creating >> more threads, when you can just as easily create more threads in >> the parent without forking? The only reason to fork from a threaded >> process is to call one of the exec() functions. > > Well, it worked until the last major set of changes to malloc. For me, the point > was that I was able to have transparent background worker threads in any program > regardless of its architecture, using the standard pthread fork hooks. Could you > point me to the POSIX section covering fork and threads? If it's really not > supposed to work then that's fine, but there's an awful lot of code there dedicated > to support going threaded again after a fork. > Practically, you can't go threaded again after a fork (by which I mean creating new threads or use things like mutexes etc.) in any posix system I know of. It would require that: The forking thread stop until: Every other thread has released every resource it owns and reports itself to be in a "safe quiescent state", or at least report every resource it owns, especially locks, and After the fork: The child, post fork, to take ownership of all of them, and free them. You might be able to do that in a simple threaded program, but consider then that the libraries may have threads running in them of which you are unaware, and that some of the resources may interract with resources owned by the forking thread. Add to this that there may be a signal thrown into this mix as well (signals are the bane of thread developement) From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 08:18:47 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 373171065677 for ; Fri, 9 Jan 2009 08:18:47 +0000 (UTC) (envelope-from shilp.kamal@yahoo.com) Received: from n2.bullet.mail.mud.yahoo.com (n2.bullet.mail.mud.yahoo.com [209.191.127.222]) by mx1.freebsd.org (Postfix) with SMTP id D1ABA8FC2C for ; Fri, 9 Jan 2009 08:18:46 +0000 (UTC) (envelope-from shilp.kamal@yahoo.com) Received: from [68.142.200.227] by n2.bullet.mud.yahoo.com with NNFMP; 09 Jan 2009 08:05:48 -0000 Received: from [68.142.201.247] by t8.bullet.mud.yahoo.com with NNFMP; 09 Jan 2009 08:05:48 -0000 Received: from [127.0.0.1] by omp408.mail.mud.yahoo.com with NNFMP; 09 Jan 2009 08:05:48 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 25997.63992.bm@omp408.mail.mud.yahoo.com Received: (qmail 72766 invoked by uid 60001); 9 Jan 2009 08:05:47 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=oTqQzwfsk+7SbIhe6PFbmkpA3LRMHXItE9MKVcJJJrDMh8D6zY49tPcW8ctaqKDhB4aS9uTerkSXapZNlGY8tpyFOYQVM9/1qLj/Usm3iQ8ySFi2uIiuTmYQLA8SZaAiKYK8jQa0Px6GpnBMWsEKEH8K4sJBdt/3paT/cyjcw6Y=; X-YMail-OSG: hStPAywVM1nkZ8NSAgRv750tgiz1AvC7W6ULeq33YK3JGT036l2YJOjpIPTCVAypwBQdFf7YG4VhoBKtL4rboVta7.eFHU3uWCYol66NInDjwPJ1.qn6qnK7xZSyM7hsbf5jzp9w8AVtxbs_WNXPTk1mgbw- Received: from [71.142.201.57] by web45413.mail.sp1.yahoo.com via HTTP; Fri, 09 Jan 2009 00:05:47 PST X-Mailer: YahooMailWebService/0.7.260.1 Date: Fri, 9 Jan 2009 00:05:47 -0800 (PST) From: Kamlesh Patel To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <468090.72533.qm@web45413.mail.sp1.yahoo.com> Cc: freebsd-questions@freebsd.org Subject: kernel panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: shilp.kamal@yahoo.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 08:18:47 -0000 Hi there, I changed the following file of FreeBSD 7.0: sys/boot/forth/beastie.4th variable rebootkey variable mykey (added line) I built and installed kernel, then i reboot the system, it gives me the following error: --------------------------------------------------- " panic: free: guard1 fail @ 0x6e104 from /usr/src/sys/boot/i386/loader/../../common/module.c:959 --> Press a key on the console to reboot <-- " ---------------------------------------------------- How do i recover the system from this error. I can't reload the loader.old Could anyone please help me? Kamlesh MS CS, CSUS From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 09:57:16 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A7B910656EA for ; Fri, 9 Jan 2009 09:57:16 +0000 (UTC) (envelope-from aksoy.for.research@gmail.com) Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by mx1.freebsd.org (Postfix) with ESMTP id E7EBE8FC22 for ; Fri, 9 Jan 2009 09:57:15 +0000 (UTC) (envelope-from aksoy.for.research@gmail.com) Received: by bwz13 with SMTP id 13so2197919bwz.19 for ; Fri, 09 Jan 2009 01:57:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=XkiV7zWj9/PBEvysh6gmiJ16wzaPOi18EZtgPL9vM3I=; b=XOtsbwXolq98qVx7A59Em+B8WdCQS1r6plS/I1PrQLv8J8a4OtdVLDjaDgnxdAs9Op mQkfFx8ewWkWWzQxvNhs1vYFWO1IsSlIDucVibeBQwPotzK0Rtl7Gf+oCNoQYxPGfEpx bSXoTd6bMLhg3L0RHkAiVBiVKnfhY2oFxrdUM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=CEkeqk7ByUvGdzF2SkgmE7KrCI8r0th/+oSW6CfR8MqLncb5UwuA7CjauLia9gYTuh mUDNOCkiQ2FRaUq4TRSAAtTq/pTRxAC+O8WKSLWcgDkT8XoaBVQNivlDZcTb+vtdDw8g f9UZPZwyvQJYs6bupyA/GnyYLVY82pnUYVPR8= Received: by 10.181.4.1 with SMTP id g1mr3406324bki.100.1231495034932; Fri, 09 Jan 2009 01:57:14 -0800 (PST) Received: by 10.181.224.18 with HTTP; Fri, 9 Jan 2009 01:57:14 -0800 (PST) Message-ID: <14ded62c0901090157t7397f615ted93a979fdda5e14@mail.gmail.com> Date: Fri, 9 Jan 2009 04:57:14 -0500 From: "=?ISO-8859-1?Q?Mehmet_Ali_Aksoy_T=DCYS=DCZ?=" To: "Ulf Lilleengen" In-Reply-To: <20090108215917.GA1375@carrot.default.net> MIME-Version: 1.0 References: <14ded62c0901080123u7268055epb3e17d84aa757051@mail.gmail.com> <20090108150807.GA1264@carrot.pvv.ntnu.no> <14ded62c0901080616o68bad18cg256fa10f12c4560b@mail.gmail.com> <20090108215917.GA1375@carrot.default.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Threads and SMP kernel scheduling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 09:57:17 -0000 Hi, Thank you very much again Ulf. I found this http://en.wikipedia.org/wiki/Native_POSIX_Thread_Library and i= t describes 1:1 correspondence of Linux threads. So, you were right and thank you very much again. Regards, Mehmet On Thu, Jan 8, 2009 at 4:59 PM, Ulf Lilleengen wr= ote: > On tor, jan 08, 2009 at 09:16:26am -0500, Mehmet Ali Aksoy T=DCYS=DCZ wro= te: > > Hi, > > > > Thank you very much for your response Ulf. It is a very clear answer. > Thanks > > again. > > > > By the way, any information for the Linux case? > > > I think this applies to Linux as well, since it's NPTL(Native Posix > Threading > Library) uses a 1:1 mapping also. I'm not 100% sure, so you might want to > ask > on a linux mailing list. > > -- > Ulf Lilleengen > From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 07:17:53 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59932106566C for ; Fri, 9 Jan 2009 07:17:53 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mired.org (five.mired.org [66.92.153.75]) by mx1.freebsd.org (Postfix) with ESMTP id E03E08FC0A for ; Fri, 9 Jan 2009 07:17:52 +0000 (UTC) (envelope-from mwm@mired.org) Received: (qmail 42463 invoked from network); 9 Jan 2009 01:50:41 -0500 Received: from unknown (HELO mbook.local) (192.168.195.193) by 0 with SMTP; 9 Jan 2009 01:50:41 -0500 Date: Fri, 9 Jan 2009 01:51:06 -0500 From: Mike Meyer To: "Sheldon Givens" Message-ID: <20090109015106.3614a378@mbook.local> In-Reply-To: References: <20090107125759.GA1462@roadrunner.spoerlein.net> <20090107154854.GC1462@roadrunner.spoerlein.net> Organization: Meyer Consulting X-Mailer: Claws Mail 3.6.1 (GTK+ 2.14.4; i386-apple-darwin9) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 09 Jan 2009 12:16:51 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 07:17:53 -0000 On Wed, 7 Jan 2009 09:27:24 -0800 "Sheldon Givens" wrote: > And I guess I just feel like running a second command to do what should be > possible to do with the first command (and is, on many platforms. ps > --no-headers on linux for example) is a problem and presents opportunity for > continued refinement of the utility. I agree. However, I think we might want to look at a broader scope, in that the same argument applies to pretty much every command that outputs headers - if you're feeding the output to a program, you probably don't want the headers, and copying all the output through another process for the sole purpose of removing them seems wasteful. That we already have commands in the base system that implement this functionality would imply that others agree with this. So `--no-headers' is ok. However, `-n' has lots of different meanings in different commands. How about borrowing from existing commands that already implement this functionality (zfs and zpool) and using `-H', which is relatively rarely used elsewhere? http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 15:52:07 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 957901065670; Fri, 9 Jan 2009 15:52:07 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 384AF8FC17; Fri, 9 Jan 2009 15:52:07 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.3/8.14.3/NETPLEX) with ESMTP id n09FaiSj012500; Fri, 9 Jan 2009 10:36:44 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Fri, 09 Jan 2009 10:36:44 -0500 (EST) Date: Fri, 9 Jan 2009 10:36:44 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Brian Fundakowski Feldman In-Reply-To: <20090109053117.GB2825@green.homeunix.org> Message-ID: References: <20090109031942.GA2825@green.homeunix.org> <20090109053117.GB2825@green.homeunix.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 15:52:07 -0000 On Fri, 9 Jan 2009, Brian Fundakowski Feldman wrote: > On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: >> On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: >> >>> It appears that the post-fork hooks for malloc(3) are somewhat broken such that >>> when a threaded program forks, and then its child attempts to go threaded, it >>> deadlocks because it already appears to have locks held. I am not familiar >>> enough with the current libthr/libc/rtld-elf interaction that I've been able >>> to fix it myself, unfortunately. >> >> There's really nothing to fix - according to POSIX you are only >> allowed to call async-signal-safe functions in the child forked >> from a threaded process. If you are trying to do anything other >> than that, it may or may not work on FreeBSD, but it is not >> guaranteed and is not portable. >> >> The rationale is that what is the point of forking and creating >> more threads, when you can just as easily create more threads in >> the parent without forking? The only reason to fork from a threaded >> process is to call one of the exec() functions. > > Well, it worked until the last major set of changes to malloc. For me, the point > was that I was able to have transparent background worker threads in any program > regardless of its architecture, using the standard pthread fork hooks. Could you > point me to the POSIX section covering fork and threads? If it's really not > supposed to work then that's fine, but there's an awful lot of code there dedicated > to support going threaded again after a fork. I don't know if this link will work for you, but you can start here: http://www.opengroup.org/onlinepubs/009695399/nframe.html "It is suggested that programs that use fork() call an exec function very soon afterwards in the child process, thus resetting all states. In the meantime, only a short list of async-signal-safe library routines are promised to be available." -- DE -- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 16:34:38 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 515EC106564A; Fri, 9 Jan 2009 16:34:38 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green.homeunix.org [66.92.150.152]) by mx1.freebsd.org (Postfix) with ESMTP id ED35F8FC12; Fri, 9 Jan 2009 16:34:37 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (obama@localhost [127.0.0.1]) by green.homeunix.org (8.14.3/8.14.1) with ESMTP id n09GYVfm042403; Fri, 9 Jan 2009 11:34:31 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.14.3/8.14.1/Submit) id n09GYQm4042402; Fri, 9 Jan 2009 11:34:26 -0500 (EST) (envelope-from green) Date: Fri, 9 Jan 2009 11:34:26 -0500 From: Brian Fundakowski Feldman To: Julian Elischer Message-ID: <20090109163426.GC2825@green.homeunix.org> References: <20090109031942.GA2825@green.homeunix.org> <20090109053117.GB2825@green.homeunix.org> <4966F81C.3070406@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4966F81C.3070406@elischer.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:34:38 -0000 On Thu, Jan 08, 2009 at 11:09:16PM -0800, Julian Elischer wrote: > Brian Fundakowski Feldman wrote: >> On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: >>> On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: >>> >>>> It appears that the post-fork hooks for malloc(3) are somewhat broken such that >>>> when a threaded program forks, and then its child attempts to go threaded, it >>>> deadlocks because it already appears to have locks held. I am not familiar >>>> enough with the current libthr/libc/rtld-elf interaction that I've been able >>>> to fix it myself, unfortunately. >>> There's really nothing to fix - according to POSIX you are only >>> allowed to call async-signal-safe functions in the child forked >>> from a threaded process. If you are trying to do anything other >>> than that, it may or may not work on FreeBSD, but it is not >>> guaranteed and is not portable. >>> >>> The rationale is that what is the point of forking and creating >>> more threads, when you can just as easily create more threads in >>> the parent without forking? The only reason to fork from a threaded >>> process is to call one of the exec() functions. >> >> Well, it worked until the last major set of changes to malloc. For me, the point >> was that I was able to have transparent background worker threads in any program >> regardless of its architecture, using the standard pthread fork hooks. Could you >> point me to the POSIX section covering fork and threads? If it's really not >> supposed to work then that's fine, but there's an awful lot of code there dedicated >> to support going threaded again after a fork. >> > > Practically, you can't go threaded again after a fork > (by which I mean creating new threads or use things > like mutexes etc.) in any posix system I know of. > > It would require that: > The forking thread stop until: > Every other thread has released every resource it owns > and reports itself to be in a "safe quiescent state", > or at least report every resource it owns, especially > locks, > and > After the fork: > The child, post fork, to take ownership of all > of them, and free them. > > You might be able to do that in a simple > threaded program, but consider then that the libraries may have > threads running in them of which you are unaware, and that > some of the resources may interract with resources owned by the > forking thread. > > Add to this that there may be a signal thrown into this mix as well > > (signals are the bane of thread developement) Well, I wouldn't mind showing all of you what I can of what I had been doing with the background threads -- it works pretty well modulo this particular malloc lock bug. Due to it being inappropriate to share library resources between a child and parent for an open socket connection, I always considered the only "safe" behavior to be going single-threaded for the duration of the fork processes in both the parent and child, and the pthread_atfork(3) hooks have been sufficient to do so. -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 16:50:21 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0490106566B for ; Fri, 9 Jan 2009 16:50:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5BB6D8FC1E for ; Fri, 9 Jan 2009 16:50:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n09GoBDW000681 for ; Fri, 9 Jan 2009 09:50:11 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 09 Jan 2009 09:50:27 -0700 (MST) Message-Id: <20090109.095027.-1672857892.imp@bsdimp.com> To: hackers@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: 3x read to write ratio on dump/restore X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:50:21 -0000 I just copied a disk using dump + restore. I noticed something through the whole run of this 500GB operation: L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name 3 231 231 14754 9.5 0 0 0.0 97.5| da1s1a 0 39 0 0 0.0 39 4982 10.0 38.7| da2s1a The read kBps was 3x the write kBps. While the dump is going through the raw device, and the restore is going through the file system, I can't imagine why we'd have such a huge difference that would be utter consistent for the whole 15 hour run. Any ideas what gives? I observed this with 16MB cache and with 32MB cache, fwiw. Warner From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 17:11:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DD5C106566C for ; Fri, 9 Jan 2009 17:11:50 +0000 (UTC) (envelope-from omerfsen@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.freebsd.org (Postfix) with ESMTP id A79B98FC14 for ; Fri, 9 Jan 2009 17:11:49 +0000 (UTC) (envelope-from omerfsen@gmail.com) Received: by ug-out-1314.google.com with SMTP id 30so41462ugs.39 for ; Fri, 09 Jan 2009 09:11:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=YwlVsSCK+uSlDdPRvsjeqNCerSCvw6c9nDYnuvulmTk=; b=Znxrqxaf8L6bEUp515buTCWJEsukVl9PKp7G/5hz9uTq4Z43HbdvaSDVX3iM8pojc0 S3ReutomzWA30OS4TzzBNMxFg5HQjb3f5aqa/wM01stkVFXHvv6/l0a4FLZbl28fUbtu HI69ExkY4P7egh3dZVLOK3L2cIKZ1egrp8UNE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Z1WcpHG6/FfWQcbtyuNZfeTc8Z7hW5t+hZwpHOKa3ZqCr540Os4H11YMFIF92x+TN0 4fNIY1kQI+tA4K123QXOcrQ8RGIYTsmQfYFQLopHlxpBaEHG8LbWwm71DLhfvjAsBfu3 p0hcBVIDAXB6OAviRFVP5ZTHbQeA8jqJ+P3dg= Received: by 10.66.233.12 with SMTP id f12mr14965242ugh.88.1231519193341; Fri, 09 Jan 2009 08:39:53 -0800 (PST) Received: by 10.67.90.9 with HTTP; Fri, 9 Jan 2009 08:39:53 -0800 (PST) Message-ID: <75a268720901090839q406ed8f3g8d09e83a9a452415@mail.gmail.com> Date: Fri, 9 Jan 2009 18:39:53 +0200 From: "Omer Faruk Sen" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: kernel dump with 7.1-RELEASE X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:11:50 -0000 Hi, I am having kernel dump with FreeBSD 7.1: Here is crashinfo output of it (Actually i don't know the state of crashinfo in Fbsd 7.1) 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Thu Jan 1 08:58:24 UTC 2009 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 panic: semexit - semid not allocated GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... Unread portion of the kernel message buffer: Physical memory: 8173 MB Dumping 437 MB: 422 406 390 374 358 342 326 310 294 278 262 246 230 214 198 182 166 150 134 118 102 86 70 54 38 22 6 #0 doadump () at pcpu.h:195 195 pcpu.h: No such file or directory. in pcpu.h (kgdb) #0 doadump () at pcpu.h:195 #1 0x0000000000000004 in ?? () #2 0xffffffff804b4ce9 in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #3 0xffffffff804b50f2 in panic (fmt=0x104
) at /usr/src/sys/kern/kern_shutdown.c:574 #4 0xffffffff804f846d in semexit_myhook (arg=Variable "arg" is not available. ) at /usr/src/sys/kern/sysv_sem.c:1328 #5 0xffffffff80490dbc in exit1 (td=0xffffff000995f370, rv=0) at /usr/src/sys/kern/kern_exit.c:244 #6 0xffffffff8049239e in sys_exit (td=Variable "td" is not available. ) at /usr/src/sys/kern/kern_exit.c:109 #7 0xffffffff8078a7c7 in syscall (frame=0xffffffffb0d4ac80) at /usr/src/sys/amd64/amd64/trap.c:907 #8 0xffffffff8077088b in Xfast_syscall () at /usr/src/sys/amd64/amd64/exception.S:330 #9 0x0000000800a2a30c in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 17:39:38 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 682871065670; Fri, 9 Jan 2009 17:39:38 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 9D3718FC0C; Fri, 9 Jan 2009 17:39:37 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 09:39:09 -0800 Message-ID: <49678BBC.8050306@elischer.org> Date: Fri, 09 Jan 2009 09:39:08 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Brian Fundakowski Feldman References: <20090109031942.GA2825@green.homeunix.org> <20090109053117.GB2825@green.homeunix.org> <4966F81C.3070406@elischer.org> <20090109163426.GC2825@green.homeunix.org> In-Reply-To: <20090109163426.GC2825@green.homeunix.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:39:38 -0000 Brian Fundakowski Feldman wrote: > On Thu, Jan 08, 2009 at 11:09:16PM -0800, Julian Elischer wrote: >> Brian Fundakowski Feldman wrote: >>> On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: >>>> On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: >>>> >>>>> It appears that the post-fork hooks for malloc(3) are somewhat broken such that >>>>> when a threaded program forks, and then its child attempts to go threaded, it >>>>> deadlocks because it already appears to have locks held. I am not familiar >>>>> enough with the current libthr/libc/rtld-elf interaction that I've been able >>>>> to fix it myself, unfortunately. >>>> There's really nothing to fix - according to POSIX you are only >>>> allowed to call async-signal-safe functions in the child forked >>>> from a threaded process. If you are trying to do anything other >>>> than that, it may or may not work on FreeBSD, but it is not >>>> guaranteed and is not portable. >>>> >>>> The rationale is that what is the point of forking and creating >>>> more threads, when you can just as easily create more threads in >>>> the parent without forking? The only reason to fork from a threaded >>>> process is to call one of the exec() functions. >>> Well, it worked until the last major set of changes to malloc. For me, the point >>> was that I was able to have transparent background worker threads in any program >>> regardless of its architecture, using the standard pthread fork hooks. Could you >>> point me to the POSIX section covering fork and threads? If it's really not >>> supposed to work then that's fine, but there's an awful lot of code there dedicated >>> to support going threaded again after a fork. >>> >> Practically, you can't go threaded again after a fork >> (by which I mean creating new threads or use things >> like mutexes etc.) in any posix system I know of. >> >> It would require that: >> The forking thread stop until: >> Every other thread has released every resource it owns >> and reports itself to be in a "safe quiescent state", >> or at least report every resource it owns, especially >> locks, >> and >> After the fork: >> The child, post fork, to take ownership of all >> of them, and free them. >> >> You might be able to do that in a simple >> threaded program, but consider then that the libraries may have >> threads running in them of which you are unaware, and that >> some of the resources may interract with resources owned by the >> forking thread. >> >> Add to this that there may be a signal thrown into this mix as well >> >> (signals are the bane of thread developement) > > Well, I wouldn't mind showing all of you what I can of what I had been doing > with the background threads -- it works pretty well modulo this particular > malloc lock bug. Due to it being inappropriate to share library resources > between a child and parent for an open socket connection, I always considered > the only "safe" behavior to be going single-threaded for the duration of the fork > processes in both the parent and child, and the pthread_atfork(3) hooks have been > sufficient to do so. ahhhh well going single threaded for the duration of the fork, changes everything! > From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 17:42:40 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E143106566C; Fri, 9 Jan 2009 17:42:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id AC0248FC13; Fri, 9 Jan 2009 17:42:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LLLNT-00038J-Rp; Fri, 09 Jan 2009 19:42:35 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n09HgWO3073856 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Jan 2009 19:42:32 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n09HgW7l080375; Fri, 9 Jan 2009 19:42:32 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n09HgWmK080374; Fri, 9 Jan 2009 19:42:32 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 9 Jan 2009 19:42:32 +0200 From: Kostik Belousov To: Brian Fundakowski Feldman Message-ID: <20090109174232.GI93900@deviant.kiev.zoral.com.ua> References: <20090109031942.GA2825@green.homeunix.org> <20090109053117.GB2825@green.homeunix.org> <4966F81C.3070406@elischer.org> <20090109163426.GC2825@green.homeunix.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MD+Ffo4VJSI0Ass3" Content-Disposition: inline In-Reply-To: <20090109163426.GC2825@green.homeunix.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LLLNT-00038J-Rp dc3de87fd53dd4a3470b575027518d7c X-Terabit: YES Cc: hackers@freebsd.org, Julian Elischer , jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:42:40 -0000 --MD+Ffo4VJSI0Ass3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 09, 2009 at 11:34:26AM -0500, Brian Fundakowski Feldman wrote: > On Thu, Jan 08, 2009 at 11:09:16PM -0800, Julian Elischer wrote: > > Brian Fundakowski Feldman wrote: > >> On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: > >>> On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: > >>>=20 > >>>> It appears that the post-fork hooks for malloc(3) are somewhat broke= n such that > >>>> when a threaded program forks, and then its child attempts to go thr= eaded, it > >>>> deadlocks because it already appears to have locks held. I am not f= amiliar > >>>> enough with the current libthr/libc/rtld-elf interaction that I've b= een able > >>>> to fix it myself, unfortunately. > >>> There's really nothing to fix - according to POSIX you are only > >>> allowed to call async-signal-safe functions in the child forked > >>> from a threaded process. If you are trying to do anything other > >>> than that, it may or may not work on FreeBSD, but it is not > >>> guaranteed and is not portable. > >>>=20 > >>> The rationale is that what is the point of forking and creating > >>> more threads, when you can just as easily create more threads in > >>> the parent without forking? The only reason to fork from a threaded > >>> process is to call one of the exec() functions. > >>=20 > >> Well, it worked until the last major set of changes to malloc. For me= , the point > >> was that I was able to have transparent background worker threads in a= ny program > >> regardless of its architecture, using the standard pthread fork hooks.= Could you > >> point me to the POSIX section covering fork and threads? If it's real= ly not > >> supposed to work then that's fine, but there's an awful lot of code th= ere dedicated > >> to support going threaded again after a fork. > >>=20 > >=20 > > Practically, you can't go threaded again after a fork > > (by which I mean creating new threads or use things > > like mutexes etc.) in any posix system I know of. > >=20 > > It would require that: > > The forking thread stop until: > > Every other thread has released every resource it owns > > and reports itself to be in a "safe quiescent state", > > or at least report every resource it owns, especially > > locks, > > and > > After the fork: > > The child, post fork, to take ownership of all > > of them, and free them. > >=20 > > You might be able to do that in a simple > > threaded program, but consider then that the libraries may have > > threads running in them of which you are unaware, and that > > some of the resources may interract with resources owned by the > > forking thread. > >=20 > > Add to this that there may be a signal thrown into this mix as well > >=20 > > (signals are the bane of thread developement) >=20 > Well, I wouldn't mind showing all of you what I can of what I had been do= ing > with the background threads -- it works pretty well modulo this particular > malloc lock bug. Due to it being inappropriate to share library resources > between a child and parent for an open socket connection, I always consid= ered > the only "safe" behavior to be going single-threaded for the duration of = the fork > processes in both the parent and child, and the pthread_atfork(3) hooks h= ave been > sufficient to do so. >=20 In fact, try recent HEAD, it contains the fixed for deadlocks caused by fork calls in mt processes. Also, see r185456, that may be directly relevant to your problem. The MFC to the stable/7 is doable, but depends on the MFC of some stuff committed by David Xu, that would take me some time to look into. --MD+Ffo4VJSI0Ass3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklnjIcACgkQC3+MBN1Mb4i42ACbBvOPiEBgpLqhWNF46ex45X3u Y+8AoNQj5At0SQL0H/nb/FRM8uIMnmfE =LoEE -----END PGP SIGNATURE----- --MD+Ffo4VJSI0Ass3-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 18:08:16 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 674931065673 for ; Fri, 9 Jan 2009 18:08:16 +0000 (UTC) (envelope-from shilp.kamal@yahoo.com) Received: from n71.bullet.mail.sp1.yahoo.com (n71.bullet.mail.sp1.yahoo.com [98.136.44.36]) by mx1.freebsd.org (Postfix) with SMTP id 31A398FC13 for ; Fri, 9 Jan 2009 18:08:16 +0000 (UTC) (envelope-from shilp.kamal@yahoo.com) Received: from [69.147.65.150] by n71.bullet.mail.sp1.yahoo.com with NNFMP; 09 Jan 2009 17:55:27 -0000 Received: from [69.147.84.100] by t7.bullet.mail.sp1.yahoo.com with NNFMP; 09 Jan 2009 17:55:27 -0000 Received: from [127.0.0.1] by omp201.mail.sp1.yahoo.com with NNFMP; 09 Jan 2009 17:55:27 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 267643.52950.bm@omp201.mail.sp1.yahoo.com Received: (qmail 14842 invoked by uid 60001); 9 Jan 2009 17:55:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=iByPgxmCzIHc7rC5hrHZs/p1S7zb4aQj8e68x9tN2GL1glH+44LHSHzavmupf2ELSDmJVN2aNy31eVeIV5T6BT7QPRXk+FQyJA9CHRTsBTTx9uHwJXBnXoqzhgR/17/9i9cIFBju/FY3yDfM4EZyzMAWKjveT5/4+aqUon5SweA=; X-YMail-OSG: ppwbEpIVM1nDPKSWQNwf6RBzjsM3W6GWM7gvCC9N4xwxtpJKn8mlUgT9GVy0fX.9uqRpuUVRSo_XFrFgVWuMC8n.l5I_VPBTW3z88EENhSEUCw0uts8csRSHnNZpNlhbIx36JvehMhIJK_yLg59TdHi0_fo- Received: from [130.86.201.132] by web45407.mail.sp1.yahoo.com via HTTP; Fri, 09 Jan 2009 09:55:26 PST X-Mailer: YahooMailWebService/0.7.260.1 Date: Fri, 9 Jan 2009 09:55:26 -0800 (PST) From: Kamlesh Patel To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Message-ID: <989835.14737.qm@web45407.mail.sp1.yahoo.com> X-Mailman-Approved-At: Fri, 09 Jan 2009 18:28:50 +0000 Cc: Subject: Having a problem of kernel panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: shilp.kamal@yahoo.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:08:16 -0000 Hi all, I am having a problem of kernel panic in FreeBSD 7.0: In sys/boot/forth/beastie.4th variable rebootkey variable mykey (added line) After building and installing the kernel, when i reboot the system it gives me the following error: --------------------------------------------------- " panic: free: guard1 fail @ 0x6e104 from /usr/src/sys/boot/i386/loader/../../common/module.c:959 --> Press a key on the console to reboot <-- " ---------------------------------------------------- How do i recover the system from this error. I can't reload the loader.old Could anyone please help me? From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 18:47:56 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14854106566B for ; Fri, 9 Jan 2009 18:47:56 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 011818FC17 for ; Fri, 9 Jan 2009 18:47:55 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 10:47:56 -0800 Message-ID: <49679BDA.1010209@elischer.org> Date: Fri, 09 Jan 2009 10:47:54 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: shilp.kamal@yahoo.com References: <989835.14737.qm@web45407.mail.sp1.yahoo.com> In-Reply-To: <989835.14737.qm@web45407.mail.sp1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Having a problem of kernel panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:47:56 -0000 Kamlesh Patel wrote: > Hi all, > > I am having a problem of kernel panic in FreeBSD 7.0: > > In sys/boot/forth/beastie.4th > variable rebootkey > variable mykey (added line) > > After building and installing the kernel, when i reboot the system it gives me the following error: > > --------------------------------------------------- > " panic: free: guard1 fail @ 0x6e104 from > /usr/src/sys/boot/i386/loader/../../common/module.c:959 > > --> Press a key on the console to reboot <-- " > > ---------------------------------------------------- > > How do i recover the system from this error. I can't reload the loader.old > > Could anyone please help me? it's the loader that is crashing, not the kernel. (at least that is what it looks like to me) maybe reinstall loader from cd? actually you should be able to bypass the loader using the bootblocks.. teh sysntax is arcane but you get a chance to enter something in the bootblocks before the loader. (hit space) replace /boot/loader with /boot/kernel/kernel in teh string (I think... it's been a long time since I tried this.) > > > > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 18:53:04 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B26BD1065673; Fri, 9 Jan 2009 18:53:04 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green.homeunix.org [66.92.150.152]) by mx1.freebsd.org (Postfix) with ESMTP id 563508FC08; Fri, 9 Jan 2009 18:53:03 +0000 (UTC) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (obama@localhost [127.0.0.1]) by green.homeunix.org (8.14.3/8.14.1) with ESMTP id n09IqxT6043074; Fri, 9 Jan 2009 13:52:59 -0500 (EST) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.14.3/8.14.1/Submit) id n09Iqt52043073; Fri, 9 Jan 2009 13:52:55 -0500 (EST) (envelope-from green) Date: Fri, 9 Jan 2009 13:52:55 -0500 From: Brian Fundakowski Feldman To: Kostik Belousov Message-ID: <20090109185255.GD2825@green.homeunix.org> References: <20090109031942.GA2825@green.homeunix.org> <20090109053117.GB2825@green.homeunix.org> <4966F81C.3070406@elischer.org> <20090109163426.GC2825@green.homeunix.org> <20090109174232.GI93900@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090109174232.GI93900@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org, Julian Elischer , jasone@freebsd.org Subject: Re: threaded, forked, rethreaded processes will deadlock X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:53:05 -0000 On Fri, Jan 09, 2009 at 07:42:32PM +0200, Kostik Belousov wrote: > On Fri, Jan 09, 2009 at 11:34:26AM -0500, Brian Fundakowski Feldman wrote: > > On Thu, Jan 08, 2009 at 11:09:16PM -0800, Julian Elischer wrote: > > > Brian Fundakowski Feldman wrote: > > >> On Thu, Jan 08, 2009 at 10:44:20PM -0500, Daniel Eischen wrote: > > >>> On Thu, 8 Jan 2009, Brian Fundakowski Feldman wrote: > > >>> > > >>>> It appears that the post-fork hooks for malloc(3) are somewhat broken such that > > >>>> when a threaded program forks, and then its child attempts to go threaded, it > > >>>> deadlocks because it already appears to have locks held. I am not familiar > > >>>> enough with the current libthr/libc/rtld-elf interaction that I've been able > > >>>> to fix it myself, unfortunately. > > >>> There's really nothing to fix - according to POSIX you are only > > >>> allowed to call async-signal-safe functions in the child forked > > >>> from a threaded process. If you are trying to do anything other > > >>> than that, it may or may not work on FreeBSD, but it is not > > >>> guaranteed and is not portable. > > >>> > > >>> The rationale is that what is the point of forking and creating > > >>> more threads, when you can just as easily create more threads in > > >>> the parent without forking? The only reason to fork from a threaded > > >>> process is to call one of the exec() functions. > > >> > > >> Well, it worked until the last major set of changes to malloc. For me, the point > > >> was that I was able to have transparent background worker threads in any program > > >> regardless of its architecture, using the standard pthread fork hooks. Could you > > >> point me to the POSIX section covering fork and threads? If it's really not > > >> supposed to work then that's fine, but there's an awful lot of code there dedicated > > >> to support going threaded again after a fork. > > >> > > > > > > Practically, you can't go threaded again after a fork > > > (by which I mean creating new threads or use things > > > like mutexes etc.) in any posix system I know of. > > > > > > It would require that: > > > The forking thread stop until: > > > Every other thread has released every resource it owns > > > and reports itself to be in a "safe quiescent state", > > > or at least report every resource it owns, especially > > > locks, > > > and > > > After the fork: > > > The child, post fork, to take ownership of all > > > of them, and free them. > > > > > > You might be able to do that in a simple > > > threaded program, but consider then that the libraries may have > > > threads running in them of which you are unaware, and that > > > some of the resources may interract with resources owned by the > > > forking thread. > > > > > > Add to this that there may be a signal thrown into this mix as well > > > > > > (signals are the bane of thread developement) > > > > Well, I wouldn't mind showing all of you what I can of what I had been doing > > with the background threads -- it works pretty well modulo this particular > > malloc lock bug. Due to it being inappropriate to share library resources > > between a child and parent for an open socket connection, I always considered > > the only "safe" behavior to be going single-threaded for the duration of the fork > > processes in both the parent and child, and the pthread_atfork(3) hooks have been > > sufficient to do so. > > > In fact, try recent HEAD, it contains the fixed for deadlocks caused by > fork calls in mt processes. Also, see r185456, that may be directly > relevant to your problem. > > The MFC to the stable/7 is doable, but depends on the MFC of some stuff > committed by David Xu, that would take me some time to look into. Ah, thank you for the pointer. Seems this is an opportunity for me to catch up with our switch to SVN, then. I'll take a further look at this this weekend. For reference, these platforms passed the particular regression test I posted: Linux 2.6.18-92.1.17.el5 SunOS 5.10 Generic_137138-09 Darwin macintosh.green.homeunix.org 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008;root:xnu-1228.9.59~1/RELEASE_I386 i386 FreeBSD 7.0-RELEASE -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\ From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 20:20:21 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7D1106566B for ; Fri, 9 Jan 2009 20:20:21 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id D96978FC16 for ; Fri, 9 Jan 2009 20:20:20 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180158134.adsl.alicedsl.de [85.180.158.134]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id n09KKF9Z012908 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 9 Jan 2009 21:20:18 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n09KC2Jm002933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 9 Jan 2009 21:12:02 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n09KC1NA002932; Fri, 9 Jan 2009 21:12:01 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Fri, 9 Jan 2009 21:12:01 +0100 From: Ulrich Spoerlein To: perryh@pluto.rain.com Message-ID: <20090109201201.GA1538@roadrunner.spoerlein.net> Mail-Followup-To: perryh@pluto.rain.com, guru@unixarea.de, vladimirt@partygaming.com, freebsd-hackers@freebsd.org References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@freebsd.org, guru@unixarea.de, vladimirt@partygaming.com Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:20:22 -0000 On Thu, 08.01.2009 at 21:50:47 -0800, perryh@pluto.rain.com wrote: > Ulrich Spoerlein wrote: Ummm, out of curiosity, are your receiving your mail via UUCP? :) > > Please run > > % cat /dev/sndstat > > % ls -l /dev/dsp0 /dev/dsp0.0 > > > > The reason you are not seeing them with 'ls /dev/dsp*' is because > > devfs is creating the nodes when they are open(2)'ed. Using shell > > globbing will search the output of readdir(2) for matches to dsp* > > where devfs has no way of dynamically creating nodes (which ones > > should it create anyway?) > > In principle, everything that would be successfully created if > open(2)'ed. It doesn't necessarily need to actually create them, > but the results from readdir(2) should be as if they had been > created. The whole point of things like ls(1) and readdir(2) is > to find out what-all is available to be opened, without having to > already know the answer. Not according to my understanding, which may be flawed of course. devfs(4) would have to create all devices, which may be open(2)ed up front, for dsp that would have to be 32 instances (for my system): % ll /dev/dsp0.{0,9,11,21,31} crw-rw-rw- 1 root wheel 0, 142 Jan 9 20:57 /dev/dsp0.0 crw-rw-rw- 1 root wheel 0, 153 Jan 9 20:20 /dev/dsp0.11 crw-rw-rw- 1 root wheel 0, 154 Jan 9 20:20 /dev/dsp0.21 crw-rw-rw- 1 root wheel 0, 151 Jan 9 20:20 /dev/dsp0.31 crw-rw-rw- 1 root wheel 0, 152 Jan 9 20:20 /dev/dsp0.9 It would also cloud the information about devices in-use. > > This is a FAQ really. > > It may be an FAQ, but it is also a bug, granted one that may not be > easy to fix. You really want all cloneable instances to show up with a readdir, which would mean that they would have to created upon device attachment? I really don't think so ... For /dev/dsp0 the semantics are pretty clear: try to open /dev/dsp0, if it succeeds fine, if not, there is no vchan available and you're SOL. No need to play the guess-a-free-dsp-device game. Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt. From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 20:40:16 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B235910656DF for ; Fri, 9 Jan 2009 20:40:16 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: from kiwi-computer.com (keira.kiwi-computer.com [63.224.10.3]) by mx1.freebsd.org (Postfix) with SMTP id 483D68FC1F for ; Fri, 9 Jan 2009 20:40:16 +0000 (UTC) (envelope-from rick@kiwi-computer.com) Received: (qmail 83436 invoked by uid 2001); 9 Jan 2009 20:40:15 -0000 Date: Fri, 9 Jan 2009 14:40:14 -0600 From: "Rick C. Petty" To: perryh@pluto.rain.com Message-ID: <20090109204014.GA83381@keira.kiwi-computer.com> References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> User-Agent: Mutt/1.4.2.3i Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2008@kiwi-computer.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:40:17 -0000 On Thu, Jan 08, 2009 at 09:50:47PM -0800, perryh@pluto.rain.com wrote: > > In principle, everything that would be successfully created if > open(2)'ed. It doesn't necessarily need to actually create them, > but the results from readdir(2) should be as if they had been > created. The whole point of things like ls(1) and readdir(2) is > to find out what-all is available to be opened, without having to > already know the answer. That's not how devfs works. It's actually a feature that devfs doesn't list everything ever possible (things looked terrible back in the old MAKEDEV days with all those polluted names). I'd rather be able to list to see things that are in use, although at first glance I didn't like devfs hidden nodes. Otherwise you'd be stuck printing tunXXX through infinity instead of this: % ls /dev/tun* /dev/tun0 /dev/tun115 /dev/tun194 Maybe you could argue that dsp should work differently, but some sound cards and configurations would give you infinite (within reason) device nodes, IIRC. > > This is a FAQ really. > > It may be an FAQ, but it is also a bug, granted one that may not be > easy to fix. This is not a bug, it is designed behavior. It was intentionally written to dynamically create device nodes when needed. -- Rick C. Petty From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 21:36:33 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EC16106564A for ; Fri, 9 Jan 2009 21:36:33 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.171]) by mx1.freebsd.org (Postfix) with ESMTP id 46EEC8FC1A for ; Fri, 9 Jan 2009 21:36:32 +0000 (UTC) (envelope-from eitanadlerlist@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so12512830wfg.7 for ; Fri, 09 Jan 2009 13:36:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:user-agent :mime-version:to:subject:x-enigmail-version:openpgp:content-type :from; bh=7o6bFwK1oG/XkRdJbzVxGd6z4qmaxECGK1ovDDycJic=; b=U7S0bbt0ACGt0djxFuAoJe1LcFvSrHMXBc448lzTEDHv8AympL3So5+DlFY1BB7FZ5 THNh/D7LYjYcrlkw4YjcgyG5RLsx3R9CqElA+AMzwtL6YspUeIF3DzUlm1xPoQHWEVDd wf/5VoYMf7ZPcTOHEmPvLt5bExlWjo4DO6ym0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:user-agent:mime-version:to:subject :x-enigmail-version:openpgp:content-type:from; b=HXV4SE9o7VcskTSDoKjAgGMp64/3v73SAfox8JegonUEzKlJT8CqFwNX4hnZcCKHPX 5h1cfWJhOvjdJTj8mU7sfBJyo7d0VQll5mHjotBABpuKnqW/V8VzQZp2pDzTDsv0A4wx AmFxZGgHm5usI8Vh4efmHEl8bezngVHn0sHSU= Received: by 10.142.254.6 with SMTP id b6mr59421wfi.157.1231535035810; Fri, 09 Jan 2009 13:03:55 -0800 (PST) Received: from aargh.lan (ool-182fcc8b.dyn.optonline.net [24.47.204.139]) by mx.google.com with ESMTPS id 32sm43627541wfa.0.2009.01.09.13.03.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 09 Jan 2009 13:03:53 -0800 (PST) Message-ID: <4967BBB5.3030703@gmail.com> Date: Fri, 09 Jan 2009 16:03:49 -0500 User-Agent: Mozilla (X11; U; FreeBSD i386; en-US; ) Gecko Thunderbird Mnenhy/0.7.5.666 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.7 OpenPGP: id=E9C2CCD1; url=pgp.mit.edu Content-Type: multipart/mixed; boundary="------------050806020601080608000204" From: Eitan Adler Subject: bringing ee up to date X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:36:34 -0000 This is a multi-part message in MIME format. --------------050806020601080608000204 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I think that these three files bring ee up to date from 1.4.2 to 1.4.6. -- Eitan Adler "Security is increased by designing for the way humans actually behave." -Jakob Nielsen --------------050806020601080608000204 Content-Type: text/plain; name="ee.msg.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ee.msg.patch" --- ee/nls/en_US.US-ASCII/ee.msg 2009-01-09 15:52:22.000000000 -0500 +++ easyedit/nls/en_US.US-ASCII/ee.msg 1996-11-29 22:24:20.000000000 -0500 @@ -3,7 +3,7 @@ $ $ For ee patchlevel 3 $ -$ $FreeBSD$ +$ $Header: /home/hugh/sources/old_ae/RCS/ee.msg,v 1.8 1996/11/30 03:23:40 hugh Exp $ $ $ $set 1 @@ -51,7 +51,7 @@ 41 "^f undelete char ^n next page ^x search " 42 "^g begin of line ^o end of line ^y delete line " 43 "^h backspace ^p prev page ^z undelete line " -44 "^[ (escape) menu ESC-Enter: exit ee " +44 "^[ (escape) menu " 45 " " 46 "Commands: " 47 "help : get this info file : print file name " @@ -68,7 +68,7 @@ 58 "^a ascii code ^x search ^z undelete line ^d down ^n next page " 59 "^b bottom of text ^g begin of line ^w delete word ^l left " 60 "^t top of text ^o end of line ^v undelete word ^r right " -61 "^c command ^k delete char ^f undelete char ESC-Enter: exit ee " +61 "^c command ^k delete char ^f undelete char " 62 "help : get help info |file : print file name |line : print line # " 63 "read : read a file |char : ascii code of char |0-9 : go to line \"#\"" 64 "write: write a file |case : case sensitive search |exit : leave and save " @@ -110,7 +110,7 @@ 100 " ...searching" 101 "string \"%s\" not found" 102 "search for: " -103 "could not exec %s" +103 "could not exec %s\n" 104 "press return to continue " 105 "press Esc to cancel" 106 "menu too large for window" @@ -154,8 +154,8 @@ 144 "NOEIGHTBIT" 145 "emacs key bindings " 146 "^a beginning of line ^i tab ^r restore word " -147 "^b back 1 char ^j undel char ^t begin of file " -148 "^c command ^k delete line ^u end of file " +147 "^b back 1 char ^j undel char ^t top of text " +148 "^c command ^k delete line ^u bottom of text " 149 "^d delete char ^l undelete line ^v next page " 150 "^e end of line ^m newline ^w delete word " 151 "^f forward 1 char ^n next line ^x search " @@ -164,7 +164,7 @@ 154 "^[ (escape) menu ^y search prompt ^k delete line ^p prev li ^g prev page" 155 "^o ascii code ^x search ^l undelete line ^n next li ^v next page" 156 "^u end of file ^a begin of line ^w delete word ^b back 1 char " -157 "^t begin of file ^e end of line ^r restore word ^f forward 1 char " +157 "^t top of text ^e end of line ^r restore word ^f forward 1 char " 158 "^c command ^d delete char ^j undelete char ^z next word " 159 "EMACS" 160 "NOEMACS" --------------050806020601080608000204 Content-Type: text/plain; name="ee.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ee.patch" Only in easyedit/: Changes diff -u ee/ee.1 easyedit/ee.1 --- ee/ee.1 2009-01-09 15:52:22.000000000 -0500 +++ easyedit/ee.1 2001-12-15 23:49:37.000000000 -0500 @@ -1,623 +1,543 @@ .\" -.\" $FreeBSD$ .\" -.Dd August 30, 1995 -.Dt EE 1 -.Os -.Sh NAME -.Nm ee -.Nd easy editor -.Sh SYNOPSIS -.Nm -.Op Fl eih -.Op +# -.Op Ar -.Nm ree -.Op Fl eih -.Op +# -.Op Ar -.Sh DESCRIPTION -The -.Nm -utility -is a simple screen oriented text editor. -It is always in text insertion -mode unless there is a prompt at the bottom of the terminal, or a -menu present (in a box in the middle of the terminal). -The -.Nm ree -utility is the same as -.Nm , -but restricted to editing the named +.\" To format this reference page, use the command: +.\" +.\" nroff -man ee.1 +.\" +.\" $Header: /home/hugh/sources/old_ae/RCS/ee.1,v 1.22 2001/12/16 04:49:27 hugh Exp $ +.\" +.\" +.TH ee 1 "" "" "" "" +.SH NAME +ee \- easy editor +.SH SYNOPSIS +.nf +ee [-e] [-i] [-h] [+#] [\fIfile\fR ...] +ree [-e] [-i] [-h] [+#] [\fIfile\fR ...] +.ta +.fi +.ad b +.SH DESCRIPTION +The command +.I ee +is a simple screen oriented text editor. It is always in text insertion +mode unless there is a prompt at the bottom of the terminal, or a +menu present (in a box in the middle of the terminal). The command +.I ree +is the same as +.I ee, +but restricted to editing the named file (no file operations, or shell escapes are allowed). -.Pp -For -.Nm -to work properly, the environment variable -.Ev TERM -must be set to indicate the type of terminal being used. -For -example, for an -.Tn HP 700/92 -terminal, the -.Ev TERM -variable should be set to "70092". -See your System Administrator if +.PP +An editor with similar user-friendly qualities but more features is available +and is called +.I aee. +.PP +For +.I ee +to work properly, the environment variable +.SM TERM +must be set to indicate the type of terminal being used. For +example, for an +.SM HP 700/92 +terminal, the +.SM TERM +variable should be set to "70092". See your System Administrator if you need more information. -.Pp -The following options are available: -.Bl -tag -width indent -.It Fl e -Turn off expansion of tab character to spaces. -.It Fl i -Turn off display of information window at top of terminal. -.It Fl h -Turn off highlighting of borders of windows and menus (improves +.\" +.\" options +.\" +.SS Options +The following options are available from the command line: +.PP +.TP 4 +.B -e +Turns off expansion of tab character to spaces. +.TP +.B -i +Turns off display of information window at top of terminal. +.TP +.B -h +Turns off highlighting of borders of windows and menus (improves performance on some terminals). -.It Sy +# -Move the cursor to line '#' at startup. -.El -.Ss "Control keys" -To do anything other than insert text, the user must use the control -keys (the -.Li Control -key, represented by a "^", pressed in conjunction with an -alphabetic key, e.g., ^a) and function keys available on the keyboard -(such as -.Em "Next Page" , -.Em "Prev Page" , +.TP +.B +# +Moves the cursor to line '#' at startup. +.br +.\" +.\" control keys +.\" +.SS "Control keys" +To do anything other than insert text, the user must use the control +keys (the +.B Control +key, represented by a "^", pressed in conjunction with an +alphabetic key, e.g., ^a) and function keys available on the keyboard +(such as +.BR "Next Page" ", " "Prev Page" , arrow keys, etc.). -.Pp -Since not all terminals have function keys, -.Nm -has the basic cursor movement functions assigned to control keys as -well as more intuitive keys on the keyboard when available. -For -instance, to move the cursor up, the user can use the up arrow key, -or -.Em ^u . -.Bl -tag -width indent -.It ^a -Prompt for the decimal value of a character to insert. -.It ^b -Move to the bottom of the text. -.It ^c -Get the prompt for a command. -.It ^d -Move the cursor down. -.It ^e -Prompt for the string to search for. -.It ^f -Undelete the last deleted character. -.It ^g -Move to the beginning of the line. -.It ^h -Backspace. -.It ^i -Tab. -.It ^j -Insert a newline. -.It ^k -Delete the character the cursor is sitting on. -.It ^l -Move the cursor left. -.It ^m -Insert a newline. -.It ^n -Move to the next page. -.It ^o -Move to the end of the line. -.It ^p -Move to the previous page. -.It ^r -Move the cursor to the right. -.It ^t -Move to the top of the text. -.It ^u -Move the cursor up. -.It ^v -Undelete the last deleted word. -.It ^w -Delete the word beginning at the cursor position. -.It ^x -Search. -.It ^y -Delete from the cursor position to the end of line. -.It ^z -Undelete the last deleted line. -.It ^[ (ESC) -Pop up menu. -.El -.Ss "EMACS keys mode" -Since many shells provide an Emacs mode (for cursor movement and other editing -operations), some bindings that may be more useful for people familiar with -those bindings have been provided. -These are accessible via the -.Em settings -menu, or via the initialization file (see below). -The mappings are as follows: -.Bl -tag -width indent -.It ^a -Move to the beginning of the line. -.It ^b -Back 1 character. -.It ^c -Command prompt. -.It ^d -Delete character the cursor is sitting on. -.It ^e -End of line. -.It ^f -Forward 1 character. -.It ^g -Go back 1 page. -.It ^h -Backspace. -.It ^i -Tab. -.It ^j -Undelete last deleted character. -.It ^k -Delete line. -.It ^l -Undelete last deleted line. -.It ^m -Insert a newline. -.It ^n -Move to the next line. -.It ^o -Prompt for the decimal value of a character to insert. -.It ^p -Previous line. -.It ^r -Restore last deleted word. -.It ^t -Move to the top of the text. -.It ^u -Move to the bottom of the text. -.It ^v -Move to the next page. -.It ^w -Delete the word beginning at the cursor position. -.It ^y -Prompt for the string to search for. -.It ^z -Next word. -.It ^[ (ESC) -Pop up menu. -.El -.Ss "Function Keys" -.Bl -tag -width indent -.It Next Page +.PP +Since not all terminals have function keys, +.I ee +has the basic cursor movement functions assigned to control keys as +well as more intuitive keys on the keyboard when available. For +instance, to move the cursor up, the user can use the up arrow key, +or +.BR ^u . +.RS 4 +.nf +.ta 1.4i +.sp +^a Prompt for the decimal value of a character to insert. +^b Move to the bottom of the text. +^c Get the prompt for a command. +^d Move the cursor down. +^e Prompt for the string to search for. +^f Undelete the last deleted character. +^g Move to the beginning of the line. +^h Backspace. +^i Tab. +^j Insert a newline. +^k Delete the character the cursor is sitting on. +^l Move the cursor left. +^m Insert a newline. +^n Move to the next page. +^o Move to the end of the line. +^p Move to the previous page. +^r Move the cursor to the right. +^t Move to the top of the text. +^u Move the cursor up. +^v Undelete the last deleted word. +^w Delete the word beginning at the cursor position. +^x Search. +^y Delete from the cursor position to the end of line. +^z Undelete the last deleted line. +^[ (ESC) Pop up menu. +.ta +.fi +.RE +.sp +.SS "EMACS keys mode" +.PP +Since many shells provide an Emacs mode (for cursor movement and other editing +operations), some bindings that may be more useful for people familiar with +those bindings have been provided. These are accessible via the +.B settings +menu, or via the initialization file (see below). The mappings are as follows: +.RS +.nf +.ta 1.4i +^a Move to the beginning of the line. +^b Back 1 character. +^c Command prompt. +^d Delete character the cursor is sitting on. +^e End of line. +^f Forward 1 character. +^g Go back 1 page. +^h Backspace. +^i Tab. +^j Undelete last deleted character. +^k Delete line. +^l Undelete last deleted line. +^m Insert a newline. +^n Move to the next line. +^o Prompt for the decimal value of a character to insert. +^p Previous line. +^r Restore last deleted word. +^t Move to the top of the text. +^u Move to the bottom of the text. +^v Move to the next page. +^w Delete the word beginning at the cursor position. +^y Prompt for the string to search for. +^z Next word. +^[ (ESC) Pop up menu. +.ta +.fi +.RE +.sp +.\" +.\" function keys +.\" +.SS "Function Keys" +.RS 4 +.IP "\fBNext Page\fR" Move to the next page. -.It Prev Page +.IP "\fBPrev Page\fR" Move to the previous page. -.It Delete Char +.IP "\fBDelete Char\fR" Delete the character the cursor is on. -.It Delete Line +.IP "\fBDelete Line\fR" Delete from the cursor to the end of line. -.It Insert line +.IP "\fBInsert line\fR" Insert a newline at the cursor position. -.It Arrow keys +.IP "\fBArrow keys\fR" Move the cursor in the direction indicated. -.El -.Ss Commands -Some operations require more information than a single keystroke can -provide. -For the most basic operations, there is a menu that can be -obtained by pressing the -.Tn ESC -key. -The same operations, and more can be performed by obtaining the +.RE +.\" +.\" commands +.\" +.SS Commands +.PP +Some operations require more information than a single keystroke can +provide. For the most basic operations, there is a menu that can be +obtained by pressing the +.SM \fBESC\fR +key. The same operations, and more can be performed by obtaining the command prompt (^c) and typing in one of the commands below. -.Bl -tag -width indent -.It ! Ns Ar cmd -Execute -.Ar cmd -in a shell. -.It 0-9 +.RS 4 +.IP "!\fBcmd\fR" +Execute \fBcmd\fR in a shell. +.IP "\fB0-9\fR" Move to the line indicated. -.It case +.IP "\fBcase\fR" Make searches case sensitive. -.It character -Display the ASCII value of the character at the cursor. -.It exit +.IP "\fBcharacter\fR" +Display the ascii value of the character at the cursor. +.IP "\fBexit\fR" Save the edited text, and leave the editor. -.It expand +.IP "\fBexpand\fR" Expand tabs to spaces. -.It file +.IP "\fBfile\fR" Print the name of the file. -.It help +.IP "\fBhelp\fR" Display help screen. -.It line +.IP "\fBline\fR" Display the current line number. -.It nocase +.IP "\fBnocase\fR Make searches insensitive to case (the default). -.It noexpand -Do not expand tab to spaces when the TAB key is pressed. -.It quit +.IP "\fBnoexpand\fR" +Don't expand tab to spaces when the TAB key is pressed. +.IP "\fBquit\fR" Leave the editor without saving changes. -.It read Ar file -Read the named -.Ar file . -.It write Ar file -Write the text to the named -.Ar file . -.El -.Ss "Menu Operations" -Pop-up menus can be obtained by pressing the -.Em escape -key (or -.Em ^[ -if no -.Em escape -key is present). -When in the menu, the escape key can be -used to leave the menu without performing any operations. -Use the up and -down arrow keys, or -.Em ^u -for moving up and -.Em ^d -for moving down to move to the desired items in the menu, then press -.Em return +.IP "\fBread\fR \fIfile\fR" +Read the named \fIfile\fR. +.IP "\fBwrite\fR \fIfile\fR" +Write the text to the named \fIfile\fR. +.RE +.\" +.\" menu operations +.\" +.SS "Menu Operations" +.PP +Pop-up menus can be obtained by pressing the +.B escape +key (or +.B ^[ +if no +.B escape +key is present). When in the menu, the escape key can be +used to leave the menu without performing any operations. Use the up and +down arrow keys, or +.B ^u +for moving up and +.B ^d +for moving down to move to the desired items in the menu, then press +.B return to perform the indicated task. -.Pp -To the left of each menu item is a letter, which if the corresponding +.PP +To the left of each menu item is a letter, which if the corresponding letter is pressed on the keyboard selects that menu entry. -.Pp -The main menu in -.Nm -is as follows: -.Bl -tag -width indent -.It leave editor -If changes have been made, the user will get a menu prompting whether or +.PP +The main menu in \fIee\fR is as follows: +.RS 4 +.IP "\fBleave editor\fR" +If changes have been made, the user will get a menu prompting whether or not the changes should be saved. -.It help -Display a help screen, with all of the keyboard operations and commands. -.It file operations -Pop up a menu for selecting whether to read a file, write to a file, or -save the current contents of the editor, as well as send the contents of -the editor to a print command (see the section -.Sx "Initializing ee from a file" ) . -.It redraw screen -Provide a means to repaint the screen if the screen has been corrupted. -.It settings -Show the current values of the operating modes, and right margin. -By -pressing return when the cursor is on a particular item, the value can be -changed. -To leave this menu, press the -.Em escape -key. -(See -.Sx Modes +.IP "\fBhelp\fR" +Displays a help screen, with all of the keyboard operations and commands. +.IP "\fBfile operations\fR" +Pops up a menu for selecting whether to read a file, write to a file, or +save the current contents of the editor, as well as send the contents of +the editor to a print command (see the section \fBInitializing ee from a +file\fR). +.IP "\fBredraw screen\fR" +Provides a means to repaint the screen if the screen has been corrupted. +.IP "\fBsettings\fR" +Shows the current values of the operating modes, and right margin. By +pressing return when the cursor is on a particular item, the value can be +changed. To leave this menu, press the \fBescape\fR key. (See \fBModes\fR below.) -.It search -Pop up a menu in which the user may choose to enter a string to search +.IP "\fBsearch\fR" +.br +Pops up a menu in which the user may choose to enter a string to search for, or search for a string already entered. -.It miscellaneous -Pop up a menu that allows the user to format the current paragraph, +.IP "\fBmiscellaneous\fR" +Pops up a menu that allows the user to format the current paragraph, execute a shell command, or check the spelling of the text in the editor. -.El -.Ss "Paragraph Formatting" -Paragraphs are defined for -.Nm -by a block of text bounded by: -.Bl -bullet -width indent -.It +.RE +.\" +.\" paragraph formatting +.\" +.SS "Paragraph Formatting" +.PP +Paragraphs are defined for \fIee\fR by a block of text bounded by: +.sp +.RS 8 +.IP \(bu Begin or end of file. -.It +.IP \(bu Line with no characters, or only spaces and/or tabs. -.It +.IP \(bu Line starting with a period ('.') or right angle bracket ('>'). -.El -.Pp -A paragraph may be formatted two ways: explicitly by choosing the -.Em format paragraph -menu item, or by setting -.Nm -to automatically -format paragraphs. -The automatic mode may be set via a menu, or via the +.RE +.PP +A paragraph may be formatted two ways: explicitly by choosing the +\fBformat paragraph\fR menu item, or by setting \fIee\fR to automatically +format paragraphs. The automatic mode may be set via a menu, or via the initialization file. -.Pp -There are three states for text operation in -.Nm : -free-form, margins, +.PP +There are three states for text operation in \fIee\fR: free-form, margins, and automatic formatting. -.Pp -"Free-form" is best used for things like programming. -There are no +.PP +"Free-form" is best used for things like programming. There are no restrictions on the length of lines, and no formatting takes place. -.Pp -"Margins" allows the user to type in text without having to worry about going -beyond the right margin (the right margin may be set in the -.Em settings -menu, the default is for the margin to be the right edge of the -terminal). -This is the mode that allows the -.Em format paragraph -menu item to work. -.Pp -"Automatic formatting" provides word-processor-like behavior. -The user -may type in text, while -.Nm -will make sure the entire paragraph fits -within the width of the terminal every time the user inserts a space after -typing or deleting text. -Margin observation must also be enabled in order for +.PP +"Margins" allows the user to type in text without having to worry about going +beyond the right margin (the right margin may be set in the \fBsettings\fR +menu, the default is for the margin to be the right edge of the +terminal). This is the mode that allows the \fBformat paragraph\fR menu +item to work. +.PP +"Automatic formatting" provides word-processor-like behavior. The user +may type in text, while \fIee\fR will make sure the entire paragraph fits +within the width of the terminal every time the user inserts a space after +typing or deleting text. Margin observation must also be enabled in order for automatic formatting to occur. -.Ss Modes -Although -.Nm -is a 'modeless' editor (it is in text insertion mode all the -time), there are modes in some of the things it does. -These include: -.Bl -tag -width indent -.It tab expansion +.\" +.\" modes +.\" +.SS Modes +.PP +Although ee is a 'modeless' editor (it is in text insertion mode all the +time), there are modes in some of the things it does. These include: +.RS 4 +.IP "\fBtab expansion\fR" Tabs may be inserted as a single tab character, or replaced with spaces. -.It case sensitivity -The search operation can be sensitive to whether characters are upper- or +.IP "\fBcase sensitivity\fR" +The search operation can be sensitive to whether characters are upper- or lower-case, or ignore case completely. -.It margins observed +.IP "\fBmargins observed\fR" Lines can either be truncated at the right margin, or extend on forever. -.It auto paragraph formatting -While typing in text, the editor can try to keep it looking reasonably well +.IP "\fBauto paragraph formatting\fR" +While typing in text, the editor can try to keep it looking reasonably well within the width of the screen. -.It eightbit characters -Toggle whether eight bit characters are displayed as their value in angle -brackets (e.g.\& "<220>") or as a character. -.It info window -A window showing the keyboard operations that can be performed can be +.IP "\fBeightbit characters\fR" +Toggles whether eight bit characters are displayed as their value in angle +brackets (e.g. "<220>") or as a character. +.IP "\fBinfo window\fR" +A window showing the keyboard operations that can be performed can be displayed or not. -.It emacs keys +.IP "\fBemacs keys\fR" Control keys may be given bindings similar to emacs, or not. -.It 16 bit characters -Toggles whether sixteen bit characters are handled as one 16-bit quantities or -two 8-bit quantities. -This works primarily with the Chinese Big 5 code set. -.El -.Pp -You may set these modes via the initialization file (see below), or with a +.IP "\f16 bit characters\fR" +Toggles whether sixteen bit characters are handled as one 16-bit quantities or +two 8-bit quantities. This works primarily with the Chinese Big 5 code set. +.RE +.PP +You may set these modes via the initialization file (see below), or with a menu (see above). -.Ss "Spell Checking" -There are two ways to have the spelling in the text checked from -.Nm . -One is by the traditional -.Xr spell 1 -command, the other is with the -optional -.Nm ispell -command. -.Pp -Using -.Nm spell , -the words that are not recognized will be placed at the top -of the file. -For the -.Nm ispell -option, the file is written to disk, -then -.Nm ispell -run on the file, and the file read back in once -.Nm ispell -has completed making changes to the file. -.Ss "Printing the contents of the editor" -The user may select a menu item which prints the contents of the editor. -The -.Nm -utility pipes the text in the editor to the command specified by the -initialization command -.Em printcommand -(see the section -.Sx Initializing ee from a file -below). -The default is to send the contents to -.Xr lp 1 . -.Pp -Whatever the user assigns to -.Em printcommand -must take input from -standard input. -See your system administrator for more details. -.Ss "Shell operations" -Shell commands can be executed from within -.Nm -by selecting the -.Em shell command -item in the -.Em miscellaneous -menu, or by placing an exclamation mark ("!") before the command to -execute at the -.Em command: -prompt. -Additionally, the user may direct the contents of the edit buffer -out to a shell operation (via a pipe) by using the left angle bracket -(">"), followed by a "!" and the shell command to execute. -The output of -a shell operation can also be directed into the edit buffer by using a -right angle bracket ("<") before the exclamation mark. -These can even be -used together to send output to a shell operation and read back the -results into the editor. -So, if the editor contained a list of words -to be sorted, they could be sorted by typing the following at the command +.\" +.\" spell checking +.\" +.SS "Spell Checking" +.PP +There are two ways to have the spelling in the text checked from \fIee\fR. +One is by the traditional \fIspell\fR(1) command, the other is with the +optional \fIispell\fR(1) command. +.PP +Using \fIspell\fR, the words that are not recognized will be placed at the top +of the file. For the \fIispell\fR option, the file is written to disk, +then \fIispell\fR run on the file, and the file read back in once +\fIispell\fR has completed making changes to the file. +.\" +.\" printing +.\" +.SS "Printing the contents of the editor" +.PP +The user may select a menu item which prints the contents of the editor. +.I ee +pipes the text in the editor to the command specified by the +initialization command +.B printcommand +(see the section +.B Initializing ee from a file +below). The default is to send the contents to "lp". +.PP +Whatever the user assigns to +.B printcommand +must take input from +standard input. See your system administrator for more details. +.\" +.\" shell operations +.\" +.SS "Shell operations" +.PP +Shell commands can be executed from within +.I ee +by selecting the +.B shell command +item in the +.B miscellaneous +menu, or by placing an exclamation mark ("!") before the command to +execute at the +.B command: +prompt. Additionally, the user may direct the contents of the edit buffer +out to a shell operation (via a pipe) by using the left angle bracket +(">"), followed by a "!" and the shell command to execute. The output of +a shell operation can also be directed into the edit buffer by using a +right angle bracket ("<") before the exclamation mark. These can even be +used together to send output to a shell operation and read back the +results into the editor. So, if the editor contained a list of words +to be sorted, they could be sorted by typing the following at the command prompt: -.Dl >"). -.It 16bit +.IP \fB16bit\fR Turns on handling of 16-bit characters. -.It no16bit +.IP \fbno16bit\fR Turns off handling of 16-bit characters. -.It emacs +.IP \fBemacs\fR Turns on emacs key bindings. -.It noemacs +.IP \fBnoemacs\fR Turns off emacs key bindings. -.El -.Ss "Save Editor Configuration" -When using this entry from the -.Em settings -menu, the user may choose to save the current configuration of -the editor (see -.Sx Initializing ee from a file -above) to a file named -.Pa .init.ee -in the current directory or the user's home directory. -If a file named -.Pa .init.ee -already exists, it will be renamed -.Pa .init.ee.old . -.Sh CAVEATS -THIS MATERIAL IS PROVIDED "AS IS". -THERE ARE -NO WARRANTIES OF ANY KIND WITH REGARD TO THIS -MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. -Neither -Hewlett-Packard nor Hugh Mahon shall be liable -for errors contained herein, nor for -incidental or consequential damages in -connection with the furnishing, performance or -use of this material. -Neither Hewlett-Packard -nor Hugh Mahon assumes any responsibility for -the use or reliability of this software or -documentation. -This software and -documentation is totally UNSUPPORTED. -There -is no support contract available. -Hewlett-Packard -has done NO Quality Assurance on ANY -of the program or documentation. -You may find -the quality of the materials inferior to -supported materials. -.Pp -Always make a copy of files that cannot be easily reproduced before -editing. -Save files early, and save often. -.Ss "International Code Set Support" -The -.Nm -utility supports single-byte character code sets (eight-bit clean), or the -Chinese Big-5 code set. -(Other multi-byte code sets may function, but the -reason Big-5 works is that a two-byte character also takes up two columns on +.RE +.\" +.\" save editor configuration +.\" +.SS "Save Editor Configuration" +.PP +When using this entry from the +.B settings +menu, the user may choose to save the current configuration of +the editor (see \fBInitializing ee from a +file\fR above) to a file named +.I .init.ee +in the current directory or the user's home directory. If a file named +.I .init.ee +already exists, it will be renamed +.IR .init.ee.old . +.\" +.\" Caveats +.\" +.SH CAVEATS +.PP +THIS MATERIAL IS PROVIDED "AS IS". THERE ARE +NO WARRANTIES OF ANY KIND WITH REGARD TO THIS +MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. Neither +Hewlett-Packard nor Hugh Mahon shall be liable +for errors contained herein, nor for +incidental or consequential damages in +connection with the furnishing, performance or +use of this material. Neither Hewlett-Packard +nor Hugh Mahon assumes any responsibility for +the use or reliability of this software or +documentation. This software and +documentation is totally UNSUPPORTED. There +is no support contract available. Hewlett-Packard +has done NO Quality Assurance on ANY +of the program or documentation. You may find +the quality of the materials inferior to +supported materials. +.PP +Always make a copy of files that cannot be easily reproduced before +editing. Save files early, and save often. +.SS "International Code Set Support" +.I ee +supports single-byte character code sets (eight-bit clean), or the +Chinese Big-5 code set. (Other multi-byte code sets may function, but the +reason Big-5 works is that a two-byte character also takes up two columns on the screen.) -.Sh WARNINGS -The automatic paragraph formatting operation +.SH WARNINGS +The automatic paragraph formatting operation may be too slow for slower systems. -.Sh FILES -.Bl -tag -width /usr/share/misc/init.ee -compact -.It Pa /usr/share/misc/init.ee -.It Pa $HOME/.init.ee -.It Pa .init.ee -.El -.Sh AUTHORS -The software -.Nm -was developed by -.An Hugh Mahon . -.Pp -This software and documentation contains -proprietary information which is protected by -copyright. -All rights are reserved. -.Pp -Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996 Hugh Mahon. -.Sh "SEE ALSO" -.Xr ispell 1 Pq Pa ports/textproc/ispell , -.Xr lpr 1 , -.Xr spell 1 , -.Xr termcap 5 , -.Xr terminfo 5 , -.Xr environ 7 +.SH FILES +.PP +.I /usr/local/lib/init.ee +.br +.I $HOME/.init.ee +.br +.I .init.ee +.SH AUTHOR +.PP +The software +.I ee +was developed by Hugh Mahon. +.PP +This software and documentation contains +proprietary information which is protected by +copyright. All rights are reserved. +.PP +Copyright (c) 1990, 1991, 1992, 1993, 1995, 1996, 2001 Hugh Mahon. +.SH "SEE ALSO" +.PP +termcap(4), terminfo(4), environ(5), spell(1), ispell(1), lp(1), aee(1) + diff -u ee/ee.c easyedit/ee.c --- ee/ee.c 2009-01-09 15:52:22.000000000 -0500 +++ easyedit/ee.c 2002-09-20 20:46:16.000000000 -0400 @@ -48,11 +48,11 @@ | This software and documentation contains | proprietary information which is protected by | copyright. All rights are reserved. + | + | $Header: /home/hugh/sources/old_ae/RCS/ee.c,v 1.99 2001/12/24 05:43:32 hugh Exp $ + | */ -#include -__FBSDID("$FreeBSD$"); - char *ee_copyright_message = "Copyright (c) 1986, 1990, 1991, 1992, 1993, 1994, 1995, 1996 Hugh Mahon "; @@ -62,41 +62,45 @@ "copyright. All rights are reserved." }; -char *version = "@(#) ee, version 1.4.1"; +#include "ee_version.h" + +char *version = "@(#) ee, version " EE_VERSION " $Revision: 1.99 $"; #ifdef NCURSE #include "new_curse.h" -#elif HAS_NCURSES -#include #else #include #endif -#ifdef HAS_CTYPE -#include -#endif -#include -#include -#include -#include -#include #include +#include #include #include +#include +#include +#include + #ifdef HAS_SYS_WAIT #include #endif -#ifdef HAS_STDARG -#include -#endif + #ifdef HAS_STDLIB #include #endif -#include + +#ifdef HAS_STDARG +#include +#endif + #ifdef HAS_UNISTD #include #endif +#ifdef HAS_CTYPE +#include +#endif + + #ifndef NO_CATGETS #include #include @@ -200,11 +204,8 @@ unsigned char *d_word; /* deleted word */ unsigned char *d_line; /* deleted line */ char in_string[513]; /* buffer for reading a file */ -unsigned char *print_command = "lpr"; /* string to use for the print command */ +unsigned char *print_command = "lp"; /* string to use for the print command */ unsigned char *start_at_line = NULL; /* move to this line at start of session*/ -const char count_text_default[] = "==============================================================================="; -int count_text_len = sizeof(count_text_default); /* length of the line above */ -char count_text[sizeof(count_text_default)]; /* buffer for current position display */ int in; /* input character */ FILE *temp_fp; /* temporary file pointer */ @@ -220,7 +221,6 @@ WINDOW *text_win; WINDOW *help_win; WINDOW *info_win; -WINDOW *count_win; #if defined(__STDC__) || defined(__cplusplus) #define P_(s) s @@ -300,7 +300,7 @@ int quit P_((int noverify)); void edit_abort P_((int arg)); void delete_text P_((void)); -int write_file P_((char *file_name, int warn_if_exists)); +int write_file P_((char *file_name)); int search P_((int display_message)); void search_prompt P_((void)); void del_char P_((void)); @@ -341,7 +341,6 @@ char *resolve_name P_((char *name)); int restrict_mode P_((void)); int unique_test P_((char *string, char *list[])); -void renumber_lines P_((struct text *firstline, int startnumber)); void strings_init P_((void)); #undef P_ @@ -538,23 +537,29 @@ char *chinese_cmd, *nochinese_cmd; +#ifndef __STDC__ +#ifndef HAS_STDLIB +extern char *malloc(); +extern char *realloc(); +extern char *getenv(); +FILE *fopen(); /* declaration for open function */ +#endif /* HAS_STDLIB */ +#endif /* __STDC__ */ int main(argc, argv) /* beginning of main program */ int argc; char *argv[]; { - /* Always read from (and write to) a terminal. */ - if (!isatty(STDIN_FILENO) || !isatty(STDOUT_FILENO)) { - fprintf(stderr, "ee's standard input and output must be a terminal\n"); - exit(1); - } + int counter; + pid_t parent_pid; + + for (counter = 1; counter < 24; counter++) + signal(counter, SIG_IGN); signal(SIGCHLD, SIG_DFL); signal(SIGSEGV, SIG_DFL); signal(SIGINT, edit_abort); - signal(SIGHUP, edit_abort); - d_char = malloc(3); /* provide a buffer for multi-byte chars */ d_word = malloc(150); *d_word = (char) NULL; @@ -575,7 +580,7 @@ scr_pos =0; scr_vert = 0; scr_horz = 0; - bit_bucket = fopen(_PATH_DEVNULL, "w"); + bit_bucket = fopen("/dev/null", "w"); edit = TRUE; gold = case_sen = FALSE; shell_fork = TRUE; @@ -604,26 +609,30 @@ clear_com_win = TRUE; + counter = 0; + while(edit) { - if (info_window) - { - snprintf(count_text, count_text_len, "L: %d C: %d %s", \ - curr_line->line_number, scr_horz + 1, count_text_default); - wmove(count_win, 0, 0); - if (!nohighlight) - wstandout(count_win); - wprintw(count_win, count_text); - wstandend(count_win); - wnoutrefresh(count_win); - } - - wnoutrefresh(text_win); - doupdate(); + wrefresh(text_win); in = wgetch(text_win); if (in == -1) - continue; - + exit(0); + /* + | The above check used to work to detect if the parent + | process died, but now it seems we need a more + | sophisticated check. + */ + if (counter > 50) + { + parent_pid = getppid(); + if (parent_pid == 1) + edit_abort(1); + else + counter = 0; + } + else + counter++; + resize_check(); if (clear_com_win) @@ -821,7 +830,6 @@ if (temp_buff->next_line != NULL) temp_buff->next_line->prev_line = curr_line; curr_line->next_line = temp_buff->next_line; - renumber_lines(curr_line->next_line, curr_line->line_number + 1); temp2 = temp_buff->line; if (in == 8) { @@ -955,13 +963,13 @@ } else { - waddch(window, (unsigned char)character ); + waddch(window, (char)character ); return(1); } } else { - waddch(window, (unsigned char)character); + waddch(window, (char)character); return(1); } for (i2 = 0; (string[i2] != (char) NULL) && (((column+i2+1)-horiz_offset) < last_col); i2++) @@ -1066,8 +1074,8 @@ temp_nod->line = extra= malloc(10); temp_nod->line_length = 1; temp_nod->max_length = 10; + temp_nod->line_number = curr_line->line_number + 1; temp_nod->next_line = curr_line->next_line; - renumber_lines(temp_nod, curr_line->line_number + 1); if (temp_nod->next_line != NULL) temp_nod->next_line->prev_line = temp_nod; temp_nod->prev_line = curr_line; @@ -1519,10 +1527,8 @@ left(TRUE); else if (in == KEY_RIGHT) right(TRUE); - else if (in == KEY_HOME) - bol(); - else if (in == KEY_END) - eol(); + else if ( in == KEY_HOME) + top(); else if ( in == KEY_UP) up(); else if (in == KEY_DOWN) @@ -1688,7 +1694,7 @@ cmd_str = cmd_str2 = get_string(file_write_prompt_str, TRUE); } tmp_file = resolve_name(cmd_str); - write_file(tmp_file, 1); + write_file(tmp_file); if (tmp_file != cmd_str) free(tmp_file); } @@ -1869,7 +1875,7 @@ esc_flag = FALSE; in = wgetch(com_win); if (in == -1) - continue; + exit(0); if (((in == 8) || (in == 127) || (in == KEY_BACKSPACE)) && (g_pos > 0)) { tmp_int = g_horz; @@ -1894,7 +1900,7 @@ esc_flag = TRUE; in = wgetch(com_win); if (in == -1) - continue; + exit(0); } *nam_str = in; g_pos++; @@ -1968,7 +1974,7 @@ int number; int i; char *ptr; - char *direction = NULL; + char *direction; struct text *t_line; ptr = cmd_str; @@ -2039,7 +2045,7 @@ { char *buff; int count; - struct files *temp_names = NULL; + struct files *temp_names; char *name; char *ptr; int no_more_opts = FALSE; @@ -2059,7 +2065,7 @@ input_file = FALSE; recv_file = FALSE; count = 1; - while ((count < numargs) && (!no_more_opts)) + while ((count < numargs)&& (!no_more_opts)) { buff = arguments[count]; if (!strcmp("-i", buff)) @@ -2083,7 +2089,7 @@ fprintf(stderr, usage4); exit(1); } - else if (*buff == '+') + else if ((*buff == '+') && (start_at_line == NULL)) { buff++; start_at_line = buff; @@ -2315,8 +2321,8 @@ if (!(*append)) /* if not append to current line, insert new one */ { tline = txtalloc(); /* allocate data structure for next line */ + tline->line_number = curr_line->line_number + 1; tline->next_line = curr_line->next_line; - renumber_lines(tline, curr_line->line_number + 1); tline->prev_line = curr_line; curr_line->next_line = tline; if (tline->next_line != NULL) @@ -2395,7 +2401,7 @@ file_name = tmp_file; } - if (write_file(file_name, 1)) + if (write_file(file_name)) { text_changes = FALSE; quit(0); @@ -2435,7 +2441,6 @@ recv_file = TRUE; input_file = TRUE; check_fp(); - text_changes = FALSE; } return(0); } @@ -2472,9 +2477,8 @@ } int -write_file(file_name, warn_if_exists) +write_file(file_name) char *file_name; -int warn_if_exists; { char cr; char *tmp_point; @@ -2484,8 +2488,7 @@ int write_flag = TRUE; charac = lines = 0; - if (warn_if_exists && - ((in_file_name == NULL) || strcmp(in_file_name, file_name))) + if ((in_file_name == NULL) || strcmp(in_file_name, file_name)) { if ((temp_fp = fopen(file_name, "r"))) { @@ -3151,8 +3154,9 @@ } for (value = 1; value < 24; value++) signal(value, SIG_DFL); - execl(path, last_slash, "-c", string, (char *)NULL); - errx(1, exec_err_msg, path); + execl(path, last_slash, "-c", string, NULL); + printf(exec_err_msg, path); + exit(-1); } else /* if the parent */ { @@ -3195,7 +3199,7 @@ } if (shell_fork) { - printf("%s", continue_msg); + printf(continue_msg); fflush(stdout); while ((in = getchar()) != '\n') ; @@ -3255,12 +3259,9 @@ if (info_window) { info_type = CONTROL_KEYS; - info_win = newwin(5, COLS, 0, 0); + info_win = newwin(6, COLS, 0, 0); werase(info_win); paint_info_win(); - count_win = newwin(1, COLS, 5, 0); - leaveok(count_win, TRUE); - wrefresh(count_win); } last_col = COLS - 1; @@ -3285,7 +3286,6 @@ delwin(text_win); delwin(com_win); delwin(help_win); - delwin(count_win); set_up_term(); redraw(); wrefresh(text_win); @@ -3303,7 +3303,7 @@ int counter; int length; int input; - int temp = 0; + int temp; int list_size; int top_offset; /* offset from top where menu items start */ int vert_pos; /* vertical position */ @@ -3385,7 +3385,10 @@ wmove(temp_win, (counter + top_offset - off_start), 3); wrefresh(temp_win); - input = wgetch(temp_win); + in = wgetch(temp_win); + input = in; + if (input == -1) + exit(0); if (((tolower(input) >= 'a') && (tolower(input) <= 'z')) || ((input >= '0') && (input <= '9'))) @@ -3628,6 +3631,8 @@ wprintw(com_win, press_any_key_msg); wrefresh(com_win); counter = wgetch(com_win); + if (counter == -1) + exit(0); werase(com_win); wmove(com_win, 0, 0); werase(help_win); @@ -3655,6 +3660,11 @@ else if (info_type == COMMANDS) waddstr(info_win, command_strings[counter]); } + wmove(info_win, 5, 0); + if (!nohighlight) + wstandout(info_win); + waddstr(info_win, "==============================================================================="); + wstandend(info_win); wrefresh(info_win); } @@ -3688,15 +3698,12 @@ idlok(text_win, TRUE); werase(text_win); info_window = TRUE; - info_win = newwin(5, COLS, 0, 0); + info_win = newwin(6, COLS, 0, 0); werase(info_win); info_type = CONTROL_KEYS; midscreen(min(scr_vert, last_line), point); clearok(info_win, TRUE); paint_info_win(); - count_win = newwin(1, COLS, 5, 0); - leaveok(count_win, TRUE); - wrefresh(count_win); wrefresh(text_win); clear_com_win = TRUE; } @@ -3727,7 +3734,7 @@ { string = get_string(file_write_prompt_str, TRUE); tmp_file = resolve_name(string); - write_file(tmp_file, 1); + write_file(tmp_file); if (tmp_file != string) free(tmp_file); free(string); @@ -3764,7 +3771,7 @@ string = tmp_file; } } - if (write_file(string, 1)) + if (write_file(string)) { in_file_name = string; text_changes = FALSE; @@ -4073,7 +4080,7 @@ } unsigned char *init_name[3] = { - "/usr/share/misc/init.ee", + "/usr/local/lib/init.ee", NULL, ".init.ee" }; @@ -4090,8 +4097,6 @@ int temp_int; string = getenv("HOME"); - if (!string) - string = "/root"; /* Set to reasonable default so we don't crash */ str1 = home = malloc(strlen(string)+10); strcpy(home, string); strcat(home, "/.init.ee"); @@ -4377,25 +4382,17 @@ void ispell_op() { - char template[128], *name; + char name[128]; char string[256]; - int fd; + int pid; if (restrict_mode()) { return; } - (void)sprintf(template, "/tmp/ee.XXXXXXXX"); - name = mktemp(&template[0]); - fd = open(name, O_CREAT | O_EXCL | O_RDWR, 0600); - if (fd < 0) { - wmove(com_win, 0, 0); - wprintw(com_win, create_file_fail_msg, name); - wrefresh(com_win); - return; - } - close(fd); - if (write_file(name, 0)) + pid = getpid(); + sprintf(name, "/tmp/ee.%d", pid); + if (write_file(name)) { sprintf(string, "ispell %s", name); sh_command(string); @@ -4993,19 +4990,6 @@ return(num_match); } -void -renumber_lines(firstline, startnumber) -struct text *firstline; -int startnumber; -{ - struct text *lineptr; - int i; - - i = startnumber; - for (lineptr = firstline; lineptr != NULL; lineptr = lineptr->next_line) - lineptr->line_number = i++; -} - #ifndef NO_CATGETS /* | Get the catalog entry, and if it got it from the catalog, @@ -5046,7 +5030,7 @@ #ifndef NO_CATGETS setlocale(LC_ALL, ""); - catalog = catopen("ee", NL_CAT_LOCALE); + catalog = catopen("ee", 0); #endif /* NO_CATGETS */ modes_menu[0].item_string = catgetlocal( 1, "modes menu"); @@ -5092,7 +5076,7 @@ help_text[6] = catgetlocal( 41, "^f undelete char ^n next page ^x search "); help_text[7] = catgetlocal( 42, "^g begin of line ^o end of line ^y delete line "); help_text[8] = catgetlocal( 43, "^h backspace ^p prev page ^z undelete line "); - help_text[9] = catgetlocal( 44, "^[ (escape) menu ESC-Enter: exit ee "); + help_text[9] = catgetlocal( 44, "^[ (escape) menu "); help_text[10] = catgetlocal( 45, " "); help_text[11] = catgetlocal( 46, "Commands: "); help_text[12] = catgetlocal( 47, "help : get this info file : print file name "); @@ -5109,7 +5093,7 @@ control_keys[1] = catgetlocal( 58, "^a ascii code ^x search ^z undelete line ^d down ^n next page "); control_keys[2] = catgetlocal( 59, "^b bottom of text ^g begin of line ^w delete word ^l left "); control_keys[3] = catgetlocal( 60, "^t top of text ^o end of line ^v undelete word ^r right "); - control_keys[4] = catgetlocal( 61, "^c command ^k delete char ^f undelete char ESC-Enter: exit ee "); + control_keys[4] = catgetlocal( 61, "^c command ^k delete char ^f undelete char "); command_strings[0] = catgetlocal( 62, "help : get help info |file : print file name |line : print line # "); command_strings[1] = catgetlocal( 63, "read : read a file |char : ascii code of char |0-9 : go to line \"#\""); command_strings[2] = catgetlocal( 64, "write: write a file |case : case sensitive search |exit : leave and save "); @@ -5151,7 +5135,7 @@ searching_msg = catgetlocal( 100, " ...searching"); str_not_found_msg = catgetlocal( 101, "string \"%s\" not found"); search_prompt_str = catgetlocal( 102, "search for: "); - exec_err_msg = catgetlocal( 103, "could not exec %s"); + exec_err_msg = catgetlocal( 103, "could not exec %s\n"); continue_msg = catgetlocal( 104, "press return to continue "); menu_cancel_msg = catgetlocal( 105, "press Esc to cancel"); menu_size_err_msg = catgetlocal( 106, "menu too large for window"); @@ -5199,8 +5183,8 @@ mode_strings[7] = catgetlocal( 145, "emacs key bindings "); emacs_help_text[0] = help_text[0]; emacs_help_text[1] = catgetlocal( 146, "^a beginning of line ^i tab ^r restore word "); - emacs_help_text[2] = catgetlocal( 147, "^b back 1 char ^j undel char ^t begin of file "); - emacs_help_text[3] = catgetlocal( 148, "^c command ^k delete line ^u end of file "); + emacs_help_text[2] = catgetlocal( 147, "^b back 1 char ^j undel char ^t top of text "); + emacs_help_text[3] = catgetlocal( 148, "^c command ^k delete line ^u bottom of text "); emacs_help_text[4] = catgetlocal( 149, "^d delete char ^l undelete line ^v next page "); emacs_help_text[5] = catgetlocal( 150, "^e end of line ^m newline ^w delete word "); emacs_help_text[6] = catgetlocal( 151, "^f forward 1 char ^n next line ^x search "); @@ -5219,11 +5203,11 @@ emacs_help_text[19] = help_text[19]; emacs_help_text[20] = help_text[20]; emacs_help_text[21] = help_text[21]; - emacs_control_keys[0] = catgetlocal( 154, "^[ (escape) menu ^y search prompt ^k delete line ^p prev line ^g prev page"); - emacs_control_keys[1] = catgetlocal( 155, "^o ascii code ^x search ^l undelete line ^n next line ^v next page"); - emacs_control_keys[2] = catgetlocal( 156, "^u end of file ^a begin of line ^w delete word ^b back char ^z next word"); - emacs_control_keys[3] = catgetlocal( 157, "^t begin of file ^e end of line ^r restore word ^f forward char "); - emacs_control_keys[4] = catgetlocal( 158, "^c command ^d delete char ^j undelete char ESC-Enter: exit"); + emacs_control_keys[0] = catgetlocal( 154, "^[ (escape) menu ^y search prompt ^k delete line ^p prev li ^g prev page"); + emacs_control_keys[1] = catgetlocal( 155, "^o ascii code ^x search ^l undelete line ^n next li ^v next page"); + emacs_control_keys[2] = catgetlocal( 156, "^u end of file ^a begin of line ^w delete word ^b back 1 char "); + emacs_control_keys[3] = catgetlocal( 157, "^t top of text ^e end of line ^r restore word ^f forward 1 char "); + emacs_control_keys[4] = catgetlocal( 158, "^c command ^d delete char ^j undelete char ^z next word "); EMACS_string = catgetlocal( 159, "EMACS"); NOEMACS_string = catgetlocal( 160, "NOEMACS"); usage4 = catgetlocal( 161, " +# put cursor at line #\n"); Only in easyedit/: ee_version.h diff -u ee/new_curse.c easyedit/new_curse.c --- ee/new_curse.c 2009-01-09 15:52:22.000000000 -0500 +++ easyedit/new_curse.c 2002-09-20 20:48:03.000000000 -0400 @@ -37,15 +37,14 @@ | Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995 Hugh Mahon | All are rights reserved. | - | $Header: /home/hugh/sources/old_ae/RCS/new_curse.c,v 1.49 1998/12/21 02:25:59 hugh Exp hugh $ + | $Header: /home/hugh/sources/old_ae/RCS/new_curse.c,v 1.54 2002/09/21 00:47:14 hugh Exp $ | */ char *copyright_message[] = { "Copyright (c) 1986, 1987, 1988, 1991, 1992, 1993, 1994, 1995 Hugh Mahon", "All rights are reserved."}; -#include -__FBSDID("$FreeBSD$"); +char * new_curse_name= "@(#) new_curse.c $Revision: 1.54 $"; #include "new_curse.h" #include @@ -71,7 +70,11 @@ #include #endif +#if defined(__STDC__) #include +#else +#include +#endif #ifdef HAS_UNISTD #include @@ -498,6 +501,10 @@ char *Strings; #endif +#if !defined(TERMCAP) +#define TERMCAP "/etc/termcap" +#endif + struct KEYS { int length; /* length of string sent by key */ char *string; /* string sent by key */ @@ -655,15 +662,39 @@ static char nc_scrolling_ability = FALSE; +char *terminfo_path[] = { + "/usr/lib/terminfo", + "/usr/share/lib/terminfo", + "/usr/share/terminfo", + NULL + }; + #ifdef CAP -int tc_Get_int(int); -void CAP_PARSE(void); -void Find_term(void); +#if defined(__STDC__) || defined(__cplusplus) +#define P_(s) s +#else +#define P_(s) () +#endif /* __STDC__ */ + +int tc_Get_int P_((int)); +void CAP_PARSE P_((void)); +void Find_term P_((void)); + +#undef P_ #endif /* CAP */ +#ifndef __STDC__ +#ifndef HAS_STDLIB +extern char *fgets(); +extern char *malloc(); +extern char *getenv(); +FILE *fopen(); /* declaration for open function */ +#endif /* HAS_STDLIB */ +#endif /* __STDC__ */ + #ifdef SIGWINCH /* @@ -747,6 +778,7 @@ initscr() /* initialize terminal for operations */ { int value; + int counter; char *lines_string; char *columns_string; #ifdef CAP @@ -879,30 +911,26 @@ Term_File_name = malloc(Data_Line_len); sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE); Fildes = open(Term_File_name, O_RDONLY); + if (Fildes == -1) + { + sprintf(Term_File_name, "%s/%x/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE); + Fildes = open(Term_File_name, O_RDONLY); + } } - if (Fildes == -1) - { - TERM_PATH = "/usr/lib/terminfo"; - Data_Line_len = 23 + strlen(TERM_PATH) + strlen(TERMINAL_TYPE); - Term_File_name = malloc(Data_Line_len); - sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE); - Fildes = open(Term_File_name, O_RDONLY); - } - if (Fildes == -1) - { - TERM_PATH = "/usr/share/lib/terminfo"; - Data_Line_len = 23 + strlen(TERM_PATH) + strlen(TERMINAL_TYPE); - Term_File_name = malloc(Data_Line_len); - sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE); - Fildes = open(Term_File_name, O_RDONLY); - } - if (Fildes == -1) + counter = 0; + while ((Fildes == -1) && (terminfo_path[counter] != NULL)) { - TERM_PATH = "/usr/share/terminfo"; + TERM_PATH = terminfo_path[counter]; Data_Line_len = 23 + strlen(TERM_PATH) + strlen(TERMINAL_TYPE); Term_File_name = malloc(Data_Line_len); sprintf(Term_File_name, "%s/%c/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE); Fildes = open(Term_File_name, O_RDONLY); + if (Fildes == -1) + { + sprintf(Term_File_name, "%s/%x/%s", TERM_PATH, *TERMINAL_TYPE, TERMINAL_TYPE); + Fildes = open(Term_File_name, O_RDONLY); + } + counter++; } if (Fildes == -1) { @@ -919,15 +947,15 @@ if ((pointer = Term_File_name = getenv("TERMCAP")) != NULL) { if (*Term_File_name != '/') - Term_File_name = "/etc/termcap"; + Term_File_name = TERMCAP; } else { - Term_File_name = "/etc/termcap"; + Term_File_name = TERMCAP; } if ((TFP = fopen(Term_File_name, "r")) == NULL) { - printf("unable to open /etc/termcap file \n"); + printf("unable to open %s file \n", TERMCAP); exit(0); } for (value = 0; value < 1024; value++) @@ -1340,7 +1368,7 @@ char *Name; char *Ftemp; - Ftemp = Name = malloc(strlen(TERMINAL_TYPE + 1) + 1); + Ftemp = Name = malloc(strlen(TERMINAL_TYPE) + 2); strcpy(Name, TERMINAL_TYPE); while (*Ftemp != (char)NULL) Ftemp++; @@ -1425,7 +1453,6 @@ TERMINAL_TYPE = tc_; rewind(TFP); Find_term(); - free(tc_); tc_ = NULL; CAP_PARSE(); } @@ -1480,12 +1507,17 @@ Ntemp->Attrib = FALSE; Ntemp->first_line = temp_screen = Screenalloc(cols); Ntemp->first_line->number = 0; + Ntemp->line_array = (struct _line **) malloc(LINES * sizeof(struct _line *)); + + Ntemp->line_array[0] = Ntemp->first_line; + for (i = 1; i < lines; i++) { temp_screen->next_screen = Screenalloc(cols); temp_screen->next_screen->number = i; temp_screen->next_screen->prev_screen = temp_screen; temp_screen = temp_screen->next_screen; + Ntemp->line_array[i] = temp_screen; } Ntemp->first_line->prev_screen = NULL; temp_screen->next_screen = NULL; @@ -2010,16 +2042,17 @@ int j; if (column > line->last_char) - line->row[line->last_char] = ' '; + { + for (j = line->last_char; j < column; j++) + { + line->row[j] = ' '; + line->attributes[j] = (char) NULL; + } + } line->last_char = column; line->row[column] = (char) NULL; line->attributes[column] = (char) NULL; line->changed = TRUE; - for (j = column + 1; j < cols; j++) - { - line->row[j] = ' '; - line->attributes[j] = (char) NULL; - } } void @@ -2137,12 +2170,21 @@ { for (user_col = 0, virt_col = window->SC; (virt_col < virtual_scr->Num_cols) - && (user_col < window->Num_cols); + && (user_col < user_line->last_char); virt_col++, user_col++) { virtual_line->row[virt_col] = user_line->row[user_col]; virtual_line->attributes[virt_col] = user_line->attributes[user_col]; } + for (user_col = user_line->last_char, + virt_col = window->SC + user_line->last_char; + (virt_col < virtual_scr->Num_cols) + && (user_col < window->Num_cols); + virt_col++, user_col++) + { + virtual_line->row[virt_col] = ' '; + virtual_line->attributes[virt_col] = (char) NULL; + } } if (virtual_scr->Num_cols != window->Num_cols) { @@ -2154,11 +2196,6 @@ min(virtual_scr->Num_cols, (user_line->last_char + window->SC)); } - else if (virtual_line->last_char > (user_line->last_char + window->SC)) - { - virtual_line->row[min(virtual_scr->Num_cols, - (user_line->last_char + window->SC))] = ' '; - } } else virtual_line->last_char = user_line->last_char; @@ -2214,7 +2251,7 @@ return(-1); } - return(read(STDIN_FILENO, &temp, 1)? temp : -1); + return(read(0, &temp, 1)? temp : -1); } #endif @@ -2232,11 +2269,11 @@ if (Noblock) in_value = ((bufp > 0) ? in_buff[--bufp] : timed_getchar()); else - in_value = ((bufp > 0) ? in_buff[--bufp] : read(STDIN_FILENO, &temp, 1)? temp : -1); + in_value = ((bufp > 0) ? in_buff[--bufp] : read(0, &temp, 1)? temp : -1); #else /* BSD_SELECT */ #ifdef SYS5 in_value = ((bufp > 0) ? in_buff[--bufp] : - (read(STDIN_FILENO, &temp, 1)> 0) ? temp : -1); + (read(0, &temp, 1)> 0) ? temp : -1); #else /* SYS5 */ if (Noblock) { @@ -2244,7 +2281,7 @@ old_arg = fcntl(0, F_GETFL, 0); in_value = fcntl(0, F_SETFL, old_arg | FNDELAY); } - in_value = ((bufp > 0) ? in_buff[--bufp] : read(STDIN_FILENO, &temp, 1)? temp : -1); + in_value = ((bufp > 0) ? in_buff[--bufp] : read(0, &temp, 1)? temp : -1); if (Noblock) { fcntl(0, F_SETFL, old_arg); @@ -2379,14 +2416,13 @@ WINDOW *window; int c; { - int row, column; + int column, j; int shift; /* number of spaces to shift if a tab */ struct _line *tmpline; #ifdef DIAG /*printf("starting waddch \n");fflush(stdout);*/ #endif - row = window->LY; column = window->LX; if (c == '\t') { @@ -2401,27 +2437,25 @@ waddch(window, ' '); } } - else if ((column < window->Num_cols) && (row < window->Num_lines)) + else if ((column < window->Num_cols) && (window->LY < window->Num_lines)) { if ((c == '~') && (Booleans[hz__])) c = '@'; if (( c != '\b') && (c != '\n') && (c != '\r')) { - row = 0; - tmpline = window->first_line; - while (row < window->LY) - { - row++; - tmpline = tmpline->next_screen; - } + tmpline = window->line_array[window->LY]; tmpline->row[column] = c; tmpline->attributes[column] = window->Attrib; tmpline->changed = TRUE; if (column >= tmpline->last_char) { if (column > tmpline->last_char) - tmpline->row[tmpline->last_char] = ' '; + for (j = tmpline->last_char; j < column; j++) + { + tmpline->row[j] = ' '; + tmpline->attributes[j] = (char) NULL; + } tmpline->row[column + 1] = (char) NULL; tmpline->attributes[column + 1] = (char) NULL; tmpline->last_char = column + 1; @@ -2495,6 +2529,13 @@ } if (window->LY == 0) window->first_line = tmp1; + + for (row = 0, tmp1 = window->first_line; + row < window->Num_lines; row++) + { + window->line_array[row] = tmp1; + tmp1 = tmp1->next_screen; + } } void @@ -2538,6 +2579,12 @@ else tmp = tmpline; tmp->next_screen = NULL; + + for (row = 0, tmp = window->first_line; row < window->Num_lines; row++) + { + window->line_array[row] = tmp; + tmp = tmp->next_screen; + } } else { @@ -2648,7 +2695,7 @@ Terminal.c_lflag &= ~IEXTEN; #endif Terminal.c_cc[VMIN] = 1; /* minimum of one character */ - Terminal.c_cc[VTIME] = 255; /* timeout value */ + Terminal.c_cc[VTIME] = 0; /* timeout value */ Terminal.c_cc[VINTR] = 0; /* eliminate interrupt */ value = ioctl(0, TCSETA, &Terminal); /* set characteristics */ #else @@ -2805,15 +2852,33 @@ } } +#ifndef __STDC__ +void +wprintw(va_alist) +va_dcl +#else /* __STDC__ */ void wprintw(WINDOW *window, const char *format, ...) +#endif /* __STDC__ */ { +#ifndef __STDC__ + WINDOW *window; + char *format; + va_list ap; +#else va_list ap; +#endif int value; char *fpoint; char *wtemp; +#ifndef __STDC__ + va_start(ap); + window = va_arg(ap, WINDOW *); + format = va_arg(ap, char *); +#else /* __STDC__ */ va_start(ap, format); +#endif /* __STDC__ */ fpoint = (char *) format; while (*fpoint != (char) NULL) @@ -2858,7 +2923,9 @@ else waddch(window, *fpoint++); } +#ifdef __STDC__ va_end(ap); +#endif /* __STDC__ */ } void @@ -2878,35 +2945,28 @@ struct _line *line1; struct _line *line2; { - int count1, count2; + int count1; int i; char *att1, *att2; char *c1, *c2; + if (line1->last_char != line2->last_char) + return(2); + c1 = line1->row; c2 = line2->row; att1 = line1->attributes; att2 = line2->attributes; - count2 = strlen(c1) + 1; - count1 = strlen(c2) + 1; - if (count1 > count2) - { - i = count2; - count2 = count1; - count1 = i; - } - if (count2 > (count1 + count1)) - return(2); i = 0; while ((c1[i] != (char) NULL) && (c2[i] != (char) NULL) && (c1[i] == c2[i]) && (att1[i] == att2[i])) i++; count1 = i + 1; - if ((count1 == 1) && (count2 == 1)) + if ((count1 == 1) && (c1[i] == (char) NULL) && (c2[i] == (char) NULL)) count1 = 0; /* both lines blank */ - else if (count2 == count1) + else if ((c1[i] == (char) NULL) && (c2[i] == (char) NULL)) count1 = -1; /* equal */ else - count1 = count2 / count1; /* lines unequal */ + count1 = 1; /* lines unequal */ return(count1); } @@ -3212,6 +3272,7 @@ int first_same; int last_same; int list[10]; + int bottom; struct _line *curr; struct _line *virt; @@ -3219,6 +3280,8 @@ struct _line *new; + struct _line *old1, *new1; + char *cur_lin; char *vrt_lin; char *cur_att; @@ -3302,7 +3365,6 @@ (first_same > from_top) && (virtual_lines[first_same - 1]); first_same--) ; - count1 = first_same - 1; for (last_same = 0; (last_same < window->Num_lines) && (virtual_lines[last_same]== FALSE); last_same++) @@ -3311,7 +3373,6 @@ /* check entire lines for diffs */ { - if (from_top >= last_same) { for (last_same = from_top; @@ -3334,39 +3395,55 @@ { if ((Comp_line(old, virt) == -1) && (!virtual_lines[from_top])) { - if (String_table[cs__]) /* scrolling region */ + /* + | Find the bottom of the + | area that should be + | scrolled. + */ + for (bottom = tmp_ft, old1 = old, + new1 = virt, count1 = 0; + (bottom < window->Num_lines) && + (Comp_line(old1, new1) <= 0); + bottom++, old1 = old1->next_screen, + new1 = new1->next_screen, + count1++) + ; + if (count1 > 3) { - list[1] = from_top; - list[0] = min((last_same - 1), (window->Num_lines - 1)); - String_Out(String_table[cs__], list, 2); - Curr_y = Curr_x = -1; - } + if (String_table[cs__]) /* scrolling region */ + { + list[1] = from_top; + list[0] = min((bottom - 1), (window->Num_lines - 1)); + String_Out(String_table[cs__], list, 2); + Curr_y = Curr_x = -1; + } - for (offset = (tmp_ft - from_top); (offset > 0); offset--) - { - old = Delete_line(from_top, min((last_same - 1), (window->Num_lines - 1)), window); - diff = FALSE; - } + for (offset = (tmp_ft - from_top); (offset > 0); offset--) + { + old = Delete_line(from_top, min((bottom - 1), (window->Num_lines - 1)), window); + diff = FALSE; + } - if (String_table[cs__]) /* scrolling region */ - { - list[1] = 0; - list[0] = LINES - 1; - String_Out(String_table[cs__], list, 2); - Curr_y = Curr_x = -1; + if (String_table[cs__]) /* scrolling region */ + { + list[1] = 0; + list[0] = LINES - 1; + String_Out(String_table[cs__], list, 2); + Curr_y = Curr_x = -1; } - top_of_win = curscr->first_line; - curr = top_of_win; - for (offset = 0; offset < from_top; offset++) - curr = curr->next_screen; - for (offset = from_top, old=curr, new=virt; - offset < window->Num_lines; - old=old->next_screen, new=new->next_screen, - offset++) - { - similar = Comp_line(old, new); - virtual_lines[offset] = (similar > 0 ? FALSE : TRUE); + top_of_win = curscr->first_line; + curr = top_of_win; + for (offset = 0; offset < from_top; offset++) + curr = curr->next_screen; + for (offset = from_top, old=curr, new=virt; + offset < window->Num_lines; + old=old->next_screen, new=new->next_screen, + offset++) + { + similar = Comp_line(old, new); + virtual_lines[offset] = (similar > 0 ? FALSE : TRUE); + } } } else @@ -3383,39 +3460,55 @@ { if (Comp_line(old, virt) == -1) { - if (String_table[cs__]) /* scrolling region */ + /* + | Find the bottom of the + | area that should be + | scrolled. + */ + for (bottom = from_top, old1 = old, + new1 = virt, count1 = 0; + (bottom < window->Num_lines) && + (Comp_line(old1, new1) <= 0); + bottom++, old1 = old1->next_screen, + new1 = new1->next_screen, + count1++) + ; + if (count1 > 3) { - list[1] = tmp_ft; - list[0] = min((last_same - 1), (window->Num_lines - 1)); - String_Out(String_table[cs__], list, 2); - Curr_y = Curr_x = -1; - } + if (String_table[cs__]) /* scrolling region */ + { + list[1] = tmp_ft; + list[0] = min((bottom - 1), (window->Num_lines - 1)); + String_Out(String_table[cs__], list, 2); + Curr_y = Curr_x = -1; + } - for (offset = (from_top - tmp_ft); (offset > 0); offset--) - { - old = Insert_line(tmp_ft, min((last_same - 1), (window->Num_lines -1)), window); - diff = FALSE; - } + for (offset = (from_top - tmp_ft); (offset > 0); offset--) + { + old = Insert_line(tmp_ft, min((bottom - 1), (window->Num_lines -1)), window); + diff = FALSE; + } - if (String_table[cs__]) /* scrolling region */ - { - list[1] = 0; - list[0] = LINES - 1; - String_Out(String_table[cs__], list, 2); - Curr_y = Curr_x = -1; - } + if (String_table[cs__]) /* scrolling region */ + { + list[1] = 0; + list[0] = LINES - 1; + String_Out(String_table[cs__], list, 2); + Curr_y = Curr_x = -1; + } - top_of_win = curscr->first_line; - curr = top_of_win; - for (offset = 0; offset < from_top; offset++) - curr = curr->next_screen; - for (offset = from_top, old=curr, new=virt; - offset < window->Num_lines; - old=old->next_screen, new=new->next_screen, - offset++) - { - similar = Comp_line(old, new); - virtual_lines[offset] = (similar > 0 ? FALSE : TRUE); + top_of_win = curscr->first_line; + curr = top_of_win; + for (offset = 0; offset < from_top; offset++) + curr = curr->next_screen; + for (offset = from_top, old=curr, new=virt; + offset < window->Num_lines; + old=old->next_screen, new=new->next_screen, + offset++) + { + similar = Comp_line(old, new); + virtual_lines[offset] = (similar > 0 ? FALSE : TRUE); + } } } else diff -u ee/new_curse.h easyedit/new_curse.h --- ee/new_curse.h 2009-01-09 15:52:22.000000000 -0500 +++ easyedit/new_curse.h 1997-05-02 23:57:42.000000000 -0400 @@ -37,8 +37,6 @@ | Copyright (c) 1986, 1987, 1988, 1991, 1995 Hugh Mahon | All are rights reserved. | - | $FreeBSD$ - | */ #include @@ -178,6 +176,7 @@ int scroll_down; int SCROLL_CLEAR; /* indicates that window has been scrolled or cleared */ struct _line *first_line; + struct _line **line_array; } WINDOW; extern WINDOW *curscr; @@ -185,7 +184,7 @@ extern int LINES, COLS; -#if __STDC__ || defined(__cplusplus) +#if defined(__STDC__) || defined(__cplusplus) #define P_(s) s #else #define P_(s) () Common subdirectories: ee/nls and easyedit/nls --------------050806020601080608000204 Content-Type: text/plain; name="ee_version.h" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ee_version.h" /* | provide a version number for ee */ #define EE_VERSION "1.4.6" #define DATE_STRING "$Date: 2002/09/21 00:50:54 $" --------------050806020601080608000204-- From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 02:18:01 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C54A71065673 for ; Sat, 10 Jan 2009 02:18:01 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mta4.srv.hcvlny.cv.net (mta4.srv.hcvlny.cv.net [167.206.4.199]) by mx1.freebsd.org (Postfix) with ESMTP id 997B98FC08 for ; Sat, 10 Jan 2009 02:18:01 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from flosoft.no-ip.biz (ool-435559b8.dyn.optonline.net [67.85.89.184]) by mta4.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0KD800CJEFNXMSA0@mta4.srv.hcvlny.cv.net> for freebsd-hackers@freebsd.org; Fri, 09 Jan 2009 20:47:57 -0500 (EST) Received: from flosoft.no-ip.biz (localhost [127.0.0.1]) by flosoft.no-ip.biz (8.14.3/8.14.3) with ESMTP id n0A1luT0002516; Fri, 09 Jan 2009 20:47:56 -0500 Date: Fri, 09 Jan 2009 20:47:56 -0500 From: "Aryeh M. Friedman" To: freebsd-hackers@freebsd.org Message-id: <4967FE4C.2050301@gmail.com> Organization: FloSoft Systems MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.95.7 User-Agent: Thunderbird 2.0.0.18 (X11/20081124) Subject: support for i45 (ich10) chipsets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aryeh.friedman@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 02:18:04 -0000 I just got a i45 based motherboard and everything works except for the following pci: none2@pci0:1:0:0: class=0x020000 card=0x83671043 chip=0x816810ec rev=0x02 hdr=0x00 vendor = 'Realtek Semiconductor' device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' class = network subclass = ethernet does -current support it or should I stay with 7.1-RELEASE ? (i386) From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 9 23:59:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B76F0106564A for ; Fri, 9 Jan 2009 23:59:59 +0000 (UTC) (envelope-from Danovitsch@vitsch.net) Received: from VM01.VEHosting.nl (unknown [IPv6:2001:470:1f14:32d::1:140]) by mx1.freebsd.org (Postfix) with ESMTP id 7AEBE8FC0C for ; Fri, 9 Jan 2009 23:59:58 +0000 (UTC) (envelope-from Danovitsch@vitsch.net) Received: from [192.168.45.10] (103-241.ftth.onsbrabantnet.nl [88.159.241.103] (may be forged)) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id n09Nxvs2060765; Sat, 10 Jan 2009 00:59:57 +0100 (CET) (envelope-from Danovitsch@vitsch.net) From: "Daan Vreeken [PA4DAN]" Organization: Vitsch Electronics To: "M. Warner Losh" Date: Sat, 10 Jan 2009 00:59:48 +0100 User-Agent: KMail/1.9.10 References: <20090109.095027.-1672857892.imp@bsdimp.com> In-Reply-To: <20090109.095027.-1672857892.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901100059.48906.Danovitsch@vitsch.net> x-ve-auth-version: mi-1.0.3 2008-05-30 - Copyright (c) 2008 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl X-Mailman-Approved-At: Sat, 10 Jan 2009 04:21:14 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: 3x read to write ratio on dump/restore X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 00:00:00 -0000 Hi Warner, On Friday 09 January 2009 17:50:27 M. Warner Losh wrote: > I just copied a disk using dump + restore. I noticed something > through the whole run of this 500GB operation: > > L(q) ops/s r/s kBps ms/r w/s kBps ms/w %busy Name > 3 231 231 14754 9.5 0 0 0.0 97.5| da1s1a > 0 39 0 0 0.0 39 4982 10.0 38.7| da2s1a > > The read kBps was 3x the write kBps. While the dump is going through > the raw device, and the restore is going through the file system, I > can't imagine why we'd have such a huge difference that would be utter > consistent for the whole 15 hour run. > > Any ideas what gives? I observed this with 16MB cache and with 32MB > cache, fwiw. I've noticed this too. Last week I upgraded a laptop harddisk and used dump + restore to copy files from the original harddisk (attached to the laptop using a USB bracket). During the entire copy process I also saw about a 3x difference. -- Daan From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 12:20:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60ED1106566B for ; Sat, 10 Jan 2009 12:20:50 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2208FC1A for ; Sat, 10 Jan 2009 12:20:50 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id n0ACKkwu019435 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 10 Jan 2009 04:20:49 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id n0ACKkiU019434; Sat, 10 Jan 2009 04:20:46 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA01042; Sat, 10 Jan 09 04:17:17 PST Date: Sat, 10 Jan 2009 04:19:28 -0800 From: perryh@pluto.rain.com To: uspoerlein@gmail.com Message-Id: <49689250.ShPX42arkUMbD6aD%perryh@pluto.rain.com> References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> <20090109201201.GA1538@roadrunner.spoerlein.net> In-Reply-To: <20090109201201.GA1538@roadrunner.spoerlein.net> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 12:20:50 -0000 Ulrich Spoerlein wrote: > On Thu, 08.01.2009 at 21:50:47 -0800, perryh@pluto.rain.com wrote: > > Ulrich Spoerlein wrote: > > Ummm, out of curiosity, are your receiving your mail via UUCP? :) http://lists.freebsd.org/pipermail/freebsd-net/2009-January/020645.html From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 12:20:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AA20106566C for ; Sat, 10 Jan 2009 12:20:50 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [199.26.172.34]) by mx1.freebsd.org (Postfix) with ESMTP id 3D1078FC0A for ; Sat, 10 Jan 2009 12:20:50 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id n0ACKnZQ019458 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 10 Jan 2009 04:20:49 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id n0ACKnQI019454; Sat, 10 Jan 2009 04:20:49 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA01056; Sat, 10 Jan 09 04:18:47 PST Date: Sat, 10 Jan 2009 04:20:58 -0800 From: perryh@pluto.rain.com To: uspoerlein@gmail.com, rick-freebsd2008@kiwi-computer.com Message-Id: <496892aa.n9QVqyhWypsSmeIU%perryh@pluto.rain.com> References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> <20090109204014.GA83381@keira.kiwi-computer.com> In-Reply-To: <20090109204014.GA83381@keira.kiwi-computer.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 12:20:50 -0000 "Rick C. Petty" wrote: > On Thu, Jan 08, 2009 at 09:50:47PM -0800, perryh@pluto.rain.com wrote: > > > In principle, everything that would be successfully created if > > open(2)'ed. It doesn't necessarily need to actually create them, > > but the results from readdir(2) should be as if they had been > > created. The whole point of things like ls(1) and readdir(2) is > > to find out what-all is available to be opened, without having to > > already know the answer. > > That's not how devfs works. It's actually a feature > that devfs doesn't list everything ever possible http://storage9.myopera.com/freejerk/files/bug-feature.jpg > (things looked terrible back in the old MAKEDEV days with > all those polluted names). Yes, MAKEDEV can create the opposite problem, wherein /dev contains nodes for devices whose drivers and/or hardware aren't present. Such orphan nodes aren't a whole lot better than missing nodes. > I'd rather be able to list to see things that are in use, although > at first glance I didn't like devfs hidden nodes. Otherwise you'd > be stuck printing tunXXX through infinity instead of this: > > % ls /dev/tun* > /dev/tun0 /dev/tun115 /dev/tun194 In any other part of the directory tree we expect ls to provide a list of names that are available to be opened (subject to permissions). Why should /dev be any different? Since you aren't supposed to open (say) /dev/tun85, but only /dev/tun0, correspondence between readdir and open would not demand that readdir return the (large, if not infinite) list of potential instances. It would however seem reasonable for that ls command to show /dev/tun0 if its driver is loaded, even if the device has not been instantiated because the node has never been opened. > This is not a bug, it is designed behavior. It was intentionally > written to dynamically create device nodes when needed. That the code faithfully adheres to the design does not guarantee that the design is flawless. IMO it violates POLA, if not POSIX, for open(2) to succeed when applied to a name which, according to readdir(2), does not exist; and it is suboptimal to have "stealth" drivers whose availability for use cannot be discovered by examining /dev. From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 15:23:33 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61BA710656E2 for ; Sat, 10 Jan 2009 15:23:33 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mta1.srv.hcvlny.cv.net (mta1.srv.hcvlny.cv.net [167.206.4.196]) by mx1.freebsd.org (Postfix) with ESMTP id 26CF68FC25 for ; Sat, 10 Jan 2009 15:23:32 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from flosoft.no-ip.biz (ool-435559b8.dyn.optonline.net [67.85.89.184]) by mta1.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0KD900DO8HF7JK61@mta1.srv.hcvlny.cv.net> for freebsd-hackers@freebsd.org; Sat, 10 Jan 2009 10:23:32 -0500 (EST) Received: from flosoft.no-ip.biz (localhost [127.0.0.1]) by flosoft.no-ip.biz (8.14.3/8.14.3) with ESMTP id n0AFNUAr003596; Sat, 10 Jan 2009 10:23:31 -0500 Date: Sat, 10 Jan 2009 10:23:30 -0500 From: "Aryeh M. Friedman" In-reply-to: <367b2c980901100718s12a3d6balcf5fbf2ecde24bf2@mail.gmail.com> To: Olivier SMEDTS Message-id: <4968BD72.50306@gmail.com> Organization: FloSoft Systems MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.95.7 References: <4967FE4C.2050301@gmail.com> <367b2c980901100718s12a3d6balcf5fbf2ecde24bf2@mail.gmail.com> User-Agent: Thunderbird 2.0.0.18 (X11/20081124) Cc: freebsd-hackers@freebsd.org Subject: Re: support for i45 (ich10) chipsets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aryeh.friedman@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 15:23:33 -0000 Olivier SMEDTS wrote: > Hello, > > 2009/1/10 Aryeh M. Friedman : > >> I just got a i45 based motherboard and everything works except for the >> following pci: >> >> none2@pci0:1:0:0: class=0x020000 card=0x83671043 chip=0x816810ec >> rev=0x02 hdr=0x00 >> vendor = 'Realtek Semiconductor' >> device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' >> class = network >> subclass = ethernet >> > > This does not seem to be related to the Intel ICH10 chipsets. This > must be a second network adapter on your motherboard. For information, > my ASUS P5Q3 (Intel ICH10 too) works very well, everything is > detected. The two network controllers are a "88E8056 Yukon PCI-E > Same motherboard > Gigabit Ethernet Controller" (if_msk driver) and a "Yukon > 88E8001/8003/8010 PCI Gigabit Ethernet Controller (Copper)" (if_sk > driver). > Is your watchdog detected (ichwd driver) ? > I'm also using the ichsmb driver without issues. > > See the following thread on freebsd-questions : > http://lists.freebsd.org/pipermail/freebsd-questions/2008-November/187147.html > > According to it, RTL8168/8111 should work with 7.1-RELEASE. Are you > using the if_re driver ? Try loading the if_re.ko module, as I think > it's not in the GENERIC kernel. > I am used to current where it is in GENERIC so will add it to my config I guess > Cheers > > >> does -current support it or should I stay with 7.1-RELEASE ? (i386) >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >> >> > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 15:39:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BDBE1065670 for ; Sat, 10 Jan 2009 15:39:59 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by mx1.freebsd.org (Postfix) with ESMTP id 31CCC8FC1B for ; Sat, 10 Jan 2009 15:39:58 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by bwz13 with SMTP id 13so3948419bwz.19 for ; Sat, 10 Jan 2009 07:39:58 -0800 (PST) Received: by 10.223.112.201 with SMTP id x9mr19496625fap.69.1231601997726; Sat, 10 Jan 2009 07:39:57 -0800 (PST) Received: by 10.223.112.75 with HTTP; Sat, 10 Jan 2009 07:39:57 -0800 (PST) Message-ID: <367b2c980901100739v2127adb6u8950ffa0efc032de@mail.gmail.com> Date: Sat, 10 Jan 2009 16:39:57 +0100 From: "Olivier SMEDTS" To: aryeh.friedman@gmail.com In-Reply-To: <4968BD72.50306@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4967FE4C.2050301@gmail.com> <367b2c980901100718s12a3d6balcf5fbf2ecde24bf2@mail.gmail.com> <4968BD72.50306@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: support for i45 (ich10) chipsets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 15:40:00 -0000 2009/1/10 Aryeh M. Friedman : > Olivier SMEDTS wrote: >> Hello, >> >> 2009/1/10 Aryeh M. Friedman : >> >>> I just got a i45 based motherboard and everything works except for the >>> following pci: >>> >>> none2@pci0:1:0:0: class=0x020000 card=0x83671043 chip=0x816810ec >>> rev=0x02 hdr=0x00 >>> vendor = 'Realtek Semiconductor' >>> device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' >>> class = network >>> subclass = ethernet >>> >> >> This does not seem to be related to the Intel ICH10 chipsets. This >> must be a second network adapter on your motherboard. For information, >> my ASUS P5Q3 (Intel ICH10 too) works very well, everything is >> detected. The two network controllers are a "88E8056 Yukon PCI-E >> > > Same motherboard ASUS P5Q3 or P5Q3 Deluxe ? I've got the Deluxe one, maybe the ethernet controllers are different. The only thing not working on mine is the integrated 802.11n wireless controller. It's a Ralink chipset (don't remember which one) attached to the USB bus. There's a linux driver available. >> Gigabit Ethernet Controller" (if_msk driver) and a "Yukon >> 88E8001/8003/8010 PCI Gigabit Ethernet Controller (Copper)" (if_sk >> driver). >> Is your watchdog detected (ichwd driver) ? >> I'm also using the ichsmb driver without issues. >> >> See the following thread on freebsd-questions : >> http://lists.freebsd.org/pipermail/freebsd-questions/2008-November/187147.html >> >> According to it, RTL8168/8111 should work with 7.1-RELEASE. Are you >> using the if_re driver ? Try loading the if_re.ko module, as I think >> it's not in the GENERIC kernel. >> > > I am used to current where it is in GENERIC so will add it to my config > I guess >> Cheers >> >> >>> does -current support it or should I stay with 7.1-RELEASE ? (i386) >>> _______________________________________________ >>> freebsd-hackers@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >>> >>> >> >> > > -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 15:43:04 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B9D7106564A for ; Sat, 10 Jan 2009 15:43:04 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by mx1.freebsd.org (Postfix) with ESMTP id E44718FC25 for ; Sat, 10 Jan 2009 15:43:03 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by bwz13 with SMTP id 13so3950950bwz.19 for ; Sat, 10 Jan 2009 07:43:02 -0800 (PST) Received: by 10.223.105.139 with SMTP id t11mr8071713fao.11.1231600685094; Sat, 10 Jan 2009 07:18:05 -0800 (PST) Received: by 10.223.112.75 with HTTP; Sat, 10 Jan 2009 07:18:05 -0800 (PST) Message-ID: <367b2c980901100718s12a3d6balcf5fbf2ecde24bf2@mail.gmail.com> Date: Sat, 10 Jan 2009 16:18:05 +0100 From: "Olivier SMEDTS" To: aryeh.friedman@gmail.com In-Reply-To: <4967FE4C.2050301@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4967FE4C.2050301@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: support for i45 (ich10) chipsets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 15:43:04 -0000 Hello, 2009/1/10 Aryeh M. Friedman : > I just got a i45 based motherboard and everything works except for the > following pci: > > none2@pci0:1:0:0: class=0x020000 card=0x83671043 chip=0x816810ec > rev=0x02 hdr=0x00 > vendor = 'Realtek Semiconductor' > device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' > class = network > subclass = ethernet This does not seem to be related to the Intel ICH10 chipsets. This must be a second network adapter on your motherboard. For information, my ASUS P5Q3 (Intel ICH10 too) works very well, everything is detected. The two network controllers are a "88E8056 Yukon PCI-E Gigabit Ethernet Controller" (if_msk driver) and a "Yukon 88E8001/8003/8010 PCI Gigabit Ethernet Controller (Copper)" (if_sk driver). Is your watchdog detected (ichwd driver) ? I'm also using the ichsmb driver without issues. See the following thread on freebsd-questions : http://lists.freebsd.org/pipermail/freebsd-questions/2008-November/187147.html According to it, RTL8168/8111 should work with 7.1-RELEASE. Are you using the if_re driver ? Try loading the if_re.ko module, as I think it's not in the GENERIC kernel. Cheers > > does -current support it or should I stay with 7.1-RELEASE ? (i386) > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 15:54:34 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 162BB1065672 for ; Sat, 10 Jan 2009 15:54:34 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mta4.srv.hcvlny.cv.net (mta4.srv.hcvlny.cv.net [167.206.4.199]) by mx1.freebsd.org (Postfix) with ESMTP id DB2478FC1D for ; Sat, 10 Jan 2009 15:54:33 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from flosoft.no-ip.biz (ool-435559b8.dyn.optonline.net [67.85.89.184]) by mta4.srv.hcvlny.cv.net (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) with ESMTP id <0KD900CCXIUVZ4O0@mta4.srv.hcvlny.cv.net> for freebsd-hackers@freebsd.org; Sat, 10 Jan 2009 10:54:31 -0500 (EST) Received: from flosoft.no-ip.biz (localhost [127.0.0.1]) by flosoft.no-ip.biz (8.14.3/8.14.3) with ESMTP id n0AFsUZs003659; Sat, 10 Jan 2009 10:54:30 -0500 Date: Sat, 10 Jan 2009 10:54:30 -0500 From: "Aryeh M. Friedman" In-reply-to: <367b2c980901100739v2127adb6u8950ffa0efc032de@mail.gmail.com> To: Olivier SMEDTS Message-id: <4968C4B6.3040203@gmail.com> Organization: FloSoft Systems MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT X-Enigmail-Version: 0.95.7 References: <4967FE4C.2050301@gmail.com> <367b2c980901100718s12a3d6balcf5fbf2ecde24bf2@mail.gmail.com> <4968BD72.50306@gmail.com> <367b2c980901100739v2127adb6u8950ffa0efc032de@mail.gmail.com> User-Agent: Thunderbird 2.0.0.18 (X11/20081124) Cc: freebsd-hackers@freebsd.org Subject: Re: support for i45 (ich10) chipsets X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: aryeh.friedman@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 15:54:34 -0000 Olivier SMEDTS wrote: > 2009/1/10 Aryeh M. Friedman : > >> Olivier SMEDTS wrote: >> >>> Hello, >>> >>> 2009/1/10 Aryeh M. Friedman : >>> >>> >>>> I just got a i45 based motherboard and everything works except for the >>>> following pci: >>>> >>>> none2@pci0:1:0:0: class=0x020000 card=0x83671043 chip=0x816810ec >>>> rev=0x02 hdr=0x00 >>>> vendor = 'Realtek Semiconductor' >>>> device = 'RTL8168/8111 PCI-E Gigabit Ethernet NIC' >>>> class = network >>>> subclass = ethernet >>>> >>>> >>> This does not seem to be related to the Intel ICH10 chipsets. This >>> must be a second network adapter on your motherboard. For information, >>> my ASUS P5Q3 (Intel ICH10 too) works very well, everything is >>> detected. The two network controllers are a "88E8056 Yukon PCI-E >>> >>> >> Same motherboard >> > > ASUS P5Q3 or P5Q3 Deluxe ? I've got the Deluxe one, maybe the ethernet > controllers are different. The only thing not working on mine is the > integrated 802.11n wireless controller. It's a Ralink chipset (don't > remember which one) attached to the USB bus. There's a linux driver > available. > I assume deluxe but I do not have access to the machine physically right now but it was bought earlier this week and my boss asked if I wanted deluxe or not (he bought it) > >>> Gigabit Ethernet Controller" (if_msk driver) and a "Yukon >>> 88E8001/8003/8010 PCI Gigabit Ethernet Controller (Copper)" (if_sk >>> driver). >>> Is your watchdog detected (ichwd driver) ? >>> I'm also using the ichsmb driver without issues. >>> >>> See the following thread on freebsd-questions : >>> http://lists.freebsd.org/pipermail/freebsd-questions/2008-November/187147.html >>> >>> According to it, RTL8168/8111 should work with 7.1-RELEASE. Are you >>> using the if_re driver ? Try loading the if_re.ko module, as I think >>> it's not in the GENERIC kernel. >>> >>> >> I am used to current where it is in GENERIC so will add it to my config >> I guess >> I guess not: # kldstat Id Refs Address Size Name 1 3 0xc0400000 94f054 kernel 2 1 0xc0d50000 68304 acpi.ko # kldload if_re kldload: can't load if_re: File exists in the config (unmodified except setting IPI_PREMPTION): device msk # Marvell/SysKonnect Yukon II Gigabit Ethernet device re # RealTek 8139C+/8169/8169S/8110S >>> Cheers >>> >>> >>> >>>> does -current support it or should I stay with 7.1-RELEASE ? (i386) >>>> _______________________________________________ >>>> freebsd-hackers@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >>>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" >>>> >>>> >>>> >>> >> > > > > From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 18:51:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13597106567A for ; Sat, 10 Jan 2009 18:51:43 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from acme.spoerlein.net (cl-43.dus-01.de.sixxs.net [IPv6:2a01:198:200:2a::2]) by mx1.freebsd.org (Postfix) with ESMTP id 773428FC0A for ; Sat, 10 Jan 2009 18:51:42 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (e180187137.adsl.alicedsl.de [85.180.187.137]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id n0AIpcnn032462 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 10 Jan 2009 19:51:39 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.3/8.14.3) with ESMTP id n0AIpatr093504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Jan 2009 19:51:36 +0100 (CET) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.3/8.14.3/Submit) id n0AIpZXb093502; Sat, 10 Jan 2009 19:51:35 +0100 (CET) (envelope-from uspoerlein@gmail.com) Date: Sat, 10 Jan 2009 19:51:35 +0100 From: Ulrich Spoerlein To: perryh@pluto.rain.com Message-ID: <20090110185135.GB83079@roadrunner.spoerlein.net> Mail-Followup-To: perryh@pluto.rain.com, rick-freebsd2008@kiwi-computer.com, freebsd-hackers@freebsd.org References: <20090107181032.GA2808@rebelion.Sisis.de> <1231398405.2842.1.camel@daemon2.partygaming.local> <20090108080708.GE1462@roadrunner.spoerlein.net> <4966e5b7.sTBBp+JY+DDMKG47%perryh@pluto.rain.com> <20090109204014.GA83381@keira.kiwi-computer.com> <496892aa.n9QVqyhWypsSmeIU%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <496892aa.n9QVqyhWypsSmeIU%perryh@pluto.rain.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: rick-freebsd2008@kiwi-computer.com, freebsd-hackers@freebsd.org Subject: Re: /dev/dsp* & /dev/audio* devices not present X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:51:43 -0000 I cannot really comment on the devfs(4) design issues, and quite frankly it hasn't bothered my thus far. Just another little quirk you get to remember. On Sat, 10.01.2009 at 04:20:58 -0800, perryh@pluto.rain.com wrote: > That the code faithfully adheres to the design does not guarantee > that the design is flawless. IMO it violates POLA, if not POSIX, > for open(2) to succeed when applied to a name which, according to > readdir(2), does not exist; and it is suboptimal to have "stealth" > drivers whose availability for use cannot be discovered by examining > /dev. You forgot directories with --x permissions. You can open many files inside them, but readdir(2) will get you nowhere. So this is a poor standard by which to judge devfs(4) device cloning. Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt. From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 19:00:40 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 951AC106566B for ; Sat, 10 Jan 2009 19:00:40 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA7C8FC1F for ; Sat, 10 Jan 2009 19:00:40 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.23] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id n0AJ0dtv069325; Sat, 10 Jan 2009 11:00:40 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4968F055.8060001@freebsd.org> Date: Sat, 10 Jan 2009 11:00:37 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mike Meyer References: <20090107125759.GA1462@roadrunner.spoerlein.net> <20090107154854.GC1462@roadrunner.spoerlein.net> <20090109015106.3614a378@mbook.local> In-Reply-To: <20090109015106.3614a378@mbook.local> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Sheldon Givens Subject: Re: Small change to 'ps' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:00:40 -0000 Mike Meyer wrote: > How about borrowing from existing commands that > already implement this functionality (zfs and zpool) and using `-H', > which is relatively rarely used elsewhere? Every BSD command that walks a filesystem supports -L, -P, and -H with consistent semantics: -L Logical traversal (follow all symlinks) -P Physical traversal (follow no symlinks) -H Hybrid traversal (follow symlinks given on command line) Tim From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 20:27:06 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7521065670 for ; Sat, 10 Jan 2009 20:27:06 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 5EC028FC0C for ; Sat, 10 Jan 2009 20:27:06 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (pD9E2D09F.dip.t-dialin.net [217.226.208.159]) by redbull.bpaserver.net (Postfix) with ESMTP id C15C82E253; Sat, 10 Jan 2009 21:10:57 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 671411C64E8; Sat, 10 Jan 2009 21:10:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1231618253; bh=WVKILiz8jLrNETMt2G7GvLzqMLtyexU6Y NSc4RqgbP8=; h=Message-ID:Date:From:To:Cc:Subject:References: In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Xix2h1WDQFusnlCY79Dh8B7WWO3uYe8+xQBKSWVqeIWBnfjfOVRgi4KidccpwOVpy Qo901+ttIFMt0R4myE6rj1kN5w0GOkAkTEUbIR16PVFXHNEILYt2HrxewOWRszgtWh9 42QuPAScYGTym11c5MbjFlm038Sq6ejfcGp0CC4nZxznCdA3n0dwlgIJJ1IJgJLy2w/ 9BnCn3HNGMZiqQSHAiobMdU6tzYZjHV3E6FNiYoF6/qJ5WWfbXn73txPdCIYahBS1Ei ByZMuZAixdy994e4sBjBhvMt2ZXr8G8XSznO+xVmWvZgjcYjaP+oZV45LhwQnuQnYhi 8aWxI6Zdw== Received: (from www@localhost) by webmail.leidinger.net (8.14.3/8.13.8/Submit) id n0AKAqd5087452; Sat, 10 Jan 2009 21:10:52 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from Luna.Leidinger.net (Luna.Leidinger.net [192.168.2.100]) by webmail.leidinger.net (Horde Framework) with HTTP; Sat, 10 Jan 2009 21:10:51 +0100 Message-ID: <20090110211051.31066z47fw0zw7k8@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Sat, 10 Jan 2009 21:10:51 +0100 From: Alexander Leidinger To: Eitan Adler References: <4967BBB5.3030703@gmail.com> In-Reply-To: <4967BBB5.3030703@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.3) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: C15C82E253.E92FE X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, ORDB-RBL, SpamAssassin (not cached, score=-14.9, required 6, BAYES_00 -15.00, DKIM_SIGNED 0.00, DKIM_VERIFIED -0.00, RDNS_DYNAMIC 0.10) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Sat, 10 Jan 2009 21:28:04 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: bringing ee up to date X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 20:27:07 -0000 Quoting Eitan Adler (from Fri, 09 Jan 2009 =20 16:03:49 -0500): > I think that these three files bring ee up to date from 1.4.2 to 1.4.6. Sorry, but the patch as is is wrong fore sure. I've seen "lp" instead =20 of "lpr", and even at least one wrong path. For other paths I would =20 have to check to say something definitive. A little bit more work is =20 needed to get an update of this into FreeBSD. How did you proceeded to =20 have a look at the update? Here's how I would do it: 1) diff the version we have with the same version of the vendor + in case of a difference the functionaility needs to be forward ported 2) diff the vendor src of the version of what we have with the next version after it 3) add the differences to our version taking 1) into account and taking care if some path which may be in the new version is OK for us 3.5) if in doubt, ask here, together with a description of what is changed / improved / new 4) repeat from 2) until the most recent version is reached Bye, Alexander. --=20 LEVERAGE: =09Even if someone doesn't care what the world thinks =09about them, they always hope their mother doesn't find out. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 10 22:51:08 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BC5B1065675 for ; Sat, 10 Jan 2009 22:51:08 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 12FD18FC14 for ; Sat, 10 Jan 2009 22:51:07 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.23] (h-66-166-149-52.snvacaid.covad.net [66.166.149.52]) by kientzle.com (8.12.9/8.12.9) with ESMTP id n0AMp7C1000756 for ; Sat, 10 Jan 2009 14:51:07 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <49692659.2030306@freebsd.org> Date: Sat, 10 Jan 2009 14:51:05 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: extattr problems? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 22:51:08 -0000 FreeBSD 6.3: fd = open("test", O_WRONLY | O_CREAT | O_EXCL, 0777); n = extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, "testattr", "1234", 4); After this, fd=3, n is non-zero, errno = 9 (EBADF) Huh? I would have expected EOPNOTSUPP if extended attributes weren't supported on this filesystem. The file descriptor is clearly valid. Tim