From owner-freebsd-doc@FreeBSD.ORG Sat Dec 22 05:33:49 2012 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3497BBED for ; Sat, 22 Dec 2012 05:33:49 +0000 (UTC) (envelope-from ddwood@highdensity.org) Received: from mail-da0-f41.google.com (mail-da0-f41.google.com [209.85.210.41]) by mx1.freebsd.org (Postfix) with ESMTP id F1B488FC0A for ; Sat, 22 Dec 2012 05:33:48 +0000 (UTC) Received: by mail-da0-f41.google.com with SMTP id e20so2412464dak.0 for ; Fri, 21 Dec 2012 21:33:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent:x-gm-message-state; bh=vpF49gA5dFLrVTULgAAEEQKwly6piyNIiBgoCC0a4p0=; b=edAniwOjafTV6PAZ7kDi+rkf+SexX/rwNizARgKWbKjgJnqAGrZTCUJBxLJcmRwvgn ReTngcVoz3ugmuNJb4ht7APPZq1Q3lbpxcp4nBhQLcOIR+g/hrNCRwjhOiX11F7r423S GXOH4jsnO9pjjGbTNXoF5B0ZhrzRXs/KlTp13zvmp6u7HKvTDrC4Qee25MhNf0MDxpEQ r10DrhJKyNiyow9iwPPgoB6tnAJo72zTlMwe9YTEQwyYuD3xianMLmNFOoS6IzbgZn1U 04qaRlIxumjRrx88WKdUu6Ro1IQ/FFDTFr4fXBXxLO0WDNTjjHKGiinCfawDf/rGgzzd 4K8g== X-Received: by 10.66.73.102 with SMTP id k6mr43150844pav.22.1356154427887; Fri, 21 Dec 2012 21:33:47 -0800 (PST) Received: from yavin (ip68-231-151-161.tc.ph.cox.net. [68.231.151.161]) by mx.google.com with ESMTPS id pv8sm8223025pbc.26.2012.12.21.21.33.45 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Dec 2012 21:33:46 -0800 (PST) Date: Fri, 21 Dec 2012 22:33:26 -0700 From: Derek Wood To: freebsd-doc@freebsd.org, doc@freebsd.org Subject: Re: [RFC] Q&A propose to add into FAQ Message-ID: <20121222053326.GA29111@yavin> Mail-Followup-To: freebsd-doc@freebsd.org, doc@freebsd.org References: <50CF471D.10407@rdtan.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50CF471D.10407@rdtan.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Gm-Message-State: ALoCoQmXHuzXaT0I9k3Ux+xeex3K8bvMBkNt+XyD6imrhf9gAFwNzMNgKxrGxJNHbToJ7hespywR X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Dec 2012 05:33:49 -0000 On Tue, Dec 18, 2012 at 12:23:57AM +0800, Edward wrote: > Hi, > > I wish to submit the below list of Q&A (Question & Answer) for addition > to current FreeBSD FAQ book. Before this can happen, I would like to > seek your comments & suggestion whether these Q&A are in correct facts, > writing style and/or suitable. These Q&A are : > > Q1: Boot up messages are missing from /var/log files. Where can I find them? > A1: Kernel log messages are recorded in /var/log/messages, > /var/log/dmesg.yesterday, and /var/log/dmesg.today. But boot time > messages can be found at /var/run/dmesg.boot. > > Q2: My xxx software only works on "some old version" of FreeBSD, where > can I get these? > A2: Older versions of FreeBSD can be obtain from > ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/ . You > should be aware that most of these versions are EoL (End of Life) and > can be extremely buggy, use at your own risk. > Can you expand on this to include older versions of software ported to FreeBSD? Ports trees distributed with release versions are available as a compressed tarball on the archive site, or can be obtained through SVN/CVS (with the warning that CVS is deprecated...). A warning would be needed that distfiles might be entirely unavailable for ancient versions of software, and the combination of an old ports tree and an old FreeBSD version will not be supported; but the port should work, and might save people the time and effort of redoing porting work that has already been done. > Q3: I have a piece of software that runs only on 64 bit processor. How > do I know my current processor is capable of 64 bit processing? > A3: Take a look at /var/run/dmesg.boot, search for the line with "AMD > Features". If CPU features flag "LM" exists, your processor supports 64 > bit processing. Otherwise, you are most likely to be using a 32 bit > processor. > Example of log to look for (64 bit processor) : > AMD Features=0x28100000 > > Q4: I just started "xxx" service, how to find out what TCP/UDP port is > open/listening? > A4: Use the utility "sockstat". Usage example, > "sockstat -Ptcp" > "sockstat -Pudp" > > Q5: I'm living in "xxx" country, how can I change this server timezone? > A5: Use "tzsetup" utility. > > Q6: I'm troubleshooting a network link issue, how can I generate big > size file to test network transfer speed? > A6: Use the utility "dd". For example, "dd if=/dev/random > of=hugefile.txt bs=1m count=1k" would create a file named hugefile.txt > with the size of 1 gigabyte. > Can you expand on this question and add additional benchmarking/diagnostic tools from ports? For example, benchmarks/netperf, net/mtr, and net-mgmt/smokeping. > Q7: My server performance seems to be slow. How can I find out what's > the bottleneck? > A7: Use the utility "iostat". Example, "iostat -dw2" would display > device (-d) statistic refreshing the output every 2 second (-w2). > "iostat -Cw2" would display CPU (-C) statistic. > I would also include systat (as mentioned by Eitan) and top in the answer to this question, or rephrase the question to preclude the possibility of a slow CPU/network being the root cause. > Q8: This server of mine is a public DNS and it seems to be rejecting > connections because of too many TCP connections with "TIME_WAIT" status > (from "netstat -an"). How can I reduce the timeout? > A8: In short, tune the sysctl value "net.inet.tcp.msl" to something > modern and acceptable, such as 7500. > In detail, the default timeout value for TIME_WAIT status is set to 60 > seconds. This value is based on RFC 793. Since this RFC is drafted in > year 1981, equipments & bandwidth of that time wasn't as fast as what we > have now. A 60 seconds of waiting, for TCP session to terminate is a > long time. For a busy server opening & closing TCP connections, this > value should set to a fairly short time, such as 15 seconds. > The value of "net.inet.tcp.msl" is not the usual "literal" seconds > though. In order to reduce from the default 60 seconds to 15 seconds, > convert it to milliseconds and then divide it by 2. For example, > when 15 seconds is converted to 15,000 milliseconds, it then should > divide by 2, which sums up as "7500". This will be the value for > "net.inet.tcp.msl". > > Q9: I just updated /etc/newsyslog.conf. How do I check for syntax error? > A9: Use the parameter "-nvv" when executing "newsyslog". For example, > "newsyslog -nvv" would tell what are each of the lines in > /etc/newsyslog.conf would do when the time comes. > > Q10: The output of "ps" is truncated to the end of my terminal width and > I can't see the program name. > A10: Tell "ps" to disregard your terminal width. For example, "ps auxww". > Can this be made more explicit? "Include 'ww' to the options supplied to ps(1)" for example. > By the way, do you guys think is there any chance that this Q&A can > squeeze into the FAQ? > Q: My this cute little colleague/friend have very big fat fingers, how > can I punk him? > A: install port "games/sl" then try typing "sl" instead of "ls". > > Regards, > Edward. > _______________________________________________ > freebsd-doc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-doc > To unsubscribe, send any mail to "freebsd-doc-unsubscribe@freebsd.org"