From owner-freebsd-questions@FreeBSD.ORG Sun Jul 31 01:00:26 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50802106566B for ; Sun, 31 Jul 2011 01:00:26 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1286B8FC08 for ; Sun, 31 Jul 2011 01:00:25 +0000 (UTC) Received: by iyb11 with SMTP id 11so7306859iyb.13 for ; Sat, 30 Jul 2011 18:00:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=6Gc60Q6rO5Stc7fLk3AGJ+yullFiArxnsKBpgoYlMBM=; b=hHxmOhhdDmB29AxfLrHxRJgBuwC7myppqQeqk8Q8YmNa9j6vSiyaQKEy31S0FHZyua mcDSrGD8y92y3FpRCJxWugmHUEou+1hTbhyPLjoXzWHf0bhe9RLuZFsqaIKwT75Jxhdp 6y41XFgxTQoeK3sWR0We2tjA4QBl9ahupsDZc= MIME-Version: 1.0 Received: by 10.42.156.129 with SMTP id z1mr2188255icw.159.1312074025403; Sat, 30 Jul 2011 18:00:25 -0700 (PDT) Received: by 10.42.179.67 with HTTP; Sat, 30 Jul 2011 18:00:25 -0700 (PDT) In-Reply-To: <20110730224113.GA43343@mech-cluster241.men.bris.ac.uk> References: <537F9F81-1353-4FA3-B8EF-EF99682F435E@gmail.com> <20110714160816.GA30155@think.gnix.co.uk> <20110715080324.GA8392@mech-cluster241.men.bris.ac.uk> <20110715235610.GA70906@mech-cluster241.men.bris.ac.uk> <20110718091913.GA4092@mech-cluster241.men.bris.ac.uk> <20110730195219.GA15888@mech-cluster241.men.bris.ac.uk> <20110730224113.GA43343@mech-cluster241.men.bris.ac.uk> Date: Sat, 30 Jul 2011 20:00:25 -0500 Message-ID: From: Antonio Olivares To: freebsd-questions@freebsd.org, Anton Shterenlikht Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: can't build teTeX port in FreeBSD 8.2 amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 01:00:26 -0000 >> Which is this directory? > > I assumed you know. > > If you've got the full teTeX installation, > start with > > % texdoc tds > > tds (TDS) stands for Tex Directory Structure. > This is a sort of a standard on how tex > tree should be organised. teTeX tree > adheres to TDS convention. > > texdoc(1) is incredibly useful, give it a go. > > The TDS convention allow for several complementary > trees. So teTeX tree, by default, is installed > under /usr/local/share, see e.g. > /usr/ports/print/teTeX-base/Makefile: > > TEXMFDIR=3D =A0 =A0 =A0 share/texmf > TEXMFDISTDIR=3D =A0 share/texmf-dist > TEXMFCONFIGDIR=3D share/texmf-config > TEXMFLOCALDIR=3D =A0share/texmf-local > > Basically, the TDS tree is where latex > will look for packages, fonts, etc. > > In addition, by default, latex (or whatever > your invocation is) will look in user's > local TDS tree, which is under $HOME/texmf. > > Here's a small example: > > BUZI> ls -alR $HOME/texmf > total 12 > drwx------ =A0 3 mexas =A0wheel =A0 512 Mar 23 =A02006 . > drwx------ =A028 mexas =A0wheel =A02048 Jul 30 23:15 .. > drwx------ =A0 3 mexas =A0wheel =A0 512 Mar 23 =A02006 bibtex > > /home/mexas/texmf/bibtex: > total 12 > drwx------ =A03 mexas =A0wheel =A0512 Mar 23 =A02006 . > drwx------ =A03 mexas =A0wheel =A0512 Mar 23 =A02006 .. > drwx------ =A02 mexas =A0wheel =A0512 Mar 23 =A02006 bst > > /home/mexas/texmf/bibtex/bst: > total 60 > drwx------ =A02 mexas =A0wheel =A0 =A0512 Mar 23 =A02006 . > drwx------ =A03 mexas =A0wheel =A0 =A0512 Mar 23 =A02006 .. > -rw------- =A01 mexas =A0wheel =A025593 Mar 23 =A02006 jmr.bst > BUZI> > > For this book I ended up with something like this: > > /home/mexas/texmf > =A0 |-doc > =A0 |---fonts > =A0 |-----bera > =A0 |---generic > =A0 |-----pgf > =A0 |-------images > =A0 |-------licenses > =A0 |-------macros > =A0 |-------text-en > =A0 |---------plots > =A0 |-------version-for-dvipdfm > =A0 |---------en > =A0 |-------version-for-dvipdfmx > =A0 |---------en > =A0 |-------version-for-dvips > =A0 |---------en > =A0 |-------version-for-pdftex > =A0 |---------en > =A0 |-------version-for-tex4ht > =A0 |---------en > =A0 |-------version-for-vtex > =A0 |---------en > =A0 |-----------plots > =A0 |-------version-for-xetex > =A0 |---------en > =A0 |---latex > =A0 |-----fourier > =A0 |-dvips > =A0 |---config > =A0 |-fonts > =A0 |---afm > =A0 |-----public > =A0 |-------fourier > =A0 |---map > =A0 |-----dvips > =A0 |-------fourier > =A0 |-----vtex > =A0 |---tfm > =A0 |-----dingbat > =A0 |-----public > =A0 |-------bbding > =A0 |-------bera > =A0 |-------fourier > =A0 |-------fouriernc > =A0 |---type1 > =A0 |-----public > =A0 |-------fourier > =A0 |---vf > =A0 |-----public > =A0 |-------bera > =A0 |-------fourier > =A0 |-------fouriernc > =A0 |-fouriernc > =A0 |---source > =A0 |-nomencl > =A0 |-phaistos > =A0 |---OpenType > =A0 |---afm > =A0 |---dvips > =A0 |---tfm > =A0 |---type1 > =A0 |---var > =A0 |-tex > =A0 |---context > =A0 |-----pgf > =A0 |-------basiclayer > =A0 |-------frontendlayer > =A0 |-------math > =A0 |-------systemlayer > =A0 |-------utilities > =A0 |---generic > =A0 |-----pgf > =A0 |-------basiclayer > =A0 |-------frontendlayer > =A0 |---------svg > =A0 |---------tikz > =A0 |-----------libraries > =A0 |-------------circuits > =A0 |-------------datavisualization > =A0 |-------libraries > =A0 |---------datavisualization > =A0 |---------decorations > =A0 |---------shapes > =A0 |-----------circuits > =A0 |-------math > =A0 |-------modules > =A0 |-------rendering > =A0 |-------systemlayer > =A0 |-------testsuite > =A0 |---------external > =A0 |---------mathtest > =A0 |-------utilities > =A0 |---latex > =A0 |-----bbding > =A0 |-----bera > =A0 |-----dingbat > =A0 |-----fourier > =A0 |-----fouriernc > =A0 |-----pgf > =A0 |-------basiclayer > =A0 |-------compatibility > =A0 |-------doc > =A0 |-------frontendlayer > =A0 |---------libraries > =A0 |-------math > =A0 |-------systemlayer > =A0 |-------utilities > =A0 |-----phaistos > =A0 |-----shadethm > =A0 |---plain > =A0 |-----pgf > =A0 |-------basiclayer > =A0 |-------frontendlayer > =A0 |-------math > =A0 |-------systemlayer > =A0 |-------utilities > >> >> I don't have it :( >> >> [olivares@quadcore ~]$ pwd >> /home/olivares >> [olivares@quadcore ~]$ cd texmf >> bash: cd: texmf: No such file or directory >> >> I know that under texlive there is a ~/.texlive/ folder, but there is >> no ~/.teTeX/texmf in the home folder. > > no, this is unrelated, see above. > >> >> > (I used the latest distro: >> > =A0http://media.texample.net/pgf/builds/pgfCVS2010-09-28_TDS.zip ) >> >> How and where do I install this one? > > different parts in different parts of your local tree. > In fact all you have to do is to copy this zip > under your $HOME/texmf and unzip it there, it will > place all its file where they belong. If you start from > this package, you will have your local TDS in place > straight away. > >> For the other book, I installed print/latex-pgf/ port and I got it to >> work, the one diffyqs.tex previously mentioned. > > ok, I'll look at this later. > > Anyway, what I did to get this book built > is not what I'd like to do all the time. > I want to have everything I need in ports, > so I'll work towards having all the above > packages in ports, eventually. > > -- I have been using TeX for a while and I have never had to set up anthing like this :( I had used MikTeX in winblow$ and TeTeX in linux distros and FreeBSD 5.3/FreeBSD6.2, and I had never had to mess with TDS. This is what I always did, I tried to compile a tex project and it failed, I looked at which *.sty file was needed and I downloaded it from CTTAN or off another computer that had it and put it directly on the folder that I was working on. This had always worked for me. On TeXlive installations(with full TeXLive 20XY installations), I have not had to hunt down *.sty files, except of course that big tikz hungry trigbook package: http://media.texample.net/pgf/builds/pgfCVS2010-09-28_TDS.zip I downloaded it, and did not know what to do with it :( Not even with the full TeXLive 2010 package installed I could get that trigbook going :( [compiled except the tikz stuff ] Am taking a look at TDS, but still confused :( Regards, Antonio From owner-freebsd-questions@FreeBSD.ORG Sun Jul 31 05:36:22 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7953106566C for ; Sun, 31 Jul 2011 05:36:22 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr13.xs4all.nl (smtp-vbr13.xs4all.nl [194.109.24.33]) by mx1.freebsd.org (Postfix) with ESMTP id 687478FC12 for ; Sun, 31 Jul 2011 05:36:22 +0000 (UTC) Received: from slackbox.erewhon.net (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr13.xs4all.nl (8.13.8/8.13.8) with ESMTP id p6V5ZZL9007662; Sun, 31 Jul 2011 07:35:35 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.net (Postfix, from userid 1001) id 0227CBAA0; Sun, 31 Jul 2011 07:35:34 +0200 (CEST) Date: Sun, 31 Jul 2011 07:35:34 +0200 From: Roland Smith To: Antonio Olivares Message-ID: <20110731053534.GA35731@slackbox.erewhon.net> References: <20110714160816.GA30155@think.gnix.co.uk> <20110715080324.GA8392@mech-cluster241.men.bris.ac.uk> <20110715235610.GA70906@mech-cluster241.men.bris.ac.uk> <20110718091913.GA4092@mech-cluster241.men.bris.ac.uk> <20110730195219.GA15888@mech-cluster241.men.bris.ac.uk> <20110730224113.GA43343@mech-cluster241.men.bris.ac.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: Anton Shterenlikht , freebsd-questions@freebsd.org Subject: Re: can't build teTeX port in FreeBSD 8.2 amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 05:36:23 -0000 --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 30, 2011 at 08:00:25PM -0500, Antonio Olivares wrote: > I have been using TeX for a while and I have never had to set up > anthing like this :( I had used MikTeX in winblow$ and TeTeX in linux > distros and FreeBSD 5.3/FreeBSD6.2, and I had never had to mess with > TDS. >=20 > This is what I always did, I tried to compile a tex project and it > failed, I looked at which *.sty file was needed and I downloaded it > from CTTAN or off another computer that had it and put it directly on > the folder that I was working on. This had always worked for me. It works. But if you want to use that style file in more than one directory, it gets tedious. =20 > On TeXlive installations(with full TeXLive 20XY installations), I have > not had to hunt down *.sty files, except of course that big tikz > hungry trigbook package: >=20 > http://media.texample.net/pgf/builds/pgfCVS2010-09-28_TDS.zip >=20 > I downloaded it, and did not know what to do with it :( Not even with > the full TeXLive 2010 package installed I could get that trigbook > going :( [compiled except the tikz stuff ] If you are using TeXLive, first check if a TeXLive package for what you want exists. First tell tlmgr(1) to use a CTAN mirror: tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet Then list all packages available: tlmgr list|less The packages you have installed are prefixed with an 'i'. > Am taking a look at TDS, but still confused :( Make a texmf directory in your $HOME. This is searched by default in TeXLiv= e. See /usr/local/texlive//texmf/web2c/texmf.cnf Just unzip pgfCVS2010-09-28_TDS.zip in ~/texmf, and run mktexlsr afterwards. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk406aYACgkQEnfvsMMhpyVOrwCfT2XGNhHDSeJTbN5Q2TR3w/jb cAUAn1qNgfILjMQrgY+7888RlQm+xSvo =IEWR -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q-- From owner-freebsd-questions@FreeBSD.ORG Sun Jul 31 06:58:42 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A3AE106566C for ; Sun, 31 Jul 2011 06:58:42 +0000 (UTC) (envelope-from ws@au.dyndns.ws) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id 085738FC0A for ; Sun, 31 Jul 2011 06:58:41 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAKP4NE6WZWdv/2dsb2JhbABAqFuBQAEBBAF5BQsLGC5XBi2HUr5nhkIEh1iQKott Received: from ppp103-111.static.internode.on.net (HELO lillith-iv.ovirt.dyndns.ws) ([150.101.103.111]) by ipmail06.adl2.internode.on.net with ESMTP; 31 Jul 2011 16:13:22 +0930 X-Envelope-From: ws@au.dyndns.ws X-Envelope-To: freebsd-questions@freebsd.org Received: from [192.168.1.144] (ws@[192.168.1.144]) by lillith-iv.ovirt.dyndns.ws (8.14.4/8.14.4) with ESMTP id p6V6hF20087472; Sun, 31 Jul 2011 16:13:15 +0930 (CST) (envelope-from ws@au.dyndns.ws) From: Wayne Sierke To: Michael In-Reply-To: <4E3491BC.5050006@gmail.com> References: <4E333BDE.4010705@gmail.com> <1312008961.69299.18.camel@predator-ii.buffyverse> <4E3491BC.5050006@gmail.com> Content-Type: text/plain; charset="ASCII" Date: Sun, 31 Jul 2011 16:13:14 +0930 Message-ID: <1312094594.69299.28.camel@predator-ii.buffyverse> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.67 on 192.168.1.142 X-Scanned-By: SpamAssassin 3.002005(2008-06-10) X-Scanned-By: ClamAV X-Spam-Score: -4.399 () ALL_TRUSTED,BAYES_00 Cc: freebsd-questions@freebsd.org Subject: Re: Arduino UNO - upload not working X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ws@au.dyndns.ws List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 06:58:42 -0000 On Sun, 2011-07-31 at 00:20 +0100, Michael wrote: > On 30/07/2011 07:56, Wayne Sierke wrote: > > > > 0) The automatic reset for programming generally didn't work for me. > > However after judicious experimentation I was able to time a manual > > reset of the board being programmed by waiting for the "Binary sketch > > size:" message to appear in the Arduino IDE and timing a reset from that > > (about 2-3 seconds in my case). > > > > It works, I mean the workaround, it works! Thank you so much. In my case > it's a bit less than one second. I still need to test it with more > sketches but for now it looks good and gives me hope :) That's good news. :) > Could you also tell me what versions of arduino (IDE), uarduno and > avrdude you are using? Is it vanilla ports or did you have to apply any > extra patches? All vanilla. arduino-0022_1 uarduno-1.0 avrdude-5.10 openjdk6-b22_6 rxtx-openjdk6-2.1.7r2_7 Wayne From owner-freebsd-questions@FreeBSD.ORG Sun Jul 31 09:16:09 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F4E41065672 for ; Sun, 31 Jul 2011 09:16:09 +0000 (UTC) (envelope-from mexas@bristol.ac.uk) Received: from dirg.bris.ac.uk (dirg.bris.ac.uk [137.222.10.102]) by mx1.freebsd.org (Postfix) with ESMTP id C3AF28FC13 for ; Sun, 31 Jul 2011 09:16:08 +0000 (UTC) Received: from ncsd.bris.ac.uk ([137.222.10.59] helo=ncs.bris.ac.uk) by dirg.bris.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1QnS7k-0000NU-Cx; Sun, 31 Jul 2011 10:15:58 +0100 Received: from mech-cluster241.men.bris.ac.uk ([137.222.187.241]) by ncs.bris.ac.uk with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1QnS7C-0002G9-AN; Sun, 31 Jul 2011 10:15:18 +0100 Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4) with ESMTP id p6V9F7Nt050778; Sun, 31 Jul 2011 10:15:07 +0100 (BST) (envelope-from mexas@bristol.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.4/8.14.4/Submit) id p6V9F7j5050777; Sun, 31 Jul 2011 10:15:07 +0100 (BST) (envelope-from mexas@bristol.ac.uk) X-Authentication-Warning: mech-cluster241.men.bris.ac.uk: mexas set sender to mexas@bristol.ac.uk using -f Date: Sun, 31 Jul 2011 10:15:07 +0100 From: Anton Shterenlikht To: Antonio Olivares Message-ID: <20110731091507.GA50752@mech-cluster241.men.bris.ac.uk> Mail-Followup-To: Antonio Olivares , freebsd-questions@freebsd.org, Anton Shterenlikht References: <20110714160816.GA30155@think.gnix.co.uk> <20110715080324.GA8392@mech-cluster241.men.bris.ac.uk> <20110715235610.GA70906@mech-cluster241.men.bris.ac.uk> <20110718091913.GA4092@mech-cluster241.men.bris.ac.uk> <20110730195219.GA15888@mech-cluster241.men.bris.ac.uk> <20110730224113.GA43343@mech-cluster241.men.bris.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: Anton Shterenlikht , freebsd-questions@freebsd.org Subject: Re: can't build teTeX port in FreeBSD 8.2 amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 09:16:09 -0000 On Sat, Jul 30, 2011 at 08:00:25PM -0500, Antonio Olivares wrote: > > I have been using TeX for a while and I have never had to set up > anthing like this :( I had used MikTeX in winblow$ and TeTeX in linux > distros and FreeBSD 5.3/FreeBSD6.2, and I had never had to mess with > TDS. I know, this is just a fix. We are fortunate enough to have the ports tree. That is the way forward. But some work is required for this to happen. > > This is what I always did, I tried to compile a tex project and it > failed, I looked at which *.sty file was needed and I downloaded it > from CTTAN or off another computer that had it and put it directly on > the folder that I was working on. This had always worked for me. Apart from *sty files, there are also fonts, and those should live in correct directories to be found. -- Anton Shterenlikht Room 2.6, Queen's Building Mech Eng Dept Bristol University University Walk, Bristol BS8 1TR, UK Tel: +44 (0)117 331 5944 Fax: +44 (0)117 929 4423 From owner-freebsd-questions@FreeBSD.ORG Sun Jul 31 10:07:37 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CF85106566B for ; Sun, 31 Jul 2011 10:07:37 +0000 (UTC) (envelope-from kuku@kukulies.org) Received: from kukulies.org (mail.kukulies.org [78.47.239.221]) by mx1.freebsd.org (Postfix) with ESMTP id D4B9E8FC12 for ; Sun, 31 Jul 2011 10:07:36 +0000 (UTC) Received: by kukulies.org (Postfix, from userid 5001) id A41B21AC003; Sun, 31 Jul 2011 11:50:38 +0200 (CEST) Received: from [192.168.2.102] (pC19EB8FB.dip.t-dialin.net [193.158.184.251]) by kukulies.org (Postfix) with ESMTPSA id B58791AC002 for ; Sun, 31 Jul 2011 11:50:35 +0200 (CEST) Message-ID: <4E352563.2070808@kukulies.org> Date: Sun, 31 Jul 2011 11:50:27 +0200 From: "Christoph P.U. Kukulies" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: "freebsd-questions@freebsd.org" Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: invalid argument in select() when peer socket is in FD_SET X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 10:07:37 -0000 I have written a small to test TCP/IP roundtrip times of the packets in a proprietary protocol and while compiling and running this server on different platforms (Windows 7/cygwin, UbuntuLinux, FreeBSD 8.0 Release), I found that the server produces an error when the listening socket (on which the accpet() is performed) is member of the select() fd_set. On the other platforms the program works without error, just under FreeBSD I'm getting this "invalid argument" error. Comments appreciated (despite comments about the error checking logic :) Here is the code: // testsrv.c // gcc -o testsrv testsrv.c // #include #include #include #include #include #include #include #include #include #define USEDBUFSIZ 60 #define MAX_HOSTNAME 256 #define MAXFDS 256 #define CLRBUF memset(buf,0,sizeof(buf)) #define max(a,b) (((a) > (b)) ? (a) : (b)) static unsigned char buf[256]; int array_of_fds[MAXFDS]; static fd_set clientfds; #define SOCKET int void *memset(void *, int, size_t); int enter (int); int remov (int); int invalidip (char *); void exit (int); int getv (int, unsigned char *, int); int getfds (); int main(int argc, char **argv) { int nfds; static fd_set readfds; SOCKET ListenSocket, newsockfd; struct sockaddr_in cli_addr; struct sockaddr_in service; struct hostent *thisHost; int bOptVal = 0; int bOptLen = sizeof(int); char hostname[256]; char *host_addr; struct in_addr addr = {0}; char *ip; u_short port; int iResult = 0; int i , n, m, clilen, dummy, connect = 0; struct timeval tv; //--------------------------------------- //Create a listening socket ListenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (ListenSocket == -1) { perror("socket creation"); return 1; } else printf("ListenSocket=%d\n", ListenSocket); //--------------------------------------- //Bind the socket to the local IP address // and port 3210 port = 3210; if (gethostname(hostname, 256)) perror("gethostname failed\n"), exit(3); printf("%s\n", hostname), fflush(stdout); thisHost = gethostbyname(hostname); ip = inet_ntoa(*(struct in_addr *)(*thisHost->h_addr_list)); if (argc == 2) { host_addr = argv[1]; service.sin_addr.s_addr = inet_addr(host_addr); thisHost = gethostbyaddr((const char *)&service.sin_addr.s_addr, sizeof(service.sin_addr.s_addr), AF_INET); if (thisHost == 0) printf("host unknown\n"), exit(3); if (invalidip(host_addr)) printf("invalid IP\n"), exit(4); } else { service.sin_addr.s_addr = inet_addr(ip); } service.sin_port = htons(port); service.sin_family = AF_INET; iResult = bind(ListenSocket, (struct sockaddr *)&service, sizeof(service)); if (iResult == -1) { perror("bind"); shutdown(ListenSocket, SHUT_RDWR); return 1; } listen(ListenSocket, SOMAXCONN); printf("SOMAXCONN=%d %d\n", SOMAXCONN, FD_SETSIZE); /* all sockets are put into an own array_of_fs */ /* in the while() loop below the FD_SET id used by looping through the */ /* array_of_fds to fill the readfds array in the select() */ enter(ListenSocket); /* * Wait for connect */ tv.tv_sec = 0; tv.tv_usec = 5000000; /* 5 seconds */ printf("Server %s listening on port %d\n", thisHost->h_name, port); memset((void *)array_of_fds, 0, (size_t) MAXFDS * sizeof(*array_of_fds)); nfds = ListenSocket + 1; while (1) { FD_ZERO(&readfds); FD_SET(ListenSocket, &readfds); for (i = 0; i < MAXFDS; i++) { if (array_of_fds[i]) { nfds = max(nfds, array_of_fds[i]) + 1; FD_SET(array_of_fds[i], &readfds); } } n = select(nfds, &readfds, (fd_set *) NULL, /* not interested in write */ (fd_set *) NULL, /* ...or exceptions */ &tv); /* timeout */ switch (n) { case 1: clilen = sizeof(cli_addr); /* first test if a new client has connected */ if (FD_ISSET(ListenSocket, &readfds)) { newsockfd = accept(ListenSocket, (struct sockaddr *)&cli_addr, &clilen); if (enter(newsockfd)) /* socket of new connection is entered*/ printf("\n%d.connect! ", ++connect), fflush(stdout); else printf("too many connections"), exit(1); sprintf(buf, "ENTERED %d of %d", 1, 10); send(newsockfd, buf, USEDBUFSIZ, 0); /* send to the client*/ } else { for (i = 0; i < MAXFDS; i++) { int s; if (FD_ISSET((s = array_of_fds[i]), &readfds)) { m = getv(s, buf, USEDBUFSIZ); if (m <= 0) { shutdown(s, SHUT_RDWR); if (remov(s) == -1) printf("error on remove(s)\n", s), fflush(stdout ); goto done; } else { printf("*"); fflush(stdout); CLRBUF; /* now send some data to the client */ sprintf(buf, "XX-123456789-XX-xx : 0x0600, 0x9 9999999, \"NNNNN\""); m = send(s, buf, USEDBUFSIZ, 0); if (m < 0 || m != USEDBUFSIZ) { perror("cannot send\n"); } CLRBUF; sprintf(buf, "END"); m = send(s, buf, USEDBUFSIZ, 0); if (m < 0 || m != USEDBUFSIZ) { perror("cannot send\n"); } } /* else */ } /* if FD_ISSET */ } /* for */ break; case 0: break; case -1: perror("select"); exit(2); default: printf("more than one descriptor ready!\n"); fflush(stdout); exit(4); break; } /* switch */ } /* while */ } done: shutdown(ListenSocket, SHUT_RDWR); return 0; } /* main */ int getv(int fd, unsigned char *buf, int count) { int m , got = 0; int i = 0; while (got < count) { m = recv(fd, buf + got, count - got, 0); if (m == count) return m; if (m > 0) got = got + m; if (m == 0) return (0); if (m < 0) { return -1; } } return -1; } int enter(int i) { int k = 0; while (array_of_fds[k++]); if (k > MAXFDS - 1) return -1; k--; array_of_fds[k] = i; return i; } int remov(s) { int k; for (k = 0; k < MAXFDS; k++) if (array_of_fds[k] == s) { array_of_fds[k] = 0; return k; } return -1; } /* * this code taken from code for validating IPv4 address taken from article * in http://bytes.com/topic/c/answers/212174-code-validating-ipv4-address */ #define INVALID -1 #define VALID 0 int invalidip(char *ipadd) { unsigned b1, b2, b3, b4; unsigned char c; if (sscanf(ipadd, "%3u.%3u.%3u.%3u%c", &b1, &b2, &b3, &b4, &c) != 4) return INVALID; if ((b1 | b2 | b3 | b4) > 255) return INVALID; if (strspn(ipadd, "0123456789.") < strlen(ipadd)) return INVALID; return VALID; } From owner-freebsd-questions@FreeBSD.ORG Sun Jul 31 16:15:31 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39C981065673 for ; Sun, 31 Jul 2011 16:15:31 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 055B98FC12 for ; Sun, 31 Jul 2011 16:15:30 +0000 (UTC) Received: by iyb11 with SMTP id 11so7872082iyb.13 for ; Sun, 31 Jul 2011 09:15:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=CFOpPuE+bvj8NBjm5Zop5uGbMcHArh7PlLFpBlNyT7g=; b=w8uhEdEUQMbzfCDy40ofI7mmLst1av2TN0nwnBbI03B/aHz8thptmxQd7ohFwSeZG2 P8HUhNF4BA5bP5RPGb1krcpND29ghfilRyvpQPbyWruXlhZFSuRiz6hCIaWS1ouC771Z yp9G3jpTLpNbLNSUoOnjJoBtEI1t7SX40gcxY= MIME-Version: 1.0 Received: by 10.42.29.129 with SMTP id r1mr2286377icc.360.1312128930223; Sun, 31 Jul 2011 09:15:30 -0700 (PDT) Received: by 10.42.179.67 with HTTP; Sun, 31 Jul 2011 09:15:30 -0700 (PDT) In-Reply-To: <20110426184836.3C611B7EE@kev.msw.wpafb.af.mil> References: <20110426184836.3C611B7EE@kev.msw.wpafb.af.mil> Date: Sun, 31 Jul 2011 11:15:30 -0500 Message-ID: From: Antonio Olivares To: vogelke+unix@pobox.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Polytropon , FreeBSD Questions Subject: Re: easy Firewall setup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 16:15:31 -0000 > A> Is there an easy firewall setup available somewhere (like the one > A> referenced below but for FreeBSD)? > > =A0 Here's a script you can use to generate a rules file for IPF. > > -- Karl, I have used your script and it generated me a nice ipf.rules file /************* ipf.rules ********************/ quadcore# cat /etc/ipf.rules # Generated by make-ipf-rules v1.10 at Sun Jul 31 10:42:21 CDT 2011 # # NAME: # /etc/ipf.rules # # DESCRIPTION: # Ruleset for IPF packet filter. # # AUTHOR: # Antonio Olivares # -------------------------------------------------------------------- # We don't care about NETBIOS broadcast crap, bootpc requests, or IGMP. block in quick on msk0 proto udp from any to any port =3D 68 block in quick on msk0 proto udp from any to any port =3D 137 block in quick on msk0 proto udp from any to any port =3D 138 block in quick on msk0 proto igmp from any to any # -------------------------------------------------------------------- # Now block everything coming down the network. block in log on msk0 all block out log on msk0 all # -------------------------------------------------------------------- # Get rid of anything with options, as these can be used to hack. block in log quick from any to any with ipopts # -------------------------------------------------------------------- # Get rid of short TCP/IP fragments (too small for valid comparison) # as these can be used to hack. block in log quick proto tcp from any to any with short # -------------------------------------------------------------------- # Allow all traffic on loopback. pass in quick on lo0 all pass out quick on lo0 all # -------------------------------------------------------------------- # Block all the private routable addresses, as these should never # come down the network, nor should we be talking to them. block out quick on msk0 from any to 192.168.0.0/16 block out quick on msk0 from any to 172.16.0.0/12 block out quick on msk0 from any to 127.0.0.0/8 block out quick on msk0 from any to 10.0.0.0/8 block out quick on msk0 from any to 0.0.0.0/8 block out quick on msk0 from any to 169.254.0.0/16 block out quick on msk0 from any to 192.0.2.0/24 block out quick on msk0 from any to 204.152.64.0/23 block out quick on msk0 from any to 224.0.0.0/3 block in quick on msk0 from 192.168.0.0/16 to any block in quick on msk0 from 172.16.0.0/12 to any block in quick on msk0 from 10.0.0.0/8 to any block in quick on msk0 from 127.0.0.0/8 to any block in quick on msk0 from 0.0.0.0/8 to any block in quick on msk0 from 169.254.0.0/16 to any block in quick on msk0 from 192.0.2.0/24 to any block in quick on msk0 from 204.152.64.0/23 to any block in quick on msk0 from 224.0.0.0/3 to any # -------------------------------------------------------------------- # Block and log portmapper attempts. block in log quick on msk0 proto tcp/udp from any to any port =3D 111 keep = state # -------------------------------------------------------------------- # Allow outbound state related packets. pass out quick on msk0 proto tcp from any to any flags S keep state pass out quick on msk0 proto udp from any to any keep state # -------------------------------------------------------------------- # Allow ping and traceroute. Since we're doing everything quick, # we must have passes before blocks. pass in quick on msk0 proto icmp from any to any icmp-type 0 keep state pass in quick on msk0 proto icmp from any to any icmp-type 8 keep state pass in quick on msk0 proto icmp from any to any icmp-type 11 keep state pass out quick on msk0 proto icmp from any to any icmp-type 0 keep state pass out quick on msk0 proto icmp from any to any icmp-type 8 keep state pass out quick on msk0 proto icmp from any to any icmp-type 11 keep state block in log quick on msk0 proto icmp from any to any # -------------------------------------------------------------------- # Allow DNS; should this be just from nameservers? pass in quick on msk0 proto tcp from any to any port =3D 53 flags S keep st= ate pass in quick on msk0 proto udp from any to any port =3D 53 keep state # -------------------------------------------------------------------- # Allow ssh and mail from anywhere: tcpserver filters addresses pass in quick on msk0 proto tcp from any to any port =3D 22 flags S keep st= ate pass in quick on msk0 proto tcp from any to any port =3D 25 flags S keep st= ate # -------------------------------------------------------------------- # Allow http from selected addresses. pass in quick on msk0 proto tcp from 1.2.3.4 to any port =3D 80 flags S kee= p state pass in quick on msk0 proto tcp from 1.2.3.5 to any port =3D 80 flags S kee= p state # -------------------------------------------------------------------- # Allow secure http from selected addresses. pass in quick on msk0 proto tcp from 1.2.3.4 to any port =3D 443 flags S keep state pass in quick on msk0 proto tcp from 1.2.3.5 to any port =3D 443 flags S keep state # -------------------------------------------------------------------- # Copyright (C) 2011 # EOF /************************************************************/ I add /*******************/ lpd_enable=3D"YES" ipfilter_enable=3D"YES" ipfileter_rules=3D"/etc/ipf.rules" ipmon_enable=3D"YES" ipmon_flags=3D"-Ds" /******************/ to /etc/rc.conf, I load the kernel module: quadcore# kldload /boot/kernel/ipl.ko I verify it is working: with # ipf -V quadcore# ipf -Fa -f /etc/ipf.rules Then I cannot browse :( quadcore# ipfstat bad packets: in 0 out 0 IPv6 packets: in 0 out 0 input packets: blocked 17 passed 14 nomatch 14 counted 0 short 0 output packets: blocked 68 passed 22 nomatch 22 counted 0 short 0 input packets logged: blocked 0 passed 0 output packets logged: blocked 0 passed 0 packets logged: input 0 output 0 log failures: input 0 output 0 fragment state(in): kept 0 lost 0 not fragmented 0 fragment state(out): kept 0 lost 0 not fragmented 0 packet state(in): kept 0 lost 0 packet state(out): kept 0 lost 0 ICMP replies: 0 TCP RSTs sent: 0 Invalid source(in): 0 Result cache hits(in): 10 (out): 0 IN Pullups succeeded: 0 failed: 0 OUT Pullups succeeded: 0 failed: 0 Fastroute successes: 0 failures: 0 TCP cksum fails(in): 0 (out): 0 IPF Ticks: 574 Packet log flags set: (0) none But I have to stop the firewall ipf -D and run # ifconfig msk0 up and I can browse. My best guess is that there is a problem with ipv6 and ipv4, but I don't know how to troubleshoot this. I had generated the script a while ago but I got errors, I did not know that the kernel module had to be loaded: # kldload /boot/kernel/ipl.ko verify that it is working with # ipf -V I read this over at these pages: http://manuuus.co.in/configure-ipf-firewall-in-freebsd/ http://www.pc-freak.net/handbook/firewalls-ipf.html I know about ipfw too[Thanks Polytropon, I have simple setup you suggested but at school machine], and this time I tried the script which also is very good, but I have little problem. Is there anything I have to do, like turn on ipv6 to be able to browse? how do I check which version I have? Thanks for advice given. Regards, Antonio From owner-freebsd-questions@FreeBSD.ORG Sun Jul 31 19:26:26 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12EE106564A for ; Sun, 31 Jul 2011 19:26:26 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7D7288FC08 for ; Sun, 31 Jul 2011 19:26:26 +0000 (UTC) Received: by qyk38 with SMTP id 38so3486505qyk.13 for ; Sun, 31 Jul 2011 12:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=yOwWZri00NeWKHxOcL4kmgno38WXh2lKZK5vdgodxIQ=; b=Y2eOt2J4t9196UPJ8PLybdxSSzDcQbWzQ+mR1FtJi2iHSmLJBtB+2rHwwxU03GVzuy kK7UX3EhNSfEfk8vnHakhEf5cW40JhZ1p1VfcnpjSrPGL+FZnZs+0bJvA7PTZamRqE7m 3q4aG28sfhgKsRCXZ1lv7Im4tA7n+caFgfJWA= MIME-Version: 1.0 Received: by 10.224.197.71 with SMTP id ej7mr2529357qab.279.1312140385453; Sun, 31 Jul 2011 12:26:25 -0700 (PDT) Received: by 10.224.67.209 with HTTP; Sun, 31 Jul 2011 12:26:25 -0700 (PDT) In-Reply-To: References: <20110426184836.3C611B7EE@kev.msw.wpafb.af.mil> Date: Sun, 31 Jul 2011 14:26:25 -0500 Message-ID: From: Antonio Olivares To: vogelke+unix@pobox.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Polytropon , FreeBSD Questions Subject: Re: easy Firewall setup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2011 19:26:26 -0000 On Sun, Jul 31, 2011 at 11:15 AM, Antonio Olivares wrote: >> A> Is there an easy firewall setup available somewhere (like the one >> A> referenced below but for FreeBSD)? >> >> =A0 Here's a script you can use to generate a rules file for IPF. >> >> -- > > Karl, > > I have used your script and it generated me a nice ipf.rules file > > /************* ipf.rules ********************/ > quadcore# cat /etc/ipf.rules > # Generated by make-ipf-rules v1.10 at Sun Jul 31 10:42:21 CDT 2011 > # > # NAME: > # =A0 =A0/etc/ipf.rules > # > # DESCRIPTION: > # =A0 =A0Ruleset for IPF packet filter. > # > # AUTHOR: > # =A0 =A0Antonio Olivares > > # -------------------------------------------------------------------- > # We don't care about NETBIOS broadcast crap, bootpc requests, or IGMP. > block in quick on msk0 proto udp =A0from any to any port =3D 68 > block in quick on msk0 proto udp =A0from any to any port =3D 137 > block in quick on msk0 proto udp =A0from any to any port =3D 138 > block in quick on msk0 proto igmp from any to any > > # -------------------------------------------------------------------- > # Now block everything coming down the network. > block in =A0log =A0on msk0 all > block out log =A0on msk0 all > > # -------------------------------------------------------------------- > # Get rid of anything with options, as these can be used to hack. > block in =A0log quick =A0 =A0 from any to any with ipopts > > # -------------------------------------------------------------------- > # Get rid of short TCP/IP fragments (too small for valid comparison) > # as these can be used to hack. > block in =A0log quick proto tcp from any to any with short > > # -------------------------------------------------------------------- > # Allow all traffic on loopback. > pass =A0in =A0quick on lo0 all > pass =A0out quick on lo0 all > > # -------------------------------------------------------------------- > # Block all the private routable addresses, as these should never > # come down the network, nor should we be talking to them. > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 192.168.0= .0/16 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 172.16.0.= 0/12 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 127.0.0.0= /8 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 10.0.0.0/= 8 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 0.0.0.0/8 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 169.254.0= .0/16 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 192.0.2.0= /24 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 204.152.6= 4.0/23 > block out quick on msk0 from any =A0 =A0 =A0 =A0 =A0 =A0 =A0 to 224.0.0.0= /3 > > block in =A0quick on msk0 from 192.168.0.0/16 =A0 =A0to any > block in =A0quick on msk0 from 172.16.0.0/12 =A0 =A0 to any > block in =A0quick on msk0 from 10.0.0.0/8 =A0 =A0 =A0 =A0to any > block in =A0quick on msk0 from 127.0.0.0/8 =A0 =A0 =A0 to any > block in =A0quick on msk0 from 0.0.0.0/8 =A0 =A0 =A0 =A0 to any > block in =A0quick on msk0 from 169.254.0.0/16 =A0 =A0to any > block in =A0quick on msk0 from 192.0.2.0/24 =A0 =A0 =A0to any > block in =A0quick on msk0 from 204.152.64.0/23 =A0 to any > block in =A0quick on msk0 from 224.0.0.0/3 =A0 =A0 =A0 to any > > # -------------------------------------------------------------------- > # Block and log portmapper attempts. > block in log quick on msk0 proto tcp/udp from any to any port =3D 111 kee= p state > > # -------------------------------------------------------------------- > # Allow outbound state related packets. > pass =A0out quick on msk0 proto tcp from any to any flags S keep state > pass =A0out quick on msk0 proto udp from any to any keep state > > # -------------------------------------------------------------------- > # Allow ping and traceroute. =A0Since we're doing everything quick, > # we must have passes before blocks. > pass =A0in quick on msk0 proto icmp from any to any icmp-type =A00 keep s= tate > pass =A0in quick on msk0 proto icmp from any to any icmp-type =A08 keep s= tate > pass =A0in quick on msk0 proto icmp from any to any icmp-type 11 keep sta= te > pass out quick on msk0 proto icmp from any to any icmp-type =A00 keep sta= te > pass out quick on msk0 proto icmp from any to any icmp-type =A08 keep sta= te > pass out quick on msk0 proto icmp from any to any icmp-type 11 keep state > block in log quick on msk0 proto icmp from any to any > > # -------------------------------------------------------------------- > # Allow DNS; should this be just from nameservers? > pass in quick on msk0 proto tcp from any to any port =3D 53 flags S keep = state > pass in quick on msk0 proto udp from any to any port =3D 53 keep state > > # -------------------------------------------------------------------- > # Allow ssh and mail from anywhere: tcpserver filters addresses > pass in quick on msk0 proto tcp from any to any port =3D 22 flags S keep = state > pass in quick on msk0 proto tcp from any to any port =3D 25 flags S keep = state > > # -------------------------------------------------------------------- > # Allow http from selected addresses. > pass in quick on msk0 proto tcp from 1.2.3.4 to any port =3D 80 flags S k= eep state > pass in quick on msk0 proto tcp from 1.2.3.5 to any port =3D 80 flags S k= eep state > > # -------------------------------------------------------------------- > # Allow secure http from selected addresses. > pass in quick on msk0 proto tcp from 1.2.3.4 to any port =3D 443 flags S > keep state > pass in quick on msk0 proto tcp from 1.2.3.5 to any port =3D 443 flags S > keep state > > # -------------------------------------------------------------------- > # Copyright (C) 2011 > # EOF > /************************************************************/ > > I add > /*******************/ > lpd_enable=3D"YES" > ipfilter_enable=3D"YES" > ipfileter_rules=3D"/etc/ipf.rules" > ipmon_enable=3D"YES" > ipmon_flags=3D"-Ds" > /******************/ > to /etc/rc.conf, I load the kernel module: > > quadcore# kldload /boot/kernel/ipl.ko > > I verify it is working: > > with # ipf -V > > > quadcore# ipf -Fa -f /etc/ipf.rules > > Then I cannot browse :( > > > quadcore# ipfstat > bad packets: =A0 =A0 =A0 =A0 =A0 =A0in 0 =A0 =A0out 0 > =A0IPv6 packets: =A0 =A0 =A0 =A0 =A0in 0 out 0 > =A0input packets: =A0 =A0 =A0 =A0 blocked 17 passed 14 nomatch 14 counted= 0 short 0 > output packets: =A0 =A0 =A0 =A0 blocked 68 passed 22 nomatch 22 counted 0= short 0 > =A0input packets logged: =A0blocked 0 passed 0 > output packets logged: =A0blocked 0 passed 0 > =A0packets logged: =A0 =A0 =A0 =A0input 0 output 0 > =A0log failures: =A0 =A0 =A0 =A0 =A0input 0 output 0 > fragment state(in): =A0 =A0 kept 0 =A0lost 0 =A0not fragmented 0 > fragment state(out): =A0 =A0kept 0 =A0lost 0 =A0not fragmented 0 > packet state(in): =A0 =A0 =A0 kept 0 =A0lost 0 > packet state(out): =A0 =A0 =A0kept 0 =A0lost 0 > ICMP replies: =A0 0 =A0 =A0 =A0 TCP RSTs sent: =A00 > Invalid source(in): =A0 =A0 0 > Result cache hits(in): =A010 =A0 =A0 =A0(out): =A00 > IN Pullups succeeded: =A0 0 =A0 =A0 =A0 failed: 0 > OUT Pullups succeeded: =A00 =A0 =A0 =A0 failed: 0 > Fastroute successes: =A0 =A00 =A0 =A0 =A0 failures: =A0 =A0 =A0 0 > TCP cksum fails(in): =A0 =A00 =A0 =A0 =A0 (out): =A00 > IPF Ticks: =A0 =A0 =A0574 > Packet log flags set: (0) > =A0 =A0 =A0 =A0none > > > But I have to stop the firewall > > ipf -D > > and run > # ifconfig msk0 up > > and I can browse. =A0My best guess is that there is a problem with ipv6 > and ipv4, but I don't know how to troubleshoot this. =A0I had generated > the script a while ago but I got errors, I did not know that the > kernel module had to be loaded: > > # kldload /boot/kernel/ipl.ko > verify that it is working with > # ipf -V > > I read this over at these pages: > > http://manuuus.co.in/configure-ipf-firewall-in-freebsd/ > > http://www.pc-freak.net/handbook/firewalls-ipf.html > > I know about ipfw too[Thanks Polytropon, I have simple setup you > suggested but at school machine], and this time I tried the script > which also is very good, but I have little problem. > > Is there anything I have to do, like turn on ipv6 to be able to > browse? =A0how do I check which version I have? > > Thanks for advice given. > > Regards, > > Antonio > Karl & et all, I could not get the ipfw easy firewall solution to work either. However after trial and error I commented out the 192.0.X settings, #block in quick on msk0 from 192.168.0.0/16 to any #block out quick on msk0 from 192.168.0.0/16 to any since I get ip quadcore# ifconfig -a msk0: flags=3D8843 metric 0 mtu 150= 0 options=3Dc011a ether 00:1d:60:33:ca:b0 inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet autoselect (100baseTX ) status: active I thought to myself the above script will block it. After I commented these out, restarted the firewall # ipf -E # ipf -V # ipf -Fa -f /etc/ipf.rules quadcore# ipfstat bad packets: in 0 out 0 IPv6 packets: in 0 out 0 input packets: blocked 44 passed 6605 nomatch 0 counted 0 short 0 output packets: blocked 26 passed 5278 nomatch 0 counted 0 short 0 input packets logged: blocked 9 passed 0 output packets logged: blocked 26 passed 0 packets logged: input 0 output 0 log failures: input 0 output 0 fragment state(in): kept 0 lost 0 not fragmented 0 fragment state(out): kept 0 lost 0 not fragmented 0 packet state(in): kept 0 lost 0 packet state(out): kept 490 lost 0 ICMP replies: 0 TCP RSTs sent: 0 Invalid source(in): 0 Result cache hits(in): 24 (out): 16 IN Pullups succeeded: 0 failed: 0 OUT Pullups succeeded: 0 failed: 0 Fastroute successes: 0 failures: 0 TCP cksum fails(in): 0 (out): 0 IPF Ticks: 4258 Packet log flags set: (0) none quadcore# ipf -V ipf: IP Filter: v4.1.28 (496) Kernel: IP Filter: v4.1.28 Running: yes Log Flags: 0 =3D none set Default: pass all, Logging: available Active list: 0 Feature mask: 0x10f It is working :) ; I hope it works after a reboot as well, if it does not it will be back to the drawing board :( Regards, Antonio From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 00:28:39 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8DEB106566B for ; Mon, 1 Aug 2011 00:28:39 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id 89F8E8FC08 for ; Mon, 1 Aug 2011 00:28:39 +0000 (UTC) Received: by yxl31 with SMTP id 31so3705253yxl.13 for ; Sun, 31 Jul 2011 17:28:38 -0700 (PDT) Received: by 10.101.213.18 with SMTP id p18mr2735009anq.98.1312158518671; Sun, 31 Jul 2011 17:28:38 -0700 (PDT) Received: from papi.localnet ([177.17.4.208]) by mx.google.com with ESMTPS id g8sm2746955and.0.2011.07.31.17.28.36 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 31 Jul 2011 17:28:38 -0700 (PDT) From: Mario Lobo To: FreeBSD Questions Date: Sun, 31 Jul 2011 21:28:29 -0300 User-Agent: KMail/1.13.7 (FreeBSD/8.2-STABLE; KDE/4.6.2; amd64; ; ) X-KMail-Markup: true MIME-Version: 1.0 Message-Id: <201107312128.29322.lobo@bsd.com.br> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Phenom II 975 BE shows 0 celsius X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 00:28:39 -0000 Hi to all In my desktop machine, I had an AM2+ ASROCK mobo with Phenom II 955 BE that= =20 showed each core temperature perfectly under FBSD 8-STABLE, via=20 dev.cpu.x.temp. amdtemp.ko loaded. Unfortunately this Mobo died and only found AM3 boards for which my phenom = 955=20 doesn't fit. So I got an ASUS M4A88T-V EVO with a Phenom II 975 BE.=20 =46unny thing. An AM3 phenom II fits on an AM2 board but an AM3 board doesn= 't=20 accept an AM2/AM2+ phenom II :(. Anyway, now, under the very same system, it shows 0 degrees on dev.cpu.x.te= mp=20 for all cores. I've been looking through k8temp and amdtemp src code. I am definitely not= =20 sure of this but I believe something might have happened to those: =46rom k8temp.h K10_THERM_REG 0xa4=20 K10_THERMTRIP_REG 0xe4 K10_CURTMP(val) (((val) >> 21) & 0xfff) K10_THERMTRIP(val) ((val >> 1) & 1) =46rom amdtemp.c /* * Register control (K8 family) */ #define AMDTEMP_REG0F 0xe4 #define AMDTEMP_REG_SELSENSOR 0x40 #define AMDTEMP_REG_SELCORE 0x04 /* * Register control (K10 & K11) family */ #define AMDTEMP_REG 0xa4 Output of k8temp -dn: CPUID: Vendor: AuthenticAMD, 0x100f43: Model=3D04 Family=3Df+1 Stepping=3D3 Advanced Power Management=3D0x1f9 Temperature sensor: Yes Frequency ID control: No Voltage ID control: No THERMTRIP support: Yes HW Thermal control: Yes SW Thermal control: Yes 100MHz multipliers: Yes HW P-State control: Yes TSC Invariant: Yes Temp=3Dc0fef ThermTrip=3D1fc00c30 0 I keep a small win7 partition to test little things like this and see if th= e=20 same thing happens there, and it doesn't, so I concluded that the sensors a= re=20 there and are working. One thing is worth noting though. I have used a free gadget that shows=20 activity/temp for each core. It worked fine with the previous MB/CPU.That A= LSO=20 stopped working with this new MB. Like FBSD, it shows 0 degrees for any cor= e=20 too, although it correctly displays each core load. The only windows tool that correctly shows the temperature are the ASUS too= ls=20 that came with the mobo. Other than that, everything is working fine! The only thing I had to fix wa= s=20 the fstab ada location. I know this is not a big thing but I got accustomed to keeping an eye on th= ose=20 temperatures. I have googled for a few days now searching for Thermal register address or= =20 offsets for the Phenom II 975 BE, or anything related to this problem and=20 found nothing. Every search on AMD site was fruitless. I could not find a=20 single bit of tech info on this processor there, or any other tech info for= =20 that matter. Would any one have any pointers/clues/suggestions on this? Thanks, =2D-=20 Mario Lobo http://www.mallavoodoo.com.br =46reeBSD since 2.2.8 [not Pro-Audio.... YET!!] (99% winblows FREE) From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 00:32:04 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57A241065670 for ; Mon, 1 Aug 2011 00:32:04 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5988FC0C for ; Mon, 1 Aug 2011 00:32:03 +0000 (UTC) Received: by iyb11 with SMTP id 11so8307067iyb.13 for ; Sun, 31 Jul 2011 17:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=RNSbDDnWahYuuaKkiHs9Z4TzooGbdACKvnJkpZYRKG8=; b=Jzz+SYxsJcPyqYsLOgjpygxxs2z0SoUaQ1k6KSlH+lNC29MBFK0Q05XGJRfyEZ2PyK K2iUaTtkyQJZxq50lA7nVHYmjwSlr/Tu35n3tFPR+mz/HFtQ5WgqwS2x4ErDj2SW5EDo PdOTNczd2ViOZLfB0YF9+9mkgYhMUAB+h0Nv0= MIME-Version: 1.0 Received: by 10.231.61.138 with SMTP id t10mr933299ibh.86.1312158721855; Sun, 31 Jul 2011 17:32:01 -0700 (PDT) Received: by 10.42.179.67 with HTTP; Sun, 31 Jul 2011 17:32:01 -0700 (PDT) In-Reply-To: <20110731053534.GA35731@slackbox.erewhon.net> References: <20110714160816.GA30155@think.gnix.co.uk> <20110715080324.GA8392@mech-cluster241.men.bris.ac.uk> <20110715235610.GA70906@mech-cluster241.men.bris.ac.uk> <20110718091913.GA4092@mech-cluster241.men.bris.ac.uk> <20110730195219.GA15888@mech-cluster241.men.bris.ac.uk> <20110730224113.GA43343@mech-cluster241.men.bris.ac.uk> <20110731053534.GA35731@slackbox.erewhon.net> Date: Sun, 31 Jul 2011 19:32:01 -0500 Message-ID: From: Antonio Olivares To: Roland Smith Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Anton Shterenlikht , freebsd-questions@freebsd.org Subject: Re: can't build teTeX port in FreeBSD 8.2 amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 00:32:04 -0000 > If you are using TeXLive, first check if a TeXLive package for what you w= ant > exists. First tell tlmgr(1) to use a CTAN mirror: > > =A0 =A0tlmgr option repository http://mirror.ctan.org/systems/texlive/tln= et > > Then list all packages available: > > =A0 =A0tlmgr list|less > > The packages you have installed are prefixed with an 'i'. > >> Am taking a look at TDS, but still confused :( > > Make a texmf directory in your $HOME. This is searched by default in TeXL= ive. > See /usr/local/texlive//texmf/web2c/texmf.cnf > > Just unzip pgfCVS2010-09-28_TDS.zip in ~/texmf, and run mktexlsr afterwar= ds. > > Roland > -- Roland, I was finally able to compile this one with tikz stuff :) but with texlive2010 not with teTeX from ports(yet). Followed your suggestions, except that I did a global install of pgf file in /usr/local/texlive/2010/texmf/ folder, copied pgf zip file there and unzipped it, ran mktexlsr as root and finally had to snatch picnic.sty http://www.ctan.org/tex-archive/macros/latex209/contrib/picins then it worked. I might have to try something similar with the teTeX system but it looks more complicated, there are more files and where should I place them so that everything falls into place? Anyhow, thanks for the suggestions. Regards, Antonio From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 00:36:35 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D32ED106564A for ; Mon, 1 Aug 2011 00:36:35 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9A50D8FC19 for ; Mon, 1 Aug 2011 00:36:35 +0000 (UTC) Received: by iyb11 with SMTP id 11so8311042iyb.13 for ; Sun, 31 Jul 2011 17:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=UiE3pzydmj8BooeFRed8JfMWfW07bs46QEQ6Vep1VT4=; b=w7ZWLpWAg8AvjNufU5BvbBqMCQBu+XsDC6A7S0GA5HKT70thC4/gvK5DSqjct6ivg6 y3cmDmijpUbHDQ4RbiOz2DaapMqVgkwbNMd5cJv/fzZWjNjdAX6q1E/jYyYawIDv7RoM xPlC1hj0qR8q5XZy8IhWtv+2bRyYlh4svQ8Gk= MIME-Version: 1.0 Received: by 10.231.193.137 with SMTP id du9mr2526466ibb.136.1312158994713; Sun, 31 Jul 2011 17:36:34 -0700 (PDT) Received: by 10.42.179.67 with HTTP; Sun, 31 Jul 2011 17:36:34 -0700 (PDT) In-Reply-To: References: <537F9F81-1353-4FA3-B8EF-EF99682F435E@gmail.com> <20110714160816.GA30155@think.gnix.co.uk> <20110715080324.GA8392@mech-cluster241.men.bris.ac.uk> <20110715235610.GA70906@mech-cluster241.men.bris.ac.uk> <20110718091913.GA4092@mech-cluster241.men.bris.ac.uk> Date: Sun, 31 Jul 2011 19:36:34 -0500 Message-ID: From: Antonio Olivares To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: Anton Shterenlikht Subject: Re: can't build teTeX port in FreeBSD 8.2 amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 00:36:35 -0000 > http://pastebin.com/23RCus2a > > http://tobi.oetiker.ch/lshort/lshort-5.01.src.tar.gz > > ran gmake and I see the errors. > One error is that in src/ folder, the file lshort-letter.tex does not exist :(, if we cd to that folder and copy the lshort-a5.tex lshort-letter.tex then it will build provided most of the other files(sty) are found and no error occurs. That is one solution, the other could be editing the Makefile (to not build the lshort-letter.pdf). This lshort was able to build with the fix but on TeXLive not yet with teTeX :(, will see which files I need first then get back to compiling it fully and hopefully I can succeed as well. Regards, Antonio From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 06:56:39 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 977DB106566C for ; Mon, 1 Aug 2011 06:56:39 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id 6D8A88FC15 for ; Mon, 1 Aug 2011 06:56:39 +0000 (UTC) Received: from eagle.yuri.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id p716uXvD080961 for ; Sun, 31 Jul 2011 23:56:37 -0700 (PDT) (envelope-from yuri@rawbw.com) Message-ID: <4E364E1C.7040800@rawbw.com> Date: Sun, 31 Jul 2011 23:56:28 -0700 From: Yuri User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110716 Thunderbird/5.0 MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Xorg at 100%CPU when browser is on X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 06:56:39 -0000 I saw this with firefox, now I see the same with chrome. After a while when the browser is launched with ~10 tabs open, Xorg begins to consume 100% CPU and all graphics apps get sluggish. Quitting the browser brings situation back to normal. It looks amazing to me that both firefox and chrome exhibit the same behavior. Anybody sees the same? Anybody can explain why would such thing happen? Yuri From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 10:42:36 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FE18106564A for ; Mon, 1 Aug 2011 10:42:36 +0000 (UTC) (envelope-from invalid.pointer@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 15A3A8FC1B for ; Mon, 1 Aug 2011 10:42:35 +0000 (UTC) Received: by vws18 with SMTP id 18so5727479vws.13 for ; Mon, 01 Aug 2011 03:42:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=MCV9dNsFbzcIaEcH5Aa6VGtRbCSl45AC/z8uCZ075oM=; b=mZ+ntR1fllrKIPzZuEl0BD88eEDkmKihd/A3OhQj4Y0aY2xLgRaSykRjWc1zmQg8gA GfBdYS/AXU1TxlEHggWZpSkhIKLt74mqXdQmXT9eyCfCUoxO7Vt8fVu3deAYsI4kAfL2 CNdSlQVvUjn2/DsAIdJ+bJzM9x224535urYfk= Received: by 10.220.194.140 with SMTP id dy12mr213479vcb.68.1312195355104; Mon, 01 Aug 2011 03:42:35 -0700 (PDT) Received: from [127.0.0.1] ([14.99.6.13]) by mx.google.com with ESMTPS id z6sm1838226vcv.18.2011.08.01.03.41.56 (version=SSLv3 cipher=OTHER); Mon, 01 Aug 2011 03:42:32 -0700 (PDT) Message-ID: <4E36830B.1000203@gmail.com> Date: Mon, 01 Aug 2011 16:12:19 +0530 From: Manish Jain User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 To: freebsd-questions@freebsd.org References: <4E22CE81.8050106@gmail.com> In-Reply-To: <4E22CE81.8050106@gmail.com> Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: Help needed : My FreeBSD8.2-amd64 installation keeps crashing X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 10:42:36 -0000 Hello All, My apologies for the last message and for the delay in rectifying any wrong impression it might have created. It was not FreeBSD8.2-amd64 that was the problem. As I found out, it was the system thermals that was causing my system to crash. I had to turn on my BIOS's temperature warnings to discover the root cause. Playing GNU-Chess against the built-in engine[s] accelerates the rise in system temperatures dramatically. Can anyone please suggest an amd64 (phenom-AM2+) motherboard with smbus support for FreeBSD and capable of running Windows 2000 ? Regards Manish Jain [1]invalid.pointer@gmail.com On 17-Jul-11 17:28, Manish Jain wrote: Hi all, My FreeBSD8.2-amd64 installation keeps crashing - power off in a flash with no warning. I can't imagine what might be the problem. I ran memtest86+ and it cleared Pass 1 with no errors. Win XP runs without any problems. I have pasted below XP Device Manager's system summary report below. (N: is an ext2fs slice and X: is the FreeBSD slice). Can somebody suggest what might the problem be ? There are a couple of points of interest : 1) there are no /dev/smbus* nodes 2) FreeBSD8.0-amd64 ran on my system without problems. Thanks in advance for any help. Meanwhile I am about to start running memtest86+ again to go through 2 Passes. Regards Manish Jain [2]invalid.pointer@gmail.com System Resource Report - Page: 1 ******************** SYSTEM SUMMARY ******************** Windows Version: Windows 5.1 Service Pack 3 (Build 2600) Registered Owner: Manish Jain Registered Organization: Cognizant Computer Name: CTS-235050 Machine Type: AT/AT COMPATIBLE System BIOS Version: GBT - 42302e31 System BIOS Date: 01/02/09 Processor Type: x86 Family 16 Model 2 Stepping 3 Processor Vendor: AuthenticAMD Number of Processors: 4 Physical Memory: 3071 MB ******************** DISK DRIVE INFO ******************** Drive C: Type: Fixed disk drive Total Space: 33,032,691,712 bytes Free Space: 13,457,170,432 bytes Heads: 16 Cylinders: 620178 Sectors Per Track: 63 Bytes Per Sector: 512 Drive D: Type: Fixed disk drive Total Space: 240,836,165,632 bytes Free Space: 41,083,314,176 bytes Heads: 16 Cylinders: 620178 Sectors Per Track: 63 Bytes Per Sector: 512 Drive F: Type: CD-ROM drive Total Space: 33,554,432 bytes Drive N: Type: Fixed disk drive Total Space: 4,258,791,424 bytes Free Space: 2,774,253,568 bytes Heads: 16 Cylinders: 620178 Sectors Per Track: 63 Bytes Per Sector: 512 Drive X: Type: Fixed disk drive Total Space: 37,434,163,200 bytes Free Space: 3,302,391,808 bytes Heads: 16 Cylinders: 620178 Sectors Per Track: 63 Bytes Per Sector: 512 ******************** IRQ SUMMARY ******************** IRQ Usage Summary: (ISA) 0 High precision event timer (ISA) 1 Standard 101/102-Key or Microsoft Natural PS/2 Keyboard (ISA) 4 Communications Port (COM1) System Resource Report - Page: 2 (ISA) 8 High precision event timer (ISA) 9 Microsoft ACPI-Compliant System (ISA) 9 AEMPH6YR IDE Controller (ISA) 12 PS/2 Compatible Mouse (ISA) 13 Numeric data processor (ISA) 14 Primary IDE Channel (PCI) 16 Standard OpenHCD USB Host Controller (PCI) 16 Standard OpenHCD USB Host Controller (PCI) 16 Microsoft UAA Bus Driver for High Definition Audio (PCI) 17 Standard Enhanced PCI to USB Host Controller (PCI) 18 ATI Radeon HD 3200 Graphics (PCI) 18 PCI standard PCI-to-PCI bridge (PCI) 18 Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethernet NIC (PCI) 18 Standard OpenHCD USB Host Controller (PCI) 18 Standard OpenHCD USB Host Controller (PCI) 18 Standard OpenHCD USB Host Controller (PCI) 19 Microsoft UAA Bus Driver for High Definition Audio (PCI) 19 Standard Enhanced PCI to USB Host Controller (PCI) 22 Standard Dual Channel PCI IDE Controller (PCI) 22 Texas Instruments OHCI Compliant IEEE 1394 Host Controller ******************** DMA USAGE SUMMARY ******************** DMA Usage Summary: 3 ECP Printer Port (LPT1) 4 Direct memory access controller ******************** MEMORY SUMMARY ******************** Memory Usage Summary: [00000000 - 0009FFFF] System board [00000000 - 00000FFF] Motherboard resources [000A0000 - 000BFFFF] PCI bus [000A0000 - 000BFFFF] PCI standard PCI-to-PCI bridge [000A0000 - 000BFFFF] ATI Radeon HD 3200 Graphics [000C0000 - 000DFFFF] PCI bus [000CEA00 - 000CFFFF] System board [000F0000 - 000F7FFF] System board [000F8000 - 000FBFFF] System board [000FC000 - 000FFFFF] System board [00100000 - BFEDFFFF] System board [BFEE0000 - BFEFFFFF] System board [BFFF0000 - CFFEFFFF] System board [D0000000 - FEBFFFFF] PCI bus [D0000000 - DFFFFFFF] PCI standard PCI-to-PCI bridge [D0000000 - DFFFFFFF] ATI Radeon HD 3200 Graphics [E0000000 - EFFFFFFF] Motherboard resources [FDA00000 - FDAFFFFF] PCI standard PCI-to-PCI bridge [FDAE0000 - FDAEFFFF] Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethe [FDAFF000 - FDAFFFFF] Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethe [FDCF8000 - FDCFBFFF] Texas Instruments OHCI Compliant IEEE 1394 Host C [FDCFF000 - FDCFF7FF] Texas Instruments OHCI Compliant IEEE 1394 Host C [FDD00000 - FDDFFFFF] PCI standard PCI-to-PCI bridge [FDE00000 - FDFFFFFF] PCI standard PCI-to-PCI bridge [FDE00000 - FDEFFFFF] ATI Radeon HD 3200 Graphics [FDFE0000 - FDFEFFFF] ATI Radeon HD 3200 Graphics [FDFFC000 - FDFFFFFF] Microsoft UAA Bus Driver for High Definition Au [FE024000 - FE027FFF] Microsoft UAA Bus Driver for High Definition Audi [FE028000 - FE028FFF] Standard OpenHCD USB Host Controller [FE029000 - FE0290FF] Standard Enhanced PCI to USB Host Controller [FE02A000 - FE02AFFF] Standard OpenHCD USB Host Controller [FE02B000 - FE02BFFF] Standard OpenHCD USB Host Controller System Resource Report - Page: 3 [FE02C000 - FE02C0FF] Standard Enhanced PCI to USB Host Controller [FE02D000 - FE02DFFF] Standard OpenHCD USB Host Controller [FE02E000 - FE02EFFF] Standard OpenHCD USB Host Controller [FE02F000 - FE02F3FF] Standard Dual Channel PCI IDE Controller [FEC00000 - FEC00FFF] System board [FED00000 - FED003FF] High precision event timer [FEE00000 - FEE00FFF] System board [FEE00400 - FEE00FFF] Motherboard resources [FFF80000 - FFFEFFFF] System board [FFFF0000 - FFFFFFFF] System board ******************** IO PORT SUMMARY ******************** I/O Ports Usage Summary: [00000000 - 00000CF7] PCI bus [00000000 - 0000000F] Direct memory access controller [00000010 - 0000001F] Motherboard resources [00000020 - 00000021] Programmable interrupt controller [00000022 - 0000003F] Motherboard resources [00000040 - 00000043] System timer [00000044 - 0000005F] Motherboard resources [00000060 - 00000060] Standard 101/102-Key or Microsoft Natural PS/2 Ke [00000061 - 00000061] System speaker [00000062 - 00000063] Motherboard resources [00000064 - 00000064] Standard 101/102-Key or Microsoft Natural PS/2 Ke [00000065 - 0000006F] Motherboard resources [00000070 - 00000073] System CMOS/real time clock [00000074 - 0000007F] Motherboard resources [00000080 - 00000090] Direct memory access controller [00000091 - 00000093] Motherboard resources [00000094 - 0000009F] Direct memory access controller [000000A0 - 000000A1] Programmable interrupt controller [000000A2 - 000000BF] Motherboard resources [000000C0 - 000000DF] Direct memory access controller [000000E0 - 000000EF] Motherboard resources [000000F0 - 000000FF] Numeric data processor [00000170 - 00000177] Secondary IDE Channel [000001F0 - 000001F7] Primary IDE Channel [00000220 - 00000225] Motherboard resources [00000228 - 0000022F] Motherboard resources [00000238 - 0000023F] Motherboard resources [00000274 - 00000277] ISAPNP Read Data Port [00000279 - 00000279] ISAPNP Read Data Port [00000290 - 00000294] Motherboard resources [00000376 - 00000376] Secondary IDE Channel [00000378 - 0000037F] ECP Printer Port (LPT1) [000003B0 - 000003BB] PCI standard PCI-to-PCI bridge [000003B0 - 000003BB] ATI Radeon HD 3200 Graphics [000003C0 - 000003DF] PCI standard PCI-to-PCI bridge [000003C0 - 000003DF] ATI Radeon HD 3200 Graphics [000003F6 - 000003F6] Primary IDE Channel [000003F8 - 000003FF] Communications Port (COM1) [0000040B - 0000040B] Motherboard resources [000004D0 - 000004D1] Motherboard resources [000004D6 - 000004D6] Motherboard resources [00000778 - 0000077B] ECP Printer Port (LPT1) [00000A79 - 00000A79] ISAPNP Read Data Port [00000B00 - 00000B0F] Motherboard resources [00000B10 - 00000B1F] Motherboard resources [00000B20 - 00000B3F] Motherboard resources [00000C00 - 00000C01] Motherboard resources [00000C14 - 00000C14] Motherboard resources System Resource Report - Page: 4 [00000C50 - 00000C52] Motherboard resources [00000C6C - 00000C6D] Motherboard resources [00000C6F - 00000C6F] Motherboard resources [00000CD0 - 00000CD1] Motherboard resources [00000CD2 - 00000CD3] Motherboard resources [00000CD4 - 00000CDF] Motherboard resources [00000D00 - 0000FFFF] PCI bus [00004000 - 000040FE] Motherboard resources [00004100 - 0000411F] Motherboard resources [00004210 - 00004217] Motherboard resources [0000D000 - 0000DFFF] PCI standard PCI-to-PCI bridge [0000DC00 - 0000DCFF] Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethe [0000E000 - 0000EFFF] PCI standard PCI-to-PCI bridge [0000EE00 - 0000EEFF] ATI Radeon HD 3200 Graphics [0000FA00 - 0000FA0F] Standard Dual Channel PCI IDE Controller [0000FB00 - 0000FB0F] Standard Dual Channel PCI IDE Controller [0000FC00 - 0000FC03] Standard Dual Channel PCI IDE Controller [0000FD00 - 0000FD07] Standard Dual Channel PCI IDE Controller [0000FE00 - 0000FE03] Standard Dual Channel PCI IDE Controller [0000FF00 - 0000FF07] Standard Dual Channel PCI IDE Controller [0000FFE0 - 0000FFEF] AEMPH6YR IDE Controller ******************** SYSTEM DEVICE INFO ******************** Class: Universal Serial Bus controllers Device: Standard Enhanced PCI to USB Host Controller Resource: IRQ: [00000017] MEM: [FE02C000 - FE02C0FF] Device Drivers: Class: Universal Serial Bus controllers Device: Standard Enhanced PCI to USB Host Controller Resource: IRQ: [00000019] MEM: [FE029000 - FE0290FF] Device Drivers: Class: Universal Serial Bus controllers Device: Standard OpenHCD USB Host Controller Resource: IRQ: [00000016] MEM: [FE02E000 - FE02EFFF] Device Drivers: Class: Universal Serial Bus controllers Device: Standard OpenHCD USB Host Controller Resource: IRQ: [00000018] MEM: [FE02B000 - FE02BFFF] Device Drivers: Class: Universal Serial Bus controllers Device: Standard OpenHCD USB Host Controller Resource: IRQ: [00000016] MEM: [FE02D000 - FE02DFFF] Device Drivers: Class: Universal Serial Bus controllers Device: Standard OpenHCD USB Host Controller Resource: System Resource Report - Page: 5 IRQ: [00000018] MEM: [FE02A000 - FE02AFFF] Device Drivers: Class: Universal Serial Bus controllers Device: Standard OpenHCD USB Host Controller Resource: IRQ: [00000018] MEM: [FE028000 - FE028FFF] Device Drivers: Class: Universal Serial Bus controllers Device: USB Root Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: USB Root Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: USB Root Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: USB Root Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: USB Root Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: USB Root Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: USB Root Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: Generic USB Hub No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: Sony Ericsson Device 0017 No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: Sony Ericsson Device 0017 USB Ethernet Emulation (WDM) No resources used. Device Drivers: Class: Universal Serial Bus controllers System Resource Report - Page: 6 Device: USB Composite Device No resources used. Device Drivers: Class: Universal Serial Bus controllers Device: USB Mass Storage Device No resources used. Device Drivers: Class: DVD/CD-ROM drives Device: HL-DT-ST DVD-ROM GDR8163B No resources used. Device Drivers: Class: DVD/CD-ROM drives Device: Optiarc DVD RW AD-7240S No resources used. Device Drivers: Class: DVD/CD-ROM drives Device: FWX DUZGLU7C SCSI CdRom Device No resources used. Device Drivers: Class: DVD/CD-ROM drives Device: FWX DUZGLU7C SCSI CdRom Device No resources used. Device Drivers: Class: DVD/CD-ROM drives Device: HUAWEI Mass Storage USB Device No resources used. Device Drivers: Class: Computer Device: ACPI Multiprocessor PC No resources used. Device Drivers: Class: Disk drives Device: WDC WD3200AAJS-00L7A0 No resources used. Device Drivers: Class: Disk drives Device: HUAWEI SD Storage USB Device No resources used. Device Drivers: Class: Display adapters Device: ATI Radeon HD 3200 Graphics Resource: IRQ: [00000018] MEM: [000A0000 - 000BFFFF] MEM: [D0000000 - DFFFFFFF] MEM: [FDE00000 - FDEFFFFF] MEM: [FDFE0000 - FDFEFFFF] IO: [000003B0 - 000003BB] IO: [000003C0 - 000003DF] IO: [0000EE00 - 0000EEFF] Device Drivers: System Resource Report - Page: 7 Class: IDE ATA/ATAPI controllers Device: Standard Dual Channel PCI IDE Controller Resource: IRQ: [00000022] MEM: [FE02F000 - FE02F3FF] IO: [0000FB00 - 0000FB0F] IO: [0000FC00 - 0000FC03] IO: [0000FD00 - 0000FD07] IO: [0000FE00 - 0000FE03] IO: [0000FF00 - 0000FF07] Device Drivers: Class: IDE ATA/ATAPI controllers Device: Standard Dual Channel PCI IDE Controller Resource: IO: [0000FA00 - 0000FA0F] Device Drivers: Class: IDE ATA/ATAPI controllers Device: Primary IDE Channel Resource: IRQ: [00000014] IO: [000001F0 - 000001F7] IO: [000003F6 - 000003F6] Device Drivers: Class: IDE ATA/ATAPI controllers Device: Secondary IDE Channel Resource: IO: [00000170 - 00000177] IO: [00000376 - 00000376] Device Drivers: Class: IDE ATA/ATAPI controllers Device: Primary IDE Channel No resources used. Device Drivers: Class: IDE ATA/ATAPI controllers Device: Secondary IDE Channel No resources used. Device Drivers: Class: Keyboards Device: Standard 101/102-Key or Microsoft Natural PS/2 Keyboard Resource: IRQ: [00000001] IO: [00000060 - 00000060] IO: [00000064 - 00000064] Device Drivers: Class: Sound, video and game controllers Device: ATI HDMI Audio No resources used. Device Drivers: Class: Sound, video and game controllers Device: Realtek High Definition Audio No resources used. Device Drivers: Class: Sound, video and game controllers System Resource Report - Page: 8 Device: Audio Codecs No resources used. Device Drivers: Class: Sound, video and game controllers Device: Legacy Audio Drivers No resources used. Device Drivers: Class: Sound, video and game controllers Device: Media Control Devices No resources used. Device Drivers: Class: Sound, video and game controllers Device: Legacy Video Capture Devices No resources used. Device Drivers: Class: Sound, video and game controllers Device: Video Codecs No resources used. Device Drivers: Class: Sound, video and game controllers Device: Microsoft Kernel System Audio Device No resources used. Device Drivers: Class: Sound, video and game controllers Device: Microsoft WINMM WDM Audio Compatibility Driver No resources used. Device Drivers: Class: Modems Device: Sony Ericsson Device 0017 USB WMC Data Modem No resources used. Device Drivers: Class: Modems Device: Sony Ericsson Device 0017 USB WMC Modem No resources used. Device Drivers: Class: Modems Device: HUAWEI Mobile Connect - Modem No resources used. Device Drivers: Class: Monitors Device: Plug and Play Monitor No resources used. Device Drivers: Class: Mice and other pointing devices Device: PS/2 Compatible Mouse Resource: IRQ: [00000012] Device Drivers: Class: Network adapters Device: Realtek RTL8168C(P)/8111C(P) PCI-E Gigabit Ethernet NIC System Resource Report - Page: 9 Resource: IRQ: [00000018] MEM: [FDAE0000 - FDAEFFFF] MEM: [FDAFF000 - FDAFFFFF] IO: [0000DC00 - 0000DCFF] Device Drivers: Class: Network adapters Device: MAC Bridge Miniport No resources used. Device Drivers: Class: Network adapters Device: WAN Miniport (L2TP) No resources used. Device Drivers: Class: Network adapters Device: WAN Miniport (IP) No resources used. Device Drivers: Class: Network adapters Device: WAN Miniport (PPPOE) No resources used. Device Drivers: Class: Network adapters Device: WAN Miniport (PPTP) No resources used. Device Drivers: Class: Network adapters Device: WAN Miniport (IP) - Packet Scheduler Miniport No resources used. Device Drivers: Class: Network adapters Device: Sony Ericsson Device 0017 USB Ethernet Emulation (NDIS 5) - Packet S No resources used. Device Drivers: Class: Network adapters Device: Sony Ericsson Device 0016 USB Ethernet Emulation (NDIS 5) - Packet S No resources used. Device Drivers: Class: Network adapters Device: MAC Bridge Miniport - Packet Scheduler Miniport No resources used. Device Drivers: Class: Network adapters Device: Direct Parallel No resources used. Device Drivers: Class: Network adapters Device: VMware Virtual Ethernet Adapter for VMnet1 No resources used. Device Drivers: System Resource Report - Page: 10 Class: Network adapters Device: VMware Virtual Ethernet Adapter for VMnet8 No resources used. Device Drivers: Class: Network adapters Device: Sony Ericsson Device 0017 USB Ethernet Emulation (NDIS 5) No resources used. Device Drivers: Class: Network adapters Device: RAS Async Adapter No resources used. Device Drivers: *DISABLED DEVICE* Class: Network adapters Device: 1394 Net Adapter No resources used. Device Drivers: Class: Ports (COM & LPT) Device: ECP Printer Port (LPT1) Resource: DMA: [00000003] IO: [00000378 - 0000037F] IO: [00000778 - 0000077B] Device Drivers: Class: Ports (COM & LPT) Device: Communications Port (COM1) Resource: IRQ: [00000004] IO: [000003F8 - 000003FF] Device Drivers: Class: Ports (COM & LPT) Device: Sony Ericsson Device 0017 USB WMC OBEX Interface (COM21) No resources used. Device Drivers: Class: Ports (COM & LPT) Device: Sony Ericsson Device 0017 USB WMC Device Management (COM22) No resources used. Device Drivers: Class: Ports (COM & LPT) Device: HUAWEI Mobile Connect - Application Interface (COM5) No resources used. Device Drivers: Class: Ports (COM & LPT) Device: HUAWEI Mobile Connect - PC UI Interface (COM6) No resources used. Device Drivers: Class: SCSI and RAID controllers Device: AEMPH6YR IDE Controller Resource: IRQ: [00000009] IO: [0000FFE0 - 0000FFEF] Device Drivers: System Resource Report - Page: 11 Class: System devices Device: ACPI Fixed Feature Button No resources used. Device Drivers: Class: System devices Device: Programmable interrupt controller No resources used. Device Drivers: Class: System devices Device: System timer No resources used. Device Drivers: Class: System devices Device: High precision event timer No resources used. Device Drivers: Class: System devices Device: Direct memory access controller No resources used. Device Drivers: Class: System devices Device: System speaker No resources used. Device Drivers: Class: System devices Device: PCI bus Resource: MEM: [000A0000 - 000BFFFF] MEM: [000C0000 - 000DFFFF] MEM: [D0000000 - FEBFFFFF] IO: [00000000 - 00000CF7] IO: [00000D00 - 0000FFFF] Device Drivers: Class: System devices Device: Extended IO Bus No resources used. Device Drivers: Class: System devices Device: System CMOS/real time clock Resource: IO: [00000070 - 00000073] Device Drivers: Class: System devices Device: System board No resources used. Device Drivers: Class: System devices Device: Motherboard resources No resources used. Device Drivers: System Resource Report - Page: 12 Class: System devices Device: Motherboard resources No resources used. Device Drivers: Class: System devices Device: Motherboard resources No resources used. Device Drivers: Class: System devices Device: Numeric data processor No resources used. Device Drivers: Class: System devices Device: ACPI Power Button No resources used. Device Drivers: Class: System devices Device: Microsoft Windows Management Interface for ACPI No resources used. Device Drivers: Class: System devices Device: Microsoft ACPI-Compliant System Resource: IRQ: [00000009] Device Drivers: Class: System devices Device: ISAPNP Read Data Port Resource: IO: [00000274 - 00000277] IO: [00000279 - 00000279] IO: [00000A79 - 00000A79] Device Drivers: Class: System devices Device: Printer Port Logical Interface No resources used. Device Drivers: Class: System devices Device: Microsoft UAA Bus Driver for High Definition Audio Resource: IRQ: [00000016] MEM: [FE024000 - FE027FFF] Device Drivers: Class: System devices Device: PCI standard PCI-to-PCI bridge No resources used. Device Drivers: Class: System devices Device: ATI SMBus No resources used. Device Drivers: Class: System devices System Resource Report - Page: 13 Device: PCI standard ISA bridge No resources used. Device Drivers: Class: System devices Device: Microsoft UAA Bus Driver for High Definition Audio Resource: IRQ: [00000019] MEM: [FDFFC000 - FDFFFFFF] Device Drivers: Class: System devices Device: PCI standard host CPU bridge No resources used. Device Drivers: Class: System devices Device: PCI standard host CPU bridge No resources used. Device Drivers: Class: System devices Device: PCI standard host CPU bridge No resources used. Device Drivers: Class: System devices Device: PCI standard host CPU bridge No resources used. Device Drivers: Class: System devices Device: PCI standard host CPU bridge No resources used. Device Drivers: Class: System devices Device: PCI standard host CPU bridge No resources used. Device Drivers: Class: System devices Device: PCI standard PCI-to-PCI bridge Resource: MEM: [000A0000 - 000BFFFF] MEM: [D0000000 - DFFFFFFF] MEM: [FDE00000 - FDFFFFFF] IO: [000003B0 - 000003BB] IO: [000003C0 - 000003DF] IO: [0000E000 - 0000EFFF] Device Drivers: Class: System devices Device: PCI standard PCI-to-PCI bridge Resource: IRQ: [00000018] MEM: [FDA00000 - FDAFFFFF] MEM: [FDD00000 - FDDFFFFF] IO: [0000D000 - 0000DFFF] Device Drivers: Class: System devices System Resource Report - Page: 14 Device: Microsoft Composite Battery No resources used. Device Drivers: Class: System devices Device: Logical Disk Manager No resources used. Device Drivers: Class: System devices Device: Volume Manager No resources used. Device Drivers: Class: System devices Device: Terminal Server Device Redirector No resources used. Device Drivers: Class: System devices Device: Terminal Server Keyboard Driver No resources used. Device Drivers: Class: System devices Device: Terminal Server Mouse Driver No resources used. Device Drivers: Class: System devices Device: Plug and Play Software Device Enumerator No resources used. Device Drivers: Class: System devices Device: Microcode Update Device No resources used. Device Drivers: Class: System devices Device: Microsoft System Management BIOS Driver No resources used. Device Drivers: Class: Processors Device: AMD Phenom(tm) 9650 Quad-Core Processor No resources used. Device Drivers: Class: Processors Device: AMD Phenom(tm) 9650 Quad-Core Processor No resources used. Device Drivers: Class: Processors Device: AMD Phenom(tm) 9650 Quad-Core Processor No resources used. Device Drivers: Class: Processors Device: AMD Phenom(tm) 9650 Quad-Core Processor No resources used. System Resource Report - Page: 15 Device Drivers: Class: IEEE 1394 Bus host controllers Device: Texas Instruments OHCI Compliant IEEE 1394 Host Controller Resource: IRQ: [00000022] MEM: [FDCF8000 - FDCFBFFF] MEM: [FDCFF000 - FDCFF7FF] Device Drivers: Class: Storage volumes Device: Generic volume No resources used. Device Drivers: Class: Storage volumes Device: Generic volume No resources used. Device Drivers: Class: Storage volumes Device: Generic volume No resources used. Device Drivers: Class: Storage volumes Device: Generic volume No resources used. Device Drivers: Class: Storage volumes Device: Generic volume No resources used. Device Drivers: Class: Batteries Device: APC Battery BackUP No resources used. Device Drivers: Class: Human Interface Devices Device: American Power Conversion USB UPS No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: avast! Asynchronous Virus Monitor No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: AFD No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: 1394 ARP Client Protocol No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Aspi32 System Resource Report - Page: 16 No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: aswRdr No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: aswSP No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: avast! Network Shield Support No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Beep No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: C-Dilla No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: dmboot No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: dmload No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: ffs No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Fips No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: gdrv No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Generic Packet Classifier No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: VMware hcmon No resources used. Device Drivers: System Resource Report - Page: 17 Class: Non-Plug and Play Drivers Device: HTTP No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: IP Network Address Translator No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: IPSEC driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: PnP ISA/EISA Bus Driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: ksecdd No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: mnmdd No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: mountmgr No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: NDIS System Driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Remote Access NDIS TAPI Driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: NDIS Usermode I/O Protocol No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: NDProxy No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: NetBios over Tcpip No resources used. Device Drivers: Class: Non-Plug and Play Drivers System Resource Report - Page: 18 Device: Null No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: PartMgr No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: ParVdm No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Remote Access Auto Connection Driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: RDPCDD No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: RDPWD No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Secdrv No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: sptd No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: TCP/IP Protocol Driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: TCP Half Open Limited Patcher ( TCP-Z) No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: TDTCP No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: VgaSave No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: VMware vmci No resources used. System Resource Report - Page: 19 Device Drivers: Class: Non-Plug and Play Drivers Device: VMware Bridge Protocol No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: VMware Network Application Interface No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: VMware VMparport No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: VMware vmx86 No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: VolSnap No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Vstor2 WS60 Virtual Storage Driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Remote Access IP ARP Driver No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Kernel Mode Driver Frameworks service No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Windows Socket 2.0 Non-IFS Service Provider Support Environment No resources used. Device Drivers: Class: Non-Plug and Play Drivers Device: Windows Driver Foundation - User-mode Driver Framework Platform Driv No resources used. Device Drivers: Class: Portable Devices Device: W595 No resources used. Device Drivers: References 1. mailto:invalid.pointer@gmail.com 2. mailto:invalid.pointer@gmail.com From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 12:36:21 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19225106564A for ; Mon, 1 Aug 2011 12:36:21 +0000 (UTC) (envelope-from cpghost@cordula.ws) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id D18CD8FC14 for ; Mon, 1 Aug 2011 12:36:20 +0000 (UTC) Received: by vxg33 with SMTP id 33so5736191vxg.13 for ; Mon, 01 Aug 2011 05:36:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.7.82 with SMTP id c18mr1222805vcc.45.1312202179926; Mon, 01 Aug 2011 05:36:19 -0700 (PDT) Received: by 10.220.25.7 with HTTP; Mon, 1 Aug 2011 05:36:19 -0700 (PDT) X-Originating-IP: [93.221.187.185] In-Reply-To: <4E364E1C.7040800@rawbw.com> References: <4E364E1C.7040800@rawbw.com> Date: Mon, 1 Aug 2011 14:36:19 +0200 Message-ID: From: "C. P. Ghost" To: Yuri Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Questions Subject: Re: Xorg at 100%CPU when browser is on X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 12:36:21 -0000 On Mon, Aug 1, 2011 at 8:56 AM, Yuri wrote: > I saw this with firefox, now I see the same with chrome. > > After a while when the browser is launched with ~10 tabs open, Xorg begins > to consume 100% CPU and all graphics apps get sluggish. Quitting the browser > brings situation back to normal. > > It looks amazing to me that both firefox and chrome exhibit the same > behavior. > > Anybody sees the same? Anybody can explain why would such thing happen? Same here, but when mplayer plays some (rare) video files. Xorg then stays at 100% CPU, and it is impossible to kill it, neither from the inside, nor from the outside (logged in via ssh) with SIGKILL. Only a reboot helps here. Running: FreeBSD 8.2-STABLE #0 r222832 amd64 with xorg-server-1.7.7_1,1 xorg-drivers-7.5.1 and the radeonhd driver: (--) PCI:*(0:1:5:0) 1002:9610:1462:7501 ATI Technologies Inc Radeon HD 3200 Graphics rev 0, Mem @ 0xd0000000/268435456, 0xfe9e0000/65536, 0xfe800000/1048576, I/O @ 0x0000d000/256, BIOS @ 0x????????/65536 (II) LoadModule: "radeonhd" (II) Loading /usr/local/lib/xorg/modules/drivers/radeonhd_drv.so (II) Module radeonhd: vendor="AMD GPG" compiled for 1.7.7, module version = 1.3.0 Module class: X.Org Video Driver ABI class: X.Org Video Driver, version 6.0 (II) RADEONHD: version 1.3.0, built from dist of git branch master, commit 8cbff7bf (II) RADEONHD(0): ATOM BIOS Rom: SubsystemVendorID: 0x1002 SubsystemID: 0x1002 IOBaseAddress: 0xd000 Filename: MS7501_H_5.b BIOS Bootup Message: B27721 RS780 DDR2 200e/500m It happens only rarely, I can't reproduce that bug reliably. > Yuri -cpghost. -- Cordula's Web. http://www.cordula.ws/ From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 14:25:57 2011 Return-Path: Delivered-To: freebsd-questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56AD3106564A for ; Mon, 1 Aug 2011 14:25:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id A26968FC17 for ; Mon, 1 Aug 2011 14:25:56 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA27720; Mon, 01 Aug 2011 17:14:40 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4E36B4CF.3060308@FreeBSD.org> Date: Mon, 01 Aug 2011 17:14:39 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110705 Thunderbird/5.0 MIME-Version: 1.0 To: Mario Lobo References: <201107312128.29322.lobo@bsd.com.br> In-Reply-To: <201107312128.29322.lobo@bsd.com.br> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@FreeBSD.org, FreeBSD Questions Subject: Re: Phenom II 975 BE shows 0 celsius X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 14:25:57 -0000 on 01/08/2011 03:28 Mario Lobo said the following: > Hi to all > > In my desktop machine, I had an AM2+ ASROCK mobo with Phenom II 955 BE that > showed each core temperature perfectly under FBSD 8-STABLE, via > dev.cpu.x.temp. amdtemp.ko loaded. > > Unfortunately this Mobo died and only found AM3 boards for which my phenom 955 > doesn't fit. So I got an ASUS M4A88T-V EVO with a Phenom II 975 BE. > > Funny thing. An AM3 phenom II fits on an AM2 board but an AM3 board doesn't > accept an AM2/AM2+ phenom II :(. > > Anyway, now, under the very same system, it shows 0 degrees on dev.cpu.x.temp > for all cores. Sorry, I've got lost in all the config changes. So what system do you have now? Can please also provide CPU-related information from dmesg? > I've been looking through k8temp and amdtemp src code. I am definitely not > sure of this but I believe something might have happened to those: > > From k8temp.h > > K10_THERM_REG 0xa4 > K10_THERMTRIP_REG 0xe4 > K10_CURTMP(val) (((val) >> 21) & 0xfff) > K10_THERMTRIP(val) ((val >> 1) & 1) > > From amdtemp.c > > /* > * Register control (K8 family) > */ > #define AMDTEMP_REG0F 0xe4 > #define AMDTEMP_REG_SELSENSOR 0x40 > #define AMDTEMP_REG_SELCORE 0x04 > > /* > * Register control (K10 & K11) family > */ > #define AMDTEMP_REG 0xa4 > > > Output of k8temp -dn: > > CPUID: Vendor: AuthenticAMD, 0x100f43: Model=04 Family=f+1 Stepping=3 > Advanced Power Management=0x1f9 > Temperature sensor: Yes > Frequency ID control: No > Voltage ID control: No > THERMTRIP support: Yes > HW Thermal control: Yes > SW Thermal control: Yes > 100MHz multipliers: Yes > HW P-State control: Yes > TSC Invariant: Yes > Temp=c0fef > ThermTrip=1fc00c30 > 0 > > I keep a small win7 partition to test little things like this and see if the > same thing happens there, and it doesn't, so I concluded that the sensors are > there and are working. > > One thing is worth noting though. I have used a free gadget that shows > activity/temp for each core. It worked fine with the previous MB/CPU.That ALSO > stopped working with this new MB. Like FBSD, it shows 0 degrees for any core > too, although it correctly displays each core load. Most likely that gadget just re-uses OS-provided information. > The only windows tool that correctly shows the temperature are the ASUS tools > that came with the mobo. > > Other than that, everything is working fine! The only thing I had to fix was > the fstab ada location. > > I know this is not a big thing but I got accustomed to keeping an eye on those > temperatures. > > I have googled for a few days now searching for Thermal register address or > offsets for the Phenom II 975 BE, or anything related to this problem and > found nothing. Every search on AMD site was fruitless. I could not find a > single bit of tech info on this processor there, or any other tech info for > that matter. http://support.amd.com/us/Processor_TechDocs/31116.pdf > Would any one have any pointers/clues/suggestions on this? I would try to add some printfs (or used dtrace - whichever is easier for you) to see what's going on. Or you can even use pciconf to directly sneak a peek at what's reported by the hardware, e.g.: # pciconf -r pci0:0:24:3 0xa4 1c881880 You can read the BKDG to see how to interpret the value - search for F3xA4. See F3xE4 for offset calculation. Hopefully you should be able to see if hardware reports sane value and how the amdtemp ends up reporting 0°C. -- Andriy Gapon From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 14:30:38 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EBFB1065674 for ; Mon, 1 Aug 2011 14:30:38 +0000 (UTC) (envelope-from dick@nagual.nl) Received: from smtpq2.gn.mail.iss.as9143.net (smtpq2.gn.mail.iss.as9143.net [212.54.34.165]) by mx1.freebsd.org (Postfix) with ESMTP id 067BA8FC0C for ; Mon, 1 Aug 2011 14:30:37 +0000 (UTC) Received: from [212.54.34.142] (helo=smtp11.gn.mail.iss.as9143.net) by smtpq2.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1QntVs-0003ID-Ib for freebsd-questions@freebsd.org; Mon, 01 Aug 2011 16:30:36 +0200 Received: from 524944af.cm-4-2b.dynamic.ziggo.nl ([82.73.68.175] helo=mail.nagual.nl) by smtp11.gn.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1QntVr-0007B5-Qd for freebsd-questions@freebsd.org; Mon, 01 Aug 2011 16:30:35 +0200 Received: from [192.168.11.37] (192.168.11.37) by yanta (Axigen) with (CAMELLIA256-SHA encrypted) ESMTPSA id 1C0D4D; Mon, 1 Aug 2011 16:31:17 +0200 Message-ID: <4E36B89A.4090200@nagual.nl> Date: Mon, 01 Aug 2011 16:30:50 +0200 From: Dick Hoogendijk User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: FreeBSD Questions Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AxigenSpam-Level: 4 X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1QntVr-0007B5-Qd X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: geen spam, SpamAssassin (niet cached, score=1.723, vereist 5, BAYES_20 -0.00, FH_HOST_EQ_D_D_D_D 0.67, RDNS_DYNAMIC 0.98, TW_ZF 0.08) X-ZiggoSMTP-MailScanner-SpamScore: s X-ZiggoSMTP-MailScanner-From: dick@nagual.nl X-Spam-Status: No Subject: larger disk for a zfs pool X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 14:30:38 -0000 OK, my freebsd system runs on ZFS boot. W/ solaris getting larger disks for a pool was quit easy. Simply replace one disk from a mirror for a larger one, wait for the resilvering and after this replace the second one for a larger disk and wait for the resilvering again. That's it. Been there, done that. But my feeling tells me it is not that simple for a FreeBSD zfs root system, or is it? From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 14:38:01 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AFC0106566C for ; Mon, 1 Aug 2011 14:38:01 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from email2.allantgroup.com (email2.emsphone.com [199.67.51.116]) by mx1.freebsd.org (Postfix) with ESMTP id 110588FC13 for ; Mon, 1 Aug 2011 14:38:00 +0000 (UTC) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by email2.allantgroup.com (8.14.4/8.14.4) with ESMTP id p71Ec0Md079367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Aug 2011 09:38:00 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.5/8.14.5) with ESMTP id p71EbwLl034211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Aug 2011 09:37:59 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.5/8.14.5/Submit) id p71Ebukb034183; Mon, 1 Aug 2011 09:37:56 -0500 (CDT) (envelope-from dan) Date: Mon, 1 Aug 2011 09:37:55 -0500 From: Dan Nelson To: Dick Hoogendijk Message-ID: <20110801143754.GD59252@dan.emsphone.com> References: <4E36B89A.4090200@nagual.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E36B89A.4090200@nagual.nl> X-OS: FreeBSD 8.2-STABLE User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.2 at email2.allantgroup.com X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.6 (email2.allantgroup.com [199.67.51.78]); Mon, 01 Aug 2011 09:38:00 -0500 (CDT) X-Scanned-By: MIMEDefang 2.68 on 199.67.51.78 Cc: FreeBSD Questions Subject: Re: larger disk for a zfs pool X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 14:38:01 -0000 In the last episode (Aug 01), Dick Hoogendijk said: > OK, my freebsd system runs on ZFS boot. W/ solaris getting larger disks > for a pool was quit easy. Simply replace one disk from a mirror for a > larger one, wait for the resilvering and after this replace the second > one for a larger disk and wait for the resilvering again. That's it. > Been there, done that. But my feeling tells me it is not that simple for > a FreeBSD zfs root system, or is it? Should be the same procedure. Make sure you either use "zpool online -e" when swapping in the new disks, or that you have the zpool autoexpand=on attribute set. -- Dan Nelson dnelson@allantgroup.com From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 14:58:52 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFF5E106564A for ; Mon, 1 Aug 2011 14:58:52 +0000 (UTC) (envelope-from Traiano.Welcome@mtnbusiness.co.za) Received: from smtprelay01.ops.mtnbusiness.co.za (smtprelay01.ops.mtnbusiness.co.za [41.181.93.235]) by mx1.freebsd.org (Postfix) with ESMTP id DFEBE8FC14 for ; Mon, 1 Aug 2011 14:58:51 +0000 (UTC) Received: from [196.30.97.135] (helo=CPT-EXCH01.int.mtnbusiness.net) by smtprelay01.ops.mtnbusiness.co.za with esmtp (ULTRA Special SMTP Internal Alpha) (envelope-from ) id 1QntWd-0001B1-Ro for freebsd-questions@freebsd.org; Mon, 01 Aug 2011 16:31:23 +0200 Received: from CPT-EXCH01.int.mtnbusiness.net ([196.30.97.135]) by CPT-EXCH01.int.mtnbusiness.net ([196.30.97.135]) with mapi id 14.01.0218.012; Mon, 1 Aug 2011 16:30:34 +0200 From: Traiano Welcome To: "freebsd-questions@freebsd.org" Thread-Topic: Linux Binary Compatibility: Libpam compile for FreeBSD Thread-Index: AQHMUFcSrapjoVwPW0OOgoVZMl2WCA== Date: Mon, 1 Aug 2011 14:30:32 +0000 Message-ID: Accept-Language: en-US, en-ZA Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [41.181.32.21] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Linux Binary Compatibility: Libpam compile for FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 14:58:52 -0000 Hi List=0A= =0A= I need to run a linux binary on freebsd 7.3 that expects to link to libpam.= so.0. I can't seem to find how to compile libpam (linux-pam) on freebsd, or= locate some kind of compatible binary I can run on freebsd with linux bina= ry compatibility enabled in the ports tree either. =0A= =0A= Would anyone know if there is a freebsd port of linux libpam, or a source p= ackage I could easily compile for freebsd 7.3 and upward ?=0A= =0A= Informational: The binary I'm trying to run is "wmic" , a windows managemen= t instrumentation client, for monitoring windows systems via wmi. There doe= s not seem to be a wmi client available for FreeBSD, hence me resorting to = a binary compiled for linux :-(=0A= =0A= some information on the binary:=0A= =0A= ---=0A= wmic: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Lin= ux 2.2.5, dynamically linked (uses shared libs), not stripped=0A= ---=0A= =0A= running it:=0A= =0A= ---=0A= ./wmic: error while loading shared libraries: libpam.so.0: cannot open shar= ed object file: No such file or directory=0A= ---=0A= =0A= Any other suggestions that might help resolving this quandary would be welc= ome :-)=0A= =0A= Thanks in Advance,=0A= Traiano Welcome= From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 15:04:52 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16142106564A for ; Mon, 1 Aug 2011 15:04:52 +0000 (UTC) (envelope-from dick@nagual.nl) Received: from smtpq3.tb.mail.iss.as9143.net (smtpq3.tb.mail.iss.as9143.net [212.54.42.166]) by mx1.freebsd.org (Postfix) with ESMTP id C02318FC08 for ; Mon, 1 Aug 2011 15:04:51 +0000 (UTC) Received: from [212.54.42.149] (helo=smtp17.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1Qnu30-0005bG-A7 for freebsd-questions@freebsd.org; Mon, 01 Aug 2011 17:04:50 +0200 Received: from 524944af.cm-4-2b.dynamic.ziggo.nl ([82.73.68.175] helo=mail.nagual.nl) by smtp17.tb.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1Qnu2x-0003dX-8g for freebsd-questions@freebsd.org; Mon, 01 Aug 2011 17:04:47 +0200 Received: from [192.168.11.37] (192.168.11.37) by yanta (Axigen) with (CAMELLIA256-SHA encrypted) ESMTPSA id 3E5A52; Mon, 1 Aug 2011 17:05:28 +0200 Message-ID: <4E36C09E.8050709@nagual.nl> Date: Mon, 01 Aug 2011 17:05:02 +0200 From: Dick Hoogendijk User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Dan Nelson References: <4E36B89A.4090200@nagual.nl> <20110801143754.GD59252@dan.emsphone.com> In-Reply-To: <20110801143754.GD59252@dan.emsphone.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AxigenSpam-Level: 4 X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1Qnu2x-0003dX-8g X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: geen spam, SpamAssassin (niet cached, score=-0.176, vereist 5, BAYES_00 -1.90, FH_HOST_EQ_D_D_D_D 0.67, RDNS_DYNAMIC 0.98, TW_ZF 0.08) X-ZiggoSMTP-MailScanner-From: dick@nagual.nl X-Spam-Status: No Cc: FreeBSD Questions Subject: Re: larger disk for a zfs pool X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 15:04:52 -0000 Op 1-8-2011 16:37, Dan Nelson schreef: > In the last episode (Aug 01), Dick Hoogendijk said: >> OK, my freebsd system runs on ZFS boot. W/ solaris getting larger disks >> for a pool was quit easy. Simply replace one disk from a mirror for a >> larger one, wait for the resilvering and after this replace the second >> one for a larger disk and wait for the resilvering again. That's it. >> Been there, done that. But my feeling tells me it is not that simple for >> a FreeBSD zfs root system, or is it? > Should be the same procedure. Make sure you either use "zpool online -e" > when swapping in the new disks, or that you have the zpool autoexpand=on > attribute set. But I'm confused about the gpart thing I did on the original disks. $ gpart show => 34 156301421 ad4 GPT (75G) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 147912685 3 freebsd-zfs (71G) => 34 156301421 ad6 GPT (75G) 34 128 1 freebsd-boot (64K) 162 8388608 2 freebsd-swap (4.0G) 8388770 147912685 3 freebsd-zfs (71G) Do I repeat this gpart section on the new disk(s) before putting them in the rpool (one at a time). Is it compatrible to putting the solaris bootcode on disk before attaching them to a rootpool and resilvering? I want to expand my rootpool but am a little confused about the right procedure. From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 15:08:42 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BC8F106566B for ; Mon, 1 Aug 2011 15:08:42 +0000 (UTC) (envelope-from dick@nagual.nl) Received: from smtpq4.tb.mail.iss.as9143.net (smtpq4.tb.mail.iss.as9143.net [212.54.42.167]) by mx1.freebsd.org (Postfix) with ESMTP id 322F68FC0A for ; Mon, 1 Aug 2011 15:08:41 +0000 (UTC) Received: from [212.54.42.134] (helo=smtp3.tb.mail.iss.as9143.net) by smtpq4.tb.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1Qnu6i-0000El-Q5 for freebsd-questions@freebsd.org; Mon, 01 Aug 2011 17:08:40 +0200 Received: from 524944af.cm-4-2b.dynamic.ziggo.nl ([82.73.68.175] helo=mail.nagual.nl) by smtp3.tb.mail.iss.as9143.net with esmtp (Exim 4.71) (envelope-from ) id 1Qnu6i-0004ax-4K for freebsd-questions@freebsd.org; Mon, 01 Aug 2011 17:08:40 +0200 Received: from [192.168.11.37] (192.168.11.37) by yanta (Axigen) with (CAMELLIA256-SHA encrypted) ESMTPSA id 3B9958; Mon, 1 Aug 2011 17:09:21 +0200 Message-ID: <4E36C187.2050902@nagual.nl> Date: Mon, 01 Aug 2011 17:08:55 +0200 From: Dick Hoogendijk User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: FreeBSD Questions References: <4E36B89A.4090200@nagual.nl> <20110801150614.GA87286@ozzmosis.com> In-Reply-To: <20110801150614.GA87286@ozzmosis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AxigenSpam-Level: 4 X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1Qnu6i-0004ax-4K X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: geen spam, SpamAssassin (niet cached, score=-0.176, vereist 5, BAYES_00 -1.90, FH_HOST_EQ_D_D_D_D 0.67, RDNS_DYNAMIC 0.98, TW_ZF 0.08) X-ZiggoSMTP-MailScanner-From: dick@nagual.nl X-Spam-Status: No Subject: Re: larger disk for a zfs pool X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 15:08:42 -0000 Op 1-8-2011 17:06, andrew clarke schreef: > On Mon 2011-08-01 16:30:50 UTC+0200, Dick Hoogendijk (dick@nagual.nl) wrote: > >> OK, my freebsd system runs on ZFS boot. W/ solaris getting larger disks >> for a pool was quit easy. Simply replace one disk from a mirror for a >> larger one, wait for the resilvering and after this replace the second >> one for a larger disk and wait for the resilvering again. That's it. >> Been there, done that. But my feeling tells me it is not that simple for >> a FreeBSD zfs root system, or is it? > By the way, a similar question appeared on the freebsd-fs list recently: > > http://lists.freebsd.org/pipermail/freebsd-fs/2011-June/011887.html > > Although the question was asked with regards to ZFS v28, which may be > newer than what you are using. Thanks for the pointer. It's not hopeful plus the fact that I want to expand a rootpool from which I want to boot the system. From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 15:09:52 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8C1F1065676 for ; Mon, 1 Aug 2011 15:09:52 +0000 (UTC) (envelope-from kuku@kukulies.org) Received: from kukulies.org (mail.kukulies.org [78.47.239.221]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3F18FC18 for ; Mon, 1 Aug 2011 15:09:51 +0000 (UTC) Received: by kukulies.org (Postfix, from userid 5001) id 147CF1AC003; Mon, 1 Aug 2011 17:09:51 +0200 (CEST) Received: from [172.27.4.215] (unknown [87.79.34.228]) by kukulies.org (Postfix) with ESMTPSA id ED1151AC002 for ; Mon, 1 Aug 2011 17:09:47 +0200 (CEST) Message-ID: <4E36C1B1.4090708@kukulies.org> Date: Mon, 01 Aug 2011 17:09:37 +0200 From: "Christoph P.U. Kukulies" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <4E352563.2070808@kukulies.org> In-Reply-To: <4E352563.2070808@kukulies.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: invalid argument in select() when peer socket is in FD_SET X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 15:09:52 -0000 Am 31.07.2011 11:50, schrieb Christoph P.U. Kukulies: > I have written a small to test TCP/IP roundtrip times of the packets > in a proprietary protocol and while > compiling and running this server on different platforms (Windows > 7/cygwin, UbuntuLinux, FreeBSD 8.0 Release), I found > that the server produces an error when the listening socket (on which > the accpet() is performed) is member of the select() > fd_set. > > On the other platforms the program works without error, just under > FreeBSD I'm getting this "invalid argument" error. > > Comments appreciated (despite comments about the error checking logic :) > > Here is the code: > // testsrv.c > // gcc -o testsrv testsrv.c > // > > #include > #include > #include > #include > #include > #include > #include > #include > > #include > > #define USEDBUFSIZ 60 > #define MAX_HOSTNAME 256 > #define MAXFDS 256 > #define CLRBUF memset(buf,0,sizeof(buf)) > #define max(a,b) (((a) > (b)) ? (a) : (b)) > static unsigned char buf[256]; > int array_of_fds[MAXFDS]; > static fd_set clientfds; > #define SOCKET int > void *memset(void *, int, size_t); > int enter (int); > int remov (int); > int invalidip (char *); > void exit (int); > int getv (int, unsigned char *, int); > int getfds (); > > int > main(int argc, char **argv) > { > int nfds; > static fd_set readfds; > SOCKET ListenSocket, newsockfd; > struct sockaddr_in cli_addr; > struct sockaddr_in service; > struct hostent *thisHost; > int bOptVal = 0; > int bOptLen = sizeof(int); > char hostname[256]; > char *host_addr; > struct in_addr addr = {0}; > char *ip; > u_short port; > int iResult = 0; > int i , n, m, clilen, dummy, connect = 0; > struct timeval tv; > //--------------------------------------- > //Create a listening socket > ListenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); > if (ListenSocket == -1) { > perror("socket creation"); > return 1; > } else > printf("ListenSocket=%d\n", ListenSocket); > //--------------------------------------- > //Bind the socket to the local IP address > // and port 3210 > port = 3210; > if (gethostname(hostname, 256)) > perror("gethostname failed\n"), exit(3); > printf("%s\n", hostname), fflush(stdout); > thisHost = gethostbyname(hostname); > ip = inet_ntoa(*(struct in_addr *)(*thisHost->h_addr_list)); > > > if (argc == 2) { > host_addr = argv[1]; > service.sin_addr.s_addr = inet_addr(host_addr); > thisHost = gethostbyaddr((const char *)&service.sin_addr.s_addr, > sizeof(service.sin_addr.s_addr), > AF_INET); > if (thisHost == 0) > printf("host unknown\n"), exit(3); > if (invalidip(host_addr)) > printf("invalid IP\n"), exit(4); > } else { > service.sin_addr.s_addr = inet_addr(ip); > } > service.sin_port = htons(port); > service.sin_family = AF_INET; > > iResult = bind(ListenSocket, (struct sockaddr *)&service, > sizeof(service)); > if (iResult == -1) { > perror("bind"); > shutdown(ListenSocket, SHUT_RDWR); > return 1; > } > listen(ListenSocket, SOMAXCONN); > printf("SOMAXCONN=%d %d\n", SOMAXCONN, FD_SETSIZE); > /* all sockets are put into an own array_of_fs */ > /* in the while() loop below the FD_SET id used by looping through > the */ > /* array_of_fds to fill the readfds array in the select() */ > > enter(ListenSocket); > > /* > * Wait for connect > */ > tv.tv_sec = 0; > tv.tv_usec = 5000000; /* 5 seconds */ A friendly soul on FreeBSD-hackers told me that my tv_usec value is wrong in the timeval struct above. FreeBSD checks if it is in the range of 0 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B809106566C for ; Mon, 1 Aug 2011 15:27:31 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from outbound.icp-osb-irony-out8.iinet.net.au (outbound.icp-osb-irony-out8.iinet.net.au [203.59.1.134]) by mx1.freebsd.org (Postfix) with ESMTP id 8ACC18FC0C for ; Mon, 1 Aug 2011 15:27:30 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAAPFNk58qgxC/2dsb2JhbABBp2F3gUABAQQBOj8FCwsNORQYMROHbMAKhWNfBJdzLYtR X-IronPort-AV: E=Sophos;i="4.67,301,1309708800"; d="scan'208";a="133449837" Received: from unknown (HELO smtp.phoenix) ([124.170.12.66]) by outbound.icp-osb-irony-out8.iinet.net.au with ESMTP; 01 Aug 2011 23:27:28 +0800 Received: by smtp.phoenix (Postfix, from userid 1001) id E38AC10CE; Tue, 2 Aug 2011 01:27:25 +1000 (EST) Date: Tue, 2 Aug 2011 01:27:25 +1000 From: andrew clarke To: Dick Hoogendijk Message-ID: <20110801152725.GB87286@ozzmosis.com> References: <4E36B89A.4090200@nagual.nl> <20110801143754.GD59252@dan.emsphone.com> <4E36C09E.8050709@nagual.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E36C09E.8050709@nagual.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Dan Nelson , FreeBSD Questions Subject: Re: larger disk for a zfs pool X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 15:27:31 -0000 On Mon 2011-08-01 17:05:02 UTC+0200, Dick Hoogendijk (dick@nagual.nl) wrote: > But I'm confused about the gpart thing I did on the original disks. > > $ gpart show > => 34 156301421 ad4 GPT (75G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 147912685 3 freebsd-zfs (71G) > > => 34 156301421 ad6 GPT (75G) > 34 128 1 freebsd-boot (64K) > 162 8388608 2 freebsd-swap (4.0G) > 8388770 147912685 3 freebsd-zfs (71G) > Do I repeat this gpart section on the new disk(s) before putting them in > the rpool (one at a time). Basically yes. Both drives in the mirror need the freebsd-boot partition, otherwise the drive without freebsd-boot won't be bootable if the other drive fails to boot. freebsd-swap can be any size. The sector count of the freebsd-zfs partition on the new drive needs to be equal or greater to the existing sector count, though. 147912685 in your case. gpart should do that automatically if the replacement drive is larger and you tell it just to use the remaining space. Don't forget this step: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i nnn device > Is it compatrible to putting the solaris bootcode on disk before > attaching them to a rootpool and resilvering? I want to expand my > rootpool but am a little confused about the right procedure. I've not used Solaris, but I assume so. Regards Andrew From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 15:29:37 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 717321065676 for ; Mon, 1 Aug 2011 15:29:37 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from outbound.icp-qv1-irony-out4.iinet.net.au (outbound.icp-qv1-irony-out4.iinet.net.au [203.59.1.104]) by mx1.freebsd.org (Postfix) with ESMTP id DF6728FC12 for ; Mon, 1 Aug 2011 15:29:36 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAKW/Nk58qgxC/2dsb2JhbABBp2F3gUABAQQBOj8FCwsNATgUGDETh2y/boVjXwSXcy2LUQ X-IronPort-AV: E=Sophos;i="4.67,300,1309708800"; d="scan'208";a="669529613" Received: from unknown (HELO smtp.phoenix) ([124.170.12.66]) by outbound.icp-qv1-irony-out4.iinet.net.au with ESMTP; 01 Aug 2011 23:01:38 +0800 Received: by smtp.phoenix (Postfix, from userid 1001) id D2CFA10C3; Tue, 2 Aug 2011 01:01:35 +1000 (EST) Date: Tue, 2 Aug 2011 01:01:35 +1000 From: andrew clarke To: Dan Nelson Message-ID: <20110801150135.GA87150@ozzmosis.com> References: <4E36B89A.4090200@nagual.nl> <20110801143754.GD59252@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110801143754.GD59252@dan.emsphone.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Dick Hoogendijk , FreeBSD Questions Subject: Re: larger disk for a zfs pool X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 15:29:37 -0000 On Mon 2011-08-01 09:37:55 UTC-0500, Dan Nelson (dnelson@allantgroup.com) wrote: > In the last episode (Aug 01), Dick Hoogendijk said: > > > OK, my freebsd system runs on ZFS boot. W/ solaris getting larger disks > > for a pool was quit easy. Simply replace one disk from a mirror for a > > larger one, wait for the resilvering and after this replace the second > > one for a larger disk and wait for the resilvering again. That's it. > > Been there, done that. But my feeling tells me it is not that simple for > > a FreeBSD zfs root system, or is it? > > Should be the same procedure. Make sure you either use "zpool online -e" > when swapping in the new disks, or that you have the zpool autoexpand=on > attribute set. On my FreeBSD 8.2-RELEASE machine, "-e" is an "invalid option" and "autoexpand" an "invalid property". I suspect these are features of ZFS v28 and are not provided with the ZFS v15 provided with FreeBSD 8.2-REL. Judging from behaviour I experienced experimenting with ZFS in a virtual machine using 8.2-REL, it was possible to replace all drives in a ZFS mirror with larger ones and increase the size of the pool, but (after resilvering) it required either a reboot, or (if I recall correctly): zpool export tank zpool import tank for the increased size to become available. So I assume "autoexpand" was implied for ZFS v15. However this was not with FreeBSD booting from 'tank'. Trying to run "zpool export tank" may result in a "Device busy" error if the boot device was the "tank" pool. It might be worthwhile experimenting in on a spare (or virtual) machine to get a definitive answer, especially since there seem to be differences depending on FreeBSD version. Regards Andrew From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 15:34:54 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68BC91065672 for ; Mon, 1 Aug 2011 15:34:54 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from outbound.icp-osb-irony-out8.iinet.net.au (outbound.icp-osb-irony-out8.iinet.net.au [203.59.1.134]) by mx1.freebsd.org (Postfix) with ESMTP id DAB2F8FC16 for ; Mon, 1 Aug 2011 15:34:53 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAEbANk58qgxC/2dsb2JhbABBp2F3gUABAQEBAgEBAjc/BQsLDTkUFAQxE4dsBL90hWNfBJBvhwQti1E X-IronPort-AV: E=Sophos;i="4.67,301,1309708800"; d="scan'208";a="133448083" Received: from unknown (HELO smtp.phoenix) ([124.170.12.66]) by outbound.icp-osb-irony-out8.iinet.net.au with ESMTP; 01 Aug 2011 23:06:17 +0800 Received: by smtp.phoenix (Postfix, from userid 1001) id DB9AD10C7; Tue, 2 Aug 2011 01:06:14 +1000 (EST) Date: Tue, 2 Aug 2011 01:06:14 +1000 From: andrew clarke To: Dick Hoogendijk Message-ID: <20110801150614.GA87286@ozzmosis.com> References: <4E36B89A.4090200@nagual.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E36B89A.4090200@nagual.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: FreeBSD Questions Subject: Re: larger disk for a zfs pool X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 15:34:54 -0000 On Mon 2011-08-01 16:30:50 UTC+0200, Dick Hoogendijk (dick@nagual.nl) wrote: > OK, my freebsd system runs on ZFS boot. W/ solaris getting larger disks > for a pool was quit easy. Simply replace one disk from a mirror for a > larger one, wait for the resilvering and after this replace the second > one for a larger disk and wait for the resilvering again. That's it. > Been there, done that. But my feeling tells me it is not that simple for > a FreeBSD zfs root system, or is it? By the way, a similar question appeared on the freebsd-fs list recently: http://lists.freebsd.org/pipermail/freebsd-fs/2011-June/011887.html Although the question was asked with regards to ZFS v28, which may be newer than what you are using. Regards Andrew From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 16:24:08 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id B31FC106564A; Mon, 1 Aug 2011 16:24:07 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-hackers@freebsd.org Date: Mon, 1 Aug 2011 12:23:48 -0400 User-Agent: KMail/1.6.2 References: <201107312128.29322.lobo@bsd.com.br> <4E36B4CF.3060308@FreeBSD.org> In-Reply-To: <4E36B4CF.3060308@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_bMtNOs9uQI1kw+C" Message-Id: <201108011223.55772.jkim@FreeBSD.org> Cc: Mario Lobo , freebsd-questions@freebsd.org, Andriy Gapon Subject: Re: Phenom II 975 BE shows 0 celsius X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 16:24:09 -0000 --Boundary-00=_bMtNOs9uQI1kw+C Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline On Monday 01 August 2011 10:14 am, Andriy Gapon wrote: > on 01/08/2011 03:28 Mario Lobo said the following: > > Hi to all > > > > In my desktop machine, I had an AM2+ ASROCK mobo with Phenom II > > 955 BE that showed each core temperature perfectly under FBSD > > 8-STABLE, via dev.cpu.x.temp. amdtemp.ko loaded. > > > > Unfortunately this Mobo died and only found AM3 boards for which > > my phenom 955 doesn't fit. So I got an ASUS M4A88T-V EVO with a > > Phenom II 975 BE. > > > > Funny thing. An AM3 phenom II fits on an AM2 board but an AM3 > > board doesn't accept an AM2/AM2+ phenom II :(. > > > > Anyway, now, under the very same system, it shows 0 degrees on > > dev.cpu.x.temp for all cores. > > Sorry, I've got lost in all the config changes. So what system do > you have now? Can please also provide CPU-related information from > dmesg? > > > I've been looking through k8temp and amdtemp src code. I am > > definitely not sure of this but I believe something might have > > happened to those: > > > > From k8temp.h > > > > K10_THERM_REG 0xa4 > > K10_THERMTRIP_REG 0xe4 > > K10_CURTMP(val) (((val) >> 21) & 0xfff) > > K10_THERMTRIP(val) ((val >> 1) & 1) > > > > From amdtemp.c > > > > /* > > * Register control (K8 family) > > */ > > #define AMDTEMP_REG0F 0xe4 > > #define AMDTEMP_REG_SELSENSOR 0x40 > > #define AMDTEMP_REG_SELCORE 0x04 > > > > /* > > * Register control (K10 & K11) family > > */ > > #define AMDTEMP_REG 0xa4 > > > > > > Output of k8temp -dn: > > > > CPUID: Vendor: AuthenticAMD, 0x100f43: Model=04 Family=f+1 > > Stepping=3 Advanced Power Management=0x1f9 > > Temperature sensor: Yes > > Frequency ID control: No > > Voltage ID control: No > > THERMTRIP support: Yes > > HW Thermal control: Yes > > SW Thermal control: Yes > > 100MHz multipliers: Yes > > HW P-State control: Yes > > TSC Invariant: Yes > > Temp=c0fef > > ThermTrip=1fc00c30 > > 0 > > > > I keep a small win7 partition to test little things like this and > > see if the same thing happens there, and it doesn't, so I > > concluded that the sensors are there and are working. > > > > One thing is worth noting though. I have used a free gadget that > > shows activity/temp for each core. It worked fine with the > > previous MB/CPU.That ALSO stopped working with this new MB. Like > > FBSD, it shows 0 degrees for any core too, although it correctly > > displays each core load. > > Most likely that gadget just re-uses OS-provided information. > > > The only windows tool that correctly shows the temperature are > > the ASUS tools that came with the mobo. > > > > Other than that, everything is working fine! The only thing I had > > to fix was the fstab ada location. > > > > I know this is not a big thing but I got accustomed to keeping an > > eye on those temperatures. > > > > I have googled for a few days now searching for Thermal register > > address or offsets for the Phenom II 975 BE, or anything related > > to this problem and found nothing. Every search on AMD site was > > fruitless. I could not find a single bit of tech info on this > > processor there, or any other tech info for that matter. > > http://support.amd.com/us/Processor_TechDocs/31116.pdf > > > Would any one have any pointers/clues/suggestions on this? > > I would try to add some printfs (or used dtrace - whichever is > easier for you) to see what's going on. Or you can even use > pciconf to directly sneak a peek at what's reported by the > hardware, e.g.: > # pciconf -r pci0:0:24:3 0xa4 > 1c881880 > > You can read the BKDG to see how to interpret the value - search > for F3xA4. See F3xE4 for offset calculation. > > Hopefully you should be able to see if hardware reports sane value > and how the amdtemp ends up reporting 0�C. I gave up the DiodeOffset recently because a lot of BIOSes do not set any meaningful values. Instead, I added a tunable for that. Please see the attached patch, which is also available from here: http://people.freebsd.org/~jkim/amdtemp.diff Jung-uk Kim --Boundary-00=_bMtNOs9uQI1kw+C Content-Type: text/plain; charset="utf-8"; name="amdtemp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="amdtemp.diff" Index: share/man/man4/amdtemp.4 =================================================================== --- share/man/man4/amdtemp.4 (revision 221788) +++ share/man/man4/amdtemp.4 (working copy) @@ -25,12 +25,14 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2008 +.Dd May 11, 2011 .Dt AMDTEMP 4 .Os .Sh NAME .Nm amdtemp -.Nd device driver for AMD K8, K10 and K11 on-die digital thermal sensor +.Nd device driver for +.Tn AMD +processor on-die digital thermal sensor .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your @@ -49,22 +51,48 @@ amdtemp_load="YES" The .Nm driver provides support for the on-die digital thermal sensor present -in AMD K8, K10 and K11 processors. +in +.Tn AMD +Family 0Fh, 10h, 11h, 12h, and 14h processors. .Pp -For the K8 family, the +For Family 0Fh processors, the .Nm -driver reports each core's temperature through a sysctl node in the -corresponding CPU devices's sysctl tree, named -.Va dev.amdtemp.%d.sensor{0,1}.core{0,1} . +driver reports each core's temperature through sysctl nodes, named +.Va dev.amdtemp.%d.core{0,1}.sensor{0,1} . The driver also creates .Va dev.cpu.%d.temperature -displaying the maximum temperature of the two sensors -located in each CPU core. +in the corresponding CPU device's sysctl tree, displaying the maximum +temperature of the two sensors located in each CPU core. .Pp -For the K10 and K11 families, the driver creates +For Family 10h, 11h, 12h, and 14h processors, the driver reports each +package's temperature through a sysctl node, named +.Va dev.amdtemp.%d.core0.sensor0 . +The driver also creates .Va dev.cpu.%d.temperature -with the temperature of each core. +in the corresponding CPU device's sysctl tree, displaying the temperature +of the shared sensor located in each CPU package. +.Sh LOADER TUNABLES +The following tunable can be set at the +.Xr loader 8 +prompt before booting the kernel, or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.amdtemp.force_enable +.El +Set to a non-zero value to force enabling the driver for Family 10h Socket +AM2+ and Socket F package processors. +.Sh SYSCTL VARIABLES +The following variable is available as both +.Xr sysctl 8 +variable and +.Xr loader 8 +tunable: +.Bl -tag -width indent +.It Va dev.amdtemp.%d.sensor_offset +.El +Add the given offset to the temperature of the sensor. Default is 0. .Sh SEE ALSO +.Xr loader 8 , .Xr sysctl 8 .Sh HISTORY The @@ -74,6 +102,19 @@ driver first appeared in .Sh AUTHORS .An Rui Paulo Aq rpaulo@FreeBSD.org .An Norikatsu Shigemura Aq nork@FreeBSD.org -.Sh BUGS -AMD K9 is not supported because temperature reporting has been replaced -by Maltese. +.An Jung-uk Kim Aq jkim@FreeBSD.org +.Sh CAVEATS +For Family 10h and later processors, +.Do +(the reported temperature) is a non-physical temperature measured on +an arbitrary scale and it does not represent an actual physical +temperature like die or case temperature. Instead, it specifies +the processor temperature relative to the point at which the system +must supply the maximum cooling for the processor's specified maximum +case temperature and maximum thermal power dissipation +.Dc +according to +.Rs +.%T BIOS and Kernel Developer's Guide (BKDG) for AMD Processors +.%U http://developer.amd.com/documentation/guides/Pages/default.aspx +.Re Index: sys/dev/amdtemp/amdtemp.c =================================================================== --- sys/dev/amdtemp/amdtemp.c (revision 221788) +++ sys/dev/amdtemp/amdtemp.c (working copy) @@ -1,7 +1,7 @@ /*- * Copyright (c) 2008, 2009 Rui Paulo * Copyright (c) 2009 Norikatsu Shigemura - * Copyright (c) 2009 Jung-uk Kim + * Copyright (c) 2009-2011 Jung-uk Kim * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ */ /* - * Driver for the AMD CPU on-die thermal sensors for Family 0Fh/10h/11h procs. + * Driver for the AMD CPU on-die thermal sensors. * Initially based on the k8temp Linux driver. */ @@ -42,17 +42,23 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include +static int amdtemp_force_enable; +TUNABLE_INT("hw.amdtemp.force_enable", &amdtemp_force_enable); +SYSCTL_NODE(_hw, OID_AUTO, amdtemp, CTLFLAG_RD, 0, "amdtemp driver parameters"); +SYSCTL_INT(_hw_amdtemp, OID_AUTO, force_enable, CTLFLAG_RDTUN, + &amdtemp_force_enable, 0, + "Force enabling on Family 10h Socket AM2+ and F package processors"); + typedef enum { - SENSOR0_CORE0, - SENSOR0_CORE1, - SENSOR1_CORE0, - SENSOR1_CORE1, + CORE0_SENSOR0, + CORE0_SENSOR1, + CORE1_SENSOR0, + CORE1_SENSOR1, CORE0, CORE1 } amdsensor_t; @@ -62,11 +68,10 @@ struct amdtemp_softc { int sc_ncores; int sc_ntemps; int sc_flags; -#define AMDTEMP_FLAG_DO_QUIRK 0x01 /* DiodeOffset may be incorrect. */ -#define AMDTEMP_FLAG_DO_ZERO 0x02 /* DiodeOffset starts from 0C. */ -#define AMDTEMP_FLAG_DO_SIGN 0x04 /* DiodeOffsetSignBit is present. */ -#define AMDTEMP_FLAG_CS_SWAP 0x08 /* ThermSenseCoreSel is inverted. */ -#define AMDTEMP_FLAG_CT_10BIT 0x10 /* CurTmp is 10-bit wide. */ +#define AMDTEMP_FLAG_CS_SWAP 0x01 /* ThermSenseCoreSel is inverted. */ +#define AMDTEMP_FLAG_CT_10BIT 0x02 /* CurTmp is 10-bit wide. */ +#define AMDTEMP_FLAG_ALT_OFFSET 0x04 /* CurTmp starts at -28C. */ + int32_t sc_offset; int32_t (*sc_gettemp)(device_t, amdsensor_t); struct sysctl_oid *sc_sysctl_cpu[MAXCPU]; struct intr_config_hook sc_ich; @@ -76,6 +81,7 @@ struct amdtemp_softc { #define DEVICEID_AMD_MISC0F 0x1103 #define DEVICEID_AMD_MISC10 0x1203 #define DEVICEID_AMD_MISC11 0x1303 +#define DEVICEID_AMD_MISC14 0x1703 static struct amdtemp_product { uint16_t amdtemp_vendorid; @@ -84,11 +90,12 @@ static struct amdtemp_product { { VENDORID_AMD, DEVICEID_AMD_MISC0F }, { VENDORID_AMD, DEVICEID_AMD_MISC10 }, { VENDORID_AMD, DEVICEID_AMD_MISC11 }, + { VENDORID_AMD, DEVICEID_AMD_MISC14 }, { 0, 0 } }; /* - * Reported Temperature Control Register (Family 10h/11h only) + * Reported Temperature Control Register */ #define AMDTEMP_REPTMP_CTRL 0xa4 @@ -100,6 +107,12 @@ static struct amdtemp_product { #define AMDTEMP_TTSR_SELSENSOR 0x40 /* Family 0Fh only */ /* + * DRAM Configuration High Register + */ +#define AMDTEMP_DRAM_CONF_HIGH 0x94 /* Function 2 */ +#define AMDTEMP_DRAM_MODE_DDR3 0x0100 + +/* * CPU Family/Model Register */ #define AMDTEMP_CPUID 0xfc @@ -117,6 +130,9 @@ static int32_t amdtemp_gettemp0f(device_t dev, amd static int32_t amdtemp_gettemp(device_t dev, amdsensor_t sensor); static int amdtemp_sysctl(SYSCTL_HANDLER_ARGS); +/* XXX */ +extern uint32_t pci_cfgregread(int, int, int, int, int); + static device_method_t amdtemp_methods[] = { /* Device interface */ DEVMETHOD(device_identify, amdtemp_identify), @@ -173,6 +189,7 @@ amdtemp_identify(driver_t *driver, device_t parent static int amdtemp_probe(device_t dev) { + u_int regs[4]; uint32_t family, model; if (resource_disabled("amdtemp", 0)) @@ -188,7 +205,30 @@ amdtemp_probe(device_t dev) return (ENXIO); break; case 0x10: + if (amdtemp_force_enable) + break; + /* + * Erratum 319 Inaccurate Temperature Measurement + * + * http://support.amd.com/us/Processor_TechDocs/41322.pdf + */ + do_cpuid(0x80000001, regs); + switch ((regs[1] >> 28) & 0xf) { + case 0: /* Socket F */ + return (ENXIO); + case 1: /* Socket AM2+ or AM3 */ + if ((pci_cfgregread(pci_get_bus(dev), + pci_get_slot(dev), 2, AMDTEMP_DRAM_CONF_HIGH, 2) & + AMDTEMP_DRAM_MODE_DDR3) != 0 || model > 0x04 || + (model == 0x04 && (cpu_id & CPUID_STEPPING) >= 3)) + break; + /* XXX 00100F42h (RB-C2) exists in both formats. */ + return (ENXIO); + } + break; case 0x11: + case 0x12: + case 0x14: break; default: return (ENXIO); @@ -201,22 +241,14 @@ amdtemp_probe(device_t dev) static int amdtemp_attach(device_t dev) { + char tn[32]; struct amdtemp_softc *sc = device_get_softc(dev); struct sysctl_ctx_list *sysctlctx; struct sysctl_oid *sysctlnode; - uint32_t regs[4]; uint32_t cpuid, family, model; + int unit; /* - * Errata #154: Incorect Diode Offset - */ - if (cpu_id == 0x20f32) { - do_cpuid(0x80000001, regs); - if ((regs[1] & 0xfff) == 0x2c) - sc->sc_flags |= AMDTEMP_FLAG_DO_QUIRK; - } - - /* * CPUID Register is available from Revision F. */ family = CPUID_TO_FAMILY(cpu_id); @@ -232,11 +264,6 @@ amdtemp_attach(device_t dev) /* * Thermaltrip Status Register * - * - DiodeOffsetSignBit - * - * Revision D & E: bit 24 - * Other: N/A - * * - ThermSenseCoreSel * * Revision F & G: 0 - Core1, 1 - Core0 @@ -254,15 +281,39 @@ amdtemp_attach(device_t dev) * ThermSenseCoreSel work in undocumented cases as well. * In fact, the Linux driver suggests it may not work but * we just assume it does until we find otherwise. + * + * XXX According to Linux, CurTmp starts at -28C on + * Socket AM2 Revision G processors, which is not + * documented anywhere. */ - if (model < 0x40) { - sc->sc_flags |= AMDTEMP_FLAG_DO_ZERO; - if (model >= 0x10) - sc->sc_flags |= AMDTEMP_FLAG_DO_SIGN; - } else { + if (model >= 0x40) sc->sc_flags |= AMDTEMP_FLAG_CS_SWAP; - if (model >= 0x60 && model != 0xc1) - sc->sc_flags |= AMDTEMP_FLAG_CT_10BIT; + if (model >= 0x60 && model != 0xc1) { + u_int regs[4], bid; + + do_cpuid(0x80000001, regs); + bid = (regs[1] >> 9) & 0x1f; + switch (model) { + case 0x68: /* Socket S1g1 */ + case 0x6c: + case 0x7c: + break; + case 0x6b: /* Socket AM2 and ASB1 (2 cores) */ + if (bid != 0x0b && bid != 0x0c) + sc->sc_flags |= + AMDTEMP_FLAG_ALT_OFFSET; + break; + case 0x6f: /* Socket AM2 and ASB1 (1 core) */ + case 0x7f: + if (bid != 0x07 && bid != 0x09 && + bid != 0x0c) + sc->sc_flags |= + AMDTEMP_FLAG_ALT_OFFSET; + break; + default: + sc->sc_flags |= AMDTEMP_FLAG_ALT_OFFSET; + } + sc->sc_flags |= AMDTEMP_FLAG_CT_10BIT; } /* @@ -274,6 +325,8 @@ amdtemp_attach(device_t dev) break; case 0x10: case 0x11: + case 0x12: + case 0x14: /* * There is only one sensor per package. */ @@ -297,41 +350,49 @@ amdtemp_attach(device_t dev) /* * dev.amdtemp.N tree. */ + unit = device_get_unit(dev); + snprintf(tn, sizeof(tn), "dev.amdtemp.%d.sensor_offset", unit); + TUNABLE_INT_FETCH(tn, &sc->sc_offset); + sysctlctx = device_get_sysctl_ctx(dev); + SYSCTL_ADD_INT(sysctlctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "sensor_offset", CTLFLAG_RW, &sc->sc_offset, 0, + "Temperature sensor offset"); sysctlnode = SYSCTL_ADD_NODE(sysctlctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "sensor0", CTLFLAG_RD, 0, "Sensor 0"); + "core0", CTLFLAG_RD, 0, "Core 0"); SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core0", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR0_CORE0, amdtemp_sysctl, "IK", - "Sensor 0 / Core 0 temperature"); + OID_AUTO, "sensor0", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE0_SENSOR0, amdtemp_sysctl, "IK", + "Core 0 / Sensor 0 temperature"); if (sc->sc_ntemps > 1) { - if (sc->sc_ncores > 1) - SYSCTL_ADD_PROC(sysctlctx, - SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core1", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR0_CORE1, amdtemp_sysctl, "IK", - "Sensor 0 / Core 1 temperature"); - - sysctlnode = SYSCTL_ADD_NODE(sysctlctx, - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "sensor1", CTLFLAG_RD, 0, "Sensor 1"); - SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core0", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR1_CORE0, amdtemp_sysctl, "IK", - "Sensor 1 / Core 0 temperature"); + OID_AUTO, "sensor1", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE0_SENSOR1, amdtemp_sysctl, "IK", + "Core 0 / Sensor 1 temperature"); - if (sc->sc_ncores > 1) + if (sc->sc_ncores > 1) { + sysctlnode = SYSCTL_ADD_NODE(sysctlctx, + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "core1", CTLFLAG_RD, 0, "Core 1"); + SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(sysctlnode), - OID_AUTO, "core1", CTLTYPE_INT | CTLFLAG_RD, - dev, SENSOR1_CORE1, amdtemp_sysctl, "IK", - "Sensor 1 / Core 1 temperature"); + OID_AUTO, "sensor0", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE1_SENSOR0, amdtemp_sysctl, "IK", + "Core 1 / Sensor 0 temperature"); + + SYSCTL_ADD_PROC(sysctlctx, + SYSCTL_CHILDREN(sysctlnode), + OID_AUTO, "sensor1", CTLTYPE_INT | CTLFLAG_RD, + dev, CORE1_SENSOR1, amdtemp_sysctl, "IK", + "Core 1 / Sensor 1 temperature"); + } } /* @@ -377,7 +438,7 @@ amdtemp_intrhook(void *arg) sysctlctx = device_get_sysctl_ctx(cpu); sensor = sc->sc_ntemps > 1 ? - (i == 0 ? CORE0 : CORE1) : SENSOR0_CORE0; + (i == 0 ? CORE0 : CORE1) : CORE0_SENSOR0; sc->sc_sysctl_cpu[i] = SYSCTL_ADD_PROC(sysctlctx, SYSCTL_CHILDREN(device_get_sysctl_tree(cpu)), OID_AUTO, "temperature", CTLTYPE_INT | CTLFLAG_RD, @@ -415,13 +476,13 @@ amdtemp_sysctl(SYSCTL_HANDLER_ARGS) switch (sensor) { case CORE0: - auxtemp[0] = sc->sc_gettemp(dev, SENSOR0_CORE0); - auxtemp[1] = sc->sc_gettemp(dev, SENSOR1_CORE0); + auxtemp[0] = sc->sc_gettemp(dev, CORE0_SENSOR0); + auxtemp[1] = sc->sc_gettemp(dev, CORE0_SENSOR1); temp = imax(auxtemp[0], auxtemp[1]); break; case CORE1: - auxtemp[0] = sc->sc_gettemp(dev, SENSOR0_CORE1); - auxtemp[1] = sc->sc_gettemp(dev, SENSOR1_CORE1); + auxtemp[0] = sc->sc_gettemp(dev, CORE1_SENSOR0); + auxtemp[1] = sc->sc_gettemp(dev, CORE1_SENSOR1); temp = imax(auxtemp[0], auxtemp[1]); break; default: @@ -439,74 +500,49 @@ static int32_t amdtemp_gettemp0f(device_t dev, amdsensor_t sensor) { struct amdtemp_softc *sc = device_get_softc(dev); - uint32_t mask, temp; - int32_t diode_offset, offset; - uint8_t cfg, sel; + uint32_t mask, offset, temp; /* Set Sensor/Core selector. */ - sel = 0; + temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 1); + temp &= ~(AMDTEMP_TTSR_SELCORE | AMDTEMP_TTSR_SELSENSOR); switch (sensor) { - case SENSOR1_CORE0: - sel |= AMDTEMP_TTSR_SELSENSOR; + case CORE0_SENSOR1: + temp |= AMDTEMP_TTSR_SELSENSOR; /* FALLTHROUGH */ - case SENSOR0_CORE0: + case CORE0_SENSOR0: case CORE0: if ((sc->sc_flags & AMDTEMP_FLAG_CS_SWAP) != 0) - sel |= AMDTEMP_TTSR_SELCORE; + temp |= AMDTEMP_TTSR_SELCORE; break; - case SENSOR1_CORE1: - sel |= AMDTEMP_TTSR_SELSENSOR; + case CORE1_SENSOR1: + temp |= AMDTEMP_TTSR_SELSENSOR; /* FALLTHROUGH */ - case SENSOR0_CORE1: + case CORE1_SENSOR0: case CORE1: if ((sc->sc_flags & AMDTEMP_FLAG_CS_SWAP) == 0) - sel |= AMDTEMP_TTSR_SELCORE; + temp |= AMDTEMP_TTSR_SELCORE; break; } - cfg = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 1); - cfg &= ~(AMDTEMP_TTSR_SELSENSOR | AMDTEMP_TTSR_SELCORE); - pci_write_config(dev, AMDTEMP_THERMTP_STAT, cfg | sel, 1); + pci_write_config(dev, AMDTEMP_THERMTP_STAT, temp, 1); - /* CurTmp starts from -49C. */ - offset = AMDTEMP_ZERO_C_TO_K - 490; - - /* Adjust offset if DiodeOffset is set and valid. */ + mask = (sc->sc_flags & AMDTEMP_FLAG_CT_10BIT) != 0 ? 0x3ff : 0x3fc; + offset = (sc->sc_flags & AMDTEMP_FLAG_ALT_OFFSET) != 0 ? 28 : 49; temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 4); - diode_offset = (temp >> 8) & 0x3f; - if ((sc->sc_flags & AMDTEMP_FLAG_DO_ZERO) != 0) { - if ((sc->sc_flags & AMDTEMP_FLAG_DO_SIGN) != 0 && - ((temp >> 24) & 0x1) != 0) - diode_offset *= -1; - if ((sc->sc_flags & AMDTEMP_FLAG_DO_QUIRK) != 0 && - ((temp >> 25) & 0xf) <= 2) - diode_offset += 10; - offset += diode_offset * 10; - } else if (diode_offset != 0) - offset += (diode_offset - 11) * 10; + temp = ((temp >> 14) & mask) * 5 / 2; + temp += AMDTEMP_ZERO_C_TO_K + (sc->sc_offset - offset) * 10; - mask = (sc->sc_flags & AMDTEMP_FLAG_CT_10BIT) != 0 ? 0x3ff : 0x3fc; - temp = ((temp >> 14) & mask) * 5 / 2 + offset; - return (temp); } static int32_t amdtemp_gettemp(device_t dev, amdsensor_t sensor) { + struct amdtemp_softc *sc = device_get_softc(dev); uint32_t temp; - int32_t diode_offset, offset; - /* CurTmp starts from 0C. */ - offset = AMDTEMP_ZERO_C_TO_K; - - /* Adjust offset if DiodeOffset is set and valid. */ - temp = pci_read_config(dev, AMDTEMP_THERMTP_STAT, 4); - diode_offset = (temp >> 8) & 0x7f; - if (diode_offset > 0 && diode_offset < 0x40) - offset += (diode_offset - 11) * 10; - temp = pci_read_config(dev, AMDTEMP_REPTMP_CTRL, 4); - temp = ((temp >> 21) & 0x7ff) * 5 / 4 + offset; + temp = ((temp >> 21) & 0x7ff) * 5 / 4; + temp += AMDTEMP_ZERO_C_TO_K + sc->sc_offset * 10; return (temp); } --Boundary-00=_bMtNOs9uQI1kw+C-- From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 16:34:29 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 53E061065670; Mon, 1 Aug 2011 16:34:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-hackers@freebsd.org Date: Mon, 1 Aug 2011 12:34:09 -0400 User-Agent: KMail/1.6.2 References: <201107312128.29322.lobo@bsd.com.br> In-Reply-To: <201107312128.29322.lobo@bsd.com.br> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201108011234.11176.jkim@FreeBSD.org> Cc: Mario Lobo , freebsd-questions@freebsd.org Subject: Re: Phenom II 975 BE shows 0 celsius X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 16:34:29 -0000 On Sunday 31 July 2011 08:28 pm, Mario Lobo wrote: > Hi to all > > In my desktop machine, I had an AM2+ ASROCK mobo with Phenom II 955 > BE that showed each core temperature perfectly under FBSD 8-STABLE, > via dev.cpu.x.temp. amdtemp.ko loaded. > > Unfortunately this Mobo died and only found AM3 boards for which my > phenom 955 doesn't fit. So I got an ASUS M4A88T-V EVO with a Phenom > II 975 BE. > > Funny thing. An AM3 phenom II fits on an AM2 board but an AM3 board > doesn't accept an AM2/AM2+ phenom II :(. > > Anyway, now, under the very same system, it shows 0 degrees on > dev.cpu.x.temp for all cores. > > I've been looking through k8temp and amdtemp src code. I am > definitely not > > sure of this but I believe something might have happened to those: > >From k8temp.h > > K10_THERM_REG 0xa4 > K10_THERMTRIP_REG 0xe4 > K10_CURTMP(val) (((val) >> 21) & 0xfff) > K10_THERMTRIP(val) ((val >> 1) & 1) > > >From amdtemp.c > > /* > * Register control (K8 family) > */ > #define AMDTEMP_REG0F 0xe4 > #define AMDTEMP_REG_SELSENSOR 0x40 > #define AMDTEMP_REG_SELCORE 0x04 > > /* > * Register control (K10 & K11) family > */ > #define AMDTEMP_REG 0xa4 > > > Output of k8temp -dn: > > CPUID: Vendor: AuthenticAMD, 0x100f43: Model=04 Family=f+1 > Stepping=3 Advanced Power Management=0x1f9 > Temperature sensor: Yes > Frequency ID control: No > Voltage ID control: No > THERMTRIP support: Yes > HW Thermal control: Yes > SW Thermal control: Yes > 100MHz multipliers: Yes > HW P-State control: Yes > TSC Invariant: Yes > Temp=c0fef > ThermTrip=1fc00c30 > 0 > > I keep a small win7 partition to test little things like this and > see if the same thing happens there, and it doesn't, so I concluded > that the sensors are there and are working. > > One thing is worth noting though. I have used a free gadget that > shows activity/temp for each core. It worked fine with the previous > MB/CPU.That ALSO stopped working with this new MB. Like FBSD, it > shows 0 degrees for any core too, although it correctly displays > each core load. > > The only windows tool that correctly shows the temperature are the > ASUS tools that came with the mobo. FYI, FreeBSD has aibs(4) (or acpi_aiboost(4) depending on your FreeBSD version) and it does essentially the same thing. Jung-uk Kim > Other than that, everything is working fine! The only thing I had > to fix was the fstab ada location. > > I know this is not a big thing but I got accustomed to keeping an > eye on those temperatures. > > I have googled for a few days now searching for Thermal register > address or offsets for the Phenom II 975 BE, or anything related to > this problem and found nothing. Every search on AMD site was > fruitless. I could not find a single bit of tech info on this > processor there, or any other tech info for that matter. > > > Would any one have any pointers/clues/suggestions on this? > > Thanks, From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 18:18:47 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1EB4106566B for ; Mon, 1 Aug 2011 18:18:47 +0000 (UTC) (envelope-from alphachi@mediaspirit.org) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 77B848FC15 for ; Mon, 1 Aug 2011 18:18:47 +0000 (UTC) Received: by iyb11 with SMTP id 11so9460677iyb.13 for ; Mon, 01 Aug 2011 11:18:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.147.65 with SMTP id m1mr3350035icv.46.1312221123019; Mon, 01 Aug 2011 10:52:03 -0700 (PDT) Received: by 10.42.229.6 with HTTP; Mon, 1 Aug 2011 10:52:02 -0700 (PDT) Date: Tue, 2 Aug 2011 01:52:02 +0800 Message-ID: From: alphachi To: "list: freebsd" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: About ASUS EeePC 1015B X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 18:18:47 -0000 ASUS EeePC 1015B hardware list: AMD Fusion APU C50 1.0GHz (dual core) Processor AMD Radeon HD 6250 with WSVGA(1024x600) ... I have installed FreeBSD 8.2R-amd64, but there are some problems: 1. When using "pciconf -lv", I found none0@pci0:0:20:0 class=0x0c0500 card=0x43851002 chip=0x43851002 rev=0x42 hdr=0x00 vendor = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.' device = 'ATI SMBus (ATI RD600/RS600)' class = serial bus subclass = SMBus Which module should be load? I have tried "kldload amdbus" and it's useless. 2. How to enable the camera? The camera is on the screen. In Windows7, the driver name is "ECam Utility". 3. How to enable the Hotkeys? I have using "kldload acpi_asus", but the Hotkeys(Fn+*) can't use. "dmesg -a" found some warning messages: ... ACPI APIC Table : ACPI Warning: incorrect checksum in table [XSDT] - 0x89, should be 0x36 (20101013/tbutils-354) ACPI Warning: Optional field Pm2ControlBlock has zero address or length: 0x0000000000000000/0x1 (20101013/tbfadt-655) acpi0: <_ASUS_Notebook> on motherboard ... 4. Display driver seems exceptional I have installed Xorg 7.5.1 with xf86-video-ati. Although X can work, there are some error messages when enter X: ... failed to set mtrr: Invalid argument ... (EE) RADEON(0): Acceleration initialization failed ... expected keysym, got XF86TouchpadToggle: line 123 of inet ... It looks like the display dirver doesn't take effect. THANKS! From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 19:10:47 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A39F106564A; Mon, 1 Aug 2011 19:10:47 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) by mx1.freebsd.org (Postfix) with ESMTP id 41D988FC0A; Mon, 1 Aug 2011 19:10:45 +0000 (UTC) Received: from draco.over-yonder.net (c-174-50-4-38.hsd1.ms.comcast.net [174.50.4.38]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id 333A437B496; Mon, 1 Aug 2011 13:52:31 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 7E1FB61C43; Mon, 1 Aug 2011 13:52:30 -0500 (CDT) Date: Mon, 1 Aug 2011 13:52:30 -0500 From: "Matthew D. Fuller" To: Mario Lobo Message-ID: <20110801185230.GA81791@over-yonder.net> References: <201107312128.29322.lobo@bsd.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201107312128.29322.lobo@bsd.com.br> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.21-fullermd.4 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.2 at thyme.infocus-llc.com X-Virus-Status: Clean Cc: freebsd-hackers@freebsd.org, FreeBSD Questions Subject: Re: Phenom II 975 BE shows 0 celsius X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2011 19:10:47 -0000 On Sun, Jul 31, 2011 at 09:28:29PM -0300 I heard the voice of Mario Lobo, and lo! it spake thus: > > Unfortunately this Mobo died and only found AM3 boards for which my > phenom 955 doesn't fit. Not that it helps you now, but the 955 _is_ perfectly compatible with AM3. It's only the initial 920 and 940 that were AM2-only. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. From owner-freebsd-questions@FreeBSD.ORG Mon Aug 1 20:58:05 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85BA9106566B for ; Mon, 1 Aug 2011 20:58:05 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from services.ipt.ru (services.ipt.ru [194.62.233.110]) by mx1.freebsd.org (Postfix) with ESMTP id 34D488FC08 for ; Mon, 1 Aug 2011 20:58:04 +0000 (UTC) Received: from gate.ipt.ru ([194.62.233.123] helo=h30.sp.ipt.ru) by services.ipt.ru with esmtps (TLSv1:AES128-SHA:128) (Exim 4.54 (FreeBSD)) id 1Qnz1I-000DRS-SK; Tue, 02 Aug 2011 00:23:24 +0400 From: Boris Samorodov To: Traiano Welcome References: Date: Tue, 02 Aug 2011 00:23:23 +0400 In-Reply-To: (Traiano Welcome's message of "Mon, 1 Aug 2011 14:30:32 +0000") Message-ID: <37201588@h30.sp.ipt.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: "freebsd-questions@freebsd.org" Subject: Re: Linux Binary Compatibility: Libpam compile for FreeBSD X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: ,