<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-714742118606354868</id><updated>2011-10-07T12:58:51.308-07:00</updated><title type='text'>Unix Tech Tips &amp; Tricks</title><subtitle type='html'>A Technology Repository</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>42</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-6163237087139976278</id><published>2007-06-05T00:31:00.001-07:00</published><updated>2007-06-05T00:31:17.113-07:00</updated><title type='text'>Small tutorial on SCCS</title><content type='html'>&lt;DIV&gt; &lt;CENTER&gt; &lt;H2&gt;Small tutorial on SCCS&lt;/H2&gt;&lt;/CENTER&gt; &lt;H3&gt;The Basics&lt;/H3&gt;SCCS is a software versioning and revision control system. It  works by maintaining information about files in a main directory (called SCCS).  Each person working on the code creates a symbolic link to this directory in  his/her own workspace. There is an SCCS directory for each project.  &lt;H3&gt;Setup&lt;/H3&gt;Decide on a central repository to store the code. This can be  something like &lt;CODE&gt;/usr/src/projectName&lt;/CODE&gt;.&lt;BR&gt;Create the SCCS directory  there: &lt;CODE&gt;&lt;B&gt;mkdir&lt;/B&gt; /usr/src/projectName/SCCS&lt;/CODE&gt;. Put the original  files into the SCCS system using&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs create&lt;/B&gt;  filename&lt;/CODE&gt;&lt;BR&gt;where &lt;CODE&gt;filename&lt;/CODE&gt; is the name of the file.  &lt;P&gt; &lt;H3&gt;Usage&lt;/H3&gt; &lt;UL&gt;   &lt;LI&gt;&lt;B&gt;Creating a file and putting it into sccs&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs    create&lt;/B&gt; filename&lt;/CODE&gt;&lt;BR&gt;   &lt;LI&gt;&lt;B&gt;checking files out for editing&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs edit&lt;/B&gt;    filename&lt;/CODE&gt;&lt;BR&gt;   &lt;LI&gt;&lt;B&gt;checking files in after editing&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs delget&lt;/B&gt;    filename&lt;/CODE&gt;&lt;BR&gt;   &lt;LI&gt;&lt;B&gt;getting a particular version of a file&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs get&lt;/B&gt;    filename&lt;/CODE&gt; gets the latest version of the file&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs get    -r&lt;/B&gt;xx filename&lt;/CODE&gt; gets version xx of the file    &lt;LI&gt;&lt;B&gt;getting the latest version of all files&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs get&lt;/B&gt;    SCCS/s.*&lt;/CODE&gt;    &lt;LI&gt;&lt;B&gt;getting information about which files are checked    out&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs info&lt;/B&gt;&lt;/CODE&gt;    &lt;LI&gt;&lt;B&gt;getting information about a particular file&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs    prt&lt;/B&gt; filename&lt;/CODE&gt;    &lt;LI&gt;&lt;B&gt;Diff between current file and checked in version&lt;/B&gt;:&lt;BR&gt;&lt;CODE&gt;&lt;B&gt;sccs    diffs&lt;/B&gt; filename&lt;/CODE&gt; &lt;/LI&gt;&lt;/UL&gt; &lt;P&gt;To modify a file, check it out for editing (edit), make the modifications,  and then check it back in (delget).&lt;BR&gt; &lt;H3&gt;Version info in the source code&lt;/H3&gt;SCCS provides the ability to mark your  source files with the sccs information, such as the date of the last  modification. To enable this, include the string &lt;CODE&gt;&lt;B&gt;%W% %G%&lt;/B&gt;&lt;/CODE&gt; in  your source code. Generally this would be placed inside a comment. Once a file  is checked in, the string gets replaced by the name of the file and the date of  last modification. &lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-6163237087139976278?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/6163237087139976278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=6163237087139976278&amp;isPopup=true' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6163237087139976278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6163237087139976278'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/06/small-tutorial-on-sccs.html' title='Small tutorial on SCCS'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>44</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-3990806091560179443</id><published>2007-06-04T22:14:00.001-07:00</published><updated>2007-06-04T22:14:43.747-07:00</updated><title type='text'>Basic Source Control Using RCS</title><content type='html'>&lt;DIV&gt; &lt;TABLE cellSpacing=0 cellPadding=0 width="90%" border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD colSpan=2&gt;&amp;nbsp;&lt;MAP name=catalog_header_buttons&gt;&lt;AREA shape=RECT          coords=407,17,512,32 href="/catalog/search.html"&gt;&lt;AREA shape=RECT          coords=431,3,512,18 href="/catalog/prdindex.html"&gt;&lt;/MAP&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="25%"&gt;&lt;A        href="http://www.oreilly.com/catalog/rcs/"&gt;&lt;IMG        alt="Applying RCS and SCCS: From Source Control to Project Control"        hspace=10 src="http://www.oreilly.com/catalog/covers/rcs.s.gif" align=left        vspace=10 border=0 valign="top"&gt; &lt;/A&gt;&lt;/TD&gt;     &lt;TD vAlign=top height=105&gt;&lt;BR&gt;       &lt;H2&gt;Applying RCS and SCCS&lt;/H2&gt;       &lt;H3&gt;From Source Control to Project Control&lt;/H3&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;HR noShade SIZE=1&gt; &lt;!--sample chapter begins --&gt; &lt;BLOCKQUOTE&gt;   &lt;H2&gt;&lt;BR&gt;Basic Source Control Using RCS&lt;/H2&gt;   &lt;P&gt;The &lt;B class=emphasis.bold&gt;Revision Control System&lt;/B&gt;, or RCS, was    developed by Walter F. Tichy at Purdue University in the early 1980s.    Implemented later than SCCS, and with full knowledge of it, RCS is a more    user-friendly system, and in most ways a more powerful one. In this chapter we    present the most basic capabilities of RCS, by showing how you can apply it to    the source file modification cycle.&lt;/P&gt;   &lt;H2 class=sect1&gt;&lt;A class=title name=AUTOID-1262&gt;Background&lt;/A&gt;&lt;/H2&gt;   &lt;P class=para&gt;Traditionally, RCS has been included in BSD UNIX distributions;    currently, it is also distributed by the Free Software Foundation [Egg91]. RCS    has &lt;EM class=emphasis&gt;not&lt;/EM&gt; traditionally been included in    AT&amp;amp;T-derived UNIX distributions. Despite the technical merits of RCS, its    absence from System V and earlier AT&amp;amp;T systems can present practical and    political obstacles to those who would like to use it.&lt;/P&gt;   &lt;P class=para&gt;If RCS is of interest to you, make sure your system provides it.    If not, you'll be obliged to obtain it from another source, such as the FSF.    (We provide instructions for doing so in Appendix H, &lt;EM    class=emphasis&gt;References&lt;/EM&gt;.)[&lt;A class=footnote title=Footnote    href="http://www.oreilly.com/catalog/rcs/chapter/ch03.html#footnote-1"&gt;1&lt;/A&gt;]    The FSF, of course, distributes RCS in source form only. Though it's normally    trivial to configure and build RCS for a UNIX-like ("POSIX-compliant")    platform, this is still something you would have to do yourself if you    obtained the system in this way.&lt;/P&gt;   &lt;BLOCKQUOTE class=footnote&gt;     &lt;P class=para&gt;&lt;A class=footnote title=Footnote name=footnote-1&gt;[1]&lt;/A&gt; A      successor to RCS called RCE (for Revision Control Engine) has recently been      announced by a group working in Germany with Walter Tichy [XCC95]. RCE is      built atop a difference generator that works between arbitrary files, and is      implemented as a library, permitting source control operations to be      integrated with existing applications. A "stand-alone" command-line      interface that is compatible with RCS is provided, as well as a graphical      interface. We have not evaluated RCE; if it's of interest to you, see      Appendix H for information on finding out more about it.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;In this book we describe RCS version 5.6.0.1, the most recent    one available as this book was being written.[&lt;A class=footnote title=Footnote    href="http://www.oreilly.com/catalog/rcs/chapter/ch03.html#footnote-2"&gt;2&lt;/A&gt;]    This version of RCS contains the commands listed in &lt;A class=xref    href="http://www.oreilly.com/catalog/rcs/chapter/ch03.html#RCS-CHP-3-TAB-1"&gt;Table    3.1&lt;/A&gt;.[&lt;A class=footnote title=Footnote    href="http://www.oreilly.com/catalog/rcs/chapter/ch03.html#footnote-3"&gt;3&lt;/A&gt;]&lt;/P&gt;   &lt;BLOCKQUOTE class=footnote&gt;     &lt;P class=para&gt;&lt;A class=footnote title=Footnote name=footnote-2&gt;[2]&lt;/A&gt; Note      that RCS 5.6.0.1 differs from 5.6 only in that it provides partial support      for a new form of conflict output in doing three-way merges. (See Chapter 5,      &lt;EM class=emphasis&gt;Extending Source Control to Multiple Releases&lt;/EM&gt;, for a      discussion of of such merges.) Since the new support is incomplete, it's      disabled, making 5.6.0.1 effectively identical to 5.6. Version 5.7 of RCS      was released just after this book went into production. Though it changes      nothing fundamental, 5.7 does introduce a few new features. We flag the most      important or visible of these in footnotes at the relevant points in our      presentation. Appendix G, &lt;EM class=emphasis&gt;Changes in RCS Version      5.7&lt;/EM&gt;, gives a more complete summary of what changed.&lt;/P&gt;     &lt;P class=para&gt;&lt;A class=footnote title=Footnote name=footnote-3&gt;[3]&lt;/A&gt; We      include in Table 3-1 the &lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt;(1) command, which      in older RCS releases was a useful but limited shell script. In the current      release, the command is implemented in C and uses much of the same internal      code as the other RCS commands. Though the RCS sources still flag &lt;EM      class=emphasis&gt;rcsclean&lt;/EM&gt; as experimental, we think it's "grown up"      enough to warrant inclusion as part of the standard system.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;   &lt;TABLE class=table cellPadding=3 border=1&gt;     &lt;CAPTION class=table&gt;&lt;A class=title name=RCS-CHP-3-TAB-1&gt;Table 3.1: The RCS      Command Set&lt;/A&gt;&lt;/CAPTION&gt;     &lt;THEAD class=thead&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TH class=entry align=left&gt;Command&lt;/TH&gt;       &lt;TH class=entry align=left&gt;Description&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;     &lt;TBODY class=tbody&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;ci&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Check in RCS revisions&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;co&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Check out RCS revisions&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;ident&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Identify files&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;merge&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Three-way file merge&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;rcs&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Change RCS file attributes&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Clean up working files&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;rcsdiff&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Compare RCS revisions&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;rcsmerge&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Merge RCS revisions&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;EM class=emphasis&gt;rlog&lt;/EM&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Print log messages and other info on RCS      files&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;   &lt;P&gt;&lt;/P&gt;   &lt;H2 class=sect1&gt;&lt;A class=title name=AUTOID-1355&gt;Conventions&lt;/A&gt;&lt;/H2&gt;   &lt;P class=para&gt;Before describing the basic RCS commands, let's define some    terms and take a look at command-line conventions, especially how you specify    files to the system.&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1362&gt;Nomenclature&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;When RCS creates an archive file, the name of the archive file    is the source file name with &lt;EM class=emphasis&gt;,v&lt;/EM&gt; appended to it. Thus    if you created an archive for the file &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt;, &lt;EM    class=emphasis&gt;xform.c,v&lt;/EM&gt; would become the archive's name. The "&lt;EM    class=emphasis&gt;,v&lt;/EM&gt;" nominally refers to the multiple "versions" of the    source file stored in the archive file. Naturally enough, RCS calls its    archive files "RCS files."&lt;/P&gt;   &lt;P class=para&gt;All of the terms that we introduced in prior chapters to talk    about source control in fact come from RCS. Thus RCS uses the term "revision"    to refer to each stored version of the source file. It also uses the term    "check-in" to refer to the addition of a new revision to an RCS file and    "check-out" to refer to the retrieval of an existing revision from an RCS    file. And a source file that's been retrieved from an RCS file is known as a    "working file."&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1392&gt;RCS Command Lines&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;Like most programs with a UNIX heritage, all RCS commands expect    a command line that consists of a command name followed by one or more file    names. The file names may be (but don't have to be) preceded by one or more    options. If given, options change how the command works. So to summarize, a    command line looks like&lt;/P&gt;   &lt;BLOCKQUOTE class=literallayout&gt;     &lt;P class=literallayout&gt;&lt;EM class=emphasis&gt;command-name &lt;/EM&gt;[&lt;EM      class=emphasis&gt;options&lt;/EM&gt;]&lt;EM class=emphasis&gt; files&lt;/EM&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;Each &lt;EM class=emphasis&gt;option&lt;/EM&gt; begins with a hyphen, which    is what distinguishes it from a filename. After the hyphen comes a single    letter that identifies the option; then (for some options) comes a string that    serves as a value for the option. Never insert whitespace between an option    letter and its value--let them appear as one argument on the command line.    (The first argument not starting with a hyphen is assumed to begin the    filename arguments for the command.) Each file named on a command line can be    either a source file or an RCS file, as we explain below.&lt;/P&gt;   &lt;P class=para&gt;Thus a typical command might be&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;rcsdiff -r1.2 xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;This invocation of the &lt;KBD class=command&gt;rcsdiff&lt;/KBD&gt;(1)    command specifies one option (&lt;EM class=emphasis&gt;-r&lt;/EM&gt;, which has &lt;B    class=emphasis.bold&gt;1.2&lt;/B&gt; as its value) and specifies one file, &lt;EM    class=emphasis&gt;xform.c&lt;/EM&gt;.&lt;/P&gt;   &lt;P class=para&gt;One final note is really not related to RCS, but to entering    quoted strings on a shell command line. As we'll see, you sometimes have the    choice of entering a description of an operation either at a prompt from the    program you're running or directly on the program's command line. If you want    to give the description on the command line, you'll need to enter it as a    quoted string (because it will contain whitespace). And if you want to    continue the description over more than one line, you'll have to use whatever    convention your shell supports for continuing a command line.&lt;/P&gt;   &lt;P class=para&gt;For example, the &lt;EM class=emphasis&gt;-m&lt;/EM&gt; option to the &lt;KBD    class=command&gt;ci&lt;/KBD&gt; program specifies comments for a check-in operation. If    you want to give a multiline comment and you're using &lt;EM    class=emphasis&gt;csh&lt;/EM&gt;(1) (or derivatives) as your shell, you need to precede    each carriage return in the commentary with a backslash:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci -m"Fix CR 604: vary conditioning algorithm according to\&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;? &lt;CODE class=userinput&gt;&lt;B&gt;range data supplied by caller." filter.sh&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;However, under the Bourne shell (or &lt;EM    class=emphasis&gt;ksh&lt;/EM&gt;(1) or &lt;EM class=emphasis&gt;bash(1)&lt;/EM&gt;), as long as the    value for &lt;EM class=emphasis&gt;-m&lt;/EM&gt; is quoted, you don't need to do anything    special to continue the comments onto a second line:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;$ &lt;CODE class=userinput&gt;&lt;B&gt;ci -m"Fix CR 604: vary conditioning algorithm according to&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;&amp;gt; &lt;CODE class=userinput&gt;&lt;B&gt;range data supplied by caller." filter.sh&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1436&gt;Naming Files&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;In running an RCS command, you can name either a working file or    the corresponding RCS file on the command line; the command will automatically    derive the other file name from the one you provide. This means, for instance,    that these two command lines are equivalent:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% rcsdiff -r1.2 xform.c,v % rcsdiff -r1.2 xform.c&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;Another feature provided by RCS is the automatic use of an &lt;EM    class=emphasis&gt;RCS&lt;/EM&gt; subdirectory for RCS files. If you create such a    subdirectory beneath the directory where you're working, RCS will try to use    it before trying to use the current directory. RCS will not, however, create a    subdirectory if one doesn't already exist.&lt;/P&gt;   &lt;P class=para&gt;Let's examine naming in more detail. Say that your working file    has the name &lt;EM class=emphasis&gt;workfile&lt;/EM&gt; and that &lt;EM    class=emphasis&gt;path1&lt;/EM&gt; and &lt;EM class=emphasis&gt;path2&lt;/EM&gt; are UNIX    pathnames. Then the full set of rules for specifying names to an RCS command    looks like this:    &lt;UL class=itemizedlist&gt;     &lt;LI class=listitem&gt;     &lt;P class=para&gt;If you name only a working file (such as, say, &lt;EM      class=emphasis&gt;path1/workfile&lt;/EM&gt;), the command tries to use an RCS file      with the name &lt;EM class=emphasis&gt;path1/RCS/workfile,v&lt;/EM&gt; or &lt;EM      class=emphasis&gt;path1/workfile,v&lt;/EM&gt; (in that order). Naturally, this is      also what happens in the simple case in which &lt;EM class=emphasis&gt;path1&lt;/EM&gt;      is not present.&lt;/P&gt;     &lt;P&gt;&lt;/P&gt;     &lt;LI class=listitem&gt;     &lt;P class=para&gt;If you name only an RCS file without a pathname prefix (such      as &lt;EM class=emphasis&gt;workfile,v&lt;/EM&gt;), the command tries to use &lt;EM      class=emphasis&gt;workfile,v&lt;/EM&gt; first in any &lt;EM class=emphasis&gt;RCS&lt;/EM&gt;      subdirectory beneath the current directory, then in the current directory      itself. If it can use an RCS file with one of those names, it tries to use a      working file named &lt;EM class=emphasis&gt;workfile&lt;/EM&gt; in the current      directory.&lt;/P&gt;     &lt;P&gt;&lt;/P&gt;     &lt;LI class=listitem&gt;     &lt;P class=para&gt;If you name an RCS file with a pathname prefix (such as &lt;EM      class=emphasis&gt;path2/workfile,v&lt;/EM&gt;), the command expects to be able to use      an RCS file with exactly that name. Then it tries to use a working file      named &lt;EM class=emphasis&gt;workfile&lt;/EM&gt; in the current directory.&lt;/P&gt;     &lt;P&gt;&lt;/P&gt;     &lt;LI class=listitem&gt;     &lt;P class=para&gt;If you name both a working file and an RCS file, then the      command uses files with exactly those names during its execution. In this      case the two files can be specified in either order, and can come from      completely unrelated directories.&lt;/P&gt;     &lt;P&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P class=para&gt;Suppose, for instance, that in your current directory you had a    source file &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt;, as well as an &lt;EM    class=emphasis&gt;RCS&lt;/EM&gt; subdirectory. Then any of these command lines would    create an archive file named &lt;EM class=emphasis&gt;RCS/xform.c&lt;/EM&gt; from the &lt;EM    class=emphasis&gt;xform.c&lt;/EM&gt; source file. (The command here is the "check-in"    command we describe below.)&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci xform.c,v&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci RCS/xform.c,v&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci RCS/xform.c,v xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci xform.c RCS/xform.c,v&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;When the source file and the RCS file are in the same directory    (or when the RCS file is in an &lt;EM class=emphasis&gt;RCS&lt;/EM&gt; subdirectory),    there's no need to give both file names on the command line. This becomes    useful only if the two files are in unrelated directories. For example, if &lt;EM    class=emphasis&gt;xform.c&lt;/EM&gt; were in the directory &lt;EM    class=emphasis&gt;/home/cullen/current/src/mathlib&lt;/EM&gt;, but you wanted to create    the RCS file in the directory &lt;EM    class=emphasis&gt;/project/archive/mathlib&lt;/EM&gt;, either of these command lines    would do the trick:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci /home/cullen/current/src/mathlib/xform.c /project/archive/mathlib/xform.c,v&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci /project/archive/mathlib/xform.c,v /home/cullen/current/src/mathlib/xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;Command lines like this one become useful when you put files    into separate trees according to their type. (We mentioned this possibility at    the end of Chapter 2, &lt;EM class=emphasis&gt;The Basics of Source Control&lt;/EM&gt;.)    This is one of the key concepts behind project control, as we'll see time and    again in later chapters. If you take this approach, though, you won't want to    be typing horrendously long command lines all the time. It's far better to    create some kind of "tree mapper" to manage the filenames for you. Such a    mapper is fundamental to systems like TCCS.&lt;/P&gt;   &lt;P class=para&gt;Naturally, for any RCS command, you can specify more than one    file, and the command will process each file in turn. For your own sake, if    you frequently process more than one file at a time, you'll probably want to    use an &lt;EM class=emphasis&gt;RCS&lt;/EM&gt; subdirectory to hold RCS files. This helps    you avoid naming RCS files by mistake when you use wildcards to name groups of    working files.&lt;/P&gt;   &lt;P class=para&gt;Note that RCS &lt;EM class=emphasis&gt;will&lt;/EM&gt; take a command line    of intermixed working filenames and RCS filenames and match them up using the    rules we outlined earlier in this chapter. Though this may work all right for    simple cases, however, the potential for ambiguity or erroneous file inclusion    is great enough that you should avoid the situation altogether and just    segregate your RCS files in an &lt;EM class=emphasis&gt;RCS&lt;/EM&gt; subdirectory.&lt;/P&gt;   &lt;P class=para&gt;This is desirable for more general administrative reasons as    well. Working files and RCS files are innately different, and it only makes    sense to keep them in distinct places to make it easy to administer them    appropriately. In particular, by segregating your RCS files, you make it    harder to access them accidentally in any way other than through the RCS    command set. An &lt;B class=emphasis.bold&gt;rm -rf&lt;/B&gt; will still remove them, of    course, but the added safety of an &lt;EM class=emphasis&gt;RCS&lt;/EM&gt; subdirectory    shouldn't be neglected.&lt;/P&gt;   &lt;P&gt;   &lt;H2 class=sect1&gt;&lt;A class=title name=AUTOID-1535&gt;Basic RCS Commands&lt;/A&gt;&lt;/H2&gt;   &lt;P class=para&gt;Now we present one iteration of the source file modification    cycle, using RCS commands to implement each operation. We also cover a few    other basic commands that are not strictly part of the cycle. All of this    involves only some of the RCS commands and few (if any) of their many options.    Later chapters explore more of the potential of the full RCS command set.&lt;/P&gt;   &lt;P class=para&gt;&lt;A class=xref    href="http://www.oreilly.com/catalog/rcs/chapter/ch03.html#RCS-CHP-3-FIG-1"&gt;Figure    3.1&lt;/A&gt; depicts the basic source control operations. This is the same picture    we presented as Figure 2-1, but with the "bubbles" annotated to show which RCS    command actually implements each operation. So once again, the central part of    the figure shows the modification cycle.&lt;/P&gt;   &lt;H4 class=figure&gt;&lt;A class=title name=RCS-CHP-3-FIG-1&gt;Figure 3.1: Basic source    control operations in RCS&lt;/A&gt;&lt;/H4&gt;&lt;IMG class=graphic alt="Figure 3.1"    src="http://www.oreilly.com/catalog/rcs/chapter/RCS.03.01.gif"&gt;    &lt;P class=para&gt;Let's cover each of the operations in more depth. Roughly    speaking, we'll describe them in the order in which they appear in the figure,    working from top to bottom.&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1551&gt;Creating an RCS File&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;You create an RCS file with the command &lt;EM    class=emphasis&gt;ci&lt;/EM&gt;(1) (for "check-in"). The command line need not specify    anything but the name of the source file you're checking in. So a simple    example of creating an RCS file is&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;which will create the file &lt;EM class=emphasis&gt;xform.c,v&lt;/EM&gt;. If    you've already made an &lt;EM class=emphasis&gt;RCS&lt;/EM&gt; subdirectory, then the file    will be created there. Otherwise, it will be created in the current    directory.&lt;/P&gt;   &lt;P class=para&gt;By default, when you create an RCS file, you're prompted for a    short description of the file you're putting under source control. You may    enter as much text as you like in response, ending your input with a line    containing a period by itself. The interaction looks like this:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;xform.c,v  &amp;lt;--  xform.c initial revision: 1.1 enter description, terminated with ^D or '.': NOTE: This is NOT the log message! &amp;gt;&amp;gt; &lt;CODE class=userinput&gt;&lt;B&gt;Matrix transform routines, for single-precision data.&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;&amp;gt;&amp;gt; &lt;CODE class=userinput&gt;&lt;B&gt;.&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;done&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;Once the RCS file is created, your source file is immediately    deleted. It is, of course, now safely stored in the RCS file and can be    extracted as a working file whenever you want it.&lt;/P&gt;   &lt;BLOCKQUOTE&gt;     &lt;TABLE width="85%" border=1&gt;       &lt;TBODY&gt;       &lt;TR&gt;         &lt;TD&gt;           &lt;P class=para&gt;As the warning "NOTE: This is NOT the log message!"            implies, you really create two descriptions when you check in the            initial revision of an archive file. The first description, which is            what &lt;EM class=emphasis&gt;ci&lt;/EM&gt; prompts for by default, is for the            file itself--this message is meant to describe the role of the file in            your project. In addition, &lt;EM class=emphasis&gt;ci&lt;/EM&gt; also creates a            log message (a term we'll come back to later), to describe the first            revision of the archive file--you can use this description to trace            the origins of the source file you're checking in.&lt;/P&gt;           &lt;P class=para&gt;By default, &lt;EM class=emphasis&gt;ci&lt;/EM&gt; creates a log            message with the value "Initial revision". If you want to use the            message actually to capture some useful data, you can use the &lt;EM            class=emphasis&gt;-m&lt;/EM&gt; option on the &lt;KBD class=command&gt;ci&lt;/KBD&gt;            command line to specify it, like this:&lt;/P&gt;           &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci -m"As ported from 9000 engineering group sources,\&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;? &lt;CODE class=userinput&gt;&lt;B&gt;version 4.13.&lt;/B&gt;&lt;/CODE&gt;" xform.c&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;           &lt;P class=para&gt;Of course, this message has to be quoted, and the usual            rules apply if it extends across multiple lines.&lt;/P&gt;           &lt;P class=para&gt;The &lt;KBD class=command&gt;ci&lt;/KBD&gt; command also lets you            specify the archive file description on the command line, instead of            being prompted for it, via the &lt;EM class=emphasis&gt;-t&lt;/EM&gt; flag. In            fact, you can use &lt;EM class=emphasis&gt;-t&lt;/EM&gt; on any check-in, not just            the first one, to change an archive's description. You can give a            description either as the value to &lt;EM class=emphasis&gt;-t&lt;/EM&gt; or in a            file, which you name using &lt;EM class=emphasis&gt;-t&lt;/EM&gt;.&lt;/P&gt;           &lt;P class=para&gt;If the value of the option starts with a hyphen, it's            taken to be the literal text of the description; otherwise, it's taken            to be the name of a file containing the description. So either of            these command sequences would be equivalent to the original &lt;KBD            class=command&gt;ci&lt;/KBD&gt; command we showed above:&lt;/P&gt;           &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;cat &amp;gt; xform.desc&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;&lt;CODE class=userinput&gt;&lt;B&gt;Matrix transform routines, for single-precision data.&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;&lt;CODE class=userinput&gt;&lt;B&gt;^D&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci -txform.desc xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci -t-"Matrix transform routines, for single-precision data." xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1638&gt;Getting a Working File for    Reading&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;You extract a working file from an existing RCS file with the    command &lt;EM class=emphasis&gt;co&lt;/EM&gt; (for "check-out"). The &lt;KBD    class=command&gt;co&lt;/KBD&gt;(1) command is designed to be the mirror-image of &lt;EM    class=emphasis&gt;ci&lt;/EM&gt;(1). So, once again, in the simplest case you specify    nothing but a filename when you run the command. A simple example of creating    a working file is&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;co xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;xform.c,v  --&amp;gt;  xform.c revision 1.1 done&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;This command will look for an RCS file with the name &lt;EM    class=emphasis&gt;RCS/xform.c,v&lt;/EM&gt; or &lt;EM class=emphasis&gt;xform.c,v&lt;/EM&gt; and    create a working file from it named &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt;. Here, the    output from the command confirms that revision 1.1 of &lt;EM    class=emphasis&gt;xform.c&lt;/EM&gt; was extracted from the RCS file &lt;EM    class=emphasis&gt;xform.c,v&lt;/EM&gt;.&lt;/P&gt;   &lt;P class=para&gt;Since the command line doesn't explicitly say that you want to    modify &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt;, the file is created read-only. This is    a reminder that you shouldn't change it unless you coordinate your change with    the RCS file (by locking the revision of &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt; that    you want to modify).&lt;/P&gt;   &lt;P class=para&gt;If a writable file already exists with the same name as the    working file that &lt;EM class=emphasis&gt;co&lt;/EM&gt; is trying to create, the command    will warn you of the file's presence and ask you whether you want to overwrite    it. If a writable copy of &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt; existed, for    instance, the exchange would look like this:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;co xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;RCS/xform.c,v  --&amp;gt;  xform.c revision 1.1 writable xform.c exists; remove it? [ny](n):&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;At this point, &lt;EM class=emphasis&gt;co&lt;/EM&gt; expects a response    from you that starts with &lt;B class=emphasis.bold&gt;y&lt;/B&gt; or &lt;B    class=emphasis.bold&gt;n&lt;/B&gt;--responding with &lt;B class=emphasis.bold&gt;n&lt;/B&gt;, or    with anything other than a word beginning with &lt;B class=emphasis.bold&gt;y&lt;/B&gt;,    will cause &lt;EM class=emphasis&gt;co&lt;/EM&gt; to abort the check-out. If you abort the    check-out, &lt;EM class=emphasis&gt;co&lt;/EM&gt; confirms that with the additional    message&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;co error: checkout aborted&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;This message, of course, doesn't really indicate an    "error"--just that the check-out was aborted as you requested.&lt;/P&gt;   &lt;BLOCKQUOTE class=caution&gt;     &lt;P class=para&gt;&lt;STRONG&gt;CAUTION:&lt;/STRONG&gt; As we said in Chapter 2, &lt;EM      class=emphasis&gt;co&lt;/EM&gt; will silently overwrite any read-only copy of a file      that already exists with the same name as a working file it wants to check      out, on the assumption that the existing file is the result of a previous      &lt;EM class=emphasis&gt;co&lt;/EM&gt; for reading. So if a file is under source      control, &lt;EM class=emphasis&gt;do not&lt;/EM&gt; try to maintain changed copies of it      manually (i.e., outside source control). If you do, then sooner or later      you're likely to delete a file you wanted to save.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;You can change the way &lt;EM class=emphasis&gt;co&lt;/EM&gt; checks out a    file if for some reason the usual safeguards it provides against overwriting a    working file aren't appropriate. First of all, you can use the &lt;EM    class=emphasis&gt;-f&lt;/EM&gt; option to "force" &lt;EM class=emphasis&gt;co&lt;/EM&gt; to create    a working file even if a writable file of the same name already exists. You    might use &lt;EM class=emphasis&gt;-f&lt;/EM&gt; if you had copied some outdated copy of    the file into your work area but now wanted to overwrite it with a current    copy from the archive file.&lt;/P&gt;   &lt;P class=para&gt;At the other extreme, you can check out a revision without    affecting any file that already exists with the same name, by using the &lt;EM    class=emphasis&gt;-p&lt;/EM&gt; option. With &lt;EM class=emphasis&gt;-p&lt;/EM&gt;, &lt;EM    class=emphasis&gt;co&lt;/EM&gt; will "print" the checked-out revision to its standard    output, rather than putting it into a working file. You can then redirect    standard output to capture the file in whatever way is appropriate. You might    use &lt;EM class=emphasis&gt;-p&lt;/EM&gt; if you wanted to have more than one revision of    a file checked out simultaneously--you could check out all but one revision    with &lt;EM class=emphasis&gt;-p&lt;/EM&gt; into files with special names. (Of course, &lt;EM    class=emphasis&gt;-p&lt;/EM&gt; is purely a convenience. You can always avoid using it    by doing regular check-outs and renaming the working files afterward.)&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1727&gt;Getting a Working File for    Modification&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;If you want to change a source file for which you've created an    RCS file, you need to get a writable working copy by adding the &lt;EM    class=emphasis&gt;-l&lt;/EM&gt; option to the &lt;KBD class=command&gt;co&lt;/KBD&gt; command line.    To check out &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt; for modification, you use the    command line:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;co -l xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;xform.c,v  --&amp;gt;  xform.c revision 1.1 (locked) done&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;Compare the output from this command to that from the last &lt;EM    class=emphasis&gt;co&lt;/EM&gt; we looked at. As you can see, the current output    confirms that a lock has been set on the revision of &lt;EM    class=emphasis&gt;xform.c&lt;/EM&gt; you've checked out. Now that you have the lock,    you have the exclusive right to change this revision (revision 1.1) of the    file and eventually to check in your working file as the next revision of the    RCS file.&lt;/P&gt;   &lt;P class=para&gt;If someone else already held the lock to revision 1.1, you would    not be able to lock it yourself. However, even when you can't lock a given    revision, you can still check it out for reading only (that is, without the    &lt;EM class=emphasis&gt;-l&lt;/EM&gt; option). The assumption here is that you won't    modify the file when you obtain it for reading only. If, for example, you    requested the lock for revision 1.1 of &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt; but    couldn't get it, &lt;EM class=emphasis&gt;co&lt;/EM&gt; would inform you with an error    message like this one:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;co -l xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;RCS/xform.c,v  --&amp;gt;  xform.c co error: revision 1.1 already locked by cullen&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;In this case you don't have the option of forcing the check-out    to proceed, so &lt;EM class=emphasis&gt;co&lt;/EM&gt; doesn't ask whether you want to. The    check-out is aborted unconditionally. The error message points out what user    owns the lock, which lets you contact him if you absolutely need to modify the    file now. Perhaps he can check it back in. Even if he can't, waiting is better    than circumventing RCS.&lt;/P&gt;   &lt;P class=para&gt;Occasionally, you may need to set a lock in an archive file    without checking out a working file. Say, for instance, you're archiving    sources distributed from outside your group, you've moved a new distribution    into place, and now you want to check in the new version of each file.    Checking out working files would overwrite the new sources with the older    ones. To set a lock without creating a working file, use the command &lt;B    class=emphasis.bold&gt;rcs -l&lt;/B&gt;.&lt;/P&gt;   &lt;P class=para&gt;Having a lock set in each archive file will enable you to check    in the corresponding newly imported source file as a successor to the existing    revision you locked.&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1787&gt;Comparing a Working File to    Its RCS File&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;To compare a working file against the RCS file it came from, use    the &lt;KBD class=command&gt;rcsdiff&lt;/KBD&gt;(1) program. If, for instance, you want to    compare the current contents of the working file against the original revision    you checked out of the RCS file, just give the command with no options, as    in&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;rcsdiff xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;The &lt;KBD class=command&gt;rcsdiff&lt;/KBD&gt; command will output a line    indicating what revision it is reading from the RCS file, then it will run the    &lt;EM class=emphasis&gt;diff&lt;/EM&gt;(1) program, comparing the revision it read    against the current working file. The &lt;EM class=emphasis&gt;diff&lt;/EM&gt; output will    show the original revision as the "old" file being compared and the current    working file as the "new" file being compared. Typical output might look like    this:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;rcsdiff xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;=================================================================== RCS file: xform.c,v retrieving revision 1.1 diff -r1.1 xform.c 4a5 &amp;gt; j_coord = i_coord - x; 11,12c12,13 &amp;lt;       for (j = j_coord; j &amp;lt; j_max; ++j) &amp;lt;               if (a[j] &amp;lt; b[j]) { --- &amp;gt;       for (j = j_coord + 1; j &amp;lt;= j_max; ++j) &amp;gt;               if (a[j - 1] &amp;lt; b[j]) { 20d20 &amp;lt; j_coord = i_coord - x;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;In other words, in the working file (the new file in the &lt;EM    class=emphasis&gt;diff&lt;/EM&gt; listing), an assignment to &lt;B    class=emphasis.bold&gt;j_coord&lt;/B&gt; has moved from line 20 to line 4, and the    first two lines of the &lt;EM class=emphasis&gt;for&lt;/EM&gt; loop currently at line 12    have been changed.&lt;/P&gt;   &lt;P class=para&gt;You can also use &lt;EM class=emphasis&gt;rcsdiff&lt;/EM&gt; to compare a    working file against some revision other than the one it started from or to    compare two different RCS file revisions to each other. To compare your    working file against any revision of the RCS file, add a &lt;EM    class=emphasis&gt;-r&lt;/EM&gt; option to the &lt;KBD class=command&gt;rcsdiff&lt;/KBD&gt; command    line, naming the revision you're interested in. For instance, to compare the    current contents of &lt;EM class=emphasis&gt;xform.c&lt;/EM&gt; against revision 1.3 of    its RCS file, you use the command&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;rcsdiff -r1.3 xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;To compare two different revisions already checked in to the RCS    file, just give two &lt;EM class=emphasis&gt;-r&lt;/EM&gt; options, as in&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;rcsdiff -r1.1 -r1.2 xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;This command produces a &lt;EM class=emphasis&gt;diff&lt;/EM&gt; listing    with revision 1.1 as the "old" file and revision 1.2 as the "new" file. This    form of &lt;EM class=emphasis&gt;rcsdiff&lt;/EM&gt; can be particularly useful for    debugging, since it lets you see recent changes to the file other than your    own.&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1863&gt;Adding a Working File to Its    RCS File&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;When you're satisfied with the current state of your working    file and want to save it for future reference, use the &lt;KBD    class=command&gt;ci&lt;/KBD&gt; command to add it to the corresponding RCS file. This    is, of course, the same command you used to create the RCS file in the first    place; ordinarily, to check in a working file, you give the same simple    command line as you did then. For instance,&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;This command would check in the current contents of &lt;EM    class=emphasis&gt;xform.c&lt;/EM&gt; as a new revision in the corresponding RCS file,    then delete the working file. When you run &lt;EM class=emphasis&gt;ci&lt;/EM&gt;, you'll    be prompted for a description of your changes to the working file, in the same    way as &lt;EM class=emphasis&gt;ci&lt;/EM&gt; originally asked you to describe the file    itself. A typical interaction might be&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;xform.c,v  &amp;lt;--  xform.c new revision: 1.2; previous revision: 1.1 enter log message: (terminate with ^D or single '.') &amp;gt;&amp;gt; &lt;CODE class=userinput&gt;&lt;B&gt;In function ff1():  move declaration of j_coord; fix&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;&amp;gt;&amp;gt; &lt;CODE class=userinput&gt;&lt;B&gt;off-by-one error in traversal loop.&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;&amp;gt;&amp;gt; &lt;CODE class=userinput&gt;&lt;B&gt;.&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;done&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;Again, you can enter as much text as you like, and you terminate    your entry with a period on a line by itself.&lt;/P&gt;   &lt;P class=para&gt;Sometimes, you may prefer to give revision commentary directly    on the &lt;KBD class=command&gt;ci&lt;/KBD&gt; command line. This can be handy when you're    checking in more than one file and want all of the files to have the same    commentary. You do this using the &lt;EM class=emphasis&gt;-m&lt;/EM&gt; option to &lt;EM    class=emphasis&gt;ci&lt;/EM&gt; (as we've mentioned a few times in other contexts). For    instance, the last check-in that we showed could be phrased as&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;ci -m"In function ff1():  move declaration of j_coord; fix\&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;? &lt;CODE class=userinput&gt;&lt;B&gt;off-by-one error in traversal loop." xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;Notice that we gave the comments as a quoted string, as they    contain white space. Since in this example we're using a &lt;EM    class=emphasis&gt;csh&lt;/EM&gt;(1)-style shell, we had to type a backslash to extend    the comments onto a second line.&lt;/P&gt;   &lt;P class=para&gt;Ordinarily, &lt;EM class=emphasis&gt;ci&lt;/EM&gt; expects a newly    checked-in revision to be different from its ancestor and will not complete    the check-in if the two are identical. You can use the &lt;EM    class=emphasis&gt;-f&lt;/EM&gt; option to "force" a check-in to complete anyway in this    case. By default, &lt;EM class=emphasis&gt;ci&lt;/EM&gt; deletes your working file when    the check-in is complete. Often, you'll still want a copy of the file to exist    afterward. To make &lt;EM class=emphasis&gt;ci&lt;/EM&gt; do an immediate check-out of the    working file after checking it in, you can add either of two options to the    command line. The &lt;EM class=emphasis&gt;-u&lt;/EM&gt; option will check out your    working file unlocked, suitable for read-only use. The &lt;EM    class=emphasis&gt;-l&lt;/EM&gt; option will set a new lock on the revision that you    just checked in and check out the working file for modification. Both of these    options are simply shorthand for doing a separate &lt;EM class=emphasis&gt;co&lt;/EM&gt;    following the check-in.&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1945&gt;Discarding a Working    File&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;If you decide that you don't want to keep the changes that    you've made, you can use the &lt;KBD class=command&gt;rcs&lt;/KBD&gt;(1) command to    discard your changes by unlocking the RCS file revision you started with. Run    &lt;EM class=emphasis&gt;rcs&lt;/EM&gt; just by naming the file you want to discard,    preceded by the option &lt;EM class=emphasis&gt;-u&lt;/EM&gt; (for "unlock"):&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;rcs -u xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;RCS file: xform.c,v 1.1 unlocked done&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;This command will remove any lock you currently have set in the    RCS file. However, it doesn't do anything to the working file you name and    doesn't even require that the file exist. If you want to remove the working    file, you have to do that yourself with &lt;EM class=emphasis&gt;rm&lt;/EM&gt;(1).&lt;/P&gt;   &lt;P class=para&gt;If you've set more than one lock in a file under the same    username, you need to tell &lt;EM class=emphasis&gt;rcs&lt;/EM&gt; the revision you wish    to unlock, by adding a revision ID to the &lt;EM class=emphasis&gt;-u&lt;/EM&gt; option.    Without it, the command can't tell which pending update to the archive file    you want to cancel. This command, for instance, would unlock revision 1.1 of    &lt;EM class=emphasis&gt;xform.c,v&lt;/EM&gt; even if you had another revision locked:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;% &lt;CODE class=userinput&gt;&lt;B&gt;rcs -u1.1 xform.c&lt;/B&gt;&lt;/CODE&gt;&lt;BR&gt;RCS file: xform.c,v 1.1 unlocked done&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;If you want to discard a working file and replace it with the    original revision it came from, it may be more convenient to use the command    &lt;B class=emphasis.bold&gt;co -f -u&lt;/B&gt;. The &lt;EM class=emphasis&gt;-u&lt;/EM&gt; option    causes &lt;EM class=emphasis&gt;co&lt;/EM&gt; to unlock the checked-out revision if it was    locked by you, while &lt;EM class=emphasis&gt;-f&lt;/EM&gt; forces &lt;EM    class=emphasis&gt;co&lt;/EM&gt; to overwrite your writable working file with the    original revision from the archive file.&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-1995&gt;Viewing the History of an RCS    File&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;As we've seen, the &lt;KBD class=command&gt;ci&lt;/KBD&gt; command asks you    for a description when you create an RCS file, as well as when you add a    revision to one. Together, these descriptions form a history, or log, of all    that's happened to the RCS file since its creation. The descriptions can be    displayed by using the &lt;KBD class=command&gt;rlog&lt;/KBD&gt;(1) command.&lt;/P&gt;   &lt;P class=para&gt;As usual, you simply give on the command line the name of the    file you want to examine. Here's an example:&lt;/P&gt;   &lt;BLOCKQUOTE class=screen&gt;&lt;PRE class=screen&gt;&lt;B class=emphasis.bold&gt;% rlog xform.c&lt;/B&gt; RCS file:        xform.c,v;   Working file:    xform.c head:            1.2 branch: locks:           ;  strict access list: symbolic names: comment leader:  " * " total revisions: 2;    selected revisions: 2 description: Matrix transform routines, for single-precision data. ---------------------------- revision 1.2 date: 95/05/10 14:34:02;  author: rully;  state: Exp;  lines added/del: 3/3 In function ff1():  move declaration of j_coord; fix off-by-one error in traversal loop. ---------------------------- revision 1.1 date: 95/04/23 14:32:31;  author: rully;  state: Exp; As ported from 9000 engineering group sources, version 4.13. =============================================================================&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;   &lt;P class=para&gt;The output of &lt;EM class=emphasis&gt;rlog&lt;/EM&gt; can be divided into    three parts. First appears a summary of various characteristics of the RCS    file, which is unrelated to what we've discussed in this chapter. Next,    following the &lt;EM class=emphasis&gt;description:&lt;/EM&gt; line, we find the text    entered when the RCS file was first created. Last, a list of revision entries    appears, one for each revision in the RCS file. These entries are output with    the most recent first. Each one contains the description that was originally    entered for that revision.&lt;/P&gt;   &lt;H3 class=sect2&gt;&lt;A class=title name=AUTOID-2020&gt;Cleaning Up an RCS Source    Directory&lt;/A&gt;&lt;/H3&gt;   &lt;P class=para&gt;To help you tidy up a source directory when you're done working    there, RCS provides a program called &lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt;. This    program compares working files in the current directory against their archive    files and removes working files that were checked out but never modified. More    specifically:    &lt;UL class=itemizedlist&gt;     &lt;LI class=listitem&gt;     &lt;P class=para&gt;A working file that was checked out for reading is removed      only if it still matches the head revision on the default branch of the      archive file.[&lt;A class=footnote title=Footnote      href="http://www.oreilly.com/catalog/rcs/chapter/ch03.html#footnote-4"&gt;4&lt;/A&gt;]&lt;/P&gt;     &lt;BLOCKQUOTE class=footnote&gt;       &lt;P class=para&gt;&lt;A class=footnote title=Footnote name=footnote-4&gt;[4]&lt;/A&gt; See        Chapter 6, &lt;EM class=emphasis&gt;Applying RCS to Multiple Releases&lt;/EM&gt;, for        a discussion of RCS archive file branches.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;     &lt;P&gt;&lt;/P&gt;     &lt;LI class=listitem&gt;     &lt;P class=para&gt;If &lt;EM class=emphasis&gt;-u&lt;/EM&gt; is given, a working file that      was checked out for modification is removed if it still matches the original      revision (that is, the one checked out locked by the user).&lt;/P&gt;     &lt;P&gt;&lt;/P&gt;     &lt;LI class=listitem&gt;     &lt;P class=para&gt;If a working file does not match the revision noted in the      last two cases, then &lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt; will never remove      it.&lt;/P&gt;     &lt;P&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P class=para&gt;When &lt;EM class=emphasis&gt;-u&lt;/EM&gt; is given, if &lt;EM    class=emphasis&gt;rcsclean&lt;/EM&gt; removes a working file, it also removes any lock    corresponding to it. Any commands &lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt; executes    are echoed to its standard output so you can see what's going on.&lt;/P&gt;   &lt;P class=para&gt;If you invoke &lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt; with no    arguments, it will process all of the working files in the current directory.    If you provide arguments, then only the working files you name will be    processed. Needless to say, &lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt; has no effect on    files other than working files checked out from an RCS file.&lt;/P&gt;   &lt;P class=para&gt;If you want to see what commands &lt;EM    class=emphasis&gt;rcsclean&lt;/EM&gt; would execute, if given a certain command line,    you can use the &lt;EM class=emphasis&gt;-n&lt;/EM&gt; flag. Then &lt;EM    class=emphasis&gt;rcsclean&lt;/EM&gt; will echo the commands it normally would run but    will not actually execute them. Note that the output from &lt;B    class=emphasis.bold&gt;rcsclean -n&lt;/B&gt; looks exactly like the normal output, so    be careful not to confuse a &lt;EM class=emphasis&gt;-n&lt;/EM&gt; run with the real    McCoy.&lt;/P&gt;   &lt;P&gt;   &lt;H2 class=sect1&gt;&lt;A class=title name=AUTOID-2070&gt;Summary&lt;/A&gt;&lt;/H2&gt;   &lt;P class=para&gt;You can put and keep files under source control with RCS by    using only two commands, &lt;EM class=emphasis&gt;ci&lt;/EM&gt; and &lt;EM    class=emphasis&gt;co&lt;/EM&gt;. This simplicity is a strong point of the system. We've    also introduced the &lt;KBD class=command&gt;rcs&lt;/KBD&gt; command to abort a pending    modification to an RCS file and informational commands &lt;EM    class=emphasis&gt;rcsdiff&lt;/EM&gt; and &lt;EM class=emphasis&gt;rlog&lt;/EM&gt;, which give you    detailed information about the contents of an RCS file. Finally, we presented    &lt;EM class=emphasis&gt;rcsclean&lt;/EM&gt; to remove unmodified working files.&lt;/P&gt;   &lt;P class=para&gt;&lt;A class=xref    href="http://www.oreilly.com/catalog/rcs/chapter/ch03.html#RCS-CHP-3-TAB-2"&gt;Table    3.2&lt;/A&gt; summarizes our presentation so far, by relating each operation in the    source file modification cycle (plus a few other basic ones) to the RCS    command that implements it.&lt;/P&gt;   &lt;TABLE class=table cellPadding=3 border=1&gt;     &lt;CAPTION class=table&gt;&lt;A class=title name=RCS-CHP-3-TAB-2&gt;Table 3.2: Basic      RCS Commands&lt;/A&gt;&lt;/CAPTION&gt;     &lt;THEAD class=thead&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TH class=entry align=left&gt;Command&lt;/TH&gt;       &lt;TH class=entry align=left&gt;Basic Operation&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;     &lt;TBODY class=tbody&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;ci&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Creating an archive file&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;co&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Getting a working file for reading&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;co -l&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Getting a working file for modification&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;rcsdiff&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Comparing a working file to its RCS file&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;ci&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Adding a working file to an RCS file&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;rcs -u&lt;/B&gt; plus &lt;B          class=emphasis.bold&gt;rm&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Discarding a working file&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;rlog&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Viewing the history of an RCS file&lt;/TD&gt;&lt;/TR&gt;     &lt;TR class=row vAlign=top&gt;       &lt;TD class=entry&gt;&lt;B class=emphasis.bold&gt;rcsclean&lt;/B&gt;&lt;/TD&gt;       &lt;TD class=entry&gt;Cleaning up a source directory&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;   &lt;P class=para&gt;Remember, too, that all of these commands employ an intelligent    command-line interface that fairly well balances simplicity and flexibility    and can provide an advantage over SCCS. That said, let's see what SCCS has to    offer. &lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;!-- End of sample chapter --&gt; &lt;P&gt; &lt;CENTER&gt;&lt;FONT face="Verdana, Arial, Helvetica" size=1&gt;&lt;/FONT&gt;&lt;/CENTER&gt;&lt;!-- O'Reilly Footer Ends Here --&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-3990806091560179443?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/3990806091560179443/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=3990806091560179443&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3990806091560179443'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3990806091560179443'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/06/basic-source-control-using-rcs.html' title='Basic Source Control Using RCS'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-5625220278710312650</id><published>2007-04-02T02:28:00.001-07:00</published><updated>2007-04-02T02:28:25.880-07:00</updated><title type='text'>Understanding Virtual Memory -Linux</title><content type='html'>&lt;H1&gt;Understanding Virtual Memory&lt;/H1&gt; &lt;H4 class=byline&gt;by Norm Murray and Neil Horman&lt;/H4&gt; &lt;UL id=articleMenu&gt;   &lt;LI&gt;&lt;SPAN class=sect1&gt;&lt;A    href="http://www.redhat.com/magazine/001nov04/features/vm/#intro"&gt;Introduction&lt;/A&gt;    &lt;/SPAN&gt;   &lt;LI&gt;&lt;SPAN class=sect1&gt;&lt;A    href="http://www.redhat.com/magazine/001nov04/features/vm/#definitions"&gt;Definitions&lt;/A&gt;    &lt;/SPAN&gt;   &lt;LI&gt;&lt;SPAN class=sect1&gt;&lt;A    href="http://www.redhat.com/magazine/001nov04/features/vm/#life-page"&gt;The Life    of a Page&lt;/A&gt; &lt;/SPAN&gt;   &lt;LI&gt;&lt;SPAN class=sect1&gt;&lt;A    href="http://www.redhat.com/magazine/001nov04/features/vm/#tuning-vm"&gt;Tuning    the VM&lt;/A&gt; &lt;/SPAN&gt;   &lt;LI&gt;&lt;SPAN class=sect1&gt;&lt;A    href="http://www.redhat.com/magazine/001nov04/features/vm/#example-scenarios"&gt;Example    Scenarios&lt;/A&gt; &lt;/SPAN&gt;   &lt;LI&gt;&lt;SPAN class=sect1&gt;&lt;A    href="http://www.redhat.com/magazine/001nov04/features/vm/#further-reading"&gt;Further    Reading&lt;/A&gt; &lt;/SPAN&gt;   &lt;LI&gt;&lt;SPAN class=sect1&gt;&lt;A    href="http://www.redhat.com/magazine/001nov04/features/vm/#author"&gt;About the    Author&lt;/A&gt; &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt; &lt;H2 id=intro&gt;Introduction&lt;/H2&gt; &lt;P&gt;One of the most important aspects of an operating system is the Virtual  Memory Management system. Virtual Memory (VM) allows an operating system to  perform many of its advanced functions, such as process isolation, file caching,  and swapping. As such, it is imperative that an administrator understand the  functions and tunable parameters of an operating system's Virtual Memory Manager  so that optimal performance for a given workload may be achieved. After reading  this article, the reader should have a rudimentary understanding of the data the  Red Hat Enterprise Linux (RHEL3) VM controls and the algorithms it uses.  Further, the reader should have a fairly good understanding of general Linux VM  tuning techniques. It is important to note that Linux as an operating system has  a proud legacy of overhaul. Items which no longer serve useful purposes or which  have better implementations as technology advances are phased out. This implies  that the tuning parameters described in this article may be out of date if you  are using a newer or older kernel. Fear not however! With a well grounded  understanding of the general mechanics of a VM, it is fairly easy to convert  knowledge of VM tuning to another VM. The same general principles apply, and  documentation for a given kernel (including its specific tunable parameters) can  be found in the corresponding kernel source tree under the file &lt;CODE  class=filename&gt;Documentation/sysctl/vm.txt&lt;/CODE&gt;.&lt;/P&gt; &lt;H2 id=definitions&gt;Definitions&lt;/H2&gt; &lt;P&gt;To properly understand how a Virtual Memory Manager does its job, it helps to  understand what components comprise a VM. While the low level view of a VM are  overwhelming for most, a high level view is necessary to understand how a VM  works and how it can be optimized for workloads.&lt;/P&gt; &lt;H3 id=what-comprises&gt;What Comprises a VM&lt;/H3&gt;&lt;A id=fig-vm-toplevel  name=fig-vm-toplevel&gt;&lt;/A&gt; &lt;DIV class=mediaobject&gt;&lt;IMG alt="High Level Overview of VM Subsystem"  src="http://www.redhat.com/magazine/001nov04/features/vm/figs/vm-toplevel.png"&gt;  &lt;/DIV&gt; &lt;DIV class=caption&gt;Figure 1. High Level Overview of VM Subsystem&lt;/DIV&gt; &lt;P&gt;The inner workings of the Linux virtual memory subsystem are quite complex,  but it can be defined at a high level with the following components:&lt;/P&gt; &lt;H4 id=mmu&gt;MMU&lt;/H4&gt; &lt;P&gt;The Memory Management Unit (MMU) is the hardware base that makes a VM system  possible. The MMU allows software to reference physical memory by aliased  addresses, quite often more than one. It accomplishes this through the use of  pages and page tables. The MMU uses a section of memory to translate virtual  addresses into physical addresses via a series of table lookups.&lt;/P&gt; &lt;H4 id=zoned-buddy-allocator&gt;Zoned Buddy Allocator&lt;/H4&gt; &lt;P&gt;The Zoned Buddy Allocator is responsible for the management of page  allocations to the entire system. This code manages lists of physically  contiguous pages and maps them into the MMU page tables, so as to provide other  kernel subsystems with valid physical address ranges when the kernel requests  them (Physical to Virtual Address mapping is handled by a higher layer of the  VM). The name Buddy Allocator is derived from the algorithm this subsystem uses  to maintain it free page lists. All physical pages in RAM are cataloged by the  Buddy Allocator and grouped into lists. Each list represents clusters of 2n  pages, where n is incremented in each list. If no entries exist on the requested  list, an entry from the next list up is broken into two separate clusters and is  returned to the caller while the other is added to the next list down. When an  allocation is returned to the buddy allocator, the reverse process happens. Note  that the Buddy Allocator also manages memory zones, which define pools of memory  which have different purposes. Currently there are three memory pools which the  Buddy Allocator manages accesses for:&lt;/P&gt; &lt;UL&gt;   &lt;LI&gt;   &lt;P&gt;DMA &amp;#8212; This zone consists of the first 16 MB of RAM, from which legacy    devices allocate to perform direct memory operations.&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;NORMAL &amp;#8212; This zone encompasses memory addresses from 16 MB to 1 GB and is    used by the kernel for internal data structures as well as other system and    user space allocations.&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;HIGHMEM &amp;#8212; This zone includes all memory above 1 GB and is used exclusively    for system allocations (file system buffers, user space allocations,    etc).&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt; &lt;H4 id=slab-allocator&gt;Slab Allocator&lt;/H4&gt; &lt;P&gt;The Slab Allocator provides a more usable front end to the Buddy Allocator  for those sections of the kernel which require memory in sizes that are more  flexible than the standard 4 KB page. The Slab Allocator allows other kernel  components to create caches of memory objects of a given size. The Slab  Allocator is responsible for placing as many of the cache's objects on a page as  possible and monitoring which objects are free and which are allocated. When  allocations are requested and no more are available, the Slab Allocator requests  more pages from the Buddy Allocator to satisfy the request. This allows kernel  components to use memory in a much simpler way. This way components which make  use of many small portions of memory are not required to individually implement  memory management code so that too many pages are not wasted. The Slab Allocator  may only allocate from the DMA and NORMAL zones.&lt;/P&gt; &lt;H3 id=kernel-threads&gt;Kernel Threads&lt;/H3&gt; &lt;P&gt;The last component in the VM subsystem are the kernel threads: &lt;CODE  class=filename&gt;kscand&lt;/CODE&gt;, &lt;CODE class=filename&gt;kswapd&lt;/CODE&gt;, &lt;CODE  class=filename&gt;kupdated&lt;/CODE&gt;, and &lt;CODE class=filename&gt;bdflush&lt;/CODE&gt;. These  tasks are responsible for the recovery and management of in use memory. All  pages of memory have an associated state (for more information on the memory  state machine, refer to &lt;A title="The Life of a Page"  href="http://www.redhat.com/magazine/001nov04/features/vm/#life-page"&gt;the  section called &amp;#8220;The Life of a Page&amp;#8221;&lt;/A&gt; section. In general, the active tasks in  the kernel related to VM usage are responsible for attempting to move pages out  of RAM. Periodically they examine RAM, trying to identify and free inactive  memory so that it can be put to other uses in the system.&lt;/P&gt; &lt;H2 id=life-page&gt;The Life of a Page&lt;/H2&gt; &lt;P&gt;All of the memory managed by the VM is labeled by a state. These states help  let the VM know what to do with a given page under various circumstances.  Dependent on the current needs of the system, the VM may transfer pages from one  state to the next, according to the state machine in &lt;A  title="Figure 2. VM Page State Machine"  href="http://www.redhat.com/magazine/001nov04/features/vm/#vm-page-state-machine"&gt;Figure  2. &amp;#8220;VM Page State Machine&amp;#8221;&lt;/A&gt;. Using these states, the VM can determine what is  being done with a page by the system at a given time and what actions the VM may  take on the page. The states that have particular meanings are as follows: &lt;/P&gt; &lt;OL&gt;   &lt;LI&gt;   &lt;P&gt;FREE &amp;#8212; All pages available for allocation begin in this state. This    indicates to the VM that the page is not being used for any purpose and is    available for allocation.&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;ACTIVE &amp;#8212; Pages which have been allocated from the Buddy Allocator enter    this state. It indicates to the VM that the page has been allocated and is    actively in use by the kernel or a user process. &lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;INACTIVE DIRTY &amp;#8212; This state indicates that the page has fallen into disuse    by the entity which allocated it and thus is a candidate for removal from main    memory. The &lt;CODE class=filename&gt;kscand&lt;/CODE&gt; task periodically sweeps    through all the pages in memory, taking note of the amount of time the page    has been in memory since it was last accessed. If &lt;CODE    class=filename&gt;kscand&lt;/CODE&gt; finds that a page has been accessed since it last    visited the page, it increments the page's age counter; otherwise, it    decrements that counter. If &lt;CODE class=filename&gt;kscand&lt;/CODE&gt; finds a page    with its age counter at zero, it moves the page to the inactive dirty state.    Pages in the inactive dirty state are kept in a list of pages to be    laundered.&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;INACTIVE LAUNDERED &amp;#8212; This is an interim state in which those pages which    have been selected for removal from main memory enter while their contents are    being moved to disk. Only pages which were in the inactive dirty state can    enter this state. When the disk I/O operation is complete, the page is moved    to the inactive clean state, where it may be deallocated or overwritten for    another purpose. If, during the disk operation, the page is accessed, the page    is moved back into the active state.&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;INACTIVE CLEAN &amp;#8212; Pages in this state have been laundered. This means that    the contents of the page are in sync with the backed up data on disk. Thus,    they may be deallocated by the VM or overwritten for other  purposes.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;A id=vm-page-state-machine  name=vm-page-state-machine&gt;&lt;/A&gt; &lt;DIV class=mediaobject&gt;&lt;IMG alt="VM Page State Machine"  src="http://www.redhat.com/magazine/001nov04/features/vm/figs/vm-state-machine.png"&gt;  &lt;/DIV&gt; &lt;DIV class=caption&gt;Figure 2. VM Page State Machine&lt;/DIV&gt; &lt;H2 id=tuning-vm&gt;Tuning the VM&lt;/H2&gt; &lt;P&gt;Now that the picture of the VM mechanism is sufficiently illustrated, how is  it adjusted to fit certain workloads? There are two methods for changing tunable  parameters in the Linux VM. The first is the sysctl interface. The sysctl  interface is a programming oriented interface, which allows software programs to  modify various tunable parameters directly. It is exported to system  administrators via the sysctl utility, which allows an administrator to specify  a value for any of the tunable VM parameters via the command line. For example:  &lt;/P&gt;&lt;PRE&gt;&lt;CODE class=command&gt;sysctl -w vm.max map count=65535&lt;/CODE&gt; &lt;/PRE&gt; &lt;P&gt;The sysctl utility also supports the use of a configuration file (&lt;CODE  class=filename&gt;/etc/sysctl.conf&lt;/CODE&gt;), in which all the desirable changes to a  VM can be recorded for a system and restored after a restart of the operating  system, making this access method suitable for long term changes to a system VM.  The file is straightforward in its layout, using simple key-value pairs with  comments for clarity. For example:&lt;/P&gt;&lt;PRE&gt;&lt;TT class=computeroutput&gt; #Adjust the min and max read-ahead for files vm.max-readahead=64 vm.min-readahead=32 #turn on memory over-commit  vm.overcommit_memory=2 #bump up the percentage of memory in use to activate bdflush vm.bdflush="40 500 0 0 500 3000 60 20 0" &lt;/TT&gt; &lt;/PRE&gt; &lt;P&gt;The second method of modifying VM tunable parameters is via the proc file  system. This method exports every group of VM tunables as a virtual file,  accessible via all the common Linux utilities used for modifying file contents.  The VM tunables are available in the directory &lt;CODE  class=filename&gt;/proc/sys/vm/&lt;/CODE&gt; and are most commonly read and modified  using the &lt;CODE class=command&gt;cat&lt;/CODE&gt; and &lt;CODE class=command&gt;echo&lt;/CODE&gt;  commands. For example, use the command &lt;CODE class=command&gt;cat  /proc/sys/vm/kswapd&lt;/CODE&gt; to view the current value of the &lt;CODE  class=filename&gt;kswapd&lt;/CODE&gt; tunable. The output should be similar to:&lt;/P&gt;&lt;PRE&gt;&lt;TT class=computeroutput&gt; 512 32 8 &lt;/TT&gt; &lt;/PRE&gt; &lt;P&gt;Then, use the following command to modify the value of the tunable: &lt;/P&gt;&lt;PRE&gt;&lt;CODE class=command&gt;echo 511 31 7 &amp;gt; /proc/sys/vm/kswapd&lt;/CODE&gt; &lt;/PRE&gt; &lt;P&gt;Use the &lt;CODE class=command&gt;cat /proc/sys/vm/kswapd&lt;/CODE&gt; command again to  verify that the value was modified. The output should be:&lt;/P&gt;&lt;PRE&gt;&lt;TT class=computeroutput&gt; 511 31 7 &lt;/TT&gt; &lt;/PRE&gt; &lt;P&gt;The proc file system interface is a convenient method for making adjustments  to the VM while attempting to isolate the peak performance of a system. For  convenience, the following sections list the VM tunable parameters as the  filenames they are exported to in the &lt;CODE class=filename&gt;/proc/sys/vm/&lt;/CODE&gt;  directory. Unless otherwise noted, these tunables apply to the RHEL3 2.4.21-4  kernel.&lt;/P&gt; &lt;H3 id=bdflush&gt;bdflush&lt;/H3&gt; &lt;P&gt;The &lt;CODE class=filename&gt;bdflush&lt;/CODE&gt; file contains 9 parameters, of which  6 are tunable. These parameters affect the rate at which pages in the buffer  cache (the subset of pagecache which stores files in memory) are freed and  returned to disk. By adjusting the various values in this file, a system can be  tuned to achieve better performance in environments where large amounts of file  I/O are performed. &lt;A title="Table 1. bdflush Parameters"  href="http://www.redhat.com/magazine/001nov04/features/vm/#bdflush-params"&gt;Table  1. &amp;#8220;bdflush Parameters&amp;#8221;&lt;/A&gt; defines the parameters for &lt;CODE  class=filename&gt;bdflush&lt;/CODE&gt; in the order they appear in the file.&lt;/P&gt;&lt;A  id=bdflush-params name=bdflush-params&gt;&lt;/A&gt; &lt;TABLE class=basic4 cellSpacing=0 summary="bdflush Parameters"&gt;   &lt;COLGROUP&gt;   &lt;COL&gt;   &lt;COL&gt;&lt;/COLGROUP&gt;   &lt;THEAD&gt;   &lt;TR&gt;     &lt;TH&gt;Parameter&lt;/TH&gt;     &lt;TH&gt;Description&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;nfract&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The percentage of dirty pages in the buffer cache required to activate        the &lt;CODE class=filename&gt;bdflush&lt;/CODE&gt; task&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;ndirty&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The maximum number of dirty pages in the buffer cache to write to disk        in each &lt;CODE class=filename&gt;bdflush&lt;/CODE&gt; execution&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;reserved1&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;Reserved for future use&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;reserved2&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;Reserved for future&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;interval&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The number of jiffies (10ms periods) to delay between &lt;CODE        class=filename&gt;bdflush&lt;/CODE&gt; iterations&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;age_buffer&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The time for a normal buffer to age before it is considered for        flushing back to disk &lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;nfract_sync&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The percentage of dirty pages in the buffer cache required to cause        the tasks which are writing pages of memory to begin writing those pages        to disk instead&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;nfract_stop_bdflush&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The percentage of dirty pages in buffer cache required to allow &lt;CODE        class=filename&gt;bdflush&lt;/CODE&gt; to return to idle state&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;reserved3&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;Reserved for future use&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;DIV class=caption&gt;Table 1. &lt;CODE class=filename&gt;bdflush&lt;/CODE&gt; Parameters&lt;/DIV&gt; &lt;P&gt;Generally, systems that require more free memory for application allocation  want to set the &lt;CODE class=filename&gt;bdflush&lt;/CODE&gt; values higher (except for  the &lt;CODE class=filename&gt;age_buffer&lt;/CODE&gt;, which would be moved lower), so that  file data is sent to disk more frequently and in greater volume, thus freeing up  pages of RAM for application use. This, of course, comes at the expense of CPU  cycles because the system processor spends more time moving data to disk and  less time running applications. Conversely, systems which are required to  perform large amounts of I/O would want to do the opposite to these values,  allowing more RAM to be used to cache disk file so that file access is faster.  &lt;/P&gt; &lt;H3 id=dcache-priority&gt;dcache_priority&lt;/H3&gt; &lt;P&gt;This file controls the bias of the priority for caching directory contents.  When the system is under stress, it selectively reduces the size of various file  system caches in an effort to reclaim memory. By increasing this value, memory  reclamation bias is shifted away from the dirent cache. By reducing this amount,  the bias is shifted towards reclaiming dirent memory. This is not a particularly  useful tuning parameter, but it can be helpful in maintaining the interactive  response time on an otherwise heavily loaded system. If you experience  intolerable delays in communicating with your system when it is busy performing  other work, increasing this parameter may help.&lt;/P&gt; &lt;H3 id=hugetlb&gt;hugetlb_pool&lt;/H3&gt; &lt;P&gt;The &lt;CODE class=filename&gt;hugetlb_pool&lt;/CODE&gt; file is responsible for  recording the number of megabytes used for huge pages. Huge pages are just like  regular pages in the VM, only they are an order of magnitude larger. Note also  that huge pages are not swappable. Huge pages are both beneficial and  detrimental to a system. They are helpful in that each huge page takes only one  set of entries in the VM page tables, which allows for a higher degree of  virtual address caching in the TLB (Translation Look-aside Buffer: A device  which caches virtual address translations for faster lookups) and a requisite  performance improvement. On the downside, they are very large and can be  wasteful of memory resources for those applications which do not need large  amounts of memory. Some applications, however, do require large amounts of  memory and can make good use of huge pages if they are written to be aware of  them. If a system is running applications which require large amounts of memory  and is aware of this feature, then it is advantageous to increase this value to  an amount satisfactory to that application or set of applications.&lt;/P&gt; &lt;H3 id=inactive-clean-percent&gt;inactive_clean_percent&lt;/H3&gt; &lt;P&gt;This control specifies the minimum percentage of pages in each page zone that  must be in the clean or laundered state. If any zone drops below this threshold,  and the system is under pressure for more memory, then that zone will begin  having its inactive dirty pages laundered. Note that this control is only  available on the 2.4.21-5EL kernels forward. Raising the value for the  corresponding zone which is memory starved causes pages to be paged out more  quickly, eliminating memory starvation at the expense of CPU clock cycles.  Lowering this number allows more data to remain in RAM, increasing the system  performance but at the risk of memory starvation.&lt;/P&gt; &lt;H3 id=kswapd&gt;kswapd&lt;/H3&gt; &lt;P&gt;While this set of parameters previously defined how frequently and in what  volume a system moved non-buffer cache pages to disk, in Red Hat Enterprise  Linux 3, these controls are unused.&lt;/P&gt; &lt;H3 id=max-map-count&gt;max_map_count&lt;/H3&gt; &lt;P&gt;The &lt;CODE class=filename&gt;max_map_count&lt;/CODE&gt; file allows for the restriction  of the number of VMAs (Virtual Memory Areas) that a particular process can own.  A Virtual Memory Area is a contiguous area of virtual address space. These areas  are created during the life of the process when the program attempts to memory  map a file, links to a shared memory segment, or allocates heap space. Tuning  this value limits the amount of these VMAs that a process can own. Limiting the  amount of VMAs a process can own can lead to problematic application behavior  because the system will return out of memory errors when a process reaches its  VMA limit but can free up lowmem for other kernel uses. If your system is  running low on memory in the NORMAL zone, then lowering this value will help  free up memory for kernel use.&lt;/P&gt; &lt;H3 id=max-readahead&gt;max-readahead&lt;/H3&gt; &lt;P&gt;The &lt;CODE class=filename&gt;max-readahead&lt;/CODE&gt; tunable affects how early the  Linux VFS (Virtual File System) fetches the next block of a file from memory.  File readahead values are determined on a per file basis in the VFS and are  adjusted based on the behavior of the application accessing the file. Anytime  the current position being read in a file plus the current read ahead value  results in the file pointer pointing to the next block in the file, that block  is fetched from disk. By raising this value, the Linux kernel allows the  readahead value to grow larger, resulting in more blocks being prefetched from  disks which predictably access files in uniform linear fashion. This can result  in performance improvements but can also result in excess (and often  unnecessary) memory usage. Lowering this value has the opposite affect. By  forcing readaheads to be less aggressive, memory may be conserved at a potential  performance impact.&lt;/P&gt; &lt;H3 id=min-readahead&gt;min-readahead&lt;/H3&gt; &lt;P&gt;Like &lt;CODE class=filename&gt;max-readahead&lt;/CODE&gt;, &lt;CODE  class=filename&gt;min-readahead&lt;/CODE&gt; places a floor on the readahead value.  Raising this number forces a file's readahead value to be unconditionally  higher, which can bring about performance improvements provided that all file  access in the system is predictably linear from the start to the end of a file.  This, of course, results in higher memory usage from the pagecache. Conversely,  lowering this value, allows the kernel to conserve pagecache memory at a  potential performance cost.&lt;/P&gt; &lt;H3 id=overcommit-memory&gt;overcommit_memory&lt;/H3&gt; &lt;P&gt;&lt;CODE class=filename&gt;overcommit_memory&lt;/CODE&gt; is a value which sets the  general kernel policy toward granting memory allocations. If the value is 0,  then the kernel checks to determine if there is enough memory free to grant a  memory request to a malloc call from an application. If there is enough memory,  then the request is granted. Otherwise, it is denied and an error code is  returned to the application. If the setting in this file is 1, the kernel allows  all memory allocations, regardless of the current memory allocation state. If  the value is set to 2, then the kernel grants allocations above the amount of  physical RAM and swap in the system as defined by the &lt;CODE  class=filename&gt;overcommit_ratio&lt;/CODE&gt; value. Enabling this feature can be  somewhat helpful in environments which allocate large amounts of memory  expecting worst case scenarios but do not use it all.&lt;/P&gt; &lt;H3 id=overcommit-ratio&gt;overcommit_ratio&lt;/H3&gt; &lt;P&gt;The &lt;CODE class=filename&gt;overcommit_ratio&lt;/CODE&gt; tunable defines the amount  by which the kernel overextends its memory resources in the event that &lt;CODE  class=filename&gt;overcommit_memory&lt;/CODE&gt; is set to the value of 2. The value in  this file represents a percentage added to the amount of actual RAM in a system  when considering whether to grant a particular memory request. For instance, if  this value is set to 50, then the kernel would treat a system with 1 GB of RAM  and 1 GB of swap as a system with 2.5 GB of allocatable memory when considering  whether to grant a malloc request from an application. The general formula for  this tunable is:&lt;/P&gt;&lt;PRE&gt;allocatable memory=(swap size + (RAM size * overcommit ratio)) &lt;/PRE&gt; &lt;P&gt;Use these previous two parameters with caution. Enabling &lt;CODE  class=filename&gt;overcommit_memory&lt;/CODE&gt; can create significant performance gains  at little cost but only if your applications are suited to its use. If your  applications use all of the memory they allocate, memory overcommit can lead to  short performance gains followed by long latencies as your applications are  swapped out to disk frequently when they must compete for oversubscribed RAM.  Also, ensure that you have at least enough swap space to cover the  overallocation of RAM (meaning that your swap space should be at least big  enough to handle the percentage if overcommit in addition to the regular 50  percent of RAM that is normally recommended).&lt;/P&gt; &lt;H3 id=pagecache&gt;pagecache&lt;/H3&gt; &lt;P&gt;The &lt;CODE class=filename&gt;pagecache&lt;/CODE&gt; file adjusts the amount of RAM  which can be used by the page cache. The page cache holds various pieces of  data, such as open files from disk, memory mapped files, and pages of executable  programs. Modifying the values in this file dictates how much of memory is used  for this purpose. &lt;A title="Table 2. pagecache Parameters"  href="http://www.redhat.com/magazine/001nov04/features/vm/#pagecache-parameters"&gt;Table  2. &amp;#8220;pagecache Parameters&amp;#8221;&lt;/A&gt; defines the parameters for pagecache in the order  they appear in the file.&lt;/P&gt;&lt;A id=pagecache-parameters  name=pagecache-parameters&gt;&lt;/A&gt; &lt;TABLE class=basic4 cellSpacing=0 summary="pagecache Parameters"&gt;   &lt;COLGROUP&gt;   &lt;COL&gt;   &lt;COL&gt;&lt;/COLGROUP&gt;   &lt;THEAD&gt;   &lt;TR&gt;     &lt;TH&gt;Parameter&lt;/TH&gt;     &lt;TH&gt;Description&lt;/TH&gt;&lt;/TR&gt;&lt;/THEAD&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;min&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The minimum amount of memory to reserve for pagecache use.&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;borrow&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;The percentage of pagecache pages &lt;CODE class=filename&gt;kswapd&lt;/CODE&gt;        uses to balance the reclaiming of pagecache pages and process  memory.&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;CODE class=filename&gt;max&lt;/CODE&gt; &lt;/TD&gt;     &lt;TD&gt;If more memory than this percentage is used by pagecache, &lt;CODE        class=filename&gt;kswapd&lt;/CODE&gt; only evicts pages from the pagecache. Once        the amount of memory in pagecache is below this threshold, &lt;CODE        class=filename&gt;kswapd&lt;/CODE&gt; begins moving process pages to swap    again.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;DIV class=caption&gt;Table 2. &lt;CODE class=filename&gt;pagecache&lt;/CODE&gt;  Parameters&lt;/DIV&gt; &lt;P&gt;Increasing these values allows more programs and cached files to stay in  memory longer, thereby allowing applications to execute more quickly. On memory  starved systems, however, this may lead to application delays as processes must  wait for memory to become available. Moving these values downward swaps  processes and other disk-backed data out more quickly, allowing for other  processes to obtain memory more easily and increasing execution speed. For most  workloads the automatic tuning is sufficient. However, if your workload suffers  from excessive swapping and a large cache, you may want to reduce the values  until the swapping problem goes away.&lt;/P&gt; &lt;H3 id=page-cluster&gt;page-cluster&lt;/H3&gt; &lt;P&gt;The kernel attempts to read multiple pages from disk on a page fault to avoid  excessive seeks on the hard drive. This parameter defines the number of pages  the kernel tries to read from memory during each page fault. The value is  interpreted as 2&lt;SUP&gt;page-cluster&lt;/SUP&gt; pages for each page fault. A page fault  is encountered every time a virtual memory address is accessed for which there  is not yet a corresponding physical page assigned or for which the corresponding  physical page has been swapped to disk. If the memory address has been requested  in a valid way (for example, the application contains the address in its virtual  memory map), then the kernel associates a page of RAM with the address or  retrieves the page from disk and places it back in RAM. Then the kernel restarts  the application from where it left off. By increasing the &lt;CODE  class=filename&gt;page-cluster&lt;/CODE&gt; value, pages subsequent to the requested page  are also retrieved, meaning that if the workload of a particular system accesses  data in RAM in a linear fashion, increasing this parameter can provide  significant performance gains (much like the file readahead parameters described  earlier). Of course if your workload accesses data discreetly in many separate  areas of memory, then this can just as easily cause performance degradation.&lt;/P&gt; &lt;H2 id=example-scenarios&gt;Example Scenarios&lt;/H2&gt; &lt;P&gt;Now that we have covered the details of kernel tuning, let us look at some  example workloads and the various tuning parameters that may improve system  performance.&lt;/P&gt; &lt;H3 id=file-server&gt;File (IMAP, Web, etc.) Server&lt;/H3&gt; &lt;P&gt;This workload is geared towards performing a large amount of I/O to and from  the local disk, thus benefiting from an adjustment allowing more files to be  maintained in RAM. This speeds up I/O by caching more files in RAM and  eliminating the need to wait for disk I/O to complete. A simple change to &lt;CODE  class=filename&gt;sysctl.conf&lt;/CODE&gt; as follows usually benefits this workload:  &lt;/P&gt;&lt;PRE&gt;&lt;TT class=computeroutput&gt; #increase the amount of RAM pagecache is allowed to use  #before we start moving it back to disk  vm.pagecache="10 40 100" &lt;/TT&gt; &lt;/PRE&gt; &lt;H3 id=general-compute-server&gt;General Compute Server With Many Active Users&lt;/H3&gt; &lt;P&gt;This workload is a very general type of configuration. It involves many  active users who likely run many processes, all of which may or may not be CPU  intensive or I/O intensive or a combination thereof. As the default VM  configuration attempts to find a balance between I/O and process memory usage,  it may be best to leave most configuration settings alone in this case. However,  this environment likely contains many small processes which, regardless of  workload, consume memory resources, particularly lowmem. It may help, therefore,  to tune the VM to conserve low memory resources when possible:&lt;/P&gt;&lt;PRE&gt;&lt;TT class=computeroutput&gt; #lower the pagecache max to keep from eating all memory up with cache  vm.pagecache=10 25 50  #lower max-readahead to reduce the amount of unneeded IO  vm.max-readahead=16 &lt;/TT&gt; &lt;/PRE&gt; &lt;H3 id=batch-computing-server&gt;Non interactive (Batch) Computing Server&lt;/H3&gt; &lt;P&gt;A batch computing server is usually the exact opposite of a file server.  Applications run without human interaction, and they commonly perform with  little I/O. The number of processes running on controlled. Consequently this  system should allow maximum throughput:&lt;/P&gt;&lt;PRE&gt;&lt;TT class=computeroutput&gt; #Reduce the amount of pagecache normally allowed vm.pagecache="1 10 100" #do not worry about conserving lowmem, not that many processes vm.max_map_count=128000 14 #crank up overcommit, processes can sleep as they are not interactive vm.overcommit=2  vm.overcommit_ratio=75 &lt;/TT&gt; &lt;/PRE&gt; &lt;H2 id=further-reading&gt;Further Reading&lt;/H2&gt; &lt;OL&gt;   &lt;LI&gt;   &lt;P&gt;&lt;I class=citetitle&gt;Understanding the Linux Kernel&lt;/I&gt; by Daniel Bovet and    Marco Cesati (O'Reilly &amp;amp; Associates)&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;&lt;I class=citetitle&gt;&lt;A    href="http://people.redhat.com/nmurray/RHEL-2.1-VM-whitepaper.pdf"&gt;Virtual    Memory Behavior in Red Hat Enterprise Linux AS 2.1&lt;/A&gt;&lt;/I&gt; by Bob Matthews and    Norm Murray&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;&lt;I class=citetitle&gt;&lt;A href="http://surriel.com/lectures/ols2003/"&gt;Towards    an O(1) VM&lt;/A&gt;&lt;/I&gt; by Rik Van Riel&lt;/P&gt;   &lt;LI&gt;   &lt;P&gt;&lt;I class=citetitle&gt;&lt;A    href="http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.21.tar.bz2"&gt;The    Linux Kernel Source Tree, versions 2.4.21-4EL &amp;amp; 2.4.21-5EL&lt;/A&gt;    &lt;/I&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-5625220278710312650?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/5625220278710312650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=5625220278710312650&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5625220278710312650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5625220278710312650'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/04/understanding-virtual-memory-linux.html' title='Understanding Virtual Memory -Linux'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-7389753422341055790</id><published>2007-03-07T01:35:00.001-08:00</published><updated>2007-03-07T01:35:42.129-08:00</updated><title type='text'>Cool Unix Commands </title><content type='html'>&lt;H1&gt;Cool Commands &lt;/H1&gt;&lt;I&gt;  &lt;P&gt;Peter Baer Galvin &lt;/P&gt;&lt;/I&gt;  &lt;P&gt;There are so many commands in Solaris that it is difficult to separate the   cool ones from the mundane. For example, there are commands to report how much   time a program spends in each system call, and commands to dynamically show   system activities, and most of these commands are included with Solaris 8 as   well as Solaris 9. This month, Iâ€™m highlighting some of the commands that you   might find particularly useful. &lt;/P&gt;  &lt;P&gt;Systems administrators are tool users. Through experience, we have learned   that the more tools we have, the better able we are to diagnose problems and   implement solutions. The commands included in this column are gleaned from   experience, friends, acquaintances, and from attendance at the SunNetwork 2002   conference in September. â€œThe /procodile Hunterâ€ talk by Solaris kernel   developers Brian Cantrill and Mike Shapiro was especially enlightening and   frightening because Cantrill wrote code to illustrate a point faster than   Shapiro could explain the point they were trying to illustrate! &lt;/P&gt;&lt;B&gt;  &lt;P&gt;Useful Solaris Commands &lt;/P&gt;  &lt;P&gt;truss -c&lt;/B&gt; (Solaris &amp;gt;= 8): This astounding option to truss provides a   profile summary of the command being trussed: &lt;/P&gt;&lt;PRE&gt;$ truss -c grep asdf work.doc  syscall              seconds   calls  errors  _exit                    .00       1  read                     .01      24  open                     .00       8      4  close                    .00       5  brk                      .00      15  stat                     .00       1  fstat                    .00       4  execve                   .00       1  mmap                     .00      10  munmap                   .01       3  memcntl                  .00       2  llseek                   .00       1  open64                   .00       1                          ----     ---    ---  sys totals:              .02      76      4  usr time:                .00  elapsed:                 .05&lt;/PRE&gt;  &lt;P&gt;It can also show profile data on a running process. In this case, the data   shows what the process did between when &lt;B&gt;truss&lt;/B&gt; was started and when   &lt;B&gt;truss&lt;/B&gt; execution was terminated with a control-c. Itâ€™s ideal for   determining why a process is hung without having to wade through the pages of   &lt;B&gt;truss&lt;/B&gt; output. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;truss -d&lt;/B&gt; and &lt;B&gt;truss -D&lt;/B&gt; (Solaris &amp;gt;= 8): These &lt;B&gt;truss&lt;/B&gt;   options show the time associated with each system call being shown by truss and   is excellent for finding performance problems in custom or commercial code. For   example: &lt;/P&gt;&lt;PRE&gt;$ truss -d who  Base time stamp:  1035385727.3460  [ Wed Oct 23 11:08:47 EDT 2002 ]   0.0000 execve(â€œ/usr/bin/whoâ€, 0xFFBEFD5C, 0xFFBEFD64)  argc = 1   0.0032 stat(â€œ/usr/bin/whoâ€, 0xFFBEFA98)                = 0   0.0037 open(â€œ/var/ld/ld.configâ€, O_RDONLY)             Err#2 ENOENT   0.0042 open(â€œ/usr/local/lib/libc.so.1â€, O_RDONLY)      Err#2 ENOENT   0.0047 open(â€œ/usr/lib/libc.so.1â€, O_RDONLY)            = 3   0.0051 fstat(3, 0xFFBEF42C)                            = 0  . . .&lt;/PRE&gt;&lt;B&gt;  &lt;P&gt;truss -D&lt;/B&gt; is even more useful, showing the time delta between system   calls: &lt;/P&gt;&lt;PRE&gt;Dilbert&amp;gt; truss -D who   0.0000 execve(â€œ/usr/bin/whoâ€, 0xFFBEFD5C, 0xFFBEFD64)  argc = 1   0.0028 stat(â€œ/usr/bin/whoâ€, 0xFFBEFA98)                = 0   0.0005 open(â€œ/var/ld/ld.configâ€, O_RDONLY)             Err#2 ENOENT   0.0006 open(â€œ/usr/local/lib/libc.so.1â€, O_RDONLY)      Err#2 ENOENT   0.0005 open(â€œ/usr/lib/libc.so.1â€, O_RDONLY)            = 3   0.0004 fstat(3, 0xFFBEF42C)                            = 0&lt;/PRE&gt;  &lt;P&gt;In this example, the &lt;B&gt;stat&lt;/B&gt; system call took a lot longer than the   others. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;truss -T&lt;/B&gt;: This is a great debugging help. It will stop a process at the   execution of a specified system call. (â€œ-Uâ€ does the same, but with   user-level function calls.) A core could then be taken for further analysis, or   any of the /proc tools could be used to determine many aspects of the status of   the process. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;truss -l&lt;/B&gt; (improved in Solaris 9): Shows the thread number of each call in   a multi-threaded processes. Solaris 9 &lt;B&gt;truss -l&lt;/B&gt; finally makes it possible   to watch the execution of a multi-threaded application. &lt;/P&gt;  &lt;P&gt;Truss is truly a powerful tool. It can be used on core files to analyze what   caused the problem, for example. It can also show details on user-level library   calls (either system libraries or programmer libraries) via the â€œ-uâ€ option.   &lt;/P&gt;&lt;B&gt;  &lt;P&gt;pkg-get&lt;/B&gt;: This is a nice tool (&lt;B&gt;http://www.bolthole.com/solaris&lt;/B&gt;) for   automatically getting freeware packages. It is configured via   &lt;B&gt;/etc/pkg-get.conf&lt;/B&gt;. Once itâ€™s up and running, execute &lt;B&gt;pkg-get -a&lt;/B&gt;   to get a list of available packages, and &lt;B&gt;pkg-get -i&lt;/B&gt; to get and install a   given package. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;plimit&lt;/B&gt; (Solaris &amp;gt;= 8): This command displays and sets the per-process   limits on a running process. This is handy if a long-running process is running   up against a limit (for example, number of open files). Rather than using   &lt;B&gt;limit&lt;/B&gt; and restarting the command, &lt;B&gt;plimit&lt;/B&gt; can modify the running   process. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;coreadm&lt;/B&gt; (Solaris &amp;gt;= 8): In the â€œoldâ€ days (before &lt;B&gt;coreadm&lt;/B&gt;),   core dumps were placed in the processâ€™s working directory. Core files would   also overwrite each other. All this and more has been addressed by   &lt;B&gt;coreadm&lt;/B&gt;, a tool to manage core file creation. With it, you can specify   whether to save cores, where cores should be stored, how many versions should be   retained, and more. Settings can be retained between reboots by &lt;B&gt;coreadm&lt;/B&gt;   modifying &lt;B&gt;/etc/coreadm.conf&lt;/B&gt;. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;pgrep&lt;/B&gt; (Solaris &amp;gt;= 8): &lt;B&gt;pgrep&lt;/B&gt; searches through /proc for   processes matching the given criteria, and returns their process-ids. A great   option is â€œ-nâ€, which returns the newest process that matches. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;preap&lt;/B&gt; (Solaris &amp;gt;= 9): Reaps zombie processes. Any processes stuck in   the â€œzâ€ state (as shown by &lt;B&gt;ps&lt;/B&gt;), can be removed from the system with   this command. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;pargs&lt;/B&gt; (Solaris &amp;gt;= 9): Shows the arguments and environment variables of   a process. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;nohup -p&lt;/B&gt; (Solaris &amp;gt;= 9): The &lt;B&gt;nohup&lt;/B&gt; command can be used to start   a process, so that if the shell that started the process closes (i.e., the   process gets a â€œSIGHUPâ€ signal), the process will keep running. This is   useful for backgrounding a task that should continue running no matter what   happens around it. But what happens if you start a process and later want to   HUP-proof it? With Solaris 9, &lt;B&gt;nohup -p&lt;/B&gt; takes a process-id and causes   SIGHUP to be ignored. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;prstat&lt;/B&gt; (Solaris &amp;gt;= 8): &lt;B&gt;prstat&lt;/B&gt; is &lt;B&gt;top&lt;/B&gt; and a lot more.   Both commands provide a screenâ€™s worth of process and other information and   update it frequently, for a nice window on system performance. &lt;B&gt;prstat&lt;/B&gt; has   much better accuracy than &lt;B&gt;top&lt;/B&gt;. It also has some nice options. â€œ-aâ€   shows process and user information concurrently (sorted by CPU hog, by default).   â€œ-câ€ causes it to act like &lt;B&gt;vmstat&lt;/B&gt; (new reports printed below old   ones). â€œ-Câ€ shows processes in a processor set. â€œ-jâ€ shows processes in   a â€œprojectâ€. â€œ-Lâ€ shows per-thread information as well as per-process.   â€œ-mâ€ and â€œ-vâ€ show quite a bit of per-process performance detail   (including pages, traps, lock wait, and CPU wait). The output data can also be   sorted by resident-set (real memory) size, virtual memory size, execute time,   and so on. &lt;B&gt;prstat&lt;/B&gt; is very useful on systems without &lt;B&gt;top&lt;/B&gt;, and   should probably be used instead of &lt;B&gt;top&lt;/B&gt; because of its accuracy (and some   sites care that it is a supported program). &lt;/P&gt;&lt;B&gt;  &lt;P&gt;trapstat&lt;/B&gt; (Solaris &amp;gt;= 9): &lt;B&gt;trapstat&lt;/B&gt; joins &lt;B&gt;lockstat&lt;/B&gt; and   &lt;B&gt;kstat&lt;/B&gt; as the most inscrutable commands on Solaris. Each shows gory   details about the innards of the running operating system. Each is indispensable   in solving strange happenings on a Solaris system. Best of all, their output is   good to send along with bug reports, but further study can reveal useful   information for general use as well. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;vmstat -p&lt;/B&gt; (Solaris &amp;gt;= 8): Until this option became available, it was   almost impossible (see the â€œse toolkitâ€) to determine what kind of memory   demand was causing a system to page. &lt;B&gt;vmstat -p&lt;/B&gt; is key because it not only   shows whether your system is under memory stress (via the â€œsrâ€ column), it   also shows whether that stress is from application code, application data, or   I/O. â€œ-pâ€ can really help pinpoint the cause of any mysterious memory issues   on Solaris. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;pmap -x&lt;/B&gt; (Solaris &amp;gt;= 8, bugs fixed in Solaris &amp;gt;= 9): If the process   with memory problems is known, and more details on its memory use are needed,   check out &lt;B&gt;pmap -x&lt;/B&gt;. The target process-id has its memory map fully   explained, as in: &lt;/P&gt;&lt;PRE&gt;# pmap -x 1779  1779:   -ksh   Address  Kbytes     RSS    Anon  Locked Mode   Mapped File  00010000     192     192       -       - r-x--  ksh  00040000       8       8       8       - rwx--  ksh  00042000      32      32       8       - rwx--    [ heap ]  FF180000     680     664       -       - r-x--  libc.so.1  FF23A000      24      24       -       - rwx--  libc.so.1  FF240000       8       8       -       - rwx--  libc.so.1  FF280000     568     472       -       - r-x--  libnsl.so.1  FF31E000      32      32       -       - rwx--  libnsl.so.1  FF326000      32      24       -       - rwx--  libnsl.so.1  FF340000      16      16       -       - r-x--  libc_psr.so.1  FF350000      16      16       -       - r-x--  libmp.so.2  FF364000       8       8       -       - rwx--  libmp.so.2  FF380000      40      40       -       - r-x--  libsocket.so.1  FF39A000       8       8       -       - rwx--  libsocket.so.1  FF3A0000       8       8       -       - r-x--  libdl.so.1  FF3B0000       8       8       8       - rwx--    [ anon ]  FF3C0000     152     152       -       - r-x--  ld.so.1  FF3F6000       8       8       8       - rwx--  ld.so.1  FFBFE000       8       8       8       - rw---    [ stack ]  -------- ------- ------- ------- -------  total Kb    1848    1728      40       -&lt;/PRE&gt;  &lt;P&gt;Here we see each chunk of memory, what it is being used for, how much space   it is taking (virtual and real), and mode information. &lt;/P&gt;&lt;B&gt;  &lt;P&gt;df -h&lt;/B&gt; (Solaris &amp;gt;= 9): This command is popular on Linux, and just made   its way into Solaris. &lt;B&gt;df -h&lt;/B&gt; displays summary information about file   systems in human-readable form: &lt;/P&gt;&lt;PRE&gt;$ df -h  Filesystem             size   used  avail capacity  Mounted on  /dev/dsk/c0t0d0s0      4.8G   1.7G   3.0G    37%    /  /proc                    0K     0K     0K     0%    /proc  mnttab                   0K     0K     0K     0%    /etc/mnttab  fd                       0K     0K     0K     0%    /dev/fd  swap                   848M    40K   848M     1%    /var/run  swap                   849M   1.0M   848M     1%    /tmp  /dev/dsk/c0t0d0s7       13G    78K    13G     1%    /export/home&lt;/PRE&gt;&lt;B&gt;  &lt;P&gt;Conclusion &lt;/P&gt;&lt;/B&gt;  &lt;P&gt;Each administrator has a set of tools used daily, and another set of tools to   help in a pinch. This column included a wide variety of commands and options   that are lesser known, but can be very useful. Do you have favorite tools that   have saved you in a bind? If so, please send them to me so I can expand my tool   set as well. Alternately, send along any tools that you hate or that you feel   are dangerous, which could also turn into a useful column! &lt;/P&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-7389753422341055790?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/7389753422341055790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=7389753422341055790&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/7389753422341055790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/7389753422341055790'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/03/cool-unix-commands.html' title='Cool Unix Commands '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-9067154952715442012</id><published>2007-03-06T03:34:00.001-08:00</published><updated>2007-03-15T23:58:16.249-07:00</updated><title type='text'>HOWTO: Mirrored root disk on Solaris</title><content type='html'>&lt;span style="font-family:Verdana;font-size:85%;color:#000080;"&gt;&lt;p&gt; &lt;/p&gt;&lt;table cellspacing="0" width="624" border="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td valign="top" colspan="2"&gt;&lt;p align="left"&gt;&lt;span style="font-size:85%;color:#000080;"&gt;&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" colspan="2"&gt;&lt;p&gt;&lt;span style="font-size:85%;color:#000080;"&gt;&lt;/span&gt; &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td valign="top" colspan="2"&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;&lt;a href="http://www.brandonhutchinson.com/Mirroring_disks_with_DiskSuite.html"&gt;http://www.brandonhutchinson.com/Mirroring_disks_with_DiskSuite.html&lt;/a&gt; &lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;0. Partition the first disk&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# format c0t0d0&lt;/pre&gt;&lt;p&gt;Use the partition tool (=&amp;gt; "p &amp;lt;enter&amp;gt;, p &amp;lt;enter&amp;gt;"!) to setup the slices. We assume the following slice setup afterwards:&lt;/p&gt;&lt;pre&gt;#  Tag         Flag  Cylinders      Size      Blocks&lt;br /&gt; -  ----------  ----  -------------  --------  --------------------&lt;br /&gt; 0  root        wm        0 -   812  400.15MB  (813/0/0)     819504&lt;br /&gt; 1  swap        wu      813 -  1333  256.43MB  (521/0/0)     525168&lt;br /&gt; 2  backup      wm        0 - 17659    8.49GB  (17660/0/0) 17801280&lt;br /&gt; 3  unassigned  wm     1334 -  1354   10.34MB  (21/0/0)       21168&lt;br /&gt; 4  var         wm     1355 -  8522    3.45GB  (7168/0/0)   7225344&lt;br /&gt; 5  usr         wm     8523 - 14764    3.00GB  (6242/0/0)   6291936&lt;br /&gt; 6  unassigned  wm    14765 - 16845    1.00GB  (2081/0/0)   2097648&lt;br /&gt; 7  home        wm    16846 - 17659  400.15MB  (813/0/0)     819504&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;1. Copy the partition table of the first disk to its future mirror disk&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# prtvtoc /dev/rdsk/c0t0d0s2  fmthard -s - /dev/rdsk/c0t1d0s2&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;2. Create at least two state database replicas on each disk&lt;/strong&gt; &lt;/p&gt;&lt;pre&gt;# metadb -a -f -c 2 c0t0d0s3 c0t1d0s3&lt;/pre&gt;&lt;p&gt;Check the state of all replicas with &lt;em&gt;metadb&lt;/em&gt;: &lt;/p&gt;&lt;pre&gt;# metadb&lt;/pre&gt;&lt;p&gt;Notes:&lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;A state database replica contains configuration and state information about the meta devices. Make sure that always at least 50% of the replicas are active! &lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;3. Create the &lt;/strong&gt;&lt;b&gt;&lt;em&gt;root&lt;/b&gt;&lt;/em&gt;&lt;strong&gt; slice mirror and its first submirror&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# metainit -f d10 1 1 c0t0d0s0&lt;br /&gt; # metainit -f d20 1 1 c0t1d0s0&lt;br /&gt; # metainit d30 -m d10&lt;/pre&gt;&lt;p&gt;Run &lt;em&gt;metaroot&lt;/em&gt; to prepare /etc/vfstab and /etc/system (do this &lt;u&gt;only&lt;/u&gt; for the root slice!): &lt;/p&gt;&lt;pre&gt;# metaroot d30&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;4. Create the &lt;/strong&gt;&lt;b&gt;&lt;em&gt;swap&lt;/b&gt;&lt;/em&gt;&lt;strong&gt; slice mirror and its first submirror&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# metainit -f d11 1 1 c0t0d0s1&lt;br /&gt; # metainit -f d21 1 1 c0t1d0s1&lt;br /&gt; # metainit d31 -m d11&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;5. Create the &lt;/strong&gt;&lt;b&gt;&lt;em&gt;var&lt;/b&gt;&lt;/em&gt;&lt;strong&gt; slice mirror and its first submirror&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# metainit -f d14 1 1 c0t0d0s4&lt;br /&gt; # metainit -f d24 1 1 c0t1d0s4&lt;br /&gt; # metainit d34 -m d14&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;6. Create the &lt;/strong&gt;&lt;b&gt;&lt;em&gt;usr&lt;/b&gt;&lt;/em&gt;&lt;strong&gt; slice mirror and its first submirror&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# metainit -f d15 1 1 c0t0d0s5&lt;br /&gt; # metainit -f d25 1 1 c0t1d0s5&lt;br /&gt; # metainit d35 -m d15&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;7. Create the&lt;/strong&gt;&lt;b&gt;&lt;em&gt; unassigned&lt;/b&gt;&lt;/em&gt;&lt;strong&gt; slice mirror and its first submirror&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# metainit -f d16 1 1 c0t0d0s6&lt;br /&gt; # metainit -f d26 1 1 c0t1d0s6&lt;br /&gt; # metainit d36 -m d16&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;8. Create the &lt;/strong&gt;&lt;b&gt;&lt;em&gt;home&lt;/b&gt;&lt;/em&gt;&lt;strong&gt; slice mirror and its first submirror&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# metainit -f d17 1 1 c0t0d0s7&lt;br /&gt; # metainit -f d27 1 1 c0t1d0s7&lt;br /&gt; # metainit d37 -m d17&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;9. Edit &lt;/strong&gt;&lt;b&gt;&lt;em&gt;/etc/vfstab&lt;/b&gt;&lt;/em&gt;&lt;strong&gt; to mount all mirrors after boot, including mirrored swap&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;/etc/vfstab&lt;/em&gt; &lt;u&gt;before&lt;/u&gt; changes:&lt;/p&gt;&lt;pre&gt;fd                 -                   /dev/fd  fd     -  no   -&lt;br /&gt; /proc              -                   /proc    proc   -  no   -&lt;br /&gt; /dev/dsk/c0t0d0s1  -                   -        swap   -  no   -&lt;br /&gt; /dev/md/dsk/d30    /dev/md/rdsk/d30    /        ufs    1  no   logging&lt;br /&gt; /dev/dsk/c0t0d0s5  /dev/rdsk/c0t0d0s5  /usr     ufs    1  no   ro,logging&lt;br /&gt; /dev/dsk/c0t0d0s4  /dev/rdsk/c0t0d0s4  /var     ufs    1  no   nosuid,logging&lt;br /&gt; /dev/dsk/c0t0d0s7  /dev/rdsk/c0t0d0s7  /home    ufs    2  yes  nosuid,logging&lt;br /&gt; /dev/dsk/c0t0d0s6  /dev/rdsk/c0t0d0s6  /opt     ufs    2  yes  nosuid,logging&lt;br /&gt; swap               -                   /tmp     tmpfs  -  yes  -&lt;/pre&gt;&lt;em&gt;&lt;p&gt;/etc/vfstab&lt;/em&gt; &lt;u&gt;after&lt;/u&gt; changes:&lt;/p&gt;&lt;pre&gt;fd                 -                   /dev/fd  fd     -  no   -&lt;br /&gt; /proc              -                   /proc    proc   -  no   -&lt;br /&gt; /dev/md/dsk/d31    -                   -        swap   -  no   -&lt;br /&gt; /dev/md/dsk/d30    /dev/md/rdsk/d30    /        ufs    1  no   logging&lt;br /&gt; /dev/md/dsk/d35    /dev/md/rdsk/d35    /usr     ufs    1  no   ro,logging&lt;br /&gt; /dev/md/dsk/d34    /dev/md/rdsk/d34    /var     ufs    1  no   nosuid,logging&lt;br /&gt; /dev/md/dsk/d37    /dev/md/rdsk/d37    /home    ufs    2  yes  nosuid,logging&lt;br /&gt; /dev/md/dsk/d36    /dev/md/rdsk/d36    /opt     ufs    2  yes  nosuid,logging&lt;br /&gt; swap               -                   /tmp     tmpfs  -  yes  -&lt;/pre&gt;&lt;p&gt;Notes:&lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;The entry for the root device (/) has already been altered by the &lt;em&gt;metaroot &lt;/em&gt;command we executed before. &lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;10. Reboot the system&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# lockfs -fa &amp;amp;&amp; init 6&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;11. Attach the second submirrors to all mirrors&lt;/strong&gt; &lt;/p&gt;&lt;pre&gt;# metattach d30 d20&lt;br /&gt; # metattach d31 d21&lt;br /&gt; # metattach d34 d24&lt;br /&gt; # metattach d35 d25&lt;br /&gt; # metattach d36 d26&lt;br /&gt; # metattach d37 d27&lt;/pre&gt;&lt;p&gt;Notes: &lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;This will finally cause the data from the boot disk to be synchronized with the mirror drive. &lt;/p&gt;&lt;p&gt;You can use &lt;em&gt;metastat&lt;/em&gt; to track the mirroring progress. &lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;12. Change the crash dump device to the swap metadevice&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# dumpadm -d `swap -l  tail -1  awk '{print $1}'&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;13. Make the mirror disk bootable&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0&lt;/pre&gt;&lt;p&gt;Notes:&lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;This will install a boot block to the second disk. &lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;p&gt;&lt;br /&gt;&lt;strong&gt;14. Determine the physical device path of the mirror disk&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# ls -l /dev/dsk/c0t1d0s0&lt;br /&gt; ... /dev/dsk/c0t1d0s0 -&amp;gt; ../../devices/pci@1f,4000/scsi@3/sd@1,0:a&lt;/pre&gt;&lt;strong&gt;&lt;p&gt;15. Create a device alias for the mirror disk&lt;/p&gt;&lt;/strong&gt;&lt;pre&gt;# eeprom "nvramrc=devalias mirror /pci@1f,4000/scsi@3/disk@1,0"&lt;br /&gt; # eeprom "use-nvramrc?=true"&lt;/pre&gt;&lt;p&gt;Add the &lt;em&gt;mirror&lt;/em&gt; device alias to the Open Boot parameter boot-device to prepare the case of a problem with the primary boot device. &lt;/p&gt;&lt;pre&gt;# eeprom "boot-device=disk mirror cdrom net"&lt;/pre&gt;&lt;p&gt;You can also configure the device alias and boot-device list from the &lt;em&gt;Open Boot Prompt&lt;/em&gt; (OBP a.k.a. &lt;em&gt;ok prompt&lt;/em&gt;): &lt;/p&gt;&lt;pre&gt;ok nvalias mirror /pci@1f,4000/scsi@3/disk@1,0&lt;br /&gt; ok use-nvramrc?=true&lt;br /&gt; ok boot-device=disk mirror cdrom net&lt;/pre&gt;&lt;p&gt;Notes:&lt;/p&gt;&lt;dir&gt;&lt;dir&gt;&lt;p&gt;From the OBP, you can use &lt;em&gt;boot mirror&lt;/em&gt; to boot from the mirror disk. &lt;/p&gt;&lt;p&gt;On my test system, I had to replace &lt;em&gt;sd@1,0:a&lt;/em&gt; with &lt;em&gt;disk@1,0&lt;/em&gt;. Use &lt;em&gt;devalias&lt;/em&gt; on the OBP prompt to determine the correct device path. &lt;/p&gt;&lt;/dir&gt;&lt;/dir&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt; &lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-9067154952715442012?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/9067154952715442012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=9067154952715442012&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/9067154952715442012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/9067154952715442012'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/03/howto-mirrored-root-disk-on-solaris.html' title='HOWTO: Mirrored root disk on Solaris'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-8023916738494584768</id><published>2007-02-15T02:27:00.000-08:00</published><updated>2007-02-22T18:19:32.483-08:00</updated><title type='text'>Active FTP vs. Passive FTP, a Definitive Explanation</title><content type='html'>Active FTP vs. Passive FTP, a Definitive Explanation&lt;p&gt;&lt;br&gt;&lt;a href="http://slacksite.com/other/ftp.html"&gt;http://slacksite.com/other/ftp.html&lt;/a&gt;&lt;p&gt;&lt;br&gt;Introduction&lt;p&gt;&lt;br&gt;One of the most commonly seen questions when dealing with firewalls and&lt;br&gt;other Internet connectivity issues is the difference between active and&lt;br&gt;passive FTP and how best to support either or both of them. Hopefully&lt;br&gt;the following text will help to clear up some of the confusion over how&lt;br&gt;to support FTP in a firewalled environment. &lt;p&gt;This may not be the definitive explanation, as the title claims,&lt;br&gt;however, I&amp;#39;ve heard enough good feedback and seen this document linked&lt;br&gt;in enough places to know that quite a few people have found it to be&lt;br&gt;useful. I am always looking for ways to improve things though, and if&lt;br&gt;you find something that is not quite clear or needs more explanation,&lt;br&gt;please let me know! Recent additions to this document include the&lt;br&gt;examples of both active and passive command line FTP sessions. These&lt;br&gt;session examples should help make things a bit clearer. They also&lt;br&gt;provide a nice picture into what goes on behind the scenes during an FTP&lt;br&gt;session. Now, on to the information... &lt;p&gt;&lt;br&gt;The Basics&lt;p&gt;&lt;br&gt;FTP is a TCP based service exclusively. There is no UDP component to&lt;br&gt;FTP. FTP is an unusual service in that it utilizes two ports, a &amp;#39;data&amp;#39;&lt;br&gt;port and a &amp;#39;command&amp;#39; port (also known as the control port).&lt;br&gt;Traditionally these are port 21 for the command port and port 20 for the&lt;br&gt;data port. The confusion begins however, when we find that depending on&lt;br&gt;the mode, the data port is not always on port 20. &lt;p&gt;&lt;br&gt;Active FTP&lt;p&gt;&lt;br&gt;In active mode FTP the client connects from a random unprivileged port&lt;br&gt;(N &amp;gt; 1023) to the FTP server&amp;#39;s command port, port 21. Then, the client&lt;br&gt;starts listening to port N+1 and sends the FTP command PORT N+1 to the&lt;br&gt;FTP server. The server will then connect back to the client&amp;#39;s specified&lt;br&gt;data port from its local data port, which is port 20. &lt;p&gt;&amp;gt;From the server-side firewall&amp;#39;s standpoint, to support active mode FTP&lt;br&gt;the following communication channels need to be opened: &lt;p&gt;		FTP server&amp;#39;s port 21 from anywhere (Client initiates&lt;br&gt;connection) &lt;p&gt;		FTP server&amp;#39;s port 21 to ports &amp;gt; 1023 (Server responds to&lt;br&gt;client&amp;#39;s control port) &lt;p&gt;		FTP server&amp;#39;s port 20 to ports &amp;gt; 1023 (Server initiates&lt;br&gt;data connection to client&amp;#39;s data port) &lt;p&gt;		FTP server&amp;#39;s port 20 from ports &amp;gt; 1023 (Client sends&lt;br&gt;ACKs to server&amp;#39;s data port) &lt;p&gt;When drawn out, the connection appears as follows: &lt;p&gt; &amp;lt;outbind://235/images/ftp/active&lt;a href="ftp://ftp.gif"&gt;ftp.gif&lt;/a&gt;&amp;gt; &lt;p&gt;In step 1, the client&amp;#39;s command port contacts the server&amp;#39;s command port&lt;br&gt;and sends the command PORT 1027. The server then sends an ACK back to&lt;br&gt;the client&amp;#39;s command port in step 2. In step 3 the server initiates a&lt;br&gt;connection on its local data port to the data port the client specified&lt;br&gt;earlier. Finally, the client sends an ACK back as shown in step 4. &lt;p&gt;The main problem with active mode FTP actually falls on the client side.&lt;br&gt;The FTP client doesn&amp;#39;t make the actual connection to the data port of&lt;br&gt;the server--it simply tells the server what port it is listening on and&lt;br&gt;the server connects back to the specified port on the client. From the&lt;br&gt;client side firewall this appears to be an outside system initiating a&lt;br&gt;connection to an internal client--something that is usually blocked. &lt;p&gt;&lt;br&gt;Active FTP Example&lt;p&gt;&lt;br&gt;Below is an actual example of an active FTP session. The only things&lt;br&gt;that have been changed are the server names, IP addresses, and user&lt;br&gt;names. In this example an FTP session is initiated from&lt;br&gt;testbox1.slacksite.com (192.168.150.80), a linux box running the&lt;br&gt;standard FTP command line client, to testbox2.slacksite.com&lt;br&gt;(192.168.150.90), a linux box running ProFTPd 1.2.2RC2. The debugging&lt;br&gt;(-d) flag is used with the FTP client to show what is going on behind&lt;br&gt;the scenes. Everything in red is the debugging output which shows the&lt;br&gt;actual FTP commands being sent to the server and the responses generated&lt;br&gt;from those commands. Normal server output is shown in black, and user&lt;br&gt;input is in bold. &lt;p&gt;There are a few interesting things to consider about this dialog. Notice&lt;br&gt;that when the PORT command is issued, it specifies a port on the client&lt;br&gt;(192.168.150.80) system, rather than the server. We will see the&lt;br&gt;opposite behavior when we use passive FTP. While we are on the subject,&lt;br&gt;a quick note about the format of the PORT command. As you can see in the&lt;br&gt;example below it is formatted as a series of six numbers separated by&lt;br&gt;commas. The first four octets are the IP address while the last two&lt;br&gt;octets comprise the port that will be used for the data connection. To&lt;br&gt;find the actual port multiply the fifth octet by 256 and then add the&lt;br&gt;sixth octet to the total. Thus in the example below the port number is (&lt;br&gt;(14*256) + 178), or 3762. A quick check with netstat should confirm this&lt;br&gt;information. &lt;p&gt;testbox1: {/home/p-t/slacker/public_html} % ftp -d testbox2&lt;br&gt;Connected to testbox2.slacksite.com.&lt;br&gt;220 testbox2.slacksite.com FTP server ready.&lt;br&gt;Name (testbox2:slacker): slacker&lt;br&gt;---&amp;gt; USER slacker&lt;br&gt;331 Password required for slacker.&lt;br&gt;Password: TmpPass&lt;br&gt;---&amp;gt; PASS XXXX&lt;br&gt;230 User slacker logged in.&lt;br&gt;---&amp;gt; SYST&lt;br&gt;215 UNIX Type: L8&lt;br&gt;Remote system type is UNIX.&lt;br&gt;Using binary mode to transfer files.&lt;br&gt;ftp&amp;gt; ls&lt;br&gt;ftp: setsockopt (ignored): Permission denied&lt;br&gt;---&amp;gt; PORT 192,168,150,80,14,178&lt;br&gt;200 PORT command successful.&lt;br&gt;---&amp;gt; LIST&lt;br&gt;150 Opening ASCII mode data connection for file list.&lt;br&gt;drwx------   3 slacker    users         104 Jul 27 01:45 public_html&lt;br&gt;226 Transfer complete.&lt;br&gt;ftp&amp;gt; quit&lt;br&gt;---&amp;gt; QUIT&lt;br&gt;221 Goodbye.&lt;p&gt;Passive FTP&lt;p&gt;&lt;br&gt;In order to resolve the issue of the server initiating the connection to&lt;br&gt;the client a different method for FTP connections was developed. This&lt;br&gt;was known as passive mode, or PASV, after the command used by the client&lt;br&gt;to tell the server it is in passive mode. &lt;p&gt;In passive mode FTP the client initiates both connections to the server,&lt;br&gt;solving the problem of firewalls filtering the incoming data port&lt;br&gt;connection to the client from the server. When opening an FTP&lt;br&gt;connection, the client opens two random unprivileged ports locally (N &amp;gt;&lt;br&gt;1023 and N+1). The first port contacts the server on port 21, but&lt;br&gt;instead of then issuing a PORT command and allowing the server to&lt;br&gt;connect back to its data port, the client will issue the PASV command.&lt;br&gt;The result of this is that the server then opens a random unprivileged&lt;br&gt;port (P &amp;gt; 1023) and sends the PORT P command back to the client. The&lt;br&gt;client then initiates the connection from port N+1 to port P on the&lt;br&gt;server to transfer data. &lt;p&gt;&amp;gt;From the server-side firewall&amp;#39;s standpoint, to support passive mode FTP&lt;br&gt;the following communication channels need to be opened: &lt;p&gt;		FTP server&amp;#39;s port 21 from anywhere (Client initiates&lt;br&gt;connection) &lt;p&gt;		FTP server&amp;#39;s port 21 to ports &amp;gt; 1023 (Server responds to&lt;br&gt;client&amp;#39;s control port) &lt;p&gt;		FTP server&amp;#39;s ports &amp;gt; 1023 from anywhere (Client&lt;br&gt;initiates data connection to random port specified by server) &lt;p&gt;		FTP server&amp;#39;s ports &amp;gt; 1023 to remote ports &amp;gt; 1023 (Server&lt;br&gt;sends ACKs (and data) to client&amp;#39;s data port) &lt;p&gt;When drawn, a passive mode FTP connection looks like this: &lt;p&gt; &amp;lt;outbind://235/images/ftp/passive&lt;a href="ftp://ftp.gif"&gt;ftp.gif&lt;/a&gt;&amp;gt; &lt;p&gt;In step 1, the client contacts the server on the command port and issues&lt;br&gt;the PASV command. The server then replies in step 2 with PORT 2024,&lt;br&gt;telling the client which port it is listening to for the data&lt;br&gt;connection. In step 3 the client then initiates the data connection from&lt;br&gt;its data port to the specified server data port. Finally, the server&lt;br&gt;sends back an ACK in step 4 to the client&amp;#39;s data port. &lt;p&gt;While passive mode FTP solves many of the problems from the client side,&lt;br&gt;it opens up a whole range of problems on the server side. The biggest&lt;br&gt;issue is the need to allow any remote connection to high numbered ports&lt;br&gt;on the server. Fortunately, many FTP daemons, including the popular&lt;br&gt;WU-FTPD allow the administrator to specify a range of ports which the&lt;br&gt;FTP server will use. See Appendix 1 &amp;lt;outbind://235/ftp-appendix1.html&amp;gt;&lt;br&gt;for more information. &lt;p&gt;The second issue involves supporting and troubleshooting clients which&lt;br&gt;do (or do not) support passive mode. As an example, the command line FTP&lt;br&gt;utility provided with Solaris does not support passive mode,&lt;br&gt;necessitating a third-party FTP client, such as ncftp. &lt;p&gt;With the massive popularity of the World Wide Web, many people prefer to&lt;br&gt;use their web browser as an FTP client. Most browsers only support&lt;br&gt;passive mode when accessing ftp:// URLs. This can either be good or bad&lt;br&gt;depending on what the servers and firewalls are configured to support. &lt;p&gt;&lt;br&gt;Passive FTP Example&lt;p&gt;&lt;br&gt;Below is an actual example of a passive FTP session. The only things&lt;br&gt;that have been changed are the server names, IP addresses, and user&lt;br&gt;names. In this example an FTP session is initiated from&lt;br&gt;testbox1.slacksite.com (192.168.150.80), a linux box running the&lt;br&gt;standard FTP command line client, to testbox2.slacksite.com&lt;br&gt;(192.168.150.90), a linux box running ProFTPd 1.2.2RC2. The debugging&lt;br&gt;(-d) flag is used with the FTP client to show what is going on behind&lt;br&gt;the scenes. Everything in red is the debugging output which shows the&lt;br&gt;actual FTP commands being sent to the server and the responses generated&lt;br&gt;from those commands. Normal server output is shown in black, and user&lt;br&gt;input is in bold. &lt;p&gt;Notice the difference in the PORT command in this example as opposed to&lt;br&gt;the active FTP example. Here, we see a port being opened on the server&lt;br&gt;(192.168.150.90) system, rather than the client. See the discussion&lt;br&gt;about the format of the PORT command above, in the Active FTP Example&lt;br&gt;section &amp;lt;outbind://235/actexample&amp;gt; . &lt;p&gt;testbox1: {/home/p-t/slacker/public_html} % ftp -d testbox2&lt;br&gt;Connected to testbox2.slacksite.com.&lt;br&gt;220 testbox2.slacksite.com FTP server ready.&lt;br&gt;Name (testbox2:slacker): slacker&lt;br&gt;---&amp;gt; USER slacker&lt;br&gt;331 Password required for slacker.&lt;br&gt;Password: TmpPass&lt;br&gt;---&amp;gt; PASS XXXX&lt;br&gt;230 User slacker logged in.&lt;br&gt;---&amp;gt; SYST&lt;br&gt;215 UNIX Type: L8&lt;br&gt;Remote system type is UNIX.&lt;br&gt;Using binary mode to transfer files.&lt;br&gt;ftp&amp;gt; passive&lt;br&gt;Passive mode on.&lt;br&gt;ftp&amp;gt; ls&lt;br&gt;ftp: setsockopt (ignored): Permission denied&lt;br&gt;---&amp;gt; PASV&lt;br&gt;227 Entering Passive Mode (192,168,150,90,195,149).&lt;br&gt;---&amp;gt; LIST&lt;br&gt;150 Opening ASCII mode data connection for file list&lt;br&gt;drwx------   3 slacker    users         104 Jul 27 01:45 public_html&lt;br&gt;226 Transfer complete.&lt;br&gt;ftp&amp;gt; quit&lt;br&gt;---&amp;gt; QUIT&lt;br&gt;221 Goodbye.&lt;p&gt;Other Notes&lt;p&gt;&lt;br&gt;A reader, Maarten Sjouw, pointed out that active FTP will not function&lt;br&gt;when used in conjunction with a client-side NAT (Network Address&lt;br&gt;Translation) device which is not smart enough to alter the IP address&lt;br&gt;info in FTP packets. &lt;p&gt;&lt;br&gt;Summary&lt;p&gt;&lt;br&gt;The following chart should help admins remember how each FTP mode works:&lt;p&gt;&lt;br&gt; Active FTP :&lt;br&gt;     command : client &amp;gt;1023 -&amp;gt; server 21&lt;br&gt;     data    : client &amp;gt;1023 &amp;lt;- server 20&lt;p&gt; Passive FTP :&lt;br&gt;     command : client &amp;gt;1023 -&amp;gt; server 21&lt;br&gt;     data    : client &amp;gt;1023 -&amp;gt; server &amp;gt;1023&lt;p&gt;A quick summary of the pros and cons of active vs. passive FTP is also&lt;br&gt;in order: &lt;p&gt;Active FTP is beneficial to the FTP server admin, but detrimental to the&lt;br&gt;client side admin. The FTP server attempts to make connections to random&lt;br&gt;high ports on the client, which would almost certainly be blocked by a&lt;br&gt;firewall on the client side. Passive FTP is beneficial to the client,&lt;br&gt;but detrimental to the FTP server admin. The client will make both&lt;br&gt;connections to the server, but one of them will be to a random high&lt;br&gt;port, which would almost certainly be blocked by a firewall on the&lt;br&gt;server side. &lt;p&gt;Luckily, there is somewhat of a compromise. Since admins running FTP&lt;br&gt;servers will need to make their servers accessible to the greatest&lt;br&gt;number of clients, they will almost certainly need to support passive&lt;br&gt;FTP. The exposure of high level ports on the server can be minimized by&lt;br&gt;specifying a limited port range for the FTP server to use. Thus,&lt;br&gt;everything except for this range of ports can be firewalled on the&lt;br&gt;server side. While this doesn&amp;#39;t eliminate all risk to the server, it&lt;br&gt;decreases it tremendously. See Appendix 1&lt;br&gt;&amp;lt;outbind://235/ftp-appendix1.html&amp;gt;  for more information. &lt;p&gt;&lt;br&gt;References&lt;p&gt;&lt;br&gt;An excellent reference on how various internet protocols work and the&lt;br&gt;issues involved in firewalling them can be found in the O&amp;#39;Reilly and&lt;br&gt;Associates book, Building Internet Firewalls, 2nd Ed, by Brent Chapman&lt;br&gt;and Elizabeth Zwicky. &lt;p&gt;Finally, the definitive reference on FTP would be RFC 959, which sets&lt;br&gt;forth the official specifications of the FTP protocol. RFCs can be&lt;br&gt;downloaded from numerous locations, including&lt;br&gt;&lt;a href="http://www.faqs.org/rfcs/rfc959.html"&gt;http://www.faqs.org/rfcs/rfc959.html&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-8023916738494584768?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/8023916738494584768/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=8023916738494584768&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8023916738494584768'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8023916738494584768'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/02/active-ftp-vs-passive-ftp-definitive.html' title='Active FTP vs. Passive FTP, a Definitive Explanation'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-4539212106920593801</id><published>2007-01-10T21:22:00.001-08:00</published><updated>2007-01-10T21:22:25.333-08:00</updated><title type='text'>Configuring TCP/IP on Solaris - Overview of the Booting Processes </title><content type='html'>&lt;B&gt;&lt;FONT color=#000080&gt; &lt;P&gt;The Boot Process&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The following information is provided for your reference. It is a    brief overview of the network booting processes to help you better visualize    what is happening during configuration. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#800000&gt; &lt;BLOCKQUOTE&gt;Note&lt;/B&gt;&lt;/FONT&gt; - The names of startup scripts might change from    one release to another. &lt;/BLOCKQUOTE&gt; &lt;OL&gt;   &lt;OL&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;You start the operating system on a host. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;The kernel runs &lt;TT&gt;/sbin/init&lt;/TT&gt;, as part of the booting process.        &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;TT&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;/sbin/init&lt;/TT&gt; runs the &lt;TT&gt;/etc/rcS.d/S30rootusr.sh&lt;/TT&gt;. startup        script. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;The script runs a number of system startup tasks, including        establishing the minimum host and network configurations for diskless and        dataless operations. &lt;TT&gt;/etc/rcS.d/S30rootusr.sh&lt;/TT&gt; also mounts the        &lt;TT&gt;/usr&lt;/TT&gt; file system. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;OL&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;If the local database files contain the required configuration          information (host name and IP address), the script uses it.        &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;If the information is not available in local host configuration          files, &lt;TT&gt;/etc/rcS.d/S30rootusr.sh&lt;/TT&gt; uses RARP to acquire the host's          IP address. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;If the local files contain domain name, host name, and default router        address, the machine uses them. If the configuration information is not in        local files, then the system uses the Bootparams protocol to acquire the        host name, domain name, and default router address. Note that the required        information must be available on a network configuration server that is        located on the same network as the host. This is necessary because no        internetwork communications exist at this point. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;After &lt;TT&gt;/etc/rcS/S30rootusr.sh&lt;/TT&gt; completes its tasks and several        other boot procedures have executed, &lt;TT&gt;/etc/rc2.d/S69inet&lt;/TT&gt; runs.        This script executes startup tasks that must be completed before the name        services (NIS, NIS+, or DNS) can start. These tasks include configuring        the IP routing and setting the domain name. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;At completion of the S69inet tasks, &lt;TT&gt;/etc/rc2.d/S71rpc&lt;/TT&gt; runs.        This script starts the NIS, NIS+, or DNS name service. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;After &lt;TT&gt;/etc/rc2.d/S71&lt;/TT&gt; runs, &lt;TT&gt;/etc/rc2.d/S72inetsvc&lt;/TT&gt;        runs. This script starts up services that depend on the presence of the        name services. S72inetsvc also starts the daemon inetd, which manages user        services such as telnet. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-4539212106920593801?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/4539212106920593801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=4539212106920593801&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/4539212106920593801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/4539212106920593801'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/configuring-tcpip-on-solaris-overview.html' title='Configuring TCP/IP on Solaris - Overview of the Booting Processes '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-866900488371729268</id><published>2007-01-10T21:21:00.001-08:00</published><updated>2007-01-10T21:21:44.717-08:00</updated><title type='text'>Configuring TCP/IP on Solaris - Network Configuration Procedures </title><content type='html'>&lt;B&gt;&lt;FONT color=#000080&gt;  &lt;P&gt;Introduction&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt;  &lt;BLOCKQUOTE&gt;Network software installation takes place along with the     installation of the operating system software. At that time, certain IP     configuration parameters must be stored in appropriate files so they can be     read at boot time. &lt;/BLOCKQUOTE&gt;  &lt;BLOCKQUOTE&gt;The procedure is simply a matter of creating or editing the     network- configuration files. How configuration information is made available     to a machine's kernel depends on whether these files are stored locally (local     files mode) or acquired from the network configuration server (network client     mode). Parameters supplied during network configuration are: &lt;/BLOCKQUOTE&gt;  &lt;DIR&gt;  &lt;DIR&gt;  &lt;BLOCKQUOTE&gt;IP address of each network interface on every machine &lt;/BLOCKQUOTE&gt;  &lt;BLOCKQUOTE&gt;Host names of each machine on the network. You can type the host     name in a local file or a name service database. &lt;/BLOCKQUOTE&gt;  &lt;BLOCKQUOTE&gt;NIS, NIS+, or DNS domain name in which the machine resides, if     applicable &lt;/BLOCKQUOTE&gt;  &lt;BLOCKQUOTE&gt;Default router addresses. You supply this only if you have a     simple network topology with only one router attached to each network, or your     routers donâ€™t run routing protocols such as the Router Discovery Server     Protocol (RDISC) or the Router Information Protocol (RIP). (See Chapter 5 for     more information about these protocols.) &lt;/BLOCKQUOTE&gt;  &lt;BLOCKQUOTE&gt;Subnet mask (required only for networks with subnets)   &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;  &lt;BLOCKQUOTE&gt;This section contains complete information on creating and editing     local configuration files. &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;FONT color=#000080&gt;  &lt;P&gt;How to Configure a Host for Local Files Mode&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt;  &lt;BLOCKQUOTE&gt;Use this procedure for configuring TCP/IP on a machine that run in     local files mode. &lt;/BLOCKQUOTE&gt;  &lt;OL&gt;    &lt;OL&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Become superuser and change to the &lt;TT&gt;/etc&lt;/TT&gt; directory.       &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Type the host name of the machine in the file &lt;TT&gt;/etc/nodename&lt;/TT&gt;.         For example, if the name of the host is tenere, type tenere in the file.         &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Create a file named &lt;TT&gt;/etc/hostname.interface&lt;/TT&gt; for each network         interface. (The Solaris installation program automatically creates this         file for the primary network interface.) &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Type either the interface IP address or the interface name in each         &lt;TT&gt;/etc/hostname.interface&lt;/TT&gt; file. For example, create a file named         hostname.ie1, and type either the IP address of the host's interface or         the host's name. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Edit the &lt;TT&gt;/etc/inet/hosts&lt;/TT&gt; file to add: &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;IP addresses that you have assigned to any additional network         interfaces in the local machine, along with the corresponding host name         for each interface. The Solaris installation program will already have         created entries for the primary network interface and loopback address.       &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;IP address or addresses of the file server, if the         &lt;TT&gt;/usr&lt;/TT&gt; file system is NFS mounted. &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Type the host's fully qualified domain name in the         &lt;TT&gt;/etc/defaultdomain&lt;/TT&gt; file. For example, suppose host tenere was         part of the domain &lt;TT&gt;deserts.worldwide.com&lt;/TT&gt;. Therefore, you would         type: &lt;TT&gt;deserts.worldwide.com&lt;/TT&gt; in &lt;TT&gt;/etc/defaultdomain&lt;/TT&gt;.       &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Type the router's name in &lt;TT&gt;/etc/defaultrouter&lt;/TT&gt;.   &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Type the name of the default router and its IP addresses in         &lt;TT&gt;/etc/inet/hosts&lt;/TT&gt;. Additional routing options are available. You         can apply these options to a local files mode configuration.       &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;If your network is subnetted, type the network number and the netmask         in the file &lt;TT&gt;/etc/inet/netmasks&lt;/TT&gt;. If you have set up a NIS or NIS+         server, you can type netmask information in the appropriate database on         the server as long as server and clients are on the same network.       &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Reboot each machine on the network. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;B&gt;&lt;FONT   color=#000080&gt;  &lt;P&gt;Setting Up a Network Configuration Server&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt;  &lt;BLOCKQUOTE&gt;If you plan to configure certain hosts as network clients, you     must configure at least one machine on your network as a network configuration     server. (Refer to â€œNetwork Configuration Serversâ€ on page 45 for an     introduction.) Setting up a network configuration server involves: &lt;/BLOCKQUOTE&gt;  &lt;OL&gt;    &lt;OL&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Turning on the network configuration daemons:&lt;BR&gt;- in.tftpd&lt;BR&gt;-         in.rarpd&lt;BR&gt;- rpc.bootparamd&lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Editing and maintaining the network configuration files on the         configuration server. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;B&gt;&lt;FONT color=#000080&gt;  &lt;P&gt;How to Set Up a Network Configuration Server&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt;  &lt;OL&gt;    &lt;OL&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Become superuser and change to the root directory of the prospective         network configuration server. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Turn on the in.tftpd daemon by creating the directory         &lt;TT&gt;/tftpboot&lt;/TT&gt;: &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;TT&gt;      &lt;BLOCKQUOTE&gt;# mkdir /tftpboot&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;This configures the machine as a TFTP, bootparams, and RARP         server. &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Create a symbolic link to the directory. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;TT&gt;      &lt;BLOCKQUOTE&gt;# ln -s /tftpboot/. /tftpboot/tftpboot&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Enable the tftp line in intetd.conf. Check that the         &lt;TT&gt;/etc/inetd.conf&lt;/TT&gt; entry reads: &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;TT&gt;      &lt;BLOCKQUOTE&gt;tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s         /tftpboot&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;This prevents inettftpd() from retrieving any file other than         one located in &lt;TT&gt;/tftpboot&lt;/TT&gt;. &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Edit the hosts database, and add the host names and IP addresses for         every client on the network. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Edit the ethers database, and create entries for every host on the         network to run in network client mode. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Edit the bootparams database. Use the wildcard entry or create an         entry for every host that run in network client mode. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Reboot the server. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;B&gt;&lt;FONT color=#000080&gt;  &lt;P&gt;Configuring Network Clients&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt;  &lt;BLOCKQUOTE&gt;Network clients receive their configuration information from     network configuration servers. Therefore, before you configure a host as a     network client you must ensure that at least one network configuration server     is set up for the network. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;  &lt;P&gt;How to Configure Hosts for Network Client Mode&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt;  &lt;BLOCKQUOTE&gt;Do the following on each host to be configured in network client     mode: &lt;/BLOCKQUOTE&gt;  &lt;OL&gt;    &lt;OL&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Become superuser. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Check the directory for the existence of an &lt;TT&gt;/etc/nodename&lt;/TT&gt;         file. If one exists, delete it. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;Eliminating &lt;TT&gt;/etc/nodename&lt;/TT&gt; causes the system to use         the hostconfig program to obtain the host name, domain name, and router         addresses from the network configuration server. &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Create the file &lt;TT&gt;/etc/hostname.interface&lt;/TT&gt;, if it does not         exist. Make sure that the file is empty. An empty         &lt;TT&gt;/etc/hostname.interface&lt;/TT&gt; file causes the system to acquire the IP         address from the network configuration server. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Ensure that the &lt;TT&gt;/etc/inet/hosts&lt;/TT&gt; file contains only the host         name and IP address of the loopback network interface. The file should not         contain the IP address and host name for the local machine (primary         network interface). EXCEPTION: For a diskless client (a machine with an         NFS-mounted root file system), type the name and IP address of the server         that provides the client's root file system (usually, but not always, the         network configuration server). &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Check for the existence of an &lt;TT&gt;/etc/defaultdomain file&lt;/TT&gt;. If one         exists, delete it. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;The hostconfig program sets the domain name automatically. If         you want to override the domain name set by hostconfig, type the         substitute domain name in the file &lt;TT&gt;/etc/defaultdomain&lt;/TT&gt;.   &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Ensure that the search paths in the client's         &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; reflects the name service requirements for         your network. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;B&gt;&lt;FONT color=#000080&gt;  &lt;P&gt;How to Specify a Router for the Network Client&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt;  &lt;OL&gt;    &lt;OL&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;If you have only one router on the network and you want the network         configuration server to specify its name automatically, ensure that the         network client does not have a &lt;TT&gt;/etc/defaultrouter&lt;/TT&gt; file.       &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;To override the name of the default router provided by the network         configuration server: &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;Create &lt;TT&gt;/etc/defaultrouter&lt;/TT&gt; on the network client.       &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;Type the host name and IP address of the machine you have         designated as the default router. &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;Add the host name and IP address of the designated default         router to the network client's &lt;TT&gt;/etc/inet/hosts&lt;/TT&gt;. &lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;If you have multiple routers on the network, create         &lt;TT&gt;/etc/defaultrouter&lt;/TT&gt; on the network client, but leave it empty.         &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;  &lt;BLOCKQUOTE&gt;Creating &lt;TT&gt;/etc/defaultrouter&lt;/TT&gt; and leaving it empty causes     one of the two dynamic routing protocols to run: ICMP Router Discovery     protocol (RDISC), or Routing Information Protocol (RIP). The system first runs     the program in.rdisc, which looks for routers that are running the router     discovery protocol. If it finds one such router, in.rdisc continues to run and     keeps track of the routers that are running the RDISC protocol. &lt;/BLOCKQUOTE&gt;  &lt;BLOCKQUOTE&gt;If the system discovers that routers are not responding to the     RDISC protocol, it uses RIP and runs the daemon in.routed to keep track of     them. &lt;/BLOCKQUOTE&gt;&lt;U&gt;  &lt;BLOCKQUOTE&gt;After Installing a Network Client&lt;/U&gt; &lt;/BLOCKQUOTE&gt;  &lt;BLOCKQUOTE&gt;After you have finished editing the files on each network client     machine, do the following on the network configuration server. &lt;/BLOCKQUOTE&gt;  &lt;OL&gt;    &lt;OL&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Add entries for the hosts in the ethers and hosts databases.       &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Add entries for the hosts to the bootparams database. To simplify         matters, you can type a wild card in the bootparams database in place of         individual entries for each host. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;      &lt;BLOCKQUOTE&gt;        &lt;LI&gt;Reboot the server. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-866900488371729268?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/866900488371729268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=866900488371729268&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/866900488371729268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/866900488371729268'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/configuring-tcpip-on-solaris-network_10.html' title='Configuring TCP/IP on Solaris - Network Configuration Procedures '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-5037085224924531839</id><published>2007-01-10T21:20:00.001-08:00</published><updated>2007-01-10T21:20:52.695-08:00</updated><title type='text'>Configuring TCP/IP on Solaris - Network Databases and nsswitch.conf File </title><content type='html'>&lt;B&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Introduction&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The network databases are files that provide information needed to    configure the network. The network databases are: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;hosts &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;netmasks &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;ethers &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;bootparams &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;protocols &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;services &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;networks &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;BLOCKQUOTE&gt;As part of the configuration process, you edit the hosts database    and the netmasks database, if your network is subnetted. Two network    databases, bootparams and ethers, are used to configure machines as network    clients. The remaining databases are used by the operating system and seldom    require editing. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Although it is not a network database, the nsswitch.conf file    needs to be configured along with the relevant network databases.    nsswitch.conf specifies which name service to use for a particular machine:    NIS, NIS+, DNS, or local files. &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;FONT color=#000080&gt; &lt;P&gt;How Name Services Affect Network Databases&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Your network database takes a form that depends on the type of    name service you select for your network. For example, the hosts database    contains, at minimum, the host name and IP address of the local machine and    any network interfaces directly connected to the local machine. However, the    hosts database could contain other IP addresses and host names, depending on    the type of name service on your network. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The network databases are used as follows: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;Networks that use local files for their name service rely on files    in the /etc/inet and /etc directories &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;NIS+ uses databases called NIS+ tables &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;NIS uses databases called NIS maps &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;DNS uses records with host information &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;FONT  color=#800000&gt; &lt;BLOCKQUOTE&gt;Note&lt;/B&gt;&lt;/FONT&gt; - DNS boot and data files do not correspond    directly to the network databases. &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 cellPadding=2 width=623 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;&lt;B&gt;       &lt;P&gt;Network Database&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;&lt;B&gt;       &lt;P&gt;Local Files&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;&lt;B&gt;       &lt;P&gt;NIS+ Tables&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;&lt;B&gt;       &lt;P&gt;NIS Maps&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;       &lt;P&gt;hosts&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;       &lt;P&gt;/etc/inet/hosts&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;hosts.ord_dir&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;hosts.byaddr&lt;BR&gt;hosts.byname&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;       &lt;P&gt;netmasks&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;       &lt;P&gt;/etc/inet/netmasks&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;netmasks.ord_dir&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;netmasks.byaddr&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;       &lt;P&gt;ethers&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;       &lt;P&gt;/etc/ethers&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;ethers.ord_dir&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;ethers.byname&lt;BR&gt;ethers.byaddr&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;       &lt;P&gt;bootparams&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;       &lt;P&gt;/etc/bootparams&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;bootparams.ord_dir&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;bootparams&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;       &lt;P&gt;protocols&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;       &lt;P&gt;/etc/inet/protocols&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;protocols.ord_dir&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;protocols.byname&lt;BR&gt;protocols.bynumber&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;       &lt;P&gt;services&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;       &lt;P&gt;/etc/inet/services&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;services.ord_dir&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;services.byname&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="23%"&gt;       &lt;P&gt;networks&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="27%"&gt;       &lt;P&gt;/etc/inet/networks&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;networks.ord_dir&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="25%"&gt;       &lt;P&gt;networks.byaddr&lt;BR&gt;networks.byname&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;FONT  color=#000080&gt;&lt;TT&gt; &lt;P&gt;nsswitch.conf&lt;/TT&gt; File - Specifying Which Name Service to Use&lt;/B&gt;&lt;/FONT&gt;  &lt;/P&gt; &lt;BLOCKQUOTE&gt;The &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; file defines the search order of    the network databases. The Solaris installation program creates a default    &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; file for the local machine, based on the name    service you indicate during the installation process. If you selected the    'None' option, indicating local files for name service, the resulting    nsswitch.conf file resembles the following example: &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 cellPadding=2 width=624 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;B&gt;       &lt;P&gt;nsswitch.conf for Networks Using Files for Name Service&lt;/B&gt; &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;# /etc/nsswitch.files: # # An example file that could be copied over to /etc/nsswitch.conf; # it does not use any naming service. # # "hosts:" and "services:" in this file are used only if the # /etc/netconfig file contains "switch.so" as a # nametoaddr library for "inet" transports. passwd: files group: files hosts: files networks: files protocols: files rpc: files ethers: files netmasks: files bootparams: files publickey: files # At present there isn't a 'files' backend for netgroup; the # system will figure it out pretty quickly, # and won't use netgroups at all. netgroup: files automount: files aliases: files services: files sendmailvars: files&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;BLOCKQUOTE&gt;The nsswitch.conf(4) man page describes the file in detail. Its    basic syntax is: &lt;/BLOCKQUOTE&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;database name-service-to-search&lt;/TT&gt; &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The database field can list one of many types of databases    searched by the operating system. For example, it could indicate a database    affecting users, such as passwd or aliases, or a network database. The    parameter name-service-to-search can have the values files, nis, or nis+ for    the network databases. (The hosts database can also have dns as a name service    to search.) You can also list more than one name service, such as nis+ and    files. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;In the above example, the only search option indicated is files.    Therefore, the local machine gets security and automounting information, in    addition to network database information, from files located in its    &lt;TT&gt;/etc&lt;/TT&gt; and &lt;TT&gt;/etc/inet&lt;/TT&gt; directories. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT  color=#000080&gt; &lt;P&gt;Changing &lt;TT&gt;nsswitch.conf&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The &lt;TT&gt;/etc&lt;/TT&gt; directory contains the nsswitch.conf file    created by the Solaris installation program. It also contains template files    for the following name services: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;nsswitch.files &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;nsswitch.nis &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;nsswitch.nis+ &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;BLOCKQUOTE&gt;If you want to change from one name service to another, you can    copy the appropriate template to nsswitch.conf. You can also selectively edit    the nsswitch.conf file, and change the default name service to search for    individual databases. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;For example, on a network running NIS, you might have to change    the &lt;TT&gt;nsswitch.conf&lt;/TT&gt; file on diskless clients. The search path for the    bootparams and ethers databases must list files as the first option, and nis.    The example below shows the correct search paths. &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 cellPadding=1 width=450 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;B&gt;       &lt;P&gt;nsswitch.conf for a Diskless Client on a Network Running    NIS&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;## /etc/nsswitch.conf:# . . passwd: files nis group: file nis # consult /etc "files" only if nis is down. hosts: nis [NOTFOUND=return] files networks: nis [NOTFOUND=return] files protocols: nis [NOTFOUND=return] files rpc: nis [NOTFOUND=return] files ethers: files [NOTFOUND=return] nis netmasks: nis [NOTFOUND=return] files bootparams: files [NOTFOUND=return] nis publickey: nis netgroup: nis automount: files nis aliases: files nis # for efficient getservbyname() avoid nis services: files nis sendmailvars: files&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;bootparams&lt;/TT&gt; Database&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The bootparams database contains information used by diskless    clients and machines configured to boot in the network client mode. You need    to edit it if your network will have network clients. The database is built    from information entered into the &lt;TT&gt;/etc/bootparams&lt;/TT&gt; file. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The bootparams(4) man page contains complete syntax for this    database. Its basic syntax is: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;    machine-name file-key-server-name:pathname&lt;/PRE&gt; &lt;BLOCKQUOTE&gt;For each diskless or network client machine, the entry might    contain the following information: the name of the client, a list of keys, the    names of servers, and path names. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The first item of each entry is the name of the client machine.    Next is a list of keys, names of servers, and path names, separated by tab    characters. All items but the first are optional. The database can contain a    wildcard entry that will be matched by all clients. Here is an example:  &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 cellPadding=1 width=450 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;B&gt;       &lt;P&gt;bootparams Database&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;myclient root=myserver : /nfsroot/myclient \ swap=myserver : /nfsswap//myclient \ dump=myserver : /nfsdump/myclient&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;BLOCKQUOTE&gt;In this example the term &lt;TT&gt;dump=:&lt;/TT&gt; tells diskless hosts not    to look for a dump file. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt; &lt;BLOCKQUOTE&gt;Wildcard Entry for bootparams&lt;/B&gt;&lt;/U&gt; &lt;BR&gt;In most cases, you will    want to use the wildcard entry when editing the bootparams database to support    diskless clients. This entry is: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;    * root=server:/path dump=:&lt;/PRE&gt; &lt;BLOCKQUOTE&gt;The asterisk (*) wildcard indicates that this entry applies to all    clients not specifically named within the bootparams database.  &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;ethers&lt;/TT&gt; Database&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The ethers database is built from information entered into the    &lt;TT&gt;/etc/ethers&lt;/TT&gt; file. It associates host names to their Ethernet    addresses. You need to create an ethers database only if you are running the    RARP daemon; that is, if you are configuring network clients or diskless    machines. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;RARP uses the file to map Ethernet addresses to IP addresses. If    you are running the RARP daemon in.rarpd, you need to set up the ethers file    and maintain it on all hosts running the daemon to reflect changes to the    network. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The ethers(4) man page contains complete syntax information for    this database. Its basic format is: &lt;/BLOCKQUOTE&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;Ethernet-address hostname #comment&lt;BR&gt;Ethernet-address is the    Ethernet address of the host.&lt;BR&gt;hostname is the official name of the    host.&lt;BR&gt;#comment is any kind of note you want to append to an entry in the    file.&lt;/BLOCKQUOTE&gt;&lt;/TT&gt; &lt;BLOCKQUOTE&gt;The equipment manufacturer provides the Ethernet address. If a    machine does not display the Ethernet address when you power up, see your    hardware manuals for assistance. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;When adding entries to the ethers database, make sure that host    names correspond to the primary names in the hosts database, not to the    nicknames, as shown in the following example: &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 cellPadding=1 width=450 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;B&gt;       &lt;P&gt;Entries in the ethers Database&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;8:0:20:1:40:16 fayoum 8:0:20:1:40:15 nubian 8:0:20:1:40:7 sahara # This is a comment 8:0:20:1:40:14 tenere&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Other Network Databases&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The remaining network databases seldom need to be edited.  &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;networks database&lt;/TT&gt; Database&lt;/B&gt;&lt;/FONT&gt; &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;The networks database associates network names with network    numbers, enabling some applications to use and display names rather than    numbers. The networks database is based on information in the    /etc/inet/networks file. It contains the names of all networks to which your    network connects via routers. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The Solaris installation program sets up the initial networks    database. The only time you need to update it is when you add a new network to    your existing network topology. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The networks(4) man page contains full syntax information for    /etc/inet/networks. Here is its basic format: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;  network-name network-number nickname(s) # comment   network-name is the official name for the network.   network-number is the number assigned by the InterNIC.   nickname is any other name by which the network is known.   #comment is any kind of note you want to append to an entry in the file.&lt;/PRE&gt; &lt;BLOCKQUOTE&gt;It is particularly important that you maintain the networks file.    The netstat program uses the information in this database to produce status    tables. The example shows a sample &lt;TT&gt;/etc/networks&lt;/TT&gt; file:  &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 cellPadding=1 width=450 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;B&gt;       &lt;P&gt;/etc/networks File&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;#ident "@(#)networks 1.4 92/07/14 SMI" /* SVr4.0 1.1 */ # # The networks file associates Internet Protocol (IP) network numbers with network names. The format of this file is: # # network-name network-number nicnames . . . # The loopback network is used only for intra-machine communication #loopback 127 # Internet networks # arpanet 10 arpa # Historical ucb-ether 46 ucbether # # local networks eng 193.9.0 #engineering acc 193.9.1 #accounting prog 193.9.2 #programming&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;FONT  color=#000080&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;protocols&lt;/TT&gt; Database&lt;/B&gt;&lt;/FONT&gt; &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;The protocols database lists the TCP/IP protocols installed on    your system and their numbers; the Solaris installation program automatically    creates it. It is rare when this file requires administrative handling.  &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The protocols database contains the names of the TCP/IP protocols    installed on the system. Its syntax is completely described in the    protocols(4) man page. The example below shows an example of the    &lt;TT&gt;/etc/inet/protocols&lt;/TT&gt; file: &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 cellPadding=1 width=450 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;B&gt;       &lt;P&gt;/etc/inet/protocols File&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;# # Internet (IP) protocols # ip 0 IP # internet protocol, pseudo protocol number icmp 1 ICMP # internet control message protocol tcp 6 TCP # transmission control protocol udp 17 UDP # user datagram protocol&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;FONT  color=#000080&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;services&lt;/TT&gt; Database&lt;/B&gt;&lt;/FONT&gt; &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;The services database lists the names of TCP and UDP services and    their well known port numbers; it is used by programs that call network    services. The Solaris installation automatically creates the services    database; it generally requires no administrative handling. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The services(4) man page contains complete syntax information. The    example below shows an excerpt from a typical &lt;TT&gt;/etc/inet/services&lt;/TT&gt;    file: &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 cellPadding=1 width=450 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;B&gt;       &lt;P&gt;/etc/inet/services File&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;# # Network services # echo 7/udp echo 7/tcp discard 9/udp sink null discard 11/tcp daytime 13/udp daytime 13/tcp netstat 15/tcp ftp-data 20/tcp ftp 21/tcp telnet 23/tcp time 37/tcp timeserver time 37/udp timeserver name 42/udp nameserver whois 43/tcp nickname&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-5037085224924531839?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/5037085224924531839/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=5037085224924531839&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5037085224924531839'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5037085224924531839'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/configuring-tcpip-on-solaris-network.html' title='Configuring TCP/IP on Solaris - Network Databases and nsswitch.conf File '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-5829006668072137055</id><published>2007-01-10T21:19:00.001-08:00</published><updated>2007-01-10T21:19:26.710-08:00</updated><title type='text'>Networking -- Solaris</title><content type='html'>&lt;B&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Introduction&lt;/B&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;In order to configure networking after installing Solaris, several    files will need to be created and/or modified. This document provides a quick    overview of those files along with example configuration data. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;In most cases, the installation process performs all necessary    configuration tasks. One of the tasks generally not performed by the installer    is updating the Solaris networking files. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;I have not found an easy way to force the installation program to    configure all local networking files if the "Naming Services" section fails.    For example, if you select the DNS naming service and the machine you are    configuring is not entered in DNS, the installation process will skip this    section. In cases like this, it will be necessary to update several of the    files that pertain to networking. The following is a list of those files and    the content that should be provided. Keep in mind that the system will need to    be rebooted after making changes (and creating) these files.  &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/resolv.conf&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;During the Solaris installation program, you are prompted for    Naming Configuration information. In most cases, we use DNS. But during the    installation process, if the installer is unable to communicate with and/or    resolve your newly configured host with DNS, the Naming Configuration will    fail, and none of the configuration files (i.e. &lt;TT&gt;/etc/resolv.conf&lt;/TT&gt;)    will not be updated. I often find it necessary to manually create the    &lt;TT&gt;/etc/resolv.conf&lt;/TT&gt; with any name service information. &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;nameserver 63.67.120.18 nameserver 63.67.120.23&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/resolv.conf&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/hostname.&lt;I&gt;interface&lt;/B&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The Solaris installation program creates this file for you. The    file contains only one entry: the host name or IP address associated with the    network interface. For example, suppose &lt;TT&gt;eri0&lt;/TT&gt; is the primary network    interface for a machine called &lt;TT&gt;alexprod&lt;/TT&gt;. Its    &lt;TT&gt;/etc/hostname.&lt;/TT&gt;&lt;I&gt;interface&lt;/I&gt; file would have the name    &lt;TT&gt;/etc/hostname.eri0&lt;/TT&gt;; the file would contain the single entry    &lt;TT&gt;alexprod&lt;/TT&gt;. &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;alexprod&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/hostname.eri0&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/nodename&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;This file should contain one entry; the host name of the local    machine. For example, on machine &lt;TT&gt;alexprod&lt;/TT&gt;, the file    &lt;TT&gt;/etc/nodename&lt;/TT&gt; would contain the entry &lt;TT&gt;alexprod&lt;/TT&gt;. &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;alexprod&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/nodename&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/defaultdomain&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;This file should contain one entry, the full qualified domain name    of the administrative domain to which the local host's network belongs. You    can supply this name to the Solaris installation program or edit the file at a    later date. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Take for example the domain &lt;TT&gt;iDevelopment&lt;/TT&gt; which was    classified as a &lt;TT&gt;.info&lt;/TT&gt; domain. In this example,    &lt;TT&gt;/etc/defaultdomain&lt;/TT&gt; should contain the entry    &lt;TT&gt;iDevelopment.info&lt;/TT&gt;. &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;idevelopment.info&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/defaultdomain&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/defaultrouter&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;This file should contain an entry for each router directly    connected to the network. The entry should be the name for the network    interface that functions as a router between networks. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;If the default router for a machine will be 192.168.1.1, then this    is the entry that should be put into the file &lt;TT&gt;/etc/defaultrouter&lt;/TT&gt;.  &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;192.168.1.1&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/defaultrouter&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/hosts&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The hosts database contains the IP addresses and host names of    machines on your network. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;If you use local files for name service, the hosts database is    maintained in the &lt;TT&gt;/etc/inet/hosts&lt;/TT&gt; file. This file contains the host    names and IP addresses of the primary network interface, other network    interfaces attached to the machine, and any other network addresses that the    machine must know about. &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;B&gt;&lt;FONT color=#800000&gt; &lt;BLOCKQUOTE&gt;NOTE&lt;/FONT&gt;:&lt;/B&gt; For compatibility with BSD-based operating    systems, the file &lt;TT&gt;/etc/hosts&lt;/TT&gt; is a symbolic link to    &lt;TT&gt;/etc/inet/hosts&lt;/TT&gt;. &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;# # Internet host table # 127.0.0.1       localhost 192.168.1.102    alexprod alexprod.idevelopment.info    loghost&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/hosts&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/inet/netmasks&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;You need to edit the netmasks database as part of network    configuration only if you have set up subnetting on your network. The netmasks    database consists of a list of networks and their associated subnet masks.  &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;# # The netmasks file associates Internet Protocol (IP) address # masks with IP network numbers. # #       network-number  netmask # # The term network-number refers to a number obtained from the Internet Network # Information Center.  Currently this number is restricted to being a class # A, B, or C network number.  In the future we should be able to support # arbitrary network numbers per the Classless Internet Domain Routing # guidelines. # # Both the network-number and the netmasks are specified in # "decimal dot" notation, e.g: # #               128.32.0.0 255.255.255.0 # 192.168.1.0      255.255.255.0&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/inet/netmasks&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;FONT color=#000080&gt;&lt;TT&gt; &lt;P&gt;/etc/nsswitch.conf&lt;/B&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; file defines the search order of    the network databases (hosts, netmasks, ethers, bootparams, protocols,    services, networks). &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The Solaris installation program creates a default    &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; file for the local machine, based on the name    service you indicate during the installation process. The installation process    also creates 5 template files that can be copied over to    &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt;: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;DIR&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;nsswitch.files&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;nsswitch.nis&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;nsswitch.dns&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;nsswitch.ldap&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;&lt;TT&gt; &lt;BLOCKQUOTE&gt;nsswitch.nisplus&lt;/TT&gt; &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;BLOCKQUOTE&gt;If you selected the 'None' option, indicating local files for name    service, the resulting &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; file resembles the    following example: &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;# # /etc/nsswitch.files: # # An example file that could be copied over to /etc/nsswitch.conf; it # does not use any naming service. # # "hosts:" and "services:" in this file are used only if the # /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.  passwd:     files group:      files hosts:      files ipnodes:    files networks:   files protocols:  files rpc:        files ethers:     files netmasks:   files bootparams: files publickey:  files # At present there isn't a 'files' backend for netgroup;  the system will #   figure it out pretty quickly, and won't use netgroups at all. netgroup:   files automount:  files aliases:    files services:   files sendmailvars:   files printers:       user files  auth_attr:  files prof_attr:  files project:    files&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/nsswitch.conf - Default if you are using local files&lt;/B&gt;&lt;/I&gt;  &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Here is another &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; file that adds a dns    entry for hosts:: &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;# # /etc/nsswitch.dns: # # An example file that could be copied over to /etc/nsswitch.conf; it uses # DNS for hosts lookups, otherwise it does not use any other naming service. # # "hosts:" and "services:" in this file are used only if the # /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.  passwd:     files group:      files  # You must also set up the /etc/resolv.conf file for DNS name # server lookup.  See resolv.conf(4). hosts:      files &lt;B&gt;dns &lt;/B&gt;ipnodes:    files # Uncomment the following line and comment out the above to resolve # both IPv4 and IPv6 addresses from the ipnodes databases. Note that # IPv4 addresses are searched in all of the ipnodes databases before # searching the hosts databases. Before turning this option on, consult # the Network Administration Guide for more details on using IPv6. #ipnodes:   files dns  networks:   files protocols:  files rpc:        files ethers:     files netmasks:   files bootparams: files publickey:  files # At present there isn't a 'files' backend for netgroup;  the system will #   figure it out pretty quickly, and won't use netgroups at all. netgroup:   files automount:  files aliases:    files services:   files sendmailvars:   files printers:       user files  auth_attr:  files prof_attr:  files project:    files&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/nsswitch.conf - Adding a dns database for the hosts:    element&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Here is another &lt;TT&gt;/etc/nsswitch.conf&lt;/TT&gt; file that uses a    combination of &lt;I&gt;files&lt;/I&gt;, &lt;I&gt;nis&lt;/I&gt;, and &lt;I&gt;dns&lt;/I&gt; entries: &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;PRE&gt;# /etc/nsswitch.nis: # # An example file that could be copied over to /etc/nsswitch.conf; it # uses NIS (YP) in conjunction with files. # # "hosts:" and "services:" in this file are used only if the # /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.  # the following two lines obviate the "+" entry in /etc/passwd and /etc/group. passwd:     files nis group:      files nis  # consult /etc "files" only if nis is down. hosts:      files dns nis ipnodes:    files # Uncomment the following line and comment out the above to resolve # both IPv4 and IPv6 addresses from the ipnodes databases. Note that # IPv4 addresses are searched in all of the ipnodes databases before # searching the hosts databases. Before turning this option on, consult # the Network Administration Guide for more details on using IPv6. #ipnodes:    nis [NOTFOUND=return] files  networks:   nis [NOTFOUND=return] files protocols:  nis [NOTFOUND=return] files rpc:        nis [NOTFOUND=return] files ethers:     nis [NOTFOUND=return] files netmasks:   nis [NOTFOUND=return] files bootparams: nis [NOTFOUND=return] files publickey:  nis [NOTFOUND=return] files  netgroup:   nis  automount:  files nis aliases:    files nis  # for efficient getservbyname() avoid nis services:   files nis sendmailvars:   files printers:       user files nis  auth_attr:  files nis prof_attr:  files nis project:    files nis&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;I&gt; &lt;BLOCKQUOTE&gt;/etc/nsswitch.conf - Using a combination of files, nis, and dns    databases&lt;/B&gt;&lt;/I&gt; &lt;/BLOCKQUOTE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-5829006668072137055?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/5829006668072137055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=5829006668072137055&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5829006668072137055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5829006668072137055'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/networking-solaris.html' title='Networking -- Solaris'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-8280514969608067793</id><published>2007-01-10T21:17:00.001-08:00</published><updated>2007-01-10T21:17:47.047-08:00</updated><title type='text'>Removing Invalid Disk Device Files (/dev/dsk and /dev/rdsk) </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Removing Invalid Disk Device Files (&lt;/FONT&gt;&lt;FONT  color=#000080&gt;&lt;TT&gt;/dev/dsk&lt;/FONT&gt;&lt;/TT&gt;&lt;FONT color=#000080 size=5&gt; and  &lt;/FONT&gt;&lt;FONT color=#000080&gt;&lt;TT&gt;/dev/rdsk&lt;/FONT&gt;&lt;/TT&gt;&lt;FONT color=#000080  size=5&gt;)&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Overview&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Whether installing a SCSI controller or even an additional IDE    disk to a Sun Solaris machine, the Solaris O/S will: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;Create &lt;I&gt;Disk Device Files&lt;/I&gt; under the &lt;I&gt;Hardware Device    Tree&lt;/I&gt; (&lt;TT&gt;/devices&lt;/TT&gt;). &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Create symbolic links in &lt;TT&gt;/dev/dsk&lt;/TT&gt;, &lt;TT&gt;/dev/rdsk&lt;/TT&gt;,    and &lt;TT&gt;/dev/cfg&lt;/TT&gt; that point to the devices in the &lt;TT&gt;/devices&lt;/TT&gt;    directory. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Make entries in the &lt;TT&gt;/etc/path_to_inst&lt;/TT&gt; file.  &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;BLOCKQUOTE&gt;Things will generally work fine until you decide to remove or move    a device in the system. I have had situations where I have run out of devices    on a host because of Sun's poor ability to remove invalid (hanging) disk    device files after removing a device. This is one area where Sun could really    improve. It looks like they are trying new things with the &lt;B&gt;&lt;TT&gt;boot    -p&lt;/B&gt;&lt;/TT&gt; option but I've only ever seen it remove things once. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;There are other times when I simply wanted to replace a certain    type of SCSI controller and wanted to reuse the controller ID's from a    previously removed card. For example, I have a host (an E450) which had 2    internal controllers (0 and 1) and a dual differential SCSI card installed    (controllers 2 and 3). I removed the dual differential SCSI host adapter and    decided to replace it with a Single-Ended SCSI host adapter but Solaris would    always assign them controller numbers 4 and 5. I wanted the system to reassign    controller numbers 2 and 3 for the new host adapter but links still existed    for the original dual differential SCSI host adapter. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;My intention in this article is to provide several solutions for    either renumbering disk device files (SCSI controllers, SCSI disks, IDE    controllers, IDE disks, etc.) or simply removing old ones from replaced or    removed devices. Please keep in mind that this article has been put together    from notes I found during many searches for answers on the Internet. If anyone    reading this has other solutions, please &lt;A    href="mailto:jhunter@iDevelopment.info"&gt;email me&lt;/A&gt; and I would be happy to    post them for others going through this procedure.  &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Using the &lt;TT&gt;devfsadm&lt;/TT&gt; Command&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The &lt;B&gt;&lt;TT&gt;devfsadm&lt;/B&gt;&lt;/TT&gt; command was introduced with Solaris 7    and can be found in &lt;TT&gt;/usr/sbin/devfsadm&lt;/TT&gt;. This command is used to    maintain the &lt;TT&gt;/dev&lt;/TT&gt; and &lt;TT&gt;/devices&lt;/TT&gt; namespaces. The    &lt;B&gt;&lt;TT&gt;devfsadm&lt;/B&gt;&lt;/TT&gt; command replaces the previous suite of &lt;I&gt;devfs    administration tools&lt;/I&gt; including &lt;B&gt;&lt;TT&gt;drvconfig(1M)&lt;/B&gt;&lt;/TT&gt;,    &lt;B&gt;&lt;TT&gt;disks(1M)&lt;/B&gt;&lt;/TT&gt;, &lt;B&gt;&lt;TT&gt;tapes(1M)&lt;/B&gt;&lt;/TT&gt;,    &lt;B&gt;&lt;TT&gt;ports(1M)&lt;/B&gt;&lt;/TT&gt;, &lt;B&gt;&lt;TT&gt;audlinks(1M)&lt;/B&gt;&lt;/TT&gt;, and    d&lt;B&gt;&lt;TT&gt;evlinks(1M)&lt;/B&gt;&lt;/TT&gt;. To maintain backwards compatibility, all    previous devfs commands are hard links to &lt;B&gt;&lt;TT&gt;devfsadm&lt;/B&gt;&lt;/TT&gt;.  &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;In many cases, you only need run the command: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;  # &lt;B&gt;devfsadm -C&lt;/PRE&gt;&lt;/B&gt; &lt;BLOCKQUOTE&gt;to invoke the cleanup routines that are not normally invoked to    remove dangling logical links. &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Manual Methods&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The &lt;B&gt;&lt;TT&gt;devfsadm&lt;/B&gt;&lt;/TT&gt; command was introduced with Solaris    7. For those running older versions of Solaris (i.e. Solaris 2.6) or simply    want to perform all manual steps, this section describes the procedures to do    just that. &lt;/BLOCKQUOTE&gt; &lt;OL&gt;   &lt;OL&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Make a backup of your &lt;TT&gt;/etc/path_to_inst&lt;/TT&gt; file and then modify        the file so that all that exists is the SCSI / IDE reference for the boot        drive. Remove all of the "pcipsy" and "glm" entries except for the one        that is used by the controller that has the boot drive. &lt;I&gt;Take note of        the physical path of the controller you want to renumber.&lt;/I&gt;      &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Remove all &lt;TT&gt;/dev/dsk/cX*&lt;/TT&gt; and &lt;TT&gt;/dev/rdsk/cX*&lt;/TT&gt; files        where &lt;TT&gt;X&lt;/TT&gt; is the controller number(s) you want to remove and even        those that no longer exist. &lt;I&gt;(In the case of the example I provided on        the E450, that would be 2, 3, 4, and 5.)&lt;/I&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Remove all &lt;TT&gt;/dev/cfg/cX&lt;/TT&gt; symbolic links where X is the        controller(s) you want to remove. Make sure to not remove the controller        with the boot drive. &lt;I&gt;(Again, in the case of the example I provided on        the E450, that would be 2, 3, 4, and 5.)&lt;/I&gt; It turns out this was one of        the crucial steps that needed to be complete in order for Solaris to reuse        controller numbers 2 and 3. The O/S was not able to reassign both of these        controller numbers while the links (&lt;TT&gt;/dev/cfg/2&lt;/TT&gt; and        &lt;TT&gt;/dev/cfg/3&lt;/TT&gt;) still existed. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Remove all files under &lt;TT&gt;/devices/*&lt;/TT&gt; for the controller you want        to remove or renumber as indicated in Step #1. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Remove all files in &lt;TT&gt;/dev/sdXX*&lt;/TT&gt; that symbolically link to        controller(s) you do not want anymore. This may not be completely        necessary, but it does clean things up. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Reboot the server with the "-srv" option: &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;DIR&gt;&lt;PRE&gt;ok &lt;B&gt;boot -srv&lt;/PRE&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/B&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-8280514969608067793?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/8280514969608067793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=8280514969608067793&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8280514969608067793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8280514969608067793'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/removing-invalid-disk-device-files.html' title='Removing Invalid Disk Device Files (/dev/dsk and /dev/rdsk) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-5167029173645473761</id><published>2007-01-10T21:16:00.001-08:00</published><updated>2007-01-10T21:16:45.403-08:00</updated><title type='text'>Understanding Disk Device Files (i.e. breaking down c0t2d0s7) </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Understanding Disk Device Files (i.e. breaking down &lt;/FONT&gt;&lt;FONT  color=#000080&gt;&lt;TT&gt;c0t2d0s7&lt;/FONT&gt;&lt;/TT&gt;&lt;FONT color=#000080 size=5&gt;)&lt;/U&gt;&lt;/FONT&gt;  &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Overview&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Under Solaris, one of the most involved UNIX devices to understand    is the &lt;I&gt;disk device file&lt;/I&gt;. Here are several key points that may help:  &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;In many cases, a &lt;I&gt;disk device file&lt;/I&gt; (i.e.    &lt;TT&gt;/dev/dsk/c0t2d0s7&lt;/TT&gt;) refers to a particular partition (aka "slice") of    a disk, and not the entire physical device. There are several device files    which refer to the entire physical device, but are rarely used. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;For every disk device, there are usually two device files - the    &lt;I&gt;block device&lt;/I&gt; and the &lt;I&gt;character ("raw") device&lt;/I&gt;. In general:  &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;DIR&gt;&lt;I&gt;&lt;U&gt; &lt;BLOCKQUOTE&gt;block devices&lt;/I&gt;&lt;/U&gt; are generally stored under &lt;TT&gt;/dev/dsk&lt;/TT&gt;    and used for filesystem type access (e.g &lt;B&gt;&lt;TT&gt;mount&lt;/B&gt;&lt;/TT&gt;)  &lt;/BLOCKQUOTE&gt;&lt;I&gt;&lt;U&gt; &lt;BLOCKQUOTE&gt;character devices&lt;/I&gt;&lt;/U&gt; are generally stored under    &lt;TT&gt;/dev/rdsk&lt;/TT&gt; used for everything else (e.g. &lt;B&gt;&lt;TT&gt;fsck&lt;/B&gt;&lt;/TT&gt;,    &lt;B&gt;&lt;TT&gt;newfs&lt;/B&gt;&lt;/TT&gt;, etc..) &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt; &lt;BLOCKQUOTE&gt;Discs are generally attached to a controller (or a bus) which can    handle multiple devices. IDE and SCSI are both common attach methods. This    tends to make &lt;I&gt;disk device filename&lt;/I&gt; more complex than other types of    devices. &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;/etc/vfstab&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;To see the difference between the &lt;I&gt;block device&lt;/I&gt; and    &lt;I&gt;character device&lt;/I&gt; for a device, consider the following. The    &lt;TT&gt;/etc/vfstab&lt;/TT&gt; contains entries for a single filesystem on a Solaris    server: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;/dev/dsk/c0t2d0s7 /dev/rdsk/c0t2d0s7 /opt ufs 3 yes - &lt;/PRE&gt; &lt;BLOCKQUOTE&gt;The first 2 fields in the above entry, list the same disk device    as both a &lt;I&gt;block device&lt;/I&gt; ("dsk") and &lt;I&gt;character device&lt;/I&gt; ("rdsk").    The block device is used by &lt;B&gt;&lt;TT&gt;mount&lt;/B&gt;&lt;/TT&gt; when mounting the filesystem    while the &lt;I&gt;character device&lt;/I&gt; is used by &lt;B&gt;&lt;TT&gt;fsck&lt;/B&gt;&lt;/TT&gt; when    checking the filesystem and &lt;B&gt;&lt;TT&gt;newfs&lt;/B&gt;&lt;/TT&gt; when creating the    filesystem.. Both fields must be present in &lt;TT&gt;/etc/vfstab&lt;/TT&gt;.  &lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Breaking Down &lt;TT&gt;c0t2d0s7&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt;&lt;/TT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;This section breaks down the different components of a disk device    file. In this example, I will be using the disk device file:    &lt;TT&gt;c0t2d0s7&lt;/TT&gt;. The four components of the disk device file are:    controller, target, LUN and slice/partition and further defined in the    following table: &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=2 cellPadding=2 width=549 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="2%"&gt;&lt;B&gt;&lt;TT&gt;       &lt;P&gt;c0&lt;/B&gt;&lt;/TT&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="98%"&gt;       &lt;P&gt;This device is attached to controller #0. On a SPARCstation this is        usually the on-board SCSI or IDE controller. If this is a PC it usually        refers to the first IDE controller on the motherboard.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="2%"&gt;&lt;B&gt;&lt;TT&gt;       &lt;P&gt;t2&lt;/B&gt;&lt;/TT&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="98%"&gt;       &lt;P&gt;The device is target #2 - &lt;I&gt;(i.e. the second device on this        controller.)&lt;/I&gt; On a SCSI controller this is the SCSI target ID and is        usually set via a switch on any external enclosure or by jumpers on the        disk itself. On an IDE controller target #2 refers to the second IDE disk.        With IDE this is generally determined by the device's position on the IDE        cable.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="2%"&gt;&lt;B&gt;&lt;TT&gt;       &lt;P&gt;d0&lt;/B&gt;&lt;/TT&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="98%"&gt;       &lt;P&gt;The device is Logical Unit / "LUN" #0 (the first) on this target. Under        SCSI a single target can support up-to eight devices. This is rarely seen        in practice, but some hardware raid controllers use LUNs.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="2%"&gt;&lt;B&gt;&lt;TT&gt;       &lt;P&gt;s7&lt;/B&gt;&lt;/TT&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="98%"&gt;       &lt;P&gt;Slice or Partition number 7. Under Solaris, this relates to the        partition number as set when using the &lt;B&gt;&lt;TT&gt;format&lt;/B&gt;&lt;/TT&gt;      command.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-5167029173645473761?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/5167029173645473761/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=5167029173645473761&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5167029173645473761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5167029173645473761'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/understanding-disk-device-files-ie.html' title='Understanding Disk Device Files (i.e. breaking down c0t2d0s7) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-4556208203515179174</id><published>2007-01-10T21:10:00.001-08:00</published><updated>2007-01-10T21:10:54.929-08:00</updated><title type='text'>Adding SCSI Host Adapter (X6541A) into a Blade 100/150 </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Adding SCSI Host Adapter (X6541A) into a Blade 100/150&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Overview&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;A Sun Blade 100/150 can accept the following PCI SCSI host    adapters: &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=1 cellPadding=1 width=549 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="8%"&gt;&lt;B&gt;       &lt;P&gt;Option #&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="14%"&gt;&lt;B&gt;       &lt;P&gt;Top Level Part #&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="17%"&gt;&lt;B&gt;       &lt;P&gt;Manufacturing Part #&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="46%"&gt;&lt;B&gt;       &lt;P&gt;Description&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="15%"&gt;&lt;B&gt;       &lt;P&gt;Substitute Part #&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="8%"&gt;       &lt;P&gt;X1032A&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="14%"&gt;       &lt;P&gt;595-4258&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="17%"&gt;       &lt;P&gt;501-5656&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="46%"&gt;       &lt;P&gt;Single-Ended Ultra/Wide SCSI/FastEthernet (SunSwift PCI)&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="15%"&gt;       &lt;P&gt;501-2741&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="8%"&gt;       &lt;P&gt;X2222A&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="14%"&gt;       &lt;P&gt;595-5624&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="17%"&gt;       &lt;P&gt;501-5727&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="46%"&gt;       &lt;P&gt;Dual Ultra-2 SCSI/Dual FastEthernet PCI Adapter&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="15%"&gt;       &lt;P&gt;n/a&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="8%"&gt;       &lt;P&gt;X5010A&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="14%"&gt;       &lt;P&gt;595-5377&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="17%"&gt;       &lt;P&gt;375-0097&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="46%"&gt;       &lt;P&gt;Single-Channel Single-Ended Ultra/Wide SCSI (PCI)&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="15%"&gt;       &lt;P&gt;n/a&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="8%"&gt;       &lt;P&gt;X6540A&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="14%"&gt;       &lt;P&gt;595-4399&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="17%"&gt;       &lt;P&gt;375-0005&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="46%"&gt;       &lt;P&gt;Dual Single-Ended Ultra/Wide SCSI (PCI)&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="15%"&gt;       &lt;P&gt;n/a&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="8%"&gt;       &lt;P&gt;X6541A&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="14%"&gt;       &lt;P&gt;595-4414&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="17%"&gt;       &lt;P&gt;375-0006&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="46%"&gt;       &lt;P&gt;Dual Differential Ultra/Wide SCSI (PCI)&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="15%"&gt;       &lt;P&gt;n/a&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;BLOCKQUOTE&gt;In this article I will be documenting the steps for installing and    configuring a Dual Differential Ultra/Wide SCSI (PCI) host adapter (X6541A) in    a Sun Blade 150 running Solaris 8. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The above host adapters are designed to be installed in SPARC    systems running at least Solaris 2.5.1 Hardware:4/97 operating system.  &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The host adapters support up to 15 targets on each SCSI bus.  &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;Installing the Dual Differential Ultra/Wide SCSI (PCI)&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The following section documents the steps necessary to install a    Dual Differential Ultra/Wide SCSI (PCI) (X6541A) in a Sun Blade 150.  &lt;/BLOCKQUOTE&gt; &lt;OL&gt;   &lt;OL&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Check OS version&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Check the file &lt;TT&gt;/etc/release&lt;/TT&gt; to ensure you are running        Solaris 2.5.1 or higher. &lt;/BLOCKQUOTE&gt;&lt;PRE&gt;# &lt;B&gt;cat /etc/release &lt;/B&gt;           Solaris 8 2/02 s28s_u7wos_08a SPARC Copyright 2002 Sun Microsystems, Inc.  All Rights Reserved.              Assembled 18 December 2001&lt;/PRE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Exit the OS and power down the system&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Use either the &lt;TT&gt;shutdown&lt;/TT&gt; command (if this is a server        with active users that should be warned) or &lt;TT&gt;init 0&lt;/TT&gt; (if this is a        stand along server). When at the &lt;TT&gt;ok&lt;/TT&gt; prompt power down the system.      &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Unpack host adapter&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;The following items should be included with your host adapter        package: &lt;/BLOCKQUOTE&gt;     &lt;OL&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;PCI UltraSCSI host adapter &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;2 meter UltraSCSI-compliant cable &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;Electrostatic discharge (ESD) kit &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Open the computer&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Attach the wrist strap&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Attach the wrist strap between your wrist and a metal part of        the system chassis. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Disconnect power cord from computer&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Remove the filler panel for the desired slot&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;In most cases this will be just one screw to remove in order        to remove the filler panel for the desired PCI slot. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Make sure that the switches and jumpers are correctly set.&lt;/B&gt;&lt;/U&gt;        &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;For the single-ended host adapter, confirm the following        settings: &lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Make sure that all elements of switches U1 and U2 are off.      &lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Make sure that jumper TP9 is open. &lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;For the differential host adapter, confirm the following        settings: &lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Make sure that all jumpers (TP1, TP2, TP3, TP5, TP6) are open.      &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Install the host adapter&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Install the host adapter into the PCI slot in your system.        Ensure to secure the card in with the screw used in the removed filler        panel. Using excessive force can bend or damage the pins.  &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Close up system&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Close up the system and remove the anti-static wrist strap.      &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Reconnect power cable&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Connect the SCSI cables&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Connect the SCSI cable to your newly installed SCSI host        adapter and then to the SCSI peripheral(s). &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Power on peripherals / system&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Power on your peripherals and then your system. &lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;NOTE: If your system starts to reboot, interrupt the reboot        process by pressing the Stop and A keys together. If this is not possible,        allow the system to complete the boot process and then bring the system to        the &lt;TT&gt;ok&lt;/TT&gt; prompt by using &lt;B&gt;&lt;TT&gt;init 0&lt;/B&gt;&lt;/TT&gt;. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Make sure the host adapter is recognized by the system&lt;/B&gt;&lt;/U&gt;      &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;Use the &lt;B&gt;&lt;TT&gt;probe-scsi-all&lt;/B&gt;&lt;/TT&gt; command to display the        SCSI devices connected to your system. For example: &lt;/BLOCKQUOTE&gt;&lt;PRE&gt;ok &lt;B&gt;probe-scsi-all &lt;/B&gt;/pci@1f,2000/scsi@2 Target 8 Unit 0 Disk SEAGATE ST34371W SUN4.2G8254 /pci@1f,2000/scsi@2,1 Target 1 Unit 0 Disk SEAGATE ST34371W SUN4.2G8254&lt;/PRE&gt;     &lt;BLOCKQUOTE&gt;In the example, the first SCSI port (scsi@2) has one disk        drive connected (target 8). The second SCSI port (scsi@2,1) also has one        disk drive connected (target 1). &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Reboot your system (using the -r option)&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;ok &lt;B&gt;boot -r&lt;/PRE&gt;&lt;U&gt;     &lt;BLOCKQUOTE&gt;       &lt;LI&gt;Test the installation with SunVTS&lt;/B&gt;&lt;/U&gt; &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;You can use the SunVTS diagnostic program exercise your system        to verify the functionality, reliability, and configuration of the new        host adapter card. It is recommended to run the SunVTS program before        attempting to utilize the new host adapter for any applications.      &lt;/BLOCKQUOTE&gt;     &lt;BLOCKQUOTE&gt;The SunVTS program needs to be run as the &lt;I&gt;root&lt;/I&gt; userid.      &lt;/BLOCKQUOTE&gt;&lt;PRE&gt;# &lt;B&gt;su&lt;/PRE&gt;&lt;/B&gt;     &lt;BLOCKQUOTE&gt;Bring up the SunVTS program (GUI Window): &lt;/BLOCKQUOTE&gt;&lt;PRE&gt;# &lt;B&gt;/opt/SUNWvts/bin/sunvts&lt;/PRE&gt;     &lt;OL&gt;&lt;/B&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;Select a disk drive (any disk) that is attached to the host adapter          card you just installed. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;Start the test by hitting the "Start" button. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;Verify that no errors have occurred by checking the SunVTS status          window. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;       &lt;BLOCKQUOTE&gt;         &lt;LI&gt;If no problems occur, stop SunVTS by hitting the "Stop" button and          exit from the SunVTS application. &lt;/LI&gt;&lt;/BLOCKQUOTE&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;/OL&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;Your host adapter card is ready to run  applications!&lt;/BLOCKQUOTE&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-4556208203515179174?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/4556208203515179174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=4556208203515179174&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/4556208203515179174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/4556208203515179174'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/adding-scsi-host-adapter-x6541a-into.html' title='Adding SCSI Host Adapter (X6541A) into a Blade 100/150 '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-6646510111018129635</id><published>2007-01-10T21:09:00.000-08:00</published><updated>2007-01-10T21:10:00.140-08:00</updated><title type='text'>Solstice DiskSuite - (Solaris 2.5.1 - Solaris 8) </title><content type='html'>&lt;B&gt;&lt;U&gt;&lt;FONT color=#800000&gt; &lt;P&gt;Solstice DiskSuite - &lt;I&gt;(Solaris 2.5.1 - Solaris 8)&lt;/B&gt;&lt;/I&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;   &lt;P&gt;&lt;A href="http://wwws.sun.com/software/solaris/8/ds/ds-disksuite/"&gt;Solstice    DiskSuite Software Data Sheet - (Solaris 8)&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_SolsticeDiskSuiteSupportMatrix.shtml"&gt;DiskSuite    Support Matrix&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_IntroductionToSolsticeDiskSuite.shtml"&gt;Introduction&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_InstallingSolsticeDiskSuite421.shtml"&gt;Installing&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CommandLineToolsSolsticeDiskSuite421.shtml"&gt;Command    Line Tools&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml"&gt;&lt;B&gt;Creating    Metadevices - &lt;I&gt;(Using DiskSuite 4.2.1 Commands)&lt;/B&gt;&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml#State Database Replicas"&gt;Metadevice    State Database - &lt;I&gt;(State Database Replicas)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml#Creating a Stripe"&gt;Creating    a Stripe - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml#Creating a Concatenation"&gt;Creating    a Concatenation - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml#Creating Mirrors"&gt;Creating    Mirrors - &lt;I&gt;(RAID 1)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml#Creating a RAID5 Volume"&gt;Creating    a RAID5 Volume - &lt;I&gt;(RAID 5)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml#Creating a Trans Metadevice"&gt;Creating    a Trans Metadevice&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_CreateMetadevices_DiskSuiteCommands421.shtml#Creating a Hot Spare"&gt;Creating    a Hot Spare&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml"&gt;&lt;B&gt;Removing    Metadevices - &lt;I&gt;(Using DiskSuite 4.2.1 Commands)&lt;/B&gt;&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml#Removing a State Database Replica"&gt;Removing    a State Database Replica&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml#Removing a Stripe"&gt;Removing    a Stripe - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml#Removing a Concatenation"&gt;Removing    a Concatenation - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml#Removing a Mirror"&gt;Removing    a Mirror - &lt;I&gt;(RAID 1)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml#Removing a RAID5 Volume"&gt;Removing    a RAID5 Volume - &lt;I&gt;(RAID 5)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml#Removing a Trans Metadevice"&gt;Removing    a Trans Metadevice&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://98/SOLARIS_RemovingMetadevices_DiskSuiteCommands421.shtml#Removing a Hot Spare"&gt;Removing    a Hot Spare&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-6646510111018129635?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/6646510111018129635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=6646510111018129635&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6646510111018129635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6646510111018129635'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/solstice-disksuite-solaris-251-solaris.html' title='Solstice DiskSuite - (Solaris 2.5.1 - Solaris 8) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-1682539579629431794</id><published>2007-01-10T21:08:00.001-08:00</published><updated>2007-01-10T21:08:48.522-08:00</updated><title type='text'>Solaris Volume Manager - (Solaris 9) </title><content type='html'>&lt;B&gt;&lt;U&gt;&lt;FONT color=#800000&gt; &lt;P&gt;Solaris Volume Manager - &lt;I&gt;(Solaris 9)&lt;/B&gt;&lt;/I&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;   &lt;P&gt;&lt;A    href="http://wwws.sun.com/software/solaris/ds/ds-volumemgr/index.html"&gt;Solaris    Volume Manager Data Sheet - (Solaris 9)&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_IntroductionToVolumeManager9.shtml"&gt;Introduction&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_InstallingVolumeManager9.shtml"&gt;Installing&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CommandLineToolsVolumeManager9.shtml"&gt;Command Line    Tools&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_StartingtheVolumeManagerConsoleVolumeManager9.shtml"&gt;Starting    the Volume Manager Console GUI - (Enhanced Storage)&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CreateVolumes_VolumeManager9Commands.shtml"&gt;&lt;B&gt;Creating    Volumes - &lt;I&gt;(Using Solaris 9 Volume Manager Commands)&lt;/B&gt;&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CreateVolumes_VolumeManager9Commands.shtml#State Database Replicas"&gt;State    Database - &lt;I&gt;(State Database Replicas)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CreateVolumes_VolumeManager9Commands.shtml#Creating a Stripe"&gt;Creating    a Stripe - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CreateVolumes_VolumeManager9Commands.shtml#Creating a Concatenation"&gt;Creating    a Concatenation - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CreateVolumes_VolumeManager9Commands.shtml#Creating Mirrors"&gt;Creating    Mirrors - &lt;I&gt;(RAID 1)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CreateVolumes_VolumeManager9Commands.shtml#Creating a RAID5 Volume"&gt;Creating    a RAID5 Volume - &lt;I&gt;(RAID 5)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_CreateVolumes_VolumeManager9Commands.shtml#Creating a Hot Spare"&gt;Creating    a Hot Spare&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_RemovingVolumes_VolumeManager9Commands.shtml"&gt;&lt;B&gt;Removing    Volumes - &lt;I&gt;(Using Solaris 9 Volume Manager Commands)&lt;/B&gt;&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_RemovingVolumes_VolumeManager9Commands.shtml#Removing a State Database Replica"&gt;Removing    a State Database Replica&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_RemovingVolumes_VolumeManager9Commands.shtml#Removing a Stripe"&gt;Removing    a Stripe - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_RemovingVolumes_VolumeManager9Commands.shtml#Removing a Concatenation"&gt;Removing    a Concatenation - &lt;I&gt;(RAID 0)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_RemovingVolumes_VolumeManager9Commands.shtml#Removing a Mirror"&gt;Removing    a Mirror - &lt;I&gt;(RAID 1)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_RemovingVolumes_VolumeManager9Commands.shtml#Removing a RAID5 Volume"&gt;Removing    a RAID5 Volume - &lt;I&gt;(RAID 5)&lt;/I&gt;&lt;/A&gt;&lt;BR&gt;&lt;A    href="outbind://97/SOLARIS_RemovingVolumes_VolumeManager9Commands.shtml#Removing a Hot Spare"&gt;Removing    a Hot Spare&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-1682539579629431794?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/1682539579629431794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=1682539579629431794&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/1682539579629431794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/1682539579629431794'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/solaris-volume-manager-solaris-9.html' title='Solaris Volume Manager - (Solaris 9) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-3939696430367078764</id><published>2007-01-10T21:06:00.001-08:00</published><updated>2007-01-10T21:06:42.889-08:00</updated><title type='text'>Using NFS - (Solaris) </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Using NFS - (Solaris)&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt; &lt;P&gt;This brief article touches on several of the important commands that are used  to NFS a file system on Solaris. Now keep in mind that with most Solaris  configurations; enabling a Sun Solaris server to mount or share a file system,  the required daemons will already be running. If not, this article may help you  with this process. &lt;/P&gt; &lt;P&gt;The first thing to ensure is that the proper daemons for running NFS are  started. If unsure, I will typically just run them when I cannot determine  whether or not they are running: &lt;/P&gt; &lt;DIR&gt;&lt;PRE&gt;$ &lt;B&gt;su - &lt;/B&gt;$ &lt;B&gt;cd /usr/lib/nfs &lt;/B&gt;$ &lt;B&gt;./mountd &lt;/B&gt;$ &lt;B&gt;./nfsd&lt;/PRE&gt;&lt;/DIR&gt;&lt;/B&gt; &lt;TABLE cellSpacing=0 cellPadding=1 width=580 border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;B&gt;&lt;FONT color=#ff0000&gt;       &lt;P&gt;NOTE&lt;/FONT&gt;:&lt;/B&gt; &lt;/P&gt;       &lt;DIR&gt;       &lt;DIR&gt;&lt;B&gt;&lt;TT&gt;       &lt;P&gt;mountd:&lt;/B&gt;&lt;/TT&gt; RPC server that answers requests for NFS access        information and file system mount requests &lt;/P&gt;&lt;B&gt;&lt;TT&gt;       &lt;P&gt;nfsd:&lt;/B&gt;&lt;/TT&gt; The daemon that handles client file system requests        &lt;/P&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;B&gt;&lt;U&gt; &lt;P&gt;Sharing A File System&lt;/B&gt;&lt;/U&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The following example will &lt;I&gt;share&lt;/I&gt; a file system    &lt;TT&gt;/software&lt;/TT&gt; so that others may be able to mount it: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# &lt;B&gt;share /software&lt;/PRE&gt;&lt;/B&gt; &lt;BLOCKQUOTE&gt;If I want to check all file systems being shared from my system:  &lt;/BLOCKQUOTE&gt;&lt;PRE&gt;# &lt;B&gt;share &lt;/B&gt;-               /software   rw   ""&lt;/PRE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt; &lt;P&gt;How to NFS A File System&lt;/B&gt;&lt;/U&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Now, from another machine, I want to NFS the file system that is    being shared above: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# &lt;B&gt;mount -F nfs alex:/software /mnt/software&lt;/PRE&gt;&lt;/DIR&gt;&lt;U&gt; &lt;P&gt;How to Unmount an NFS File System&lt;/B&gt;&lt;/U&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Finally, let's unmount the previously mounted file system:  &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# &lt;B&gt;umount /mnt/software&lt;/PRE&gt;&lt;/DIR&gt;&lt;/B&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-3939696430367078764?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/3939696430367078764/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=3939696430367078764&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3939696430367078764'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3939696430367078764'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/using-nfs-solaris.html' title='Using NFS - (Solaris) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-8802532278750080957</id><published>2007-01-10T21:05:00.001-08:00</published><updated>2007-01-10T21:05:53.174-08:00</updated><title type='text'></title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Determine Which Package a Particular File Belongs To - (Sun  Solaris)&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt; &lt;P&gt;&lt;BR&gt;Use the &lt;B&gt;&lt;TT&gt;pkgchk&lt;/B&gt;&lt;/TT&gt; command to determine which package a  particular file belongs to. The syntax is: &lt;/P&gt;&lt;PRE&gt;# /usr/sbin/pkgchk -l -p /absolute/path/todir&lt;/PRE&gt; &lt;P&gt;For example, &lt;/P&gt;&lt;PRE&gt;# &lt;B&gt;/usr/sbin/pkgchk -l -p /usr/bin/pgrep &lt;/B&gt;Pathname: /usr/bin/pgrep Type: regular file Expected mode: 0555 Expected owner: root Expected group: bin Expected file size (bytes): 14688 Expected sum(1) of contents: 63968 Expected last modification: Mar 16 05:53:45 AM 2000 Referenced by the following packages:         SUNWcsu Current status: installed&lt;/PRE&gt; &lt;P&gt;You can also simply query the packages directory as follows: &lt;/P&gt;&lt;PRE&gt;# &lt;B&gt;grep /usr/bin/pgrep /var/sadm/install/contents &lt;/B&gt;/usr/bin/pgrep f none 0555 root bin 14688 63968 953204025 SUNWcsu&lt;/PRE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-8802532278750080957?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/8802532278750080957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=8802532278750080957&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8802532278750080957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8802532278750080957'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/determine-which-package-particular-file.html' title=''/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-3559994442460331881</id><published>2007-01-10T21:04:00.003-08:00</published><updated>2007-01-10T21:04:50.283-08:00</updated><title type='text'>Diagnostic Command - (Sun Solaris) </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Diagnostic Command - (Sun Solaris)&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;prtdiag&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Use the following command to obtain detailed diagnostics    information about your system configuration: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# &lt;B&gt;/usr/platform/`uname -i`/sbin/prtdiag -v &lt;/B&gt; System Configuration: Sun Microsystems  sun4u Sun Blade 150 (UltraSPARC-IIe 650MHz) System clock frequency: 93 MHZ Memory size: 1.75GB  ==================================== CPUs ====================================                E$          CPU     CPU       Temperature CPU  Freq      Size        Impl.   Mask     Die    Ambient ---  --------  ----------  ------  ----  --------  --------  0    650 MHz  512KB       US-IIe   3.3     56 C     29 C  ================================= IO Devices =================================      Bus   Freq Brd  Type  MHz   Slot        Name                              Model ---  ----  ----  ----------  --------------------------------  ----------------------  0   pci    33            7  isa/dma-isadma (dma)  0   pci    33            7  isa/serial-su16550 (serial)  0   pci    33            7  isa/serial-su16550 (serial)  0   pci    33            8  sound-pci10b9,5451.10b9.5451.1 (+  0   pci    33           12  network-pci108e,1101.1 (network)  SUNW,pci-eri  0   pci    33           12  firewire-pci108e,1102.1001 (fire+  0   pci    33           13  ide-pci10b9,5229.c3 (ide)  0   pci    33           19  SUNW,m64B (display)               ATY,RageXL  ============================ Memory Configuration ============================ Segment Table: ----------------------------------------------------------------------- Base Address       Size       Interleave Factor  Contains ----------------------------------------------------------------------- 0x0                256MB             1           Label DIMM0 0x40000000         512MB             1           Label DIMM1 0x80000000         512MB             1           Label DIMM2 0xc0000000         512MB             1           Label DIMM3  =============================== usb Devices ===============================  Name          Port# ------------  ----- device          4  =============================== device#4 Devices ===============================  Name          Port# ------------  ----- keyboard      mouse ============================ Environmental Status ============================ Fan Speeds: ---------------------------- Fan Device            Speed ---------------------------- system                 100%  ================================ HW Revisions ================================ ASIC Revisions: --------------- ebus: Rev 1  System PROM revisions: ---------------------- OBP 4.6.5 2002/06/03 16:49 POST 2.0.1 2001/08/23 17:13&lt;/PRE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;prtconf&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Use the following command to obtain detailed system information    about your Sun Solaris installation: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# &lt;B&gt;/usr/sbin/prtconf &lt;/B&gt; System Configuration:  Sun Microsystems  sun4u Memory size: 1792 Megabytes System Peripherals (Software Nodes):  SUNW,Sun-Blade-100     packages (driver not attached)         SUNW,builtin-drivers (driver not attached)         deblocker (driver not attached)         disk-label (driver not attached)         terminal-emulator (driver not attached)         obp-tftp (driver not attached)         dropins (driver not attached)         kbd-translator (driver not attached)         ufs-file-system (driver not attached)     chosen (driver not attached)     openprom (driver not attached)         client-services (driver not attached)     options, instance #0     aliases (driver not attached)     memory (driver not attached)     virtual-memory (driver not attached)     pci, instance #0         ebus, instance #1             flashprom (driver not attached)             eeprom (driver not attached)             idprom (driver not attached)         isa, instance #0             dma, instance #0                 floppy, instance #0                 parallel (driver not attached)             power, instance #0             serial, instance #0             serial, instance #1         network, instance #0         firewire, instance #0         usb (driver not attached)         pmu, instance #0             i2c, instance #0                 temperature, instance #0                 card-reader (driver not attached)                 dimm (driver not attached)                 dimm (driver not attached)                                 dimm (driver not attached)                 dimm (driver not attached)             ppm, instance #0             beep, instance #0             fan-control, instance #0         sound (driver not attached)         ide, instance #0             disk (driver not attached)             cdrom (driver not attached)             dad, instance #0             dad, instance #1             sd, instance #0         pci (driver not attached)         SUNW,m64B, instance #0     SUNW,UltraSPARC-IIe, instance #0     pseudo, instance #0&lt;/PRE&gt;&lt;/DIR&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-3559994442460331881?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/3559994442460331881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=3559994442460331881&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3559994442460331881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3559994442460331881'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/diagnostic-command-sun-solaris.html' title='Diagnostic Command - (Sun Solaris) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-6565781130380009604</id><published>2007-01-10T21:04:00.001-08:00</published><updated>2007-01-10T21:04:07.266-08:00</updated><title type='text'>Using Package Manager on Solaris </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Using Package Manager on Solaris&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#800000&gt; &lt;P&gt;Adding a Package&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;PRE&gt;  # &lt;B&gt;pkgadd -d samba-2.0.5-sol7-sparc-local&lt;/PRE&gt;&lt;U&gt;&lt;FONT color=#800000&gt; &lt;P&gt;Checking for Packages&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;PRE&gt;  # &lt;B&gt;pkginfo | grep -i samba &lt;/B&gt;  application SMCsamba       samba&lt;/PRE&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#800000&gt; &lt;P&gt;Removing a Package&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;PRE&gt;  # &lt;B&gt;pkgrm SMCsamba&lt;/PRE&gt;&lt;/B&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-6565781130380009604?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/6565781130380009604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=6565781130380009604&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6565781130380009604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6565781130380009604'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/using-package-manager-on-solaris.html' title='Using Package Manager on Solaris '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-7660737690095947584</id><published>2007-01-10T21:03:00.001-08:00</published><updated>2007-01-10T21:03:35.660-08:00</updated><title type='text'>Configuring Power Management (Sun Blades Only) </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Configuring Power Management (Sun Blades Only)&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt; &lt;P&gt;Hard drive and system power management are adjustable with the  &lt;B&gt;&lt;TT&gt;dtpower&lt;/B&gt;&lt;/TT&gt; application with Solaris 8 7/01 release and higher.  However, the power management features were not present in Solaris 8 10/00 and  Solaris 8 1/01 releases. By default, power management is &lt;I&gt;enabled&lt;/I&gt; on all  new Sun Blade systems. &lt;I&gt;(I really wish Sun would change this!)&lt;/I&gt; &lt;/P&gt; &lt;P&gt;When the system is in low-power mode, the hard drive eventually spins down to  conserve power. Later, when you perform a task that accesses the hard drive, the  hard drive spins up again. You might have to wait a few seconds for the hard  drive to spin up to full speed. If you find that the delay is inconvenient, you  can turn off Energy Star power management using one of the two methods provided  below: &lt;/P&gt;&lt;B&gt;&lt;U&gt; &lt;P&gt;Method #1&lt;/B&gt;&lt;/U&gt; &lt;/P&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;P&gt;You can disable the Energy Star power management feature by using the  &lt;B&gt;&lt;TT&gt;dtpower&lt;/B&gt;&lt;/TT&gt; application. &lt;/P&gt; &lt;P&gt;Login as the "root" account and at the system prompt type: &lt;/P&gt;&lt;PRE&gt;# &lt;B&gt;/usr/openwin/bin/dtpower&lt;/PRE&gt;&lt;/B&gt; &lt;P&gt;The dtpower application is displayed. &lt;/P&gt; &lt;P&gt;Under the Current power saving scheme menu, select &lt;I&gt;Disabled&lt;/I&gt;. &lt;/P&gt; &lt;P&gt;Press the OK button. &lt;/P&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;P&gt;&lt;BR&gt;&lt;B&gt;&lt;U&gt;Method #2&lt;/B&gt;&lt;/U&gt; &lt;/P&gt; &lt;P&gt;The main configuration file for controller Power Management is  &lt;TT&gt;/etc/power.conf&lt;/TT&gt;. &lt;/P&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;P&gt;As the root user ID, edit the &lt;TT&gt;/etc/power.conf&lt;/TT&gt; file as follows to  disable all Automatic Power Management: &lt;/P&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;TABLE cellSpacing=2 cellPadding=2 width=550 border=1&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center&gt;&lt;PRE&gt;# # Copyright (c) 1996 - 2001 by Sun Microsystems, Inc. # All rights reserved. # #pragma ident   "@(#)power.conf 1.14    99/10/18 SMI" # # Power Management Configuration File #  # Statefile     Path statefile               /usr/.CPR   # Auto-Shutdown Idle(min)       Start/Finish(hh:mm)     Behavior autoshutdown    30              9:00 9:00       noshutdown  device-dependency-property removable-media /dev/fb &lt;B&gt;autopm          disable &lt;/B&gt; system-threshold                always-on&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;P&gt;Run the command: &lt;/P&gt;&lt;PRE&gt;# &lt;B&gt;/usr/sbin/pmconfig&lt;/PRE&gt;&lt;/B&gt; &lt;P&gt;This utility is run from the command line after manual changes have been made  to the &lt;TT&gt;/etc/power.conf&lt;/TT&gt; file. For editing changes made to the  &lt;TT&gt;/etc/power.conf&lt;/TT&gt; file to take effect, users must run  &lt;B&gt;&lt;TT&gt;pmconfig&lt;/B&gt;&lt;/TT&gt;. &lt;/P&gt; &lt;P&gt;pmconfig is also run at each system boot. &lt;/P&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-7660737690095947584?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/7660737690095947584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=7660737690095947584&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/7660737690095947584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/7660737690095947584'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/configuring-power-management-sun-blades.html' title='Configuring Power Management (Sun Blades Only) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-560074449501925896</id><published>2007-01-10T21:02:00.003-08:00</published><updated>2007-01-10T21:02:55.126-08:00</updated><title type='text'>Configuring Telnet / FTP to login as root (Solaris) </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Configuring Telnet / FTP to login as root (Solaris)&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt; &lt;P&gt;Now before getting into the details of how to configure Solaris for root  logins, keep in mind that this is VERY BAD security. Make sure that you NEVER  configure your production servers for this type of login. &lt;/P&gt;&lt;B&gt;&lt;U&gt; &lt;P&gt;Configure Telnet for root logins&lt;/B&gt;&lt;/U&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;Simply edit the file &lt;CODE&gt;/etc/default/login&lt;/CODE&gt; and comment    out the following line as follows: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# If CONSOLE is set, root can only login on that device. # Comment this line out to allow remote login by root. # # CONSOLE=/dev/console&lt;/PRE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt; &lt;P&gt;Configure FTP for root logins&lt;/B&gt;&lt;/U&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;First remove the 'root' line from &lt;TT&gt;/etc/ftpusers&lt;/TT&gt;.  &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Also, don't forget to edit the file &lt;TT&gt;/etc/ftpaccess&lt;/TT&gt; and    comment out the 'deny-uid' and 'deny-gid' lines. If the file doesn't exist,    there is no need to create it. &lt;/BLOCKQUOTE&gt; &lt;TABLE cellSpacing=0 width=590 border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center bgColor=#ffffff&gt;&lt;B&gt;&lt;FONT color=#ff0000&gt;       &lt;P&gt;NOTE&lt;/FONT&gt;:&lt;/B&gt; If you are using Solaris 9 or Solaris 10, the        &lt;TT&gt;ftp*&lt;/TT&gt; files are located in  &lt;TT&gt;/etc/ftpd&lt;/TT&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-560074449501925896?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/560074449501925896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=560074449501925896&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/560074449501925896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/560074449501925896'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/configuring-telnet-ftp-to-login-as-root.html' title='Configuring Telnet / FTP to login as root (Solaris) '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-7280453884621141376</id><published>2007-01-10T21:02:00.001-08:00</published><updated>2007-01-10T21:02:24.865-08:00</updated><title type='text'>Booting Options and Using EEPROM </title><content type='html'>&lt;U&gt;&lt;FONT color=#000080 size=5&gt; &lt;P&gt;Booting Options and Using EEPROM&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt;&lt;I&gt; &lt;P&gt;by Jeff Hunter, Sr. Database Administrator&lt;/I&gt; &lt;/P&gt;&lt;B&gt;&lt;U&gt;&lt;FONT color=#000080&gt; &lt;P&gt;EEPROM Command&lt;/B&gt;&lt;/U&gt;&lt;/FONT&gt; &lt;/P&gt; &lt;BLOCKQUOTE&gt;The &lt;B&gt;&lt;TT&gt;eeprom&lt;/B&gt;&lt;/TT&gt; command is located in    &lt;B&gt;&lt;TT&gt;/usr/sbin/eeprom&lt;/B&gt;&lt;/TT&gt;. The &lt;TT&gt;eeprom&lt;/TT&gt; command is used to    display or change the values of parameters in the EEPROM. It processes    parameters in the order given. When processing a parameter accompanied by a    value, &lt;TT&gt;eeprom&lt;/TT&gt; makes the indicated alteration to the EEPROM; otherwise    it displays the parameter's value. When given no parameter specifiers,    &lt;TT&gt;eeprom&lt;/TT&gt; displays the values of all EEPROM parameters. A '-' (hyphen)    flag specifies that parameters and values are to be read from the standard    input (one parameter or &lt;I&gt;parameter = value&lt;/I&gt; per line). Only the    super-user (root) may alter the EEPROM contents. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;When the &lt;TT&gt;eeprom&lt;/TT&gt; command is executed in user mode, the    parameters with a trailing question mark (?) need to be enclosed in double    quotation marks (" ") to prevent the shell from interpreting the question    mark. Preceding the question mark with an escape character (\) will also    prevent the shell from interpreting the question mark. &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;The remainder of this section descibes some of the common usages    of the &lt;TT&gt;eeprom&lt;/TT&gt; command in Solaris. &lt;/BLOCKQUOTE&gt;&lt;B&gt;&lt;U&gt; &lt;BLOCKQUOTE&gt;Query Values&lt;/B&gt;&lt;/U&gt; &lt;/BLOCKQUOTE&gt; &lt;DIR&gt; &lt;BLOCKQUOTE&gt;To query all current EEPROM values, simply use the &lt;TT&gt;eeprom&lt;/TT&gt;    command with no arguments. If you only want to determine one EEPROM value,    specify it as an argument. Here are two examples of using the &lt;TT&gt;eeprom&lt;/TT&gt;    command: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# &lt;B&gt;eeprom auto-boot? &lt;/B&gt;auto-boot?=true # &lt;B&gt;eeprom &lt;/B&gt;test-args: data not available. diag-passes=1 pci-probe-list=7,c,3,8,d,13,5 local-mac-address?=false fcode-debug?=false ttyb-rts-dtr-off=false ttyb-ignore-cd=true ttya-rts-dtr-off=false ttya-ignore-cd=true silent-mode?=false scsi-initiator-id=7 oem-logo: data not available. oem-logo?=false oem-banner: data not available. oem-banner?=false ansi-terminal?=true screen-#columns=80 screen-#rows=34 ttyb-mode=9600,8,n,1,- ttya-mode=9600,8,n,1,- output-device=screen input-device=keyboard load-base=16384 auto-boot?=true boot-command=boot diag-file: data not available. diag-device=disk net boot-file: data not available. boot-device=disk net use-nvramrc?=false nvramrc: data not available. security-mode=none security-password: data not available. security-#badlogins=0 mfg-mode=off diag-level=max diag-switch?=false error-reset-recovery=boot&lt;/PRE&gt;&lt;/DIR&gt;&lt;B&gt;&lt;U&gt; &lt;BLOCKQUOTE&gt;auto-boot?&lt;/B&gt;&lt;/U&gt; &lt;/BLOCKQUOTE&gt; &lt;BLOCKQUOTE&gt;Used to control the &lt;I&gt;auto-boot&lt;/I&gt; feature. This option controls    whether the system directly boots up. You can disable &lt;I&gt;auto-boot&lt;/I&gt; so next    time it stays at the &lt;TT&gt;ok&lt;/TT&gt; prompt for starting installations. Use the    following command and reboot the system: &lt;/BLOCKQUOTE&gt; &lt;DIR&gt;&lt;PRE&gt;# &lt;B&gt;eeprom "auto-boot?"=false&lt;/PRE&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/B&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-7280453884621141376?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/7280453884621141376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=7280453884621141376&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/7280453884621141376'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/7280453884621141376'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2007/01/booting-options-and-using-eeprom.html' title='Booting Options and Using EEPROM '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-8112372658157580932</id><published>2006-12-28T02:52:00.001-08:00</published><updated>2006-12-28T02:52:25.698-08:00</updated><title type='text'>I/O Bottleneck - Trouble shooting</title><content type='html'>&lt;STRONG&gt;&lt;FONT face=Verdana&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;H1&gt;What does 100 percent busy mean?&lt;/H1&gt;&lt;FONT  face="verdana, arial, geneva, sans-serif" size=-2&gt;Unix Insider  8/1/99&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;&lt;!-- Deck : deck.pt -------------------------------------------------&gt;&lt;!-------------------------------------------------------------------&gt;&lt;FONT  face="verdana, arial, geneva, sans-serif" size=-2&gt;&lt;STRONG&gt;&lt;!-- Author : -------------------------------------------------------&gt;&lt;!-------------------------------------------------------------------&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT  face="verdana, arial, geneva, sans-serif" size=-1&gt;&lt;!-- Body -----------------------------------------------------------&gt; &lt;DIV class=articletxt&gt; &lt;P&gt;&lt;STRONG&gt;Q:&lt;/STRONG&gt; Some of my disks get really slow when they are nearly 100  percent busy; however, when I see a striped volume or hardware RAID unit at high  utilization levels, it still seems to respond quickly. Why is this? Do the old  rules about high utilization still apply?&lt;/P&gt; &lt;P&gt;&lt;STRONG&gt;A:&lt;/STRONG&gt; This occurs because more complex systems don't obey the  same rules as simple systems when it comes to response time, throughput, and  utilization. Even the simple systems aren't so simple. I'll begin our  examination of this phenomenon by looking at a single disk, and then move on to  combinations.&lt;/P&gt; &lt;P&gt;Part of this answer is based on my September 1997 &lt;STRONG&gt;Performance  Q&amp;amp;A&lt;/STRONG&gt; column. The information from the column was updated and  included in my book as of April 1998, and has been further updated for inclusion  in &lt;EM&gt;Sun BluePrints for Resource Management.&lt;/EM&gt; Written by several members  of our group at Sun, this book will be published this summer (see &lt;A  href="http://storage.itworld.com/4650/UIR990801perf/page_1.html#resources"&gt;Resources&lt;/A&gt;  for more information on both the book and the column). I've added much more  explanation and several examples here.&lt;/P&gt; &lt;P&gt;&lt;STRONG&gt;Measurements on a single disk&lt;/STRONG&gt;&lt;BR&gt;In an old-style,  single-disk model, the device driver maintains a queue of waiting requests that  are serviced one at a time by the disk. The terms &lt;EM&gt;utilization, service time,  wait time, throughput,&lt;/EM&gt; and &lt;EM&gt;wait queue length&lt;/EM&gt; have well-defined  meanings in this scenario; and, for this sort of basic system, the setup is so  simple that a very basic queuing model fits it well.&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=265 align=left border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=90 alt=UIR990801perffig1 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801perffig1.gif"        width=265 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif" size=-2&gt;&lt;B&gt;Figure 1.        The simple disk model&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;Over time, disk technology has moved on. Nowadays, a standard disk is  SCSI-based and has an embedded controller. The disk drive contains a small  microprocessor and about 1 MB of RAM. It can typically handle up to 64  outstanding requests via SCSI tagged-command queuing. The system uses an SCSI  host bus adaptor to talk to the disk. In large systems, there is yet another  level of intelligence and buffering in a hardware RAID controller. However, the  &lt;CODE&gt;&lt;FONT face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; utility is still built around the  simple disk model above, and its use of terminology still assumes a single disk  that can only handle a single request at a time. In addition, &lt;CODE&gt;&lt;FONT  face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; uses the same reporting mechanism for  client-side NFS mount points and complex disk volumes set up using Solstice  DiskSuite or Veritas Volume Manager.&lt;/P&gt; &lt;P&gt;In the old days, if the device driver sent a request to the disk, the disk  would do nothing else until it completed the request. The time this process took  was the &lt;EM&gt;service time,&lt;/EM&gt; and the average service time was a physical  property of the disk itself. Disks that spun and sought faster had lower (and  thus better) service times. With today's systems, if the device driver issues a  request, that request is queued internally by the RAID controller and the disk  drive, and several more requests can be sent before a response to the first  comes back. The service time, as measured by the device driver, varies according  to the load level and queue length, and is not directly comparable to the  old-style service time of a simple disk drive. The &lt;EM&gt;response time&lt;/EM&gt; is  defined as the total waiting time in the queue plus the service time.  Unfortunately, as I've mentioned before, &lt;CODE&gt;&lt;FONT  face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; reports response time but labels it  &lt;CODE&gt;&lt;FONT face=courier&gt;svc_t&lt;/FONT&gt;&lt;/CODE&gt;. We'll see later how to calculate  the actual service time for a disk.&lt;/P&gt; &lt;P&gt;As soon as a device has one request in its internal queue, it becomes busy,  and the proportion of the time that it is busy is the &lt;EM&gt;utilization.&lt;/EM&gt; If  there is always a request waiting, then the device is 100 percent busy. Because  a single disk can only complete one I/O request at a time, it saturates at 100  percent busy. If the device has a large number of requests, and it is  intelligent enough to reorder them, it may reduce the average service time and  increase the throughput as more load is applied, even though it is already at  100 percent utilization. &lt;/P&gt; &lt;P&gt;The diagram below shows how a busy disk can operate more efficiently than a  lightly loaded disk. In practice, the main difference you would see would be a  lower service time for the busy disk, albeit with a higher average response  time. This is because all the requests are present in the queue at the start, so  the response time for the last request includes the time spent waiting for every  other request to complete. In the lightly loaded case, each request is serviced  as it is made, so there is no waiting, and response time is the same as the  service time. If you hear your disk rattling on a desktop system when you start  an application, it's because the head is seeking back and forth, as shown in the  first case. Unfortunately, starting an application tends to generate a single  thread of page-in disk reads. Each such read is not issued until the previous  one is completed, so you end up with a fairly busy disk with only one request in  the queue -- and it can't be optimized. If the disk is on a busy server instead,  there are numerous accesses coming in parallel from different transactions and  different users, so you will get a full queue and more efficient disk usage  overall.&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=518 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=233 alt=UIR990801perffig2 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801perffig2.gif"        width=518 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif" size=-2&gt;&lt;B&gt;Figure 2.        Disk head movements for a request sequence&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;&lt;STRONG&gt;Solaris disk instrumentation&lt;/STRONG&gt;&lt;BR&gt;The instrumentation provided  in the Solaris operating environment takes account of this change by taking a  request's waiting period and breaking it up into two separately measured queues.  One queue, called the &lt;EM&gt;wait queue,&lt;/EM&gt; is in the device driver; the other,  called the &lt;EM&gt;active queue,&lt;/EM&gt; is in the device itself. A read or write  command is issued to the device driver and sits in the wait queue until the SCSI  bus and disk are both ready. When the command is sent to the disk device, it  moves to the active queue until the disk sends its response. The problem with  &lt;CODE&gt;&lt;FONT face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; is that it tries to report the new  measurements using some of the original terminology. The &lt;EM&gt;wait service  time&lt;/EM&gt; is actually the time spent in the wait queue. This isn't the correct  definition of service time, in any case, and the word &lt;EM&gt;wait&lt;/EM&gt; is being  used to mean two different things.&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=518 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=87 alt=UIR990801perffig3 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801perffig3.gif"        width=518 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif" size=-2&gt;&lt;B&gt;Figure 3.        Two-stage disk model used by Solaris 2&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;Utilization (U) is defined as the busy time (B) as a percentage of the total  time (T) as shown below:&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=342 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=105 alt=UIR990801equ1 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801equ1.gif"        width=342 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif"      size=-2&gt;&lt;B&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;Now, we get to something called service time (S), but this is &lt;EM&gt;not&lt;/EM&gt;  what &lt;CODE&gt;&lt;FONT face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; prints out and calls  &lt;CODE&gt;&lt;FONT face=courier&gt;svc_t&lt;/FONT&gt;&lt;/CODE&gt;. This is the real thing! It can be  calculated as the busy time (B) divided by the number of accesses that  completed, or alternatively as the utilization (U) divided by the throughput  (X):&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=497 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=110 alt=UIR990801equ2 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801equ2.gif"        width=497 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif"      size=-2&gt;&lt;B&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;&lt;S&lt;SUB&gt;&lt;FONT size=-1&gt;run&lt;/FONT&gt;&lt;/SUB&gt; is as close as you can get to the  old-style disk service time; remember, however, that modern disks can queue more  than one command at a time and can return them in a different order than the  sequence in which they were issued, so it isn't an exact equivalent. To  calculate S&lt;SUB&gt;&lt;FONT size=-1&gt;run&lt;/FONT&gt;&lt;/SUB&gt; from &lt;CODE&gt;&lt;FONT  face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; output, you need to divide the utilization by  the total number of reads and writes, as we see here.&lt;/P&gt;&lt;PRE&gt;&lt;FONT face=courier&gt;  % iostat -xn ...                               extended device statistics   r/s  w/s   kr/s   kw/s wait actv wsvc_t asvc_t   %w   %b device  21.9 63.5 1159.1 2662.9  0.0  2.7    0.0   31.8   0    93 c3t15d0  &lt;/FONT&gt; &lt;/PRE&gt; &lt;P&gt;In this case U = 93% = 0.93, and throughput X = r/s + w/s = 21.9 + 63.5 =  85.4; so, service time S = U/X = 0.011 = 11 milliseconds (ms), while the  reported response time R = 31.8 ms. The queue length is reported as 2.7, so this  makes sense, as each request has to wait in the queue for several other requests  to be serviced.&lt;/P&gt; &lt;P&gt;Using the SE Toolkit, a modified version of &lt;CODE&gt;&lt;FONT  face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; written in SE prints out the response time and  the service time data, using the format shown below.&lt;/P&gt;&lt;PRE&gt;&lt;FONT face=courier&gt;  % &lt;STRONG&gt;se siostat.se 10&lt;/STRONG&gt; 03:42:50  ------throughput------ -----wait queue----- ----active queue---- disk      r/s  w/s   Kr/s   Kw/s qlen res_t svc_t  %ut qlen res_t svc_t  %ut c0t2d0s0  0.0  0.2    0.0    1.2 0.00  0.02  0.02    0 0.00 22.87 22.87   0 03:43:00  ------throughput------ -----wait queue----- ----active queue---- disk      r/s  w/s   Kr/s   Kw/s qlen res_t svc_t  %ut qlen res_t svc_t  %ut c0t2d0s0  0.0  3.2    0.0   23.1 0.00  0.01  0.01    0 0.72 225.45 16.20   5  &lt;/FONT&gt; &lt;/PRE&gt; &lt;P&gt;We can get the number that &lt;CODE&gt;&lt;FONT face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt;  calls service time. It's defined as the queue length (Q, shown by &lt;CODE&gt;&lt;FONT  face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; with the headings &lt;CODE&gt;&lt;FONT  face=courier&gt;wait&lt;/FONT&gt;&lt;/CODE&gt; and &lt;CODE&gt;&lt;FONT face=courier&gt;actv&lt;/FONT&gt;&lt;/CODE&gt;)  divided by the throughput; but it's actually the residence or response time and  includes all queuing effects:&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=420 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=107 alt=UIR990801equ3 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801equ3.gif"        width=420 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif"      size=-2&gt;&lt;B&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;Taking the values from our &lt;CODE&gt;&lt;FONT face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt;  example, R = Q / X = 2.7 / 85.4 = 0.0316 = 31.6 ms, which is close enough to  what &lt;CODE&gt;&lt;FONT face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; reports. The difference  between 31.6 and 31.8 is due to rounding errors in the reported values of 2.7  and 85.4. Using full precision, the result is identical to what &lt;CODE&gt;&lt;FONT  face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; calculates as the response time.&lt;/P&gt; &lt;P&gt;Another way to express response time is in terms of service time and  utilization. This method uses a theoretical model of response time that assumes  that, as you approach 100 percent utilization with a constant service time, the  response time increases to infinity:&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=498 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=107 alt=UIR990801equ4 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801equ4.gif"        width=498 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif"      size=-2&gt;&lt;B&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;Taking our example again, R = S/(1-U) = 0.011 / (1-0.93) = 0.157 = 157 ms.  This is a lot more than the measured response time of 31.8 ms, so the disk is  operating better than the simple model predicts at high utilizations. There are  several reasons for this: the disk is much more complex than the model; it is  actively trying to optimize itself, so the service time isn't constant; and the  incoming data isn't as random as the model's assumptions would have it. However,  the model does provide the right characteristics, and can be used as a simple  way to do a worst-case analysis.&lt;/P&gt; &lt;P&gt;&lt;STRONG&gt;Complex resource utilization characteristics&lt;/STRONG&gt;&lt;BR&gt;One  important characteristic of complex I/O subsystems is that the utilization  measure can be confusing. When a simple system reaches 100 percent busy, it has  also reached its maximum throughput. This is because only one thing is being  processed at a time in the I/O device. When the device being monitored is an NFS  server, a hardware RAID disk subsystem, or a striped volume, the situation is  clearly much more complex. All of these can process many requests in  parallel.&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=534 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=192 alt=UIR990801perffig4 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801perffig4.gif"        width=534 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif" size=-2&gt;&lt;B&gt;Figure 4.        Complex I/O device queue model&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;As long as a single I/O is being serviced at all times, the utilization is  reported as 100 percent, which makes sense because it means that the pool of  devices is always busy doing something. However, there is enough capacity for  additional I/Os to be serviced in parallel. Compared to a simple device, the  service time for each I/O is the same, but the queue is being drained more  quickly; thus, the average queue length and response time are less, and the peak  throughput is greater. In effect, the load on each disk is divided by the number  of disks; therefore, the true utilization of the striped disk volume is actually  above 100 percent. You can see how this arises from the alternative definition  of utilization as the throughput multiplied by the service time.&lt;/P&gt; &lt;P&gt;With only one request being serviced at a time, the busy time is the time it  takes to service one request multiplied by the number of requests. If several  requests can be serviced at once, the calculated utilization goes above 100  percent, because more than one thing can be done at a time! A four-way stripe,  with each individual disk 100 percent busy, will have the same service time as  one disk, but four times the throughput, and thus should really report up to 400  percent utilization.&lt;/P&gt; &lt;P&gt;The approximated model for response time in this case changes so that  response time stays lower for a longer period of time; but it still heads for  infinity when the underlying devices each reach 100 percent utilization.&lt;/P&gt; &lt;TABLE cellSpacing=0 cellPadding=3 width=536 align=center border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;IMG height=114 alt=UIR990801equ5 hspace=0        src="http://storage.itworld.com/shared/images/2006/12/UIR990801equ5.gif"        width=536 border=0&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;FONT face="verdana, arial, geneva, sans-serif"      size=-2&gt;&lt;B&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;&lt;STRONG&gt;Wrap up&lt;/STRONG&gt;&lt;BR&gt;So the real answer to our initial question is  that the model of disk behavior and performance that is embodied by the  &lt;CODE&gt;&lt;FONT face=courier&gt;iostat&lt;/FONT&gt;&lt;/CODE&gt; report is too simple to cope with  the reality of a complex underlying disk subsystem. We stay with the old report  to be consistent and to offer users familiar data, but in reality, a much more  sophisticated approach is required. I'm working (slowly) on figuring out how to  monitor and report on complex devices like this.&lt;/P&gt; &lt;P&gt;&lt;A name=resources&gt;&lt;/A&gt;&lt;STRONG&gt;&lt;FONT color=red&gt;Resources&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt; &lt;P&gt; &lt;UL&gt;   &lt;LI&gt;SE download site: &lt;A    href="http://www.sun.com/951001/columns/adrian/column2.html"&gt;http://www.sun.com/951001/columns/adrian/column2.html&lt;/A&gt;     &lt;LI&gt;&lt;CODE&gt;&lt;FONT face=courier&gt;virtual_adrian.se&lt;/FONT&gt;&lt;/CODE&gt; rule: &lt;A    href="http://www.sun.com/951001/columns/adrian/column2.html"&gt;http://www.sun.com/951001/columns/adrian/column2.html    &lt;/A&gt;   &lt;LI&gt;Sun BluePrints Online: The Website that promotes best practices in the    datacenter: &lt;A    href="http://www.sun.com/blueprints"&gt;http://www.sun.com/blueprints&lt;/A&gt;    &lt;LI&gt;See Adrian Cockcroft's FAQ for answers to three dozen performance-related    questions: &lt;A    href="http://www.itworld.com/Comp/3380/UIR010329cockcroftletters/"&gt;http://www.itworld.com/Comp/3380/UIR010329cockcroftletters/&lt;/A&gt;    &lt;/LI&gt;&lt;/UL&gt; &lt;P&gt;&lt;FONT color=#000080&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/FONT&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-8112372658157580932?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/8112372658157580932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=8112372658157580932&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8112372658157580932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8112372658157580932'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/io-bottleneck-trouble-shooting.html' title='I/O Bottleneck - Trouble shooting'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-761277248835002814</id><published>2006-12-28T02:30:00.001-08:00</published><updated>2006-12-28T02:30:46.966-08:00</updated><title type='text'>Linux Memory Management</title><content type='html'>&lt;STRONG&gt;&lt;FONT size=5&gt;Linux Memory Management&lt;/FONT&gt;&lt;/STRONG&gt; &lt;DIV id=bodyContent&gt; &lt;H3 id=siteSub&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/H3&gt;&lt;!-- start content --&gt; &lt;TABLE  style="MARGIN-TOP: 0px; BORDER-LEFT-WIDTH: 0px; MARGIN-BOTTOM: 1px; WIDTH: 100%; BORDER-RIGHT-WIDTH: 0px"  cellSpacing=0 cellPadding=3&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD style="BACKGROUND: #efefef"&gt;       &lt;CENTER&gt;&lt;SMALL&gt;&lt;/SMALL&gt;&amp;nbsp;&lt;/CENTER&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD align=middle&gt;&lt;FONT face=Verdana color=#000080    size=2&gt;&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;TABLE class=toc id=toc summary=Contents&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD&gt;       &lt;DIV id=toctitle&gt;       &lt;H2&gt;Contents&lt;/H2&gt;&lt;SPAN class=toctoggle&gt;[&lt;A class=internal id=togglelink        href="javascript:toggleToc()"&gt;hide&lt;/A&gt;]&lt;/SPAN&gt;&lt;/DIV&gt;       &lt;UL lastCheckbox="null"&gt;         &lt;LI class=toclevel-1&gt;&lt;A          href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#Overview_of_memory_management"&gt;&lt;SPAN          class=tocnumber&gt;1&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Overview of memory          management&lt;/SPAN&gt;&lt;/A&gt;          &lt;LI class=toclevel-1&gt;&lt;A          href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#The_mysterious_880_MB_limit_on_x86"&gt;&lt;SPAN          class=tocnumber&gt;2&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;The mysterious 880 MB limit          on x86&lt;/SPAN&gt;&lt;/A&gt;          &lt;LI class=toclevel-1&gt;&lt;A          href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#The_difference_among_VIRT.2C_RES.2C_and_SHR_in_top_output"&gt;&lt;SPAN          class=tocnumber&gt;3&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;The difference among VIRT,          RES, and SHR in top output&lt;/SPAN&gt;&lt;/A&gt;          &lt;LI class=toclevel-1&gt;&lt;A          href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#The_difference_between_buffers_and_cache"&gt;&lt;SPAN          class=tocnumber&gt;4&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;The difference between          buffers and cache&lt;/SPAN&gt;&lt;/A&gt;          &lt;LI class=toclevel-1&gt;&lt;A          href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#Swappiness_.282.6_kernels.29"&gt;&lt;SPAN          class=tocnumber&gt;5&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Swappiness (2.6          kernels)&lt;/SPAN&gt;&lt;/A&gt;          &lt;UL&gt;           &lt;LI class=toclevel-2&gt;&lt;A            href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#Autoregulation"&gt;&lt;SPAN            class=tocnumber&gt;5.1&lt;/SPAN&gt; &lt;SPAN            class=toctext&gt;Autoregulation&lt;/SPAN&gt;&lt;/A&gt; &lt;/LI&gt;&lt;/UL&gt;         &lt;LI class=toclevel-1&gt;&lt;A          href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#Credits"&gt;&lt;SPAN          class=tocnumber&gt;6&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Credits&lt;/SPAN&gt;&lt;/A&gt;          &lt;LI class=toclevel-1&gt;&lt;A          href="http://gentoo-wiki.com/FAQ_Linux_Memory_Management#Feedback"&gt;&lt;SPAN          class=tocnumber&gt;7&lt;/SPAN&gt; &lt;SPAN class=toctext&gt;Feedback&lt;/SPAN&gt;&lt;/A&gt;      &lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;SCRIPT type=text/javascript&gt; if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } &lt;/SCRIPT&gt;  &lt;DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px"&gt;[&lt;A  title="Edit section: Overview of memory management"  href="http://gentoo-wiki.com/index.php?title=FAQ_Linux_Memory_Management&amp;amp;action=edit&amp;amp;section=1"&gt;edit&lt;/A&gt;]&lt;/DIV&gt;&lt;A  name=Overview_of_memory_management&gt;&lt;/A&gt; &lt;H2&gt;Overview of memory management&lt;/H2&gt; &lt;P&gt;Traditional Unix tools like 'top' often report a surprisingly small amount of  free memory after a system has been running for a while. For instance, after  about 3 hours of uptime, the machine I'm writing this on reports under 60 MB of  free memory, even though I have 512 MB of RAM on the system. Where does it all  go? &lt;/P&gt; &lt;P&gt;The biggest place it's being used is in the disk cache, which is currently  over 290 MB. This is reported by top as "cached". Cached memory is essentially  free, in that it can be replaced quickly if a running (or newly starting)  program needs the memory. &lt;/P&gt; &lt;P&gt;The reason Linux uses so much memory for disk cache is because the RAM is  wasted if it isn't used. Keeping the cache means that if something needs the  same data again, there's a good chance it will still be in the cache in memory.  Fetching the information from there is around 1,000 times quicker than getting  it from the hard disk. If it's not found in the cache, the hard disk needs to be  read anyway, but in that case nothing has been lost in time. &lt;/P&gt; &lt;P&gt;To see a better estimation of how much memory is really free for applications  to use, run the command free -m: &lt;/P&gt; &lt;TABLE  style="BORDER-RIGHT: #bfffbf 1px solid; BORDER-TOP: #bfffbf 1px solid; BORDER-LEFT: #bfffbf 1px solid; BORDER-BOTTOM: #bfffbf 1px solid; BACKGROUND-COLOR: #f2fff2"  cellSpacing=0 cellPadding=0 width="75%"&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD      style="BORDER-RIGHT: #a0ffa0 1px solid; BORDER-TOP: #a0ffa0 1px solid; BORDER-LEFT: #a0ffa0 1px solid; BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #c1ffc1"&gt;&lt;FONT        size=-1&gt;&lt;B&gt;Code:&lt;/B&gt; free -m&lt;/FONT&gt; &lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;PRE&gt;             total       used       free     shared    buffers     cached  Mem:           503        451         52          0         14        293  -/+ buffers/cache:        143        360  Swap:         1027          0       1027 &lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;The &lt;B&gt;-/+ buffers/cache&lt;/B&gt; line shows how much memory is used and free from  the perspective of the applications. Generally speaking, if little swap is being  used, memory usage isn't impacting performance at all. &lt;/P&gt; &lt;P&gt;Notice that I have 512 MB of memory in my machine, but only 52 is listed as  available by free (this 52 meg is used by the Kernel). This is mainly because  the kernel can't be swapped out, so the memory it occupies could never be freed.  There may also be regions of memory reserved for/by the hardware for other  purposes as well, depending on the system architecture. However, the actualy  memory that is free is 360Meg in this case (buffer memory Free). &lt;/P&gt; &lt;DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px"&gt;[&lt;A  title="Edit section: The mysterious 880 MB limit on x86"  href="http://gentoo-wiki.com/index.php?title=FAQ_Linux_Memory_Management&amp;amp;action=edit&amp;amp;section=2"&gt;edit&lt;/A&gt;]&lt;/DIV&gt;&lt;A  name=The_mysterious_880_MB_limit_on_x86&gt;&lt;/A&gt; &lt;H2&gt;The mysterious 880 MB limit on x86&lt;/H2&gt; &lt;P&gt;By default, the Linux kernel runs in and manages only low memory. This makes  managing the page tables slightly easier, which in turn makes memory accesses  slightly faster. The downside is that it can't use all of the memory once the  amount of total RAM reaches the neighborhood of 880 MB. This has historically  not been a problem, especially for desktop machines. &lt;/P&gt; &lt;P&gt;To be able to use all the RAM on an 1GB machine or better, the kernel needs  to be recompiled. Go into 'make menuconfig' (or whichever config is preferred)  and set the following option: &lt;/P&gt; &lt;TABLE  style="BORDER-RIGHT: #7070ff 4px solid; BORDER-TOP: #7070ff 4px solid; BORDER-LEFT: #7070ff 4px solid; BORDER-BOTTOM: #7070ff 4px solid; BACKGROUND-COLOR: #faebd7"  width="75%"&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD      style="BORDER-RIGHT: #0000ff 1px solid; BORDER-TOP: #0000ff 1px solid; BORDER-LEFT: #0000ff 1px solid; COLOR: #ffffff; BORDER-BOTTOM: #0000ff 1px solid; BACKGROUND-COLOR: #7070ff"&gt;&lt;FONT        size=-1&gt;Linux Kernel Configuration: Large amounts of memory&lt;/FONT&gt; &lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;&lt;PRE&gt;Processor Type and Features ----&amp;gt; High Memory Support ----&amp;gt;  (*) 4GB &lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;This applies both to 2.4 and 2.6 kernels. Turning on high memory support  theoretically slows down accesses slightly, but according to Joseph_sys and log,  there is no practical difference. &lt;/P&gt; &lt;P&gt;Also, the &lt;A class=extiw title=ebuild:ck-sources  href="http://gentoo-portage.com/Search?search=ck-sources"&gt;ck-sources&lt;/A&gt; kernel  has a patch for 1gb high memory support. &lt;/P&gt; &lt;DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px"&gt;[&lt;A  title="Edit section: The difference among VIRT, RES, and SHR in top output"  href="http://gentoo-wiki.com/index.php?title=FAQ_Linux_Memory_Management&amp;amp;action=edit&amp;amp;section=3"&gt;edit&lt;/A&gt;]&lt;/DIV&gt;&lt;A  name=The_difference_among_VIRT.2C_RES.2C_and_SHR_in_top_output&gt;&lt;/A&gt; &lt;H2&gt;The difference among VIRT, RES, and SHR in top output&lt;/H2&gt; &lt;P&gt;VIRT stands for the virtual size of a process, which is the sum of memory it  is actually using, memory it has mapped into itself (for instance the video  card's RAM for the X server), files on disk that have been mapped into it (most  notably shared libraries), and memory shared with other processes. VIRT  represents how much memory the program is able to access at the present moment.  &lt;/P&gt; &lt;P&gt;RES stands for the resident size, which is an accurate representation of how  much actual physical memory a process is consuming. (This also corresponds  directly to the %MEM column.) This will virtually always be less than the VIRT  size, since most programs depend on the C library. &lt;/P&gt; &lt;P&gt;SHR indicates how much of the VIRT size is actually sharable (memory or  libraries). In the case of libraries, it does not necessarily mean that the  entire library is resident. For example, if a program only uses a few functions  in a library, the whole library is mapped and will be counted in VIRT and SHR,  but only the parts of the library file containing the functions being used will  actually be loaded in and be counted under RES. &lt;/P&gt; &lt;DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px"&gt;[&lt;A  title="Edit section: The difference between buffers and cache"  href="http://gentoo-wiki.com/index.php?title=FAQ_Linux_Memory_Management&amp;amp;action=edit&amp;amp;section=4"&gt;edit&lt;/A&gt;]&lt;/DIV&gt;&lt;A  name=The_difference_between_buffers_and_cache&gt;&lt;/A&gt; &lt;H2&gt;The difference between buffers and cache&lt;/H2&gt; &lt;P&gt;Buffers are allocated by various processes to use as input queues, etc. Most  time, buffers are some processes' output, and they are file buffers. A  simplistic explanation of buffers is that they allow processes to temporarily  store input in memory until the process can deal with it. &lt;/P&gt; &lt;P&gt;Cache is typically frequently requested disk I/O. If multiple processes are  accessing the same files, much of those files will be cached to improve  performance (RAM being so much faster than hard drives), it's disk cache. &lt;/P&gt; &lt;DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px"&gt;[&lt;A  title="Edit section: Swappiness (2.6 kernels)"  href="http://gentoo-wiki.com/index.php?title=FAQ_Linux_Memory_Management&amp;amp;action=edit&amp;amp;section=5"&gt;edit&lt;/A&gt;]&lt;/DIV&gt;&lt;A  name=Swappiness_.282.6_kernels.29&gt;&lt;/A&gt; &lt;H2&gt;Swappiness (2.6 kernels)&lt;/H2&gt; &lt;P&gt;Since 2.6, there has been a way to tune how much Linux favors swapping out to  disk compared to shrinking the caches when memory gets full. &lt;/P&gt; &lt;P&gt;When an application needs memory and all the RAM is fully occupied, the  kernel has two ways to free some memory at its disposal: it can either reduce  the disk cache in the RAM by eliminating the oldest data or it may swap some  less used portions (pages) of programs out to the swap partition on disk. It is  not easy to predict which method would be more efficient. The kernel makes a  choice by roughly guessing the effectiveness of the two methods at a given  instant, based on the recent history of activity. &lt;/P&gt; &lt;P&gt;Before the 2.6 kernels, the user had no possible means to influence the  calculations and there could happen situations where the kernel often made the  wrong choice, leading to thrashing and slow performance. The addition of  swappiness in 2.6 changes this. Thanks, ghoti! &lt;/P&gt; &lt;P&gt;Swappiness takes a value between 0 and 100 to change the balance between  swapping applications and freeing cache. At 100, the kernel will always prefer  to find inactive pages and swap them out; in other cases, whether a swapout  occurs depends on how much application memory is in use and how poorly the cache  is doing at finding and releasing inactive items. &lt;/P&gt; &lt;P&gt;The default swappiness is 60. A value of 0 gives something close to the old  behavior where applications that wanted memory could shrink the cache to a tiny  fraction of RAM. For laptops which would prefer to let their disk spin down, a  value of 20 or less is recommended. &lt;/P&gt; &lt;P&gt;As a sysctl, the swappiness can be set at runtime with either of the  following commands: &lt;/P&gt;&lt;PRE&gt;sysctl -w vm.swappiness=30  echo 30 &amp;gt;/proc/sys/vm/swappiness &lt;/PRE&gt; &lt;P&gt;The default when Gentoo boots can also be set in &lt;FONT  style="FONT-FAMILY: monospace" color=green&gt;/etc/sysctl.conf&lt;/FONT&gt;: &lt;/P&gt; &lt;TABLE  style="BORDER-RIGHT: #ffbfbf 1px solid; BORDER-TOP: #ffbfbf 1px solid; BORDER-LEFT: #ffbfbf 1px solid; BORDER-BOTTOM: #ffbfbf 1px solid; BACKGROUND-COLOR: #fff2f2"  cellSpacing=0 cellPadding=0 width="75%"&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD style="BORDER-BOTTOM: #888 1px solid; BACKGROUND-COLOR: #ffafaf"&gt;&lt;FONT        size=-1&gt;&lt;B&gt;File:&lt;/B&gt; /etc/sysctl.conf&lt;/FONT&gt; &lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD&gt;       &lt;DIV class=scroll&gt;&lt;PRE style="HEIGHT: auto"&gt;# Control how much the kernel should favor swapping out applications (0-100) vm.swappiness = 30 &lt;/PRE&gt;&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt;Some patchsets (e.g. Con Kolivas' &lt;TT&gt;ck-sources&lt;/TT&gt; patchset) allow the  kernel to auto-tune the swappiness level as it sees fit; they may not keep a  user-set value. &lt;/P&gt; &lt;DIV class=editsection style="FLOAT: right; MARGIN-LEFT: 5px"&gt;[&lt;A  title="Edit section: Autoregulation"  href="http://gentoo-wiki.com/index.php?title=FAQ_Linux_Memory_Management&amp;amp;action=edit&amp;amp;section=6"&gt;edit&lt;/A&gt;]&lt;/DIV&gt;&lt;A  name=Autoregulation&gt;&lt;/A&gt; &lt;H3&gt;Autoregulation&lt;/H3&gt; &lt;P&gt;&lt;A title="Kernel Sources"  href="http://gentoo-wiki.com/Kernel_Sources#gentoo-sources"&gt;gentoo-sources&lt;/A&gt;  (and probably other gentoo 2.6 kernels) prior to 2.6.7-gentoo contains the Con  Kolivas autoregulated swappiness patch. This means that the kernel automatically  adjusts the /proc/sys/vm/swappiness value as needed during runtime, so any  changes you make will be clobbered next time it updates. A good explanation of  this patch and how it works is on &lt;A class="external text"  title=http://kerneltrap.org/node/view/3216  href="http://kerneltrap.org/node/view/3216" rel=nofollow&gt;KernelTrap&lt;/A&gt;. &lt;/P&gt; &lt;P&gt;I repeat: &lt;B&gt;With gentoo-sources (prior to 2.6.7-gentoo) it is neither  necessary nor possible to permanently adjust the swappiness value.&lt;/B&gt; It's  taken care of automatically, no need to worry. &lt;/P&gt; &lt;P&gt;gentoo-sources no longer contains this patch as of 2.6.7-gentoo. The  maintainer of gentoo-sources, Greg, pulled the autoregulation patch from the  ebuild. &lt;A class="external free"  title=http://bugs.gentoo.org/show_bug.cgi?id=54560  href="http://bugs.gentoo.org/show_bug.cgi?id=54560"  rel=nofollow&gt;http://bugs.gentoo.org/show_bug.cgi?id=54560&lt;/A&gt;  &lt;/P&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-761277248835002814?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/761277248835002814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=761277248835002814&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/761277248835002814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/761277248835002814'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/linux-memory-management.html' title='Linux Memory Management'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-5873954605160934436</id><published>2006-12-28T02:23:00.001-08:00</published><updated>2006-12-28T02:23:26.547-08:00</updated><title type='text'>INFO ON Promiscuous mode </title><content type='html'>&lt;DIV dir=ltr align=left&gt; &lt;P&gt;&lt;FONT face="Century Gothic"&gt;&lt;FONT color=#000080&gt;&lt;FONT size=2&gt;&lt;SPAN  class=356374503-13122006&gt;&lt;STRONG&gt;&lt;U&gt;INFO ON Promiscuous mode&lt;/U&gt;&lt;/STRONG&gt;  &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face="Century Gothic"&gt;&lt;FONT color=#000080&gt;&lt;FONT size=2&gt;&lt;SPAN  class=356374503-13122006&gt;&lt;/SPAN&gt;Promiscuous mode is usually initiated by a  network sniffer of some sort. Like Ethereal or dsniff. You may want to check  your running processes and verify you're not running something like that or even  a trojaned version or something normal. If I saw that in my logs, I would be  concerned. You can see promiscuous mode by running /sbin/ifconfig -a  &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face="Century Gothic"&gt;&lt;FONT color=#000080&gt;&lt;FONT size=2&gt;normal:  look--&amp;gt; UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7153852  errors:0 dropped:0 overruns:0 frame:0 TX packets:6107958 errors:0 dropped:0  overruns:0 carrier:14 &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face="Century Gothic"&gt;&lt;FONT color=#000080&gt;&lt;FONT size=2&gt;Promiscuous:  look--&amp;gt; UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1 RX  packets:7153858 errors:0 dropped:0 overruns:0 frame:0 TX packets:6107962  errors:0 dropped:0 overruns:0 carrier:14 &lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt; &lt;DIV dir=ltr align=left&gt;&lt;FONT face="Century Gothic" color=#000080 size=2&gt;&lt;SPAN  class=356374503-13122006&gt;In this case its normal state and can be ignored  :&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV dir=ltr align=left&gt;&lt;FONT face="Century Gothic" color=#000080 size=2&gt;&lt;SPAN  class=356374503-13122006&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV dir=ltr align=left&gt;&lt;FONT face="Century Gothic" color=#000080 size=2&gt;&lt;SPAN  class=356374503-13122006&gt;eth0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Link  encap:Ethernet&amp;nbsp; HWaddr  00:13:21:07:5A:2B&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet  addr:154.1.33.140&amp;nbsp; Bcast:154.1.33.255&amp;nbsp;  Mask:255.255.255.128&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  UP BROADCAST RUNNING &lt;FONT color=#800080&gt;&lt;STRONG&gt;MULTICAST&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;  MTU:1500&amp;nbsp;  Metric:1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX  packets:15985086 errors:0 dropped:0 overruns:0  frame:0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX  packets:21467022 errors:0 dropped:0 overruns:0  carrier:0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0  txqueuelen:1000&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX  bytes:7258750788 (6922.4 Mb)&amp;nbsp; TX bytes:15187993324 (14484.3  Mb)&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  Interrupt:25&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV dir=ltr align=left&gt;&lt;FONT face="Century Gothic" color=#000080 size=2&gt;&lt;SPAN  class=356374503-13122006&gt;eth1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Link  encap:Ethernet&amp;nbsp; HWaddr  00:13:21:07:5A:2A&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inet  addr:172.18.39.17&amp;nbsp; Bcast:172.18.39.127&amp;nbsp;  Mask:255.255.255.128&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  UP BROADCAST RUNNING &lt;STRONG&gt;&lt;FONT color=#800080&gt;MULTICAST&lt;/FONT&gt;&amp;nbsp;&lt;/STRONG&gt;  MTU:1500&amp;nbsp;  Metric:1&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX  packets:39861538 errors:0 dropped:0 overruns:0  frame:0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TX  packets:78187478 errors:0 dropped:0 overruns:0  carrier:0&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; collisions:0  txqueuelen:1000&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RX  bytes:2552135645 (2433.9 Mb)&amp;nbsp; TX bytes:118484247360 (112995.3  Mb)&lt;BR&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-5873954605160934436?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/5873954605160934436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=5873954605160934436&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5873954605160934436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5873954605160934436'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/info-on-promiscuous-mode.html' title='INFO ON Promiscuous mode '/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-5064880742497116058</id><published>2006-12-28T02:02:00.001-08:00</published><updated>2006-12-28T02:02:44.711-08:00</updated><title type='text'>Veritas volume manager documentation</title><content type='html'>&lt;DIV&gt;&lt;FONT face=Verdana color=#000080 size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt; &lt;DIV&gt; &lt;DIV id=index-page&gt; &lt;H1&gt;Veritas volume manager documentation&lt;/H1&gt; &lt;TABLE  style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px"  summary=""&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD width="33%"&gt;       &lt;TABLE style="WIDTH: 100%" summary=""&gt;         &lt;TBODY&gt;         &lt;TR&gt;           &lt;TH&gt;Installation&lt;/TH&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.unixway.com/vm/veritasvm/install.html"&gt;Installing              Veritas volume manager&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.unixway.com/vm/veritasvm/rootdg.html"&gt;Managing the              rootdg diskgroup&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.unixway.com/vm/veritasvm/mirroros.html"&gt;Mirroring              the operating system&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TH&gt;Third-party reference websites&lt;/TH&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://mailman.eng.auburn.edu/mailman/listinfo/veritas-vx"&gt;VxVM/VxFS              mailing list&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.cuddletech.com/veritas"&gt;www.cuddletech.com/veritas&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A href="http://www.eng.auburn.edu/pub/mail-lists/ssastuff/"&gt;SSA              helpful hints&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;     &lt;TD width="33%"&gt;       &lt;TABLE style="WIDTH: 100%" summary=""&gt;         &lt;TBODY&gt;         &lt;TR&gt;           &lt;TH&gt;Maintenance&lt;/TH&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.unixway.com/vm/veritasvm/failedbootdisk.html"&gt;Replacing              a failed boot disk&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.unixway.com/vm/veritasvm/bootcdrom.html"&gt;Performing              maintenance while booted from cdrom.&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.unixway.com/vm/veritasvm/removevm.html"&gt;Removing              the OS from VxVM control&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&lt;A              href="http://www.unixway.com/vm/veritasvm/breakmirror.html"&gt;Creating              a bootable disk from the OS mirror&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;     &lt;TD width="33%"&gt;       &lt;TABLE style="WIDTH: 100%" summary=""&gt;         &lt;TBODY&gt;         &lt;TR&gt;           &lt;TH&gt;Volume manager reference&lt;/TH&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Installation guide &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/248609.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/265468.pdf"&gt;[4.0]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Administrator's guide &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/248606.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/265469.pdf"&gt;[4.0]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/275760.pdf"&gt;[4.1]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Hardware notes &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/248608.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/265477.pdf"&gt;[4.0]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/275761.pdf"&gt;[4.1]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Troubleshooting guide &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/248611.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/265473.pdf"&gt;[4.0]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/275762.pdf"&gt;[4.1]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;User's guide -- Veritas enterprise administrator &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/248612.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/265475.pdf"&gt;[4.0]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Release notes &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/248610.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/265467.pdf"&gt;[4.0]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/Foundation_Suite/275690.pdf"&gt;[4.1]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Veritas FlashSnap point-in-time copy solutions -- Administrators              guide &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/VolumeManager_UNIX/250784.pdf"&gt;[1.1]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/Foundation_Suite/275698.pdf"&gt;[4.1]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TH&gt;Filesystem reference&lt;/TH&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Installation guide &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/FileSystem_UNIX/249768.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/FileSystem_UNIX/265450.pdf"&gt;[4.0]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;         &lt;TR&gt;           &lt;TD&gt;Administrator's guide &lt;A              href="ftp://ftp.support.veritas.com/pub/support/products/FileSystem_UNIX/249764.pdf"&gt;[3.5]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/FileSystem_UNIX/265455.pdf"&gt;[4.0]&lt;/A&gt;              &lt;A              href="http://ftp.support.veritas.com/pub/support/products/FileSystem_UNIX/275693.pdf"&gt;[4.1]&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/TD&gt;&lt;!-- END OF RIGHT SIDE INFORMATION --&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;/DIV&gt; &lt;DIV align=left&gt;&lt;FONT face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;FONT  face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;FONT color=#000080  size=2&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/FONT&gt;&lt;/FONT&gt; &lt;DIV&gt;&lt;/DIV&gt; &lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-5064880742497116058?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/5064880742497116058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=5064880742497116058&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5064880742497116058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5064880742497116058'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/veritas-volume-manager-documentation.html' title='Veritas volume manager documentation'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-8079080159956985745</id><published>2006-12-18T22:35:00.001-08:00</published><updated>2006-12-18T22:35:39.440-08:00</updated><title type='text'>Changing TimeZone to IST</title><content type='html'>&lt;P align=center&gt;&lt;B&gt;&lt;FONT face=Arial&gt;&lt;BIG&gt;&lt;BIG&gt;Changing TimeZone to  IST&lt;/BIG&gt;&lt;/BIG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/B&gt;&lt;B&gt; &lt;P&gt;&lt;FONT face=Arial&gt;Solution:&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;1) Log in as root&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;2) # cd /usr/share/lib/zoneinfo&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;Create a file called asia.ind&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;3) # vi asia.ind&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;RULE IST min max - Apr 1 0:00 0:00 D&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;Zone Asia/IST 5:30 1:00 IST &lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;4) # zic asia.ind&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;5) #TZ=Asia/IST&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;6) #export TZ&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;To make it permanent put the entry in profile and also  modify the /etc/TIMEZONE file accordingly.&lt;/FONT&gt;&lt;/P&gt;&lt;B&gt; &lt;P&gt;&lt;FONT face=Arial&gt;Output:&lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;# date&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;Sat Dec 9 16:07:49 IST 2000 &lt;/FONT&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;To see the GMT timing&lt;/FONT&gt;&lt;/P&gt;&lt;B&gt; &lt;P&gt;&lt;FONT face=Arial&gt;# date -u&lt;/FONT&gt;&lt;/B&gt;&lt;/P&gt; &lt;P&gt;&lt;FONT face=Arial&gt;Sat Dec 9 10:38:06 GMT 2000 &lt;/FONT&gt;&lt;/P&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-8079080159956985745?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/8079080159956985745/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=8079080159956985745&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8079080159956985745'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/8079080159956985745'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/changing-timezone-to-ist.html' title='Changing TimeZone to IST'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-4455793241775982188</id><published>2006-12-18T22:34:00.001-08:00</published><updated>2006-12-18T22:34:24.997-08:00</updated><title type='text'>SunService Tip Sheet: Network Security</title><content type='html'>&lt;H1&gt;SunService Tip Sheet: Network Security&lt;/H1&gt;&lt;PRE&gt;INFODOC ID: 13335  SYNOPSIS: NETWORK SECURITY PSD/FAQ DETAIL DESCRIPTION:  Product Support Document (PSD) for Network Security  Revision 1.1 Date: April 18, 1996  1.0: About Network Security   1.1: Network Security Definitions 2.0: Network Security Debugging 3.0: Common How Tos   3.1: How to Prevent Remote Root Logins Under SunOS   3.2: How to Prevent Remote Root Logins Under Solaris   3.3: How to Turn Off Specific Network Services   3.4: How to Insure the Security of NFS Partitions   3.5: How to Insure the Security of NIS Maps   3.6: How to Insure the Security of NIS+ Maps   3.7: How to Keep Up to Date with the Latest Security Problems   3.8: How to Take Additional Steps to Secure Your Site 4.0: Frequently Asked Questions 5.0: Network Security Patches   5.1: Miscellaneous Networking Patches   5.2: DNS Patches   5.3: FTP Patches   5.4: Inetd Patches   5.5: NFS Patches   5.6: NIS Patches   5.7: nscd Patches   5.8: Sendmail Patches 6.0: Known Bugs &amp;amp; RFEs 7.0: References 8.0: Supportability 9.0: Additional Support  1.0 About Network Security   1.0: About Network Security  ===========================  As the internet gets continually bigger, the question of network security becomes an ever larger one. What follows are some tips and guidelines that you can use to get yourself started with network security. If network security is an extremely critical issue at your site, consider working with the Consulting services described in Section 9.0, because this document can really only touch the surface of a very important subject.  This PSD tries to impart the following information: first, what can be done on a brand-new Sun to setup basic network security  second, what public-domain or SunSoft programs can be used to improve security even further. It does not discuss security issues unrelated to the network (e.g. setuid programs, file permissions, restricted shells, etc), but you should consider these matters when you are working to secure your system.   1.1: Network Security Definitions  ---------------------------------  A lot of varied ground is covered in this PSD.  The following terms are important to some parts of it:  FIREWALL: A machine positioned in between your internal network and external networks (usually the internet). The most strict firewalls prevent any packets from being transmitted from the internal to external networks, depending on PROXY SERVERS for needed functionality. Less strict firewalls only prevent certain types of insecure packets (i.e., X11 packets) from being passed.  PROXY SERVER: A daemon run on a firewall, which acts as a sort of go-between, accepting packets from the internal network and connecting them up to services on the external network, as appropriate (or vice-versa). Proxy servers are useful because they allow connections to go beyond a firewall, but still hide all information on the internal network from external users.  FILTERING ROUTER: Really, a type of firewall. Filtering routers can be programmed to block certain types of packets (X11, sendmail, telnet, etc).   2.0: Network Security Debugging  ===============================  The best way to "debug" network security is to read this Tip Sheet and take a look at the programs noted in section 3.8. In particular: security scanners can point out security holes in your current setup, while firewalls and TCP/IP wrappers can be set up to provide a high level of logging, giving lots of information about security-related network activity.  3.0 Common How Tos   3.1: How to Prevent Remote Root Logins Under SunOS  ---------------------------------------------------  Remote root login permissions are controlled by the /etc/ttytab file under SunOS. To change remote root login permissions, you must modify every single 'network' line in the /etc/ttytab files.  Root access over the network is denied if all of the network ttys are labelled unsecure:    ttyp0   none                            network         off unsecure  After making changes to the ttytab, you must HUP process 1:    # kill -HUP 1  Alternatively, you can reboot the machine.   3.2: How to Prevent Remote Root Logins Under Solaris  ----------------------------------------------------  In the file /etc/default/login, there is a CONSOLE line.  If there is no comment in front of the CONSOLE line, root can only login from the console:    CONSOLE=/dev/console  Changes to this file will take effect at once.   3.3: How to Turn Off Specific Network Services  ----------------------------------------------  Network programs can be started from a variety of places. You must know how they are started in order to turn them off.  The majority of network services that you will wish to disable are enabled in the /etc/inetd.conf file. To disable one of these services, simply comment out the appropriate line. For example, to disallow logins you would want to disable the following three services:    #telnet  stream  tcp     nowait  root    /usr/sbin/in.telnetd    in.telnetd   #shell   stream  tcp     nowait  root    /usr/sbin/in.rshd       in.rshd   #login   stream  tcp     nowait  root    /usr/sbin/in.rlogind    in.rlogind  ftpd, tftpd, fingerd and many other internet services can all be disabled in a similar manner. Afterwards, you must restart the inetd:    # kill -HUP inetd-pid  Most other network services (sendmail, rpc.nisd, etc) are initiated from the rc files. If a network service does not appear in the inetd, you should search through your rc files, find where it is started, and then comment out the daemon so that it does not start on bootup. You'll of course have to kill the currently running daemon to disable the service immediately.   3.4: How to Insure the Security of NFS Partitions  -------------------------------------------------  When you are exporting NFS partitions, if you don't have a firewall or filtering router that prevents NFS packets from leaving your domain, you should make sure to restrict access rights to that partition. This is done by restricting the rw or ro option to a specific machine, a list of machines or a netgroup. Examples of using the rw and ro options in this way follow:    rw=machine1   rw=machine1,machine2,machine3   rw=netgroup   ro=machine1   ro=machine1,machine2,machine3   ro=netgroup  These options should be incorporated into your export file in a way appropriate to your network. For example, under, SunOS, you might use the following:    %% cat /etc/exportfs   /export       -ro=machine1  Under Solaris, you might use the following:    %% cat /etc/dfs/dfstab   share -F nfs -o ro=netgroup /export  Note that it is most convenient to set up a netgroup that contains a listing of all of your machines and then export all of your NFS partitions to that netgroup. SunService has a NIS PSD that gives good information on how to set up a netgroup.   3.5: How to Insure the Security of NIS Maps  -------------------------------------------  By default, NIS is not particularly secure. Anyone can grab a copy of NIS maps by simply figuring out the name of your NIS domain. Thus, the first step in securing NIS to use a nonintuitive name for your defaultdomain. Something that is not a derivation of your domain name or machine name is best.  Newer versions of NIS allow you to further secure things via the securenets file. If you are using SunOS 4.1.3_U1 or lower or NSkit 1.0 or lower, you need to apply the appropriate patch before the securenets file can be used. SunOS 4.1.4 and newer versions of NSkit already have this available by default.  The contents of the /var/yp/securenets file should be a number of lines that each read:    netmask address  For example, if you only wanted the machines 150.101.16.28 and 150.101.16.29 to be able to retrieve your NIS maps, you could enter the two lines:    255.255.255.255 150.101.16.28   255.255.255.255 150.101.16.29  If you wanted everyone on the network 150.101.16.0 to be able to retrieve your maps, you could enter the line:    255.255.255.0 150.101.16.0   3.6: How to Insure the Security of NIS+ Maps  --------------------------------------------  NIS+ provides much better security than NIS and is highly suggested if you are worried about the security of your network. You can control who can access your maps with the NIS+ access rights. Type nisdefaults to examine the default values for your NIS+ domain:    %% nisdefaults -r   ----rmcdr---r---  Type niscat -o to determine the rights on an individual table:    %% niscat -o passwd   ...   Access Rights : ----rmcdr---r---  Remember that these access rights are laid out in the format: nobody, owner, group, world, and that each of these four user groups has four access rights: read, modify, create, destroy. In the above examples, owner has all rights, while group and world have only read rights. Nobody has no rights.  The above setup is secure under NIS+, since only people who are authenticated into your domain are able to look at your tables. You should only worry if you have extended rights to the nobody group. This might be required if you need to extend rights to NIS clients or to unauthenticated clients, but you should be aware that it reduces your security.  If you need to change your access rights, you should use the nischmod command. NIS+ is very powerful and you can give rights to entire objects or individual table entries. Consult the nischmod for information on how to do this.   3.7: How to Keep Up to Date with the Latest Security Problems  -------------------------------------------------------------  Though this document explains how to make your network services more secure, there are constantly new issues cropping up. If you want to make sure that your network remains secure in the future, you need to keep up with these new problems. Fortunately, there is an excellent third-party mailings list on the net that tells of network security problems as they become known.  The CERT (Computer Emergency Response Team) Coordination Center publishes CERT advisories that tell of the newest network security problems for all OSes. You can subscribe to it by mailing:          cert-advisory-request@cert.org   3.8: How to Take Additional Steps to Secure Your Site  -----------------------------------------------------  Sections 3.1 through 3.6 of this document describe how to make your system as secure as possible, using the tools that came with it. Following those basic guidelines should provide more than enough security for most sites.  However, there are some cases where you might want to implement additional levels of security, even preventing certain services from arriving at your site, in the name of making your network security even more ironclad. Addressed here are certain public-domain or Sun products that are especially helpful. There are also many third-party security programs available from other vendors.  Firewalls ---------  Firewalls are the ultimate in security, because they can totally isolate you from most of the network. Sun sells a Firewall product named Firewall-1. Consult with your local Sun Sales office for info on how to purchase Firewall-1.  A separate PSD exists on the FW-1 Product.  Security Scanners -----------------  Certain Security Scanners have been written that check for a number of common security problems. In general, if you've secured everything as noted in 3.1-3.6 and applied the patches described in section 5.0, you won't have any problems. However, you mightcan still wish to try these out.  Cops checks for all kinds of common problems (including many non-network related ones) on a single machine:    ftp://ftp.cert.org/pub/tools/cops  ISS (the Internet Security Scanner) can probe for common security problems on an entire network of machines:    ftp://ftp.cert.org/pub/tools/iss  TCP/IP Wrappers ---------------  These public domain wrappers can be used to log the use of certain TCP/IP programs (i.e., telnetd) and also to prevent access from certain sites or networks. They are available from:    ftp://ftp.cert.org/pub/tools/tcp_wrappers  Other Programs --------------  A number of other public domain network security programs are available from:    ftp://ftp.cert.org/pub/tools  You can also be interested in joining the CERT Tools mailing list, that announces the release of new security tools. You can request membership on the CERT Tools mailing list by dropping a line to:    cert-tools-request@cert.org   4.0: Frequently Asked Questions  ===============================  Q: Why should I worry about security?  A: There are crackers out on the net and in time just about every single site gets hit by them. Fortunately, if your site has a minimum level of security (i.e., no gaping security holes), the crackers will move on. Although the advice in this document will not necessarily make your site impregnable, it will provide sufficient security to keep 99.9%% of potential attackers out.  Q1: What issues should I consider when setting up security at my site? Q2: How for should I go with implementing security policies on my network?  A: When considering security at your site, you need to balance level of security with ease of use. Although a lot of basic security can be accomplished with no inconvenience to your users, when you start working with firewalls, TCP wrappers and filtering routers, you will be taking some functionality away from your users. Based on the visibility of your site and the confidentiality of its data, you must determine how much is enough and how much is too much. This varies from site to site, but a Security Consultant might be able to give you a little more direction in making this decision.  Q: What services might I want to disable?  TFTP should absolutely be disabled if you don't have diskless clients taking advantage of it.  Many sites will also disable finger, so that external users can't figure out the user names of your internal users.  Everything else pretty much depends on the needs of your site. Do people need to login from outside your network? FTP? If services are not being used, disabling them can prevent later unauthorized use.  5.0 Network Security Patches   5.0: Network Security Patches  =============================  The followings patches specifically fix some manner of security problem in the listed network program. In no way is this a complete list of network patches, but simply a list of those that can have impact upon site security.   5.1: Miscellaneous Networking Patches  -------------------------------------  100567-04 SunOS 4.1,4.1.1, 4.1.2, 4.1.3: mfree and icmp redirect security 101587-01 SunOS 4.1.3_U1: security patch for mfree and icmp redirect    Makes a machine resistant to ICMP spoofing.   5.2: DNS Patches  ----------------  102167-03 SunOS 5.3: dns fix 102165-03 SunOS 5.4: nss_dns.so.1 fixes    Make DNS more resistant to spoofing. These do not upgrade in.named   to Bind 4.9.3 and thus some security holes remain. These should be   corrected in the near future.   5.3: FTP Patches  ----------------  101640-03 SunOS 4.1.3: in.ftpd logs password info when -d option is used.    Fixes an error that caused in.ftpd to log passwords when run with   the -d option.   5.4: Inetd Patches  ------------------  101786-02 SunOS 5.3: inetd fixes 102922-03 SunOS 5.4: inetd fixes 102923-03 SunOS 5.4_x86: inetd fixes    Mostly related to performance problems, but also fixes a minor   security hole.   5.5: NFS Patches  ----------------  102177-04 SunOS 4.1.3_U1: NFS Jumbo Patch 102394-02 SunOS 4.1.4: NFS Jumbo Patch    Fix various NFS security holes.   5.6: NIS Patches  ----------------  100482-07 SunOS 4.1 4.1.1 4.1.2 4.1.3: ypserv and ypxfrd Jumbo Patch 101435-02 SunOS 4.1.3_U1: ypserv and ypxfrd fix 101363-09 NSkit 1.0: Jumbo Patch    These patches are required to allow the usage of the securenets file   in these older releases of NIS.  102034-01 SunOS 5.3: portmapper security hole    Fixes for NIS-related portmapper security holes.  102707-02 SunOS 5.3: jumbo patch for NIS commands 102704-02 SunOS 5.4: jumbo patch for NIS commands 102705-02 SunOS 5.4_x86: jumbo patch for NIS commands    These patches fix ypxfr related NIS problems that became apparent   with NSKit 1.2.  103053-01 SunOS 5.4, 5.3: Jumbo patch for NSKIT v1.2    A patch specifically for NSKit 1.2, fixing a few more security   problems.   5.7: nscd Patches  -----------------  103279-02 SunOS 5.5: nscd breaks password shadowing with NIS+    Keeps nscd from violating NIS+ shadow passwd security.   5.8: Sendmail Patches  ---------------------  100377-22 SunOS 4.1.3: sendmail jumbo patch 101665-07 SunOS 4.1.3_U1: sendmail jumbo patch 102423-04 Sunos 4.1.4: Sendmail jumbo patch    Fix a variety of older sendmail problems. These patches do not bring   the SunOS sendmail up to version 8.6.10+ and so certain new   sendmail problems are not yet addressed. They will be in the near   future.  101739-12 SunOS 5.3: sendmail jumbo patch - security 102066-11 SunOS 5.4: sendmail jumbo patch - security 102064-10 SunOS 5.4_x86: sendmail jumbo patch - security    These patches bring Solaris sendmail up to version 8.6.10+, fixing   all known sendmail security holes.  6.0 Known Bugs And  RFEs   6.1: Bugs  ---------  1238679   DNS spoofing is possible per Cern ca-96.02    This documents the existing DNS security hole noted above, which is   present in releases of BIND prior to 4.9.3. An upgrade of the SunOS   and Solaris BINDs to 4.9.3 is currently in process and should be   accomplished within the next few months.  1237810   4.1.x Unix sendmail vulnerability according to CIAC Bulletin G-    This documents the fact that 4.1.X sendmail has some security holes   because it has not been upgraded to 8.6.10+. An upgrade of the SunOS   sendmail to 8.6.10+ is currently in process and should be   accomplished within the next few months.  7.0 References   7.1: Important Man Pages  ------------------------  No specific man pages refer to internet security.   7.2: Sunsolve Documents  -----------------------  The following sunsolve documents provide some information not included here.  7.2.1: Infodocs ---------------  2105      convert existing NIS(yp) network to secure C2 domain 12793     What are the security ramifications of running TFTP?  7.2.2: SRDBs ------------  6010      C2 security and Solaris 2.x   7.3: Sun Educational Services  -----------------------------  There are no classes specifically on network security.   7.4: Solaris Documentation  --------------------------  There is no Solaris documentation specifically on network security.   7.5: Third Party Documentation  ------------------------------  The following books are not necessarily restricted to the network aspect of security, but do provide some information on it.  _Computer Security Basics_, published by O'Reilly &amp;amp; Associates  _Practical UNIX Security_, published by O'Reilly &amp;amp; Associates   7.6: RFCs  ---------  1244    the Site Security Handbook 1281    Guidelines for the Secure Operation of the Internet   8.0: Supportability  ===================  SunService is not responsible for helping design security policies at your site. It is hoped that this document will help you to maintain robust network security at your site on your.  We can help resolve problems where a Sun program has a security problem with it, but in such cases the contact must be a system administrator with a good understanding of the security issues.   9.0: Additional Support  =======================  For additional help determining security policies at your site, please contact your local SunService office for possible consulting offerings. Sun's Customer Relations organization can put you in touch with your local SunIntegration or Sales office. You can reach Customer Relations at 800-821-4643.   PRODUCT AREA: Gen. Network PRODUCT: Security SUNOS RELEASE: any HARDWARE: n/a  &lt;/PRE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-4455793241775982188?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/4455793241775982188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=4455793241775982188&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/4455793241775982188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/4455793241775982188'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/sunservice-tip-sheet-network-security.html' title='SunService Tip Sheet: Network Security'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-3231447777696055413</id><published>2006-12-18T22:33:00.001-08:00</published><updated>2006-12-18T22:33:51.715-08:00</updated><title type='text'>SunService Tip Sheet: Sun NFS</title><content type='html'>&lt;H1&gt;SunService Tip Sheet: Sun NFS&lt;/H1&gt;&lt;PRE&gt;   INFODOC ID: 11987  SYNOPSIS: NFS PSD/FAQ DETAIL DESCRIPTION:  1.0 About NFS  SunService Tip Sheet for Sun NFS  Revision: 2.9 Date: June 25, 1996  Mail to: brian.hackley@east.sun.com Mail to: gwhite@east.sun.com  Table of Contents  1.0: About NFS 2.0: Debugging NFS   2.1: share and exportfs   2.2: showmount   2.3: nfsstat   2.4: rpcinfo   2.5: etherfind and snoop   2.6 Running a snoop of NFS requests:   2.7 Lockd debug hints 3.0: Common How Tos   3.1: Exporting Filesystems Under SunOS   3.2: Exporting Filesystems Under Solaris   3.3: Mounting Filesystems Under SunOS   3.4: Mounting Filesystems Under Solaris   3.5: Setting Up Secure NFS 4.0: Some Frequently Asked Questions   4.1: Miscellaneous NFS Questions   4.2: Problems Mounting Filesystems on a Client   4.3: Common NFS Client Errors Including NFS Server Not Responding   4.4: Problems Umounting Filesystems on a Client   4.5: Interoperability Problems With Non-Sun Systems   4.6: Common NFS Server Errors   4.7: Common nfsd Error Message on NFS Servers   4.8: Common rpc.mountd Error Messages on NFS Servers   4.9: Common rpc.lockd &amp;amp; rpc.statd Error Messages   4.10: NFS Related Shutdown Errors   4.11: NFS Performance Tuning 5.0: Patches   5.1: Core NFS Patches for SunOS   5.2: Patches Related to NFS for SunOS   5.3: Core NFS Patches for Solaris   5.4: Patches Related to NFS for Solaris 6.0: Known Bugs &amp;amp; RFEs 7.0: References   7.1: Important Man Pages   7.2 Sunsolve Documents   7.3 Sun Educational Services   7.4: Solaris Documentation   7.5: Third Party Documentation   7.6: RFCs 8.0: Supportability 9.0: Additional Support   1.0: About NFS  This Tip Sheet documents a wide variety of information concerning NFS, as implemented in the SunOS and Solaris operating systems. It is intended as both an introduction to NFS and as a guide to the most common problems. There are many more complete references to NFS, a few of which are noted in section 7.4 and 7.5.  The following terms are important to an understanding of NFS:  The NFS SERVER is the machine that makes file systems available to the network. It does so by either EXPORTING (SunOS term) or SHARING (Solaris term) them.  The NFS CLIENT is the machine that accesses file systems that have been made available. It does so by MOUNTING them.  A number of different daemons are involved with NFS:  RPC.MOUNTD only runs on NFS servers. It answers initial requests from clients for file systems.  NFSD runs on NFS servers. They are the daemons that deal with the majority of the client NFS requests.  On SunOS 4.1.X, BIODS (block I/O daemons) help clients with their NFS requests.  These do not exist on Solaris 2.X.  LOCKD and STATD are a set of daemons that keep track of locks on NFS files. There will typically be a set of daemons running on a client and server.  NFS partitions can be mounted in one of two ways, hard or soft.  HARD MOUNTS are permanent mounts designed to look just like any normal, local file system. If a partition that is hard mounted becomes unavailable, client programs will keep trying to access it forever. This will cause local processes to lock when a hard mounted disk goes away. Hard mounts are the default type of mount.  SOFT MOUNTS will fail after a few retries if a remote partition becomes unavailable. This is a problem if you are writing to the partition, because you can never be sure that a write will actually get processed  on the other hand, your local processes will not lock up if that partition does go away. In general, soft mounts should only be used if you are solely reading from a disk and even then it should be understood that the mount is an unreliable one. If you soft mount a partition that will be written to, you are nearly guaranteeing that you will have problems.  There are a number of files related to NFS:  /etc/exports (SunOS) or /etc/dfs/dfstab (Solaris) lists which files to export on a Server. These file are maintained by hand.  /etc/xtab (SunOS) or /etc/dfs/sharetab (Solaris) lists the filesystems that actually are currently exported. They are maintained by exportfs and share, respectively.  /etc/rmtab on a server lists filesystems that are remotely mounted by clients. This file is maintained by rpc.mountd.  /etc/fstab (SunOS) or /etc/vfstab (Solaris) lists which files to mount on a client. These files are maintained by hand.  /etc/mtab (SunOS) or /etc/mnttab (Solaris) on a client lists filesystems which are currently mounted onto that client. The mount and umount commands modify this file.  2.0 Debugging NFS   General NFS Debugging Note  When NFS is not working or working intermittently, it can be very difficult to track down what exactly is causing the problem. The following tools are the best ones available to figure out what exactly NFS is doing.   2.1: share and exportfs  share (on Solaris) and exportfs (on SunOS) are good tools to use to see exactly how a NFS server is exporting its filesystems. Simply log on to the NFS server and run the command that is appropriate for the OS.    SunOS:   # exportfs   /usr -root=koeller   /mnt   /tmp  The above shows that /mnt and /tmp are exported normally. Since we see neither rw or ro as options, this means that the default is being used, which is rw to the world. In addition /usr gives root permissions to the machine koeller.    Solaris:   # share   -               /var   rw=engineering   ""   -               /usr/sbin   rw=lab-manta.corp.sun.com   ""   -               /usr/local   rw   ""  The above shows that /usr/local is exported normally, /var is exported only to engineering (which happens to be a netgroup) and /usr/sbin is exported only to lab-manta.corp.sun.com (which is a machine).  Note: netgroups are only supported if you are running NIS or NIS+. Consult documentation on those products for how to set up netgroups on your machines   2.2: showmount  showmount, used with the -e option, can also show how a NFS server is exporting its file systems. Its benefit is that it works over the network, so you can see exactly what your NFS client is being offered. However, showmount does not show all of the mount options and thus you must sometimes use share or exportfs, as described in section 2.1. When you do a test with showmount, do it from the NFS client that is having problems:    # showmount -e psi   export list for psi:   /var       engineering   /usr/sbin  lab-manta.corp.sun.com   /usr/local (everyone)    # showmount -e crimson   export list for crimson:   /usr (everyone)   /mnt (everyone)   /tmp (everyone)  Note that showmount only displays: the partition and who can mount it. We will not see any other options displayed. In the example above, there are no restrictions on who can mount crimson's partitions and so showmount lists (everyone).   2.3: nfsstat  The nfsstat command gives diagnostics on what type of messages are being sent via NFS. It can be run with either the -c option, to show the stats of an NFS client, or the -s option, to show the stats of an NFS server. When we run 'nfsstat -c' we see the following:    # nfsstat -c    Client rpc:   calls      badcalls   retrans    badxids    timeouts   waits      newcreds   45176      1          45         3          45         0          0   badverfs   timers     toobig     nomem      cantsend   bufulocks   0          80         0          0          0          0    Client nfs:   calls      badcalls   clgets     cltoomany   44866      1          44866      0    Version 2: (44866 calls)   null       getattr    setattr    root       lookup     readlink   read   0 0%%       7453 16%%   692 1%%     0 0%%       15225 33%%  55 0%%      13880 30%%   wrcache    write      create     remove     rename     link       symlink   0 0%%       5162 11%%   623 1%%     914 2%%     6 0%%       306 0%%     0 0%%   mkdir      rmdir      readdir    statfs   15 0%%      0 0%%       467 1%%     68 0%%  The rpc stats at the top are probably the most useful. High 'retrans' and 'timeout' values can indicate performance or network issues. The client nfs section can show you what types of NFS calls are taking up the most time. This can be useful if you're trying to figure out what is hogging your NFS. For the most part, the nfsstat command is most useful when you are doing network and performance tuning. Section 7.4 and 7.5 list books that give some information on this  they are useful to make more sense of the nfsstat statistics.   2.4: rpcinfo  You can test that you have a good, solid NFS connection to your NFS server via the rpcinfo command. As explained in the man page, this program provides information on various rpc daemons, such as nfsd, rpc.mountd, rpc.statd and rpc.lockd. Its biggest use is to determine that one of these daemons is responding on the NFS server. The following examples all show the indicated daemons correctly responding. If instead you get complaints about a service 'not responding,' there might be a problem.  To see that nfsd is responding:    # rpcinfo -T udp crimson nfs   program 100003 version 2 ready and waiting  [crimson is the name of the remote machine that I am testing]  To see that mountd is responding:    # rpcinfo -T udp crimson mountd   program 100005 version 1 ready and waiting   program 100005 version 2 ready and waiting  To see that lockd is responding:    # rpcinfo -T udp crimson nlockmgr   program 100021 version 1 ready and waiting   rpcinfo: RPC: Procedure unavailable   program 100021 version 2 is not available   program 100021 version 3 ready and waiting    # rpcinfo -T udp crimson llockmgr   program 100020 version 2 ready and waiting  (the procedure unavailable error for the nlockmgr seems to be normal for most systems)  If you run rpcinfo and determine that certain rpc services are not responding, check those daemons on the master.  If none of the above works, you can verify that RPC services are working at all on the server by running:    # rpcinfo remote-machine-name  If this gives errors too, there is probably an issue with portmap (SunOS) or rpcbind (Solaris).  [Note: the above rpcinfo commands will vary slightly under Solaris 2.5 or higher, as those OSes will offer NFS version 3, running over TCP, rather than UDP.]   2.5: etherfind and snoop  If all else fails and NFS still doesn't seem to be working right, the last resort in debugging is to use a network sniffer program, such as etherfind (SunOS) or snoop (Solaris). This can give you some indication of whether remote machines are responding at all. Below is an example of a totally normal NFS interaction, shown by snoop on Solaris:    # snoop psi and rainbow-16   Using device /dev/le (promiscuous mode)            psi -&amp;gt; rainbow-16   NFS C GETATTR FH=4141     rainbow-16 -&amp;gt; psi          NFS R GETATTR OK            psi -&amp;gt; rainbow-16   NFS C READDIR FH=4141 Cookie=2600     rainbow-16 -&amp;gt; psi          NFS R READDIR OK 1 entries (No more)  These were the results when an 'ls' was run on 'psi' in a directory that was mounted from 'rainbow-16'. The lines labelled 'C' are NFS requests, while the lines labelled 'R' are NFS replies. Through snoop you can easily see: NFS not being responding to (you would get lots of 'C' lines without 'R' replies to them) and also certain errors (timeouts and retransmits particularly). The man page on snoop gives some indication of how to make more in-depth use of the tool. In general, it should only be used for very complex issues, where NFS is behaving very oddly and even then you must be very good with NFS to perceive unexpected behavior.  See the next section for more tips on snoop.   2.6  Running a snoop of NFS requests:  This is best done from a third, uninvolved machine.  If the machine that you are trying to debug is on "systemA", then trace the packets going to and from "systemA" as follows:  snoop -o /var/snoop.out systemA  Alternatively, snoop between systemA and clientB:  snoop -o /var/snoop.out systemA clientB  snoop will run in the window (do not put into background), with a counter of the packets in the corner of the screen.  It will dump all the packets into a raw snoop file.  When the "network event" occurs, wait a couple of seconds and then kill the snoop job.  If the network event includes error messages in /var/adm/messages, please send us the /var/adm/messages and the raw snoop file (/var/snoop.out).  You can read the snoop file with snoop -i /var/snoop.out more.  There are a variety of options in the snoop man page to increase verbosity, and/or to look at specific packets.  Please note that if disk space becomes an issue, you must take steps similar to those listed above.  A very large snoop file can be created in two or three minutes, so snooping is best reserved for easily reproduced events.   2.7  Lockd debug hints  Please see section 4.9: Common rpc.lockd &amp;amp; rpc.statd Error Messages for information regarding specific lockd and statd problems.  Generally you can pick out problem clients by snooping and/or putting lockd into debug mode.  Sections 2.5 and 2.6 cover snoop.  How to put the Solaris 2.3 and 2.4 lockd into debug mode: Edit the line in the /etc/init.d/nfs.client script that starts up lockd to start it with -d3 and redirect stdout to a filesystem with ALOT of disk space.     /usr/lib/nfs/lockd -d3 &amp;gt; /var/lockd.debug.out  Note that lockd always creates an empty file in the pwd, called logfile when it is running in debug mode.  Disregard this file.  If disk space becomes an issue from doing the lockd debug mode, you will have to stop lockd and restart it.  If you turn the above command from a shell, make sure it is a bourne or korn shell (sh or ksh).  How to put the Solaris 2.5 lockd into debug mode:  You will have to do this from a shell, preferably a command tool window.  You must capture the debug output that scrolls by into a script file:    script /var/lockd.out   /usr/lib/nfs/lockd -d3  After you are done debugging, CTRL/C the lockd job since it does not fork and exec to the background.  Then exit or CTRL/D the script job.  The debug output will be in /var/lockd.out.  Please note that Solaris 2.5 will also log more detailed debug output into the /var/adm/messages file.  We will need that also.  How to run a truss of lockd (you rarely need to do this):  Just modify the start of lockd to be a truss of the lockd process. You will need even more disk space to do this!  For Solaris 2.3 and 2.4: truss  -o /var/truss.out -vall -f /usr/lib/nfs/lockd -d3&amp;gt;var/lockd.debug.out  For Solaris 2.5:   script /var/lockd.out   truss -o /var/truss.out -vall -f /usr/lib/nfs/lockd -d3  CTRL/C the script job (and exit from the script shell if on 2.5) after you have reproduced the problem.  If disk space becomes an issue from doing the truss, use a cron job to: 1.  stop running truss 2.  move "current" truss file to "old" truss file 3.  get PID of lockd 4.  truss -o /var/truss.out.current -vall -f -p PID (PID from step 3).  3.0 Common How-Tos   3.1: Exporting Filesystems Under SunOS  In order to export a fs under SunOS, you must first edit the file /etc/exports on your NFS server, adding a line for the new filesystem. For example, the following /etc/exports file is for a server that makes available the filesystems /usr, /var/spool/mail and /home:    # cat /etc/exports   /usr   /var/spool/mail   /home  You can add normal mount options to these lines, such as ro, rw and root. These options are fully described in the exports man page. The following example shows our /etc/exports file, but this time with the filesystems all being exported read only:    # cat /etc/exports   /usr  -ro   /var/spool/mail       -ro   /home -ro  If your machine is already exporting filesystems and you are adding a new one, simply run the exportfs command to make this new filesystem available:    # exportfs -a  If you have never exported filesystems from this machine before, you should reboot it after editing the /etc/exports file. This will cause rpc.mountd and nfsd to get started and will also automatically export out the filesystems.   3.2: Exporting Filesystems Under Solaris  You must edit the file /etc/dfs/dfstab in order to make files automatically export on a Solaris system. The standard syntax of lines in that file is:    share -F nfs partition  For example, the following /etc/dfs/dfstab file is for a server that makes available the filesystems /usr, /var/spool/mail and /home:    share -F nfs /usr   share -F nfs /var/spool/mail   share -F nfs /home  You can add normal mount options to these lines, such as ro, rw and root. this is done by proceeding the options with a -o flag. These options are fully described in the share man page. The following example shows our /etc/dfs/dfstab file, but this time with the filesystems all being exported read only:    share -F nfs -o ro /usr   share -F nfs -o ro /var/spool/mail   share -F nfs -o ro /home  If your machine is already exporting filesystems and you are adding a new one, simply run the shareall command to make this new filesystem available:    # shareall  If you have never exported filesystems from this machine before, you must run the nfs.server script:    # /etc/init.d/nfs.server start  (The NFS Server will come up fine on the next boot, now that an /etc/dfs/dfstab file exists)   3.3: Mounting Filesystems Under SunOS  You can always mount file systems with the mount command, with the following syntax:    mount remotemachine:/remotepartition /localpartition  For example:    mount bigserver:/usr/local /usr/local  You might also give the mount command any of the general mount options. For example, to mount /usr/local read only, you would use the command:    mount -o ro bigserver:/usr/local /usr/local  If you wish a filesystem to get mounted every time the machine is booted, you must edit the /etc/fstab file. The syntax is:    remotemach:/remotepart        /localpart      nfs     [options]       0 0  The options field is optional and can be left out if none are needed. To make /usr/local mount automatically, you would add the following to your /etc/fstab:    bigserver:/usr/local  /usr/local      nfs     0 0  To make it mount read only, you could use:    bigserver:/usr/local  /usr/local      nfs     ro      0 0   3.4: Mounting Filesystems Under Solaris  Section 3.3, above, shows how to correctly use the mount command, to interactively mount files. It works exactly the same under Solaris.  If you wish a filesystem to get mounted every time the machine is booted, you must edit the /etc/vfstab file. The syntax is:    remotemach:/remotepart - localpart nfs - yes [options]  For example, to mount the /usr/local partition, you would enter:    bigserver:/usr/local - /usr/local nfs - yes -  To mount it readonly, you would enter:    bigserver:/usr/local - /usr/local nfs - yes ro  Consult the vfstab man page if you're interested in knowing what the fields that contain "-"s and "yes" are for. For the most part, they're only relevant for non-NFS mounts.   3.5: Setting Up Secure NFS  NFS has built-in private-key encryption routines that can provide added security. To use this functionality, a partition must be both exported with the "secure" option and mounted with the "secure" option. In addition, either NIS or NIS+ must be available. Secure NFS will not work without one of these naming services.  To add the -secure option to the /secret/top partition on a SunOS machine, the following exports entry would be needed on the server:    /secret/top   -secure  In addition, the following fstab entry would be needed on the client:    server:/secret/top    /secret/top     nfs     rw,secure       0 0  (Solaris machines would have to have the -secure option similarly added.)  If you are running NIS+, you will not need to do anything further to access the partition, since NIS+ users and NIS+ hosts will already have credentials created for them.  If you are running NIS, you must create credentials for all users and hosts that might want to access the secure partition.  Root can add credentials for users with the following command:    # newkey -u username  Users can create their own credentials with the following command:    $ chkey  The passwd supplied to these programs should be the same as the user's passwd.  Root can add credentials for hosts with the following command:    # newkey -h machinename  The passwd supplied to newkey in this case should be the same as the machine's root passwd.  It is important to note that rpc.yppasswd must be running on your NIS server for these commands to work. In addition, push out publickey maps afterwards to make sure that the most up-to-date credential information is available.  Once this is all done, secure NFS should work on your NIS network, with two caveats: First, keyserv must be running on your client machines. If this is not the case, adjust your rc files, so that it automatically starts up. Second, if a user does not supply a passwd when logging in (due to a .rhosts or /etc/hosts.equiv for example) or if his secure key is different than his passwd, then he will need to execute the command 'keylogin' before he can access the secure NFS partition.  4.0 Frequently Asked Questions   4.1: Miscellaneous NFS Questions  Q: What version of NFS does Sun implement?  A: All of the currently supported revisions of SunOS and Solaris support NFS version 2, over UDP. In addition, Solaris 2.5 will support NFS version 3, over TCP. Although NFS version 3 is the default for Solaris 2.5 and up, the NFS will fall back to version 2 if other machines do not have version 3 capability.  Q: What do these NFS Error Codes mean (e.g. NFS write error 49)?  A: On SunOS, you can find a list of error codes in the intro(2) man page:    # man 2 intro  On Solaris, you can consult the /usr/include/sys/errno.h file. SRDB #10946, available through SunSolve also lists some of the NFS error codes.  Q: Why isn't my netgroup entry working?  A1: There are lots of factors related to netgroup. First, you must be using either NIS or NIS+, to propagate the netgroup. Second, netgroup will only work as ro or rw arguments and even then only when the ro or rw is not being used to override another ro or rw option. Netgroups can not be used as an argument to the root option.  A2: NFS requires that the "reverse lookup" capability work such that the hostname returned by looking up the IP address (gethostbyaddr) matches EXACTLY the text specified in the netgroup entry. Otherwise the NFS mount will fail with "access denied"  For example, if the NFS server has the following NIS netgroup entry:  goodhosts   (clienta,,) (clientb,,) (blahblah,,)  clienta is at 192.1.1.1 and the Server uses DNS for hostname lookups.  The NFS request to do the mount arrives from IP address 192.1.1.1 The NFS server looks up the IP address of 192.1.1.1 to get the hostname associated with that IP address.  The gethostbyaddr MUST return "clienta".  If it does not, the NFS request will fail with "access denied".  telnet from the NFS client to the NFS server and run "who am i".  The hostname in parentheses is the name that should be in the netgroup:  hackley    pts/13       Jan 24 09:21    (mercedes)  The most common cause of this failure is failure of a DNS administrator to properly manage the "reverse lookup maps" e.g. 192.1.1.IN-ADDR.ARPA.  Q:  What can you tell me about CacheFS?  A:  CacheFS is the "cache file system".  It allows a Solaris 2.X NFS client to cache a remote file system to improve performance.  For example, CacheFS allows you to be on "clienta" and cache your home directory, which is mounted via NFS from an NFS server.  Because most often CacheFS is used in conjunction with the automounter, we have some basic information on CacheFS in our automounter tips sheet (Product Support Document).  You can read more about CacheFS in the "NFS Administration Guide" and in the "mount_cachefs" man page.  Q:  Is there a showfh for Solaris to show the NFS File Handle?  A:  Yes here it is:  #!/bin/sh # # fhfind: takes the expanded filehandle string from an # NFS write error or stale filehandle message and maps # it to a pathname on the server. # # The device id in the filehandle is used to locate the # filesystem mountpoint.  This is then used as the starting # point for a find for the file with the inode number # extracted from the filehandle. # # If the filesystem is big - the find can take a long time. # Since there's no way to terminate the find upon finding # the file, you might need to kill fhfind after it prints # the path. #  if [ $# -ne 8 ]  then         echo         echo "Usage: fhfind &amp;lt;filehandle&amp;gt; e.g."         echo         echo "  fhfind 1540002 2 a0000 4df07 48df4455 a0000 2 25d1121d"         exit 1 fi  # Filesystem ID  FSID1=$1 FSID2=$2  # FID for the file  FFID1=$3 FFID2=`echo $4   tr [a-z] [A-Z]` # uppercase for bc FFID3=$5  # FID for the export point (not used)  EFID1=$6 EFID2=$7 EFID3=$8  # Use the device id to find the /etc/mnttab # entry and thus the mountpoint for the filesystem.  E=`grep $FSID1 /etc/mnttab` if [ "$E" = "" ]   then         echo         echo "Cannot find filesystem for devid $FSID1"         exit 0 fi  set - $E MNTPNT=$2  INUM=`echo "ibase=16 $FFID2"   bc` # hex to decimal for find  echo echo "Now searching $MNTPNT for inode number $INUM" echo  find $MNTPNT -mount -inum $INUM -print 2&amp;gt;dev/null   4.2: Problems Mounting Filesystems on a Client  Q: Why do I get "permission denied" or "access denied" when I try to mount a remote filesystem?  A1: Your remote NFS server is not exporting or sharing its file systems. You can verify this by running the showmount command as follows:    # showmount -e servername  That will provide you with a list of all the file systems that are being sent out. If a file system is not being exported, you should consult section 3.1 or 3.2, as applicable.  A2: Your remote NFS server is exporting file systems, but only to a limited number of client machines, which does not include you. To verify this, again use the command showmount:    # showmount -e psi   /var       engineering   /usr/sbin  lab-manta.corp.sun.com   /usr/local (everyone)  In this example, /usr/local is being exported to everyone, /var is being exported to the engineering group, and /usr/sbin is only being exported to the machine lab-manta.corp.sun.com. So, I might get the denial message if I tried to mount /var from a machine not in the engineering netgroup or if I tried to mount /usr/sbin from anything but lab-manta.corp.sun.com.  A3: Your machine is given explicit permission to mount the partition, but the server does not list your correct machine name. In the example above, psi is exporting to "lab-manta.corp.sun.com", but the machine might actually identify itself as "lab-manta" without the suffix. Or, alternatively, a machine might be exporting to "machine-le0" while the mount request actually comes from "machine-le1". You can test this by first running "showmount -e" and then physically logging in to the server, from the client that cannot mount, and then typing "who". This will show you if the two names do not match. For example, I am on lab-manta, trying to mount /usr/sbin from psi:    lab-manta# mount psi:/usr/sbin /test   mount: access denied for psi:/usr/sbin  I use showmount -e to verify that I am being exported to:    lab-manta# showmount -e psi   export list for psi:   /usr/sbin  lab-manta.corp.sun.com  I then login to psi, from lab-manta, and execute who:    lab-manta%% rsh psi   ...   psi# who   root       pts/6        Sep  8 14:02    (lab-manta)  As can be seen, the names "lab-manta" and "lab-manta.corp.sun.com" do not match. The entry shown by who, lab-manta, is what should appear in my export file. When I change it and re-export, I can verify it with showmount and then see that mounts do work:    lab-manta[23] showmount -e psi   export list for psi:   /usr/sbin  lab-manta   lab-manta[24] mount psi:/usr/sbin /test   lab-manta[25]  A4: Your client is a member of a netgroup, but it seems that the netgroup does not work.  See Section 4.1 for notes on debugging netgroups.  Q: Why do I get the following error when I try and mount a remote file system:    nfs mount: remote-machine:: RPC: Program not registered   nfs mount: retrying: /local-partition  A: rpc.mountd is not running on the server. You probably just exported the first filesystem from a machine that has never done NFS serving before. Reboot the NFS server, if it is SunOS 4.X,.  The the NFS server is running Solaris 2.X, run the following:  /etc/init.d/nfs.server start  Note: Consult section 3.1 or 3.2 for information on how to create the exports file on a SunOS 4.X system or on how to create the dfstab file on a Solaris 2.X system.  Q: Why doesn't the mountd respond?  After I try the mount I get NFS SERVER NOT RESPONDING.  When I try to talk to the mountd, rpcinfo gives an rpc timed out error.  How can I debug or fix a hung mountd on the NFS server.  A: First, try killing the mountd process on the server and restarting it. This gets around many hung mountd issues.  Second, make sure the NFS server is "patched up".  There is a mountd patch for Solaris 2.3 and we've seen cases where the \patch 101973 patch helps on 2.4.  Further troubleshooting tips to debug the hung mountd on Solaris 2.X: 1.  get the PID of the running mountd 2.  truss -f -vall -p PID 3.  start a snoop at the same time you start the truss 4.  if you have access to it, run "gcore" or "pstack" (unsupported utilities     made available by SunService) to get the stack trace of the mountd PID.     Update:  pstack is supported at 2.5, /usr/proc/bin/pstack .  It is              on of the new "proc" tools.  Q:  Why do I get the message "Device Busy" in response to my mount command?  A:  You get this message because some process is using the underlying mount     point.  For example, if you had a shell whose pwd was /mnt and you     tried to mount something into /mnt, e.g. mount server:/export/test /mnt     you would see this error.     To work around this, find the process using the directory and either kill     it or move its pwd someplace else.  The "fuser" command is extremely handy     to do this:     mercedes[hackley]:cd /mnt     mercedes[hackley]:fuser -u /mnt     /mnt:     4368c(hackley)     368c(hackley)      In this case you see process # 368 and 4368 are using the /mnt mount point.     PID 368  is the shell and PID 4368 was the fuser command.      You can forcibly kill any process (must be root) from a mount point     using fuser -k /mnt.      Please note that fuser is not infallible and cannot identify kernel     threads using a mount point (as sometimes happens with the automounter).   4.3: Common NFS Client Errors Including NFS Server Not Responding  If a file system has been successfully mounted, you can encounter the following errors when accessing it.  Q: Why do I get the following error message:    Stale NFS file handle  A1: This means that a file or directory that your client has open has been removed or replaced on the server. It happens most often when a dramatic change is made to the file system on the server, for example if it was moved to a new disk or totally erased and restored. The client should be rebooted to clear Stale NFS file handles.  A2: If you prefer not to reboot the machine, you can create a new mount point on the client for the mount point with the Stale NFS file handle.  Q: Why do I get the following error message:    NFS Server &amp;lt;server&amp;gt; not responding   NFS Server ok    Note, this error will occur when using HARD mounts.   This troubleshooting section applies to HARD or SOFT mounts.  A1: If this problem is happening intermittently, while some NFS traffic is occurring, though slowly, you have run into the performance limitations of either your current network setup or your current NFS server. This issue is beyond the scope of what SunService can support. Consult sections 7.4 &amp;amp; 7.5 for some excellent references that can help you tune NFS performance. Section 9.0 can point you to where you can get additional support on this issue from Sun.  A2: If the problem lasts for an extended period of time, during which no NFS traffic at all is going through, it is possible that your NFS server is no longer available.  You can verify that the server is still responding by running the commands:    # ping server and   # ping -s server 8000 10 (this will send 10 8k ICMP Echo request packets to the server)  If your machine is not available by ping, you will want to check the server machine's health, your network connections and your routing.  If the ping works, check to see that the NFS server's nfsd and mountd are responding with the "rpcinfo" command:     # rpcinfo -u server nfs  program 100003 version 2 ready and waiting     # rpcinfo -u server mountd  program 100005 version 1 ready and waiting program 100005 version 2 ready and waiting  If there is no response, go to the NFS server and find out why the nfsd and/or /mountd are not working over the network.  From the server, run the same commands.  If they work OK from the server, the network is the culprit.  If they do NOT work, check to see if they are running.  If not, restart them and repeat this process.  If either nfsd or mountd IS running but does not respond, then kill it and restart it and retest.  A3: Some older bugs might have caused this symptom. Make sure that you have the most up-to-date Core NFS patches on the NFS server. These are listed in Section 5.0 below. In addition, if you are running quad ethernet cards on Solaris, install the special quad ethernet patches listed in Section 5.4.  A4:  Try cutting down the NFS read and write size with the NFS mount options:  rsize=1024,wsize=1024.  This will eliminate problems with packet fragmentation across WANS, routers, hubs, and switches in a multivendor environment, until the root cause can be pin-pointed. THIS IS THE MOST COMMON RESOLUTION TO THIS PROBLEM.  A5: If the NFS server is  Solaris 2.3 and 2.4, 'nfsreadmap' occasionally caused the "NFS server not responding" message on Sun and non-Sun NFS clients.  You can resolve this by adding the following entry to your /etc/system file on the NFS server:  set nfs:nfsreadmap=0  And rebooting the machine.  The nfsreadmap function was removed in 2.5 because it really didn't work.  A6: If you are using FDDI on Solaris, you must enable fragmentation with the command: ndd -set /dev/ip ip_path_mtu_discovery 0  Add this to /etc/init.d/inetinit, after the other ndd command on line 18.  A7:  Another possible cause is IF the NFS SERVER is Ultrix, old AIX, Stratus, and older SGI and you ONLY get this error on Solaris 2.4 and 2.5 clients, but the 2.3 and 4.X clients are OK.  The NFS Version 2 and 3 protocol allow for the NFS READDIR request to be 1048 bytes in length.  Some older implementations incorrect thought the request had a max length of 1024.  To work around this, either mount those problem servers with rsize=1024,wsize=1024 or add the following to the NFS client's /etc/system file and reboot:  set nfs:nfs_shrinkreaddir=1  A8:  Oftentimes NFS SERVER NOT RESPONDING is an indication of another problem on the NFS server, particularly on the disk subsystem.  If you have a SPARCStorage Array, you must verify that you have the most recent firmware and patches due to the volatility of that product.  Another general method that can be tried to is look at the output from iostat -xtc 5 and check the svt_t field.  If this value goes over 50.0 (50 msec) for a disk that is being used to serve NFS requests, you might have found your bottleneck.  Consult the references in Section 7 of this PSD for other possible NFS Server tuning hints.  NOTE:  NFS Server performance tuning services are only available on a Time and Materials basis.  Q: Why can't I write to a NFS mounted file system as root?  A: Due to security concerns, the root user is given "nobody" permissions when it tries to read from or write to a NFS file system. This means that root has less access than any user, will only be able to read from things with world read permissions, and will only be able to write to things with world write permissions.  If you would like your machine to have normal root permissions to a filesystem, the filesystem must be exported with the option "root=clientmachine".  An alternative is to export the filesystem with the "anon=0" option. This will allow everyone to mount the partition with full root permissions.  Sections 3.1 and 3.2 show how to include options when exporting filesystems.  Q1: Why do 'ls'es of NFS mounted directories sometimes get mangled on     my SunOS machine? Q2: Why do I get errors when looking at a NFS file on my SunOS     machine?  A: By default, SunOS does not have UDP checksums enabled. This can cause problems if NFS is being done over an extended distance, especially if it is going across multiple routers. If you are seeing very strange errors on NFS or are getting corruption of directories when you view them, try turning UDP checksums on.  You can do so my editing the kernel file /usr/sys/netinet/in_proto.c, changing the following:    int  udp_cksum = 0            /* turn on to check &amp;amp; generate udp checksums */  to:    int  udp_cksum = 1            /* turn on to check &amp;amp; generate udp checksums */  Afterwards, you will must build a new kernel, install it and reboot. UDP checksums must be enabled on both the NFS client and NFS server for it to have any effect.  This is only an issue on SunOS machines, as Solaris machines have UDP checksums enabled by default.  Q1: Why do I get intermittent errors writing to an NFS partition? Q2: Why do I get intermittent errors reading from an NFS partition? Q3: Why do I get the following error on my NFS partition?    "nfs read error on &amp;lt;machine&amp;gt; rpc: timed out"  A: These symptoms can all be caused by failures of soft mounts. Soft mounts time out instead of logging an "NFS SERVER NOT RESPONDING" message.  Because of this and other reasons, it is recommended that you only mount non-critical read-only servers with soft mounts (e.g. man pages).  To resolve the problem, you must solve the underlying problem (See the section above on "NFS server not responding" for troubleshooting assistance.  Alternatively, you can mount the NFS server with hard,intr instead of soft, but this will have the effect of causing applications to hang instead of timeout when the NFS servers are unavailable or unreachable.   4.4: Problems Umounting Filesystems on a Client  Q: When I try and umount a partition, why do I get the following error:    /partition: Device busy  A: This means that someone is actively using the partition you are trying to unmount. They might be running a program from it or they might simply be sitting in a subdirectory of the partition.  In Solaris, you can run the command fuser to determine what processes are using a partition:    # fuser /test   /test:     1997c    1985c  The above example shows that pids 1985 and 1997 are accessing the /test partition. Either kill the processes or run fuser -k /test to have fuser do this for you.  NOTES:  This functionality is not available under SunOS.  It does not always identify an automounted process on Solaris.  In many cases, it is necessary to reboot a machine in order to clear out all of the processes that could be making a file system busy.   4.5: Interoperability Problems With Non-Sun Systems  The following problems are relevant to Suns that are doing mounts from non-Sun systems.  Q: Why do I get the following error when mounting from my HP or SunOS 3.5 machine or other machine running an older version of NFS:    nfsmount server/filesystem server not responding RPC authentication error \ 	why = invalid client credential.  A: Older versions of NFS only allowed users to be in eight groups or less. Reduce root's number of groups to eight or less and the problem will go away. Users planning to access this partition should also reduce their number of groups to eight.  Q: When I NFS mount filesystems to my Sun, from my PC, why does the Sun never see changes I make to those filesystems.  A: Most PC NFS servers do not seem to correctly notify their NFS clients of changes made to their filesystems. It appears that this is due to the fact that file timestamps on PCs are very coarse. If you are having this problem, speak with the vendor of your PC NFS product.  Q: Why do mounts from my SGI fail with "not a directory" ?  A: For some reason, certain versions of the SGI NFS server sometimes begin using port 860 rather than 2049 for NFS. When this occurs, mounts will fail. In order to get around this bug, always use the "port" option, with 2049 as a value, when doing mounts from an SGI, e.g.:    mount -o port=2049 sgi:/partition /localpartition  If you are mounting from an SGI via autofs, be sure you have the newest version of the kernel patch (101318-74 or better for 5.3, 101945-32 or better for 5.4), as older versions of the kernel patch did not support the port option for autofs.  Q: Why can't I NFS mount from my old, old machine?  A: If you have a very old machine, it is probably running NFS version 1. Such machines often have problems talking to newer versions of NFS. If you have a very old machine, speak with the manufacturer to see if they've ported NFS version 2 or 3.   4.6: Common NFS Server Errors  Q: Why do I get the following error when I run exportfs/shareall?    exportfs: /var/opt: parent-directory (/var) already exported   share_nfs: /var/opt: parent-directory (/var) already shared  A: NFS specs forbid you from exporting both a parent directory and a sub-directory. If you try and export a sub-directory when the parent directory is already exported, you will get the above error. The above example showed an export of the subdirectory /var/opt being attempted, after the directory /var was already available.  A very similar error will occur in the opposite case:    exportfs: /var: sub-directory (/var/spool/mail) already exported  This shows the directory /var being exported after /var/spool/mail was already available.  If you want to have both a parent directory and its sub-directory exported, you must export just the parent directory. Among other things, this means that you can not have different options on parent and sub-directories, for example -ro on a parent directory and -rw on a specific subdirectory.  Q: Why is my NFS server getting totally overrun by quota errors?  A: Solaris 2.4 experienced an error relating to way that quotas and NFS interacted.  Obtain 101945-34 or later, if quota message from NFS partitions are having a serious impact on your machine.  If you are running into this problem where your client is Solaris and your server is SunOS, you will not have this option and it is recommended that you simply upgrade your SunOS system.  Q: Why does the /etc/rmtab file get huge?  A: The rmtab contains the list of all the file systems currently being mounted by remote machines. When a filesystem is unmounted by a remote machine, the line in the rmtab is just commented out, not deleted. This can make the rmtab file get very large, maybe even filling the root partition.  If this is a problem at your site, add the following lines to your rc, prior to the starting of the rpc.mountd:    if [ -f /etc/rmtab ]   then     sed -e "/^#/d" /etc/rmtab &amp;gt; /tmp/rmtab 2&amp;gt;dev/null     mv /tmp/rmtab /etc/rmtab &amp;gt;dev/null 2&amp;gt;1   fi  This will cause the rmtab file to be trimmed every time the system boots.   4.7: Common nfsd Error Message on NFS Servers  Q: Why do I get the following error message when nfsd starts?    /usr/lib/nfs/nfsd[247]: netdir_getbyname (transport udp,        host/serv \1/nfs), Bad file number  A: This problem is usually the result of an nfsd line not being in your services map. Consult your naming service (files, nis, nis+) and insert the following entry, if it is missing:    nfsd            2049/udp        nfs             # NFS server daemon  ...and at 2.5, you must also have:   nfsd          2049/tcp        nfs  Q: Why do I get the following error message when nfsd starts?  /usr/lib/nfs/nfsd[2943]: t_bind to wrong address /usr/lib/nfs/nfsd[2943]: Cannot establish NFS service over /dev/udp: \ 		transport setup problem. /usr/lib/nfs/nfsd[2943]: t_bind to wrong address /usr/lib/nfs/nfsd[2943]: Cannot establish NFS service over /dev/tcp: \ 		transport setup problem. /usr/lib/nfs/nfsd[2943]: Could not start NFS service for any protocol. Exiting.  A: This problem is caused by trying to start a second nfsd when one is already running.   4.8: Common rpc.mountd Error Messages on NFS Servers  Q: Why do I constantly get the following error message on my NFS server:    Aug 15 13:13:56 servername mountd[930]: couldn't register TCP MOUNTPROG   Aug 15 13:13:58 servername inetd[141]: mountd/rpc/udp server failing  A: This problem occurs most often on SunOS machines. It typically means that you are starting rpc.mountd from the rc.local, but also have a line in your inetd.conf:    mountd/1       dgram   rpc/udp wait root /usr/etc/rpc.mountd   rpc.mountd  You can resolve this problem by commenting out the mountd line in the /etc/inetd.conf file and then killing and restarting your inetd.   4.9: Common rpc.lockd &amp;amp; rpc.statd Error Messages  Q: What does it mean when I get the following error:    lock manager: rpc error (#): RPC: Program/version mismatch  A: Some of your systems are running up-to-date versions of lockd, while others are outdated. Install the most up-to-date lockd patch on all of your systems. See section 5.0 below for a list of lockd patches.  Q: What does it mean when I get the following error:    rpc.statd: cannot talk to statd on [machine]  A: Either, [machine] is down or it is no longer doing NFS services. It's possible that the machine might still be around, but has changed its name or something similar. If these changes are going to be permanent, clear out the statmon directories on your machine. Do this by rebooting the machine into single user mode and running the following command:    SunOS:   rm /etc/sm/* /etc/sm.bak/*    Solaris:   rm /var/statmon/sm/* /var/statmon/sm.bak/*  Afterwards, execute reboot to bring your machine back up.  Alternatively, if you cannot put the system into single user mode, - Kill the statd and lockd process - clear out the "sm" and "sm.bak" directories" - Restart statd and lockd in that order  Q: How can I fix these errors?  The SunOS 4.1.X lockd reports:    lockd[136]: fcntl: error Stale NFS file handle   lockd[136]: lockd: unable to do cnvt.  the lockd error message is different on Solaris 2.3 and 2.4:    lockd: unable to do cnvt.   _nfssys: error Stale NFS file handle   Generally, this is caused by an error from a client.  The client  has submitted a request for a lock on a stale file handle.  Sometimes,  older or unpatched lockd clients will continually resubmit these  requests.  See the "lockd debug hint" Section for help in  identifying the client making the request.  See section 5.0 for info  on the NFS and lockd patches.  If the client is a non-Sun,  contact the client system vendor for their latest lockd patch.  Q: How can I fix the following errors:      nlm1_reply: RPC unknown host      create_client: no name for inet address 0x90EE4A14. We also see      nlm1_call: RPC: Program not registered      create_client: no name for inet address 0x90EE4A14.  A: There are THREE items to check in order.  1.  This first answer applies if the The hexadecimal address 0x90EE4A14     corresponds to an IP address in use on your network and it not     in your hosts database (/etc/hosts, NIS, NIS+ or DNS as appropriate).      In this case, to 144.238.74.20.     The customer does not have that host ID in his NIS+ hosts table.     The customer can find out the host name for that IP address by using     telnet to connect to the IP address, then getting the hostname.     The customer then adds the entry to the NIS+ hosts table.      Then verify that gethostbyaddr() was working with the new     IP/hostname in NIS+ with:       ping -s 144.238.74.20     The responses interpret the IP address into the hostname.  2.  If you do the above and the messages continue, kill and     restart the lockd as it appears lockd caches name service     information.  3.  Patch levels:  Solaris 2.4: 101945-34 or better kernel jumbo patch 101977-04 or better lockd jumbo patch 102216-05 or better klm kernel locking patch (See note below)  Note: Patch 102216-05 contains a fix for a bug that can cause this error message: 1164679 KLM doesn't initialize rsys &amp;amp; rpid correctly  Solaris 2.3: 101318-75 or better kernel jumbo patch  Q:  Why do I get the following error message on Solaris?  lockd[2269]:netdir_getbyname (transport udp, host/serv \1/lockd), Resource temporarily unavailable lockd[2269]: Cannot establish LM service over /dev/udp: bind problem. Exiting.  A:  This is caused by missing entries for lockd in /etc/services, the NIS services map, or the NIS+ services table. Verify this with: getent services lockd  If you don't get the lockd entries, add the following entry to the appropriate services database if it does not exist: lockd           4045/udp lockd           4045/tcp  Check your /etc/nsswitch.conf file's services entry to determine which services database you are using.  Q:  Why do I get the following error message on Solaris?  lockd[2947]: t_bind to wrong address lockd[2947]: Cannot establish LM service over /dev/udp: bind problem. Exiting.  A:  This is caused by trying to start lockd when it is already running. If you see this message at bootup, you must inspect your startup scripts in /etc/rc2.d and /etc/rc3.d to determine the cause.   4.10: NFS Related Shutdown Errors  Q: Why do I get the following error, when running 'shutdown' on my Solaris machine:    "showmount: machine: RPC:program not registered"  A: This is due to a bug in the /usr/sbin/shutdown command. shutdown executes the showmount command as part of its scheme to warn other machines that it will not be available. If the machine you executed shutdown on is not a nfs server, shutdown will complain with the above message. This will cause no impact to your machine, but if it annoys you, you can run the older /usr/ucb/ shutdown program:    # /usr/ucb/shutdown  Q: Why do I get the following error, when running 'shutdown' on my Solaris machine:    "nfs mount:machine(vold(PID###):server not responding:RPC not registered"  A: This is due to a bug in vold, which causes it to be shutdown too late. This will cause no impact to your machine, but if it annoys you, you can stop vold before executing shutdown:    # /etc/init.d/volmgt stop   # shutdown   4.11  NFS Performance Tuning  Q: How do I determine how many nfsds to run on a SunOS 4.1.X or on a    Solaris 2.X system?  A:  It is difficult to provide NFS tuning in short a technical note, but here are some general guidelines.  For more specific guidelines, consult the O'Reilly and Associates book "Managing NFS and NIS", the SunSoft Press book, "Sun Performance and Tuning", or the "SMCC NFS Performance and Tuning Guide".  Ordering info is in Section 7 of this PSD.  If you need NFS performance consulting assistance from SunService, please refer to Sections 8 and 9 of this document on supportability and support providers.  In SunOS 4.1.X, the number of nfsd's specifies the number of nfsd processes that run.  In Solaris 2.X, the number of nfsd's specifies the number of nfsd threads that run inside the single nfsd Unix process.  Here are some general guidelines for SunOS 4.1.X:  To determine how many nfsds to run, use any of the formulas below to pick a starting value.  Then use the procedures below to adjust the number of nfsds until it is right for the particular environment.  --------------------------------------------------------   VARIATION                    FORMULA --------------------------------------------------------  Variation 1   #(disk spindles) + #(network interfaces) --------------------------------------------------------  Variation 2   4 for a desktop system that is both                client and server,                8 for a small dedicated server,                16 for a large NFS and compute server,                24 for a large NFS-only server +-----------+------------------------------------------+  Variation 3   2 * max#(simultaneous disk operations) --------------------------------------------------------  On Solaris 2.X, this number will be different.  The SunSoft press book recommends taking the highest number obtained by applying the following three rules:  * Two NFS threads per active client process * 32 NFS threads on a SPARCclassic server, 64 NFS threads per   SuperSPARC processor. * 16 NFS threads per ethernet, 160 per FDDI  The default for 2.X is 16 threads.  Q: What other guidelines and help is there on Tuning NFS?  A:  Consult the O'Reilly and Associates book "Managing NFS and NIS", the SunSoft Press book, "Sun Performance and Tuning", or the "SMCC NFS Performance and Tuning Guide".  Ordering info is in Section 7 of this PSD.  5.0 Patches   General Information on Patches  The following is the list of all of the NFS related patches for 4.1.3, 4.1.3_u1, 4.1.4, 2.3, 2.4, and 2.5.  If you are having NFS problems, installing the patches is a good place to start, especially if you recognize the general symptoms noted below.  In order for a machine to be stable, all of the recommended patches should be installed as well. The list of recommended patches for your operating system is available from sunsolve1.sun.com   5.1: Core NFS Patches for SunOS 4.1.X  100173-13 SunOS 4.1.3: NFS Jumbo Patch 102177-04 SunOS 4.1.3_U1: NFS Jumbo Patch 102394-02 SunOS 4.1.4: NFS Jumbo Patch    Resolve a large number of NFS problems. Should be installed on any   machine doing NFS.  100988-05 SunOS 4.1.3: UFS File system and NFS locking Jumbo Patch. 101784-04 SunOS 4.1.3_U1: rpc.lockd/rpc.statd jumbo patch 102516-05 SunOS 4.1.4: UFS File system Jumbo Patch    Fixes a wide variety of rpc.lockd and rpc.statd problems.  102264-02 SunOS 4.1.4: rpc.lockd patch for assertion failed panic    Fixes an "Assertion failed" panic related to the lockd.  103275-01 SunOS 4.1.4: System with heavy NFS load may crash due to                  IP driver bu   5.2: Patches Related to NFS for SunOS  100361-04 SunOS 4.1.1 4.1.2 4.1.3: server not responding due to limits of    Resolves an error that could cause "NFS server not responding"   errors on a machine that had more than 500 machines in its arp cache.   Only a problem at sites with very large local nets.  101849-01 SunOS 4.1.3: rpc.quotad is very slow on busy NFS servers    Speeds up slow rpc.quotads on NFS servers.   5.3: Core NFS Patches for Solaris  SOLARIS 2.3:  101318-81 SunOS 5.3: Jumbo patch for kernel (includes libc, lockd)    Resolves a large number of problems involving both nfs and the   lockd, as well as the related autofs program. Should be installed   on any 5.3 machine, but is an absolute necessity on a machine doing   NFS.  102654-01 SunOS 5.3: rmtab grows without bounds    This patch solves problems where the mountd hangs up, but the nfsd   continues to process NFS requests from existing NFS mounts.  103059-01 SunOS 5.3: automountd /dev rdev not in mnttab    This patch fixes a variety of issues where the automounter loses   entries from mnttab, often seen with lofs (loopback) mounts.  101930-01 SunOS 5.3: some files may not show up under cachefs    This patch is required with the "autoclient" product, which is needed   to cache the / and /usr file systems with cachefs.  102932-02 SunOS 5.3: statd dies intermittently  SOLARIS 2.4 and 2.4x86:  101945-42 SunOS 5.4: jumbo patch for kernel 101946-35 SunOS 5.4_x86: jumbo patch for kernel    Resolves a large number of problems involving nfs, as well as the   related autofs program. Should be installed on any 5.4 machine, but   is an absolute necessity on a machine doing NFS.  102685-01 SunOS 5.4: lofs - causes problems with 400+ PC-NFS users    This patch resolves some mountd hangs seen after sharing a lofs mount point.  101977-04 SunOS 5.4: lockd fixes 101978-03 SunOS 5.4_x86: lockd fixes    Resolves various lockd error messages, as well as a lockd memory   leak.  102216-07 SunOS 5.4: klmmod and rpcmod fixes    Resolves problems with NFS file locking.  It is needed whenever   patching lockd.  102769-03 SunOS 5.4: statd requires enhancements in support of HADF    This patch is generally needed in high availability server application.  102209-01 SunOS 5.4: No way to cache the root and /usr file systems with CacheFS 102210-01 SunOS 5.4_x86: No way to cache root &amp;amp; /usr file systems with CacheFS    This patch is required with the "autoclient" product, which is needed   to cache the / and /usr file systems with cachefs.  102217-07 SunOS 5.4_x86: NFS client starts using unreserved UDP port numb    Resolves a problem specific to the x86 port of 5.4, which caused NFS   clients to begin using unreserved ports. [look up bug 1179403]  SOLARIS 2.5 and 2.5x86  103226-07 SunOS 5.5: /kernel/sys/nfs and /kernel/fs/nfs fixes 103227-06 SunOS 5.5_x86: /kernel: sys/nfs, fs/nfs &amp;amp; misc/nfssrv fixes   This patch is needed for any Solaris 2.5 system w/ NFS  103325-02 SunOS 5.5: mount causes the system to panic Data fault    This patch also fixes some file locking problems in klmmod  103477-02 SunOS 5.5: RPC: Unable to send/receive 103478-01 SunOS 5.5_x86: RPC: Unable to send/receive  SOLARIS 2.5.1, 2.5.1_x86, and 2.5.1_ppc 103609-02 SunOS 5.5.1: RPC: Unable to send/receive 103611-01 SunOS 5.5.1_ppc: RPC: Unable to send/receive 103610-01 SunOS 5.5.1_x86: RPC: Unable to send/receive   5.4: Patches Related to NFS for Solaris  We STRONGLY recommend you install these patches, especially if you have had any problems with "NFS SERVER NOT RESPONDING":  SOLARIS 2.3:  101546-01 SunOS 5.3: nfs: multiple quota -v may not return info or too slow  101581-02 SunOS 5.3: quotaon/quotaoff/quotacheck fixes   Resolves a problem that caused rquotad to hang on some NFS systems and   to resolve other quota issues.  101306-11 SunOS 5.3: Jumbo Patch for le &amp;amp; qe drivers   This is a "must install" patch for systems with Ethernet.  102272-02 SunOS 5.3: Ethernet and ledmainit fixes   Resolve dma problems with le interface, possible causes of NFS server hangs  101734-03 SunOS 5.3: iommu fixes for sun4m  Resolve iommu problems mainly on Sparc 5, possible causes of NFS server hangs.  SOLARIS 2.4:  101973-23 SunOS 5.4: jumbo patch for libnsl and ypbind   This patch resolves a variety of name service issues that can cause   a 2.4 NFS server to not respond to certain requests.  This is a "must have"    patch.  102001-11 SunOS 5.4: le, qe, be Ethernet driver Jumbo Patch   This is a "must install" patch for systems with Ethernet.  102332-01 SunOS 5.4: ledma fix   Resolve dma problems with le interface, possible causes of NFS server hangs  102038-02 SunOS 5.4: iommunex_dma_mctl Sparc 5 only   Resolves iommu problems on Sparc 5, possible causes of NFS server hangs.  SOLARIS 2.5  102979-02 SunOS 5.5: /kernel/drv/be, /kernel/drv/hme and /kernel/drv/qe fixes 103244-03 SunOS 5.5: Fix for le driver  6.0 Bugs and RFEs   Bugs and RFEs (Request for Enhancement)  This section should be considered under construction and fairly dynamic.  Bugs:  1149389 - Under heavy load, a 2.3 NFS server may see the following errors: Oct 18 08:57:12 cobra unix: xdrmblk_getmblk failed Oct 18 08:57:12 cobra unix: NOTICE: nfs_server: bad getargs  There is no fix for this bug in 2.3.  One case of this bug was fixed in the 2.4 FCS.  Note:  it is possible that this bug is caused by UDP checksum errors from the clients.  This is most often seen with SunOS and PC clients.  Enable UDP checksumming as a potential workaround.  Another workaround is to change the rsize=1024,wsize=1024 on all of the NFS client so that there is no UDP packet reassembly problems.  In any case, the root cause is corruption of a UDP packet or incorrect or non-existent creation of UDP checksums for requests from an NFS client.  See the automount Tips Sheet "PSD" for some further information about automount bugs.  1174737   2.4 NFS clients hang with logging in to NFS mounted home directory,           even though the NFS clients and server are "patched up". Workaround: Upgrade the 2.4 NFS client to 2.5.  Alternatively, make the ksh shell history file local, by editing in the /etc/profile on the NFS clients:  export HISTFILE=/tmp/$LOGNAME  1222181   2.4's mountd allows automount "lofs" mount point created by loopback mount to be shared or exported.  This bug has been known to cause mountd hangs on 2.4!!  RFEs:  To be investigated and added  7.0 Documentation   7.1: Important Man Pages    dfmounts              (Solaris only)   dfshares              (Solaris only)   exportfs   exports   lockd   mnttab   mount   mountd   nfs   nfsd   rmtab   share                 (Solaris only)   share_nfs             (Solaris only)   shareall              (Solaris only)   sharetab              (Solaris only)   showmount   statd   xtab   unshare               (Solaris only   7.2 Sunsolve Documents  There are a huge number of Sunsolve documents related to NFS. The ones noted below are primarily those that have expanded information, not in this document.  7.2.1 Sun Infodocs  2016      How does NFS work?  7.2.2 Sun FAQs  1025      nfs mounting from non-Solaris system fails  7.2.3 Sun SRDBs  3874      Getting "Stale NFS Handles" errors 4456      What is the procedure for optimizing the number of nfsds? 4726      error running exportfs: "Too many levels of remote in path" 4727      exportfs doesn't recog. netgroup root access exported dir. 4769      How to use rpcinfo program to troubleshoot RPC daemons? 4840      Secure NFS failing with authentication errors 5594      nfs mount fails with "not owner" 5925      NFS request from unprivileged port. 6682      quota -v return no information on an NFS client 7334      rpc.lockd error- fcntl: error Stale NFS file handle 10609     diskless client boot gave nfs mount error 13 10946     NFS errors 11058     ls of file system mounted from ULTRIX server hangs on Solaris 2.4   7.3 Sun Educational Services  Sun Education provides general SunOS and Solaris network administration classes.  In the USA, contact Sun Education at 1-800-422-8020 for a current catalog and set of course descriptions.   7.4: Solaris Documentation  _NFS Administration Guide_, Part #801-6634-10    Information on how to set up, maintain and debug NFS and   autofs.  _SMCC NFS Server Performance and Tuning Guide_, Part #802-5010-10    A very good resource for analyzing and improving NFS performance on   a Solaris server.    The part number shown is for the Solaris 2.5 version of this manual.   7.5: Third Party Documentation  _Managing NFS and NIS_, by Hal Stern, published by O'Reilly &amp;amp; Associates, Inc, ISBN #0-937175-75-7    The definitive source for managing NFS in a SunOS environment. Has a   section on performance tuning that is quite helpful. Gives some   information on the automounter as well. The underlying concepts are   still the same for Solaris, but some of the commands and file names   have changed.  _TCP/IP Network Administration_, by Craig Hunt, published by O'Reilly &amp;amp; Associates, Inc, ISBN #0-937175-82-X    A good overview of TCP/IP, with a limited introduction to SunOS NFS.   7.6: RFCs  RFCs are the internet-written documents that define the specifications of many common networking programs. RFCs can be retrieved from nic.ddn.mil, in the /rfc directory.  1094  NFS: Network File System Protocol specification    The official spec on the NFS protocol.  8.0 Supportability   8.0: Supportability  SunService is not responsible for the initial configuration of your NFS environment. In addition, SunService can not diagnose your NFS performance problems or suggest NFS tuning guidelines.  Consulting services are available from Sun to provide these services on a flat fee or per hour consulting rate.  Contact your local Sun office for further information on those services.  We can help resolve problems where NFS is not behaving correctly, but in such cases the contact must be a system administrator who has a guarantee a solution to problems involving non-Sun hosts, nor    PATCH ID: n/a PRODUCT AREA: Gen. Network PRODUCT: NFS SUNOS RELEASE: any UNBUNDLED RELEASE: n/a HARDWARE: n/a  &lt;/PRE&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-3231447777696055413?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/3231447777696055413/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=3231447777696055413&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3231447777696055413'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/3231447777696055413'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/sunservice-tip-sheet-sun-nfs.html' title='SunService Tip Sheet: Sun NFS'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-5857919765179706757</id><published>2006-12-18T22:32:00.001-08:00</published><updated>2006-12-18T22:32:49.663-08:00</updated><title type='text'>SunService Tip Sheet: Sun Automounter</title><content type='html'>&lt;DIV&gt;&lt;FONT color=#000080&gt; &lt;H1&gt;&lt;FONT face=Verdana size=2&gt;SunService Tip Sheet: Sun Automounter&lt;/FONT&gt;&lt;/H1&gt;&lt;PRE&gt;&lt;FONT face=Verdana size=2&gt;INFODOC ID: 11990  SYNOPSIS: AUTOMOUNTER PSD/FAQ DETAIL DESCRIPTION:  SunService Tip Sheet for the Sun Automounter  Revision: 1.5 Date: June 18, 1996  Mail to: brian.hackley@east.sun.com  Table of Contents:  1.0: About the Automounter 2.0: Debugging the Automounter   2.1: Testing NFS   2.2: Turning on Automounter Debugging   2.3: Testing New Maps Under Solaris 3.0: Common How Tos   3.1: How to Set Up a SunOS Automount Client Using Files   3.2: How to Set Up a SunOS Automount Client Using NIS   3.3: How to Set Up a Solaris Automount Client Using Files   3.4: How to Set Up a Solaris Automount Client Using Naming Services   3.5: How to Modify Automount Maps Under NIS   3.6: How to Modify Automount Maps Under NIS+   3.7: How to Create New NIS Automount Maps   3.8: How to Create New NIS+ Automount Maps   3.9: How to Make Changes to SunOS Automounters   3.10: How to Make Changes to Solaris Automounters   3.11: How to Upgrade Automount from SunOS to Solaris   3.12: How to use cachefs With the Automounter 4.0: Some Frequently Asked Questions   4.1: Miscellaneous Questions   4.2: Automount Startup Errors   4.3: Automount Runtime Errors   4.4: Automount Shutdown   4.5: /home Problems   4.6: /net Questions   4.7:  How do I tell automount NOT to use a certain map? 5.0: Patches   5.1: SunOS Patches for Automount   5.2: Solaris Patches for Automount 6.0: Known Bugs &amp;amp; RFEs   6.1: Bugs 7.0: References   7.1: Important Man Pages   7.2 Sunsolve Documents   7.3 Sun Educational Services   7.4: Solaris Documentation   7.5: Third Party Documentation   7.6: RFCs 8.0: Supportability 9.0: Additional Support   1.0: About the Automounter  This Tip Sheet documents a wide variety of information concerning the automounter, as implemented in the SunOS and Solaris operating systems. It is intended as both an introduction to the automounter, and as a guide to the most common problems. There are many more complete references to automounter, a few of which are noted in sections 7.4 and 7.5.  Before trying to run the automounter, you must already have a good understanding of NFS in general. SunService does have another Tip Sheet discussing general NFS topics.  The following terms are important to an understanding of the automounter:  THE AUTOMOUNTER is a program which automatically does mounts and unmounts of designated NFS partitions. It has MAPS which list what directories it controls in this manner. Automounted directories start out unmounted, are mounted when someone tries to access them, and eventually timeout, and are unmounted, when people stop using them.  There are two types of automounter maps: direct and indirect. A DIRECT MAP lists a set or unrelated mount points which may be spread out across the filesystem. A complete path (ie, /usr/local/bin or /usr/man) is listed in the map as a mount point. An INDIRECT MAP sets aside a directory, and mounts everything in the map into that directory (ie, the auto.home map sets aside /home, and everything in the auto.home map is mounted under that directory).  Automounter maps are typically distributed via a naming service, such as NIS or NIS+, so that changes can be made in one central location.  Automount between SunOS and Solaris only has one real difference: the files and maps have dots (.s) in them under SunOS (ie auto.master, auto.home), while the files/maps have underscores (_s) in them under Solaris (ie auto_master, auto_home). This change was made so that the automount maps could work correctly under NIS+.  2.0 Debugging the Automounter   General Information on Debugging the automounter  Automounter problems usually manifest as an inability to cd into a directory that should be automounted.  You should first of all look through your files and maps, making sure that they are all connected correctly, and have the right info. For example, if auto.direct is not getting read right, you should verify that auto.master references it. On Solaris, you might need to check the nsswitch.conf as well, to make sure that the automounter is using the right naming service. Consult Sections 3.1 through 3.4 for examples of proper setups.  In addition, if you are having problems with some new automounter info, you may need to restart automounter (see Section 3.9 and 3.10 for more info). If all of this seems correct, the following sections describe some additional techniques that may be used to debug the automounter   2.1: Testing NFS  If you are having problems with an automounter directory, you should always try and mount the partition by hand, to verify that the problem is related to automounter, and not NFS in general.  To do this, look in your auto.* maps, and see what remote partition your automounter is trying to access. Then, run mount to access it:    # mkdir /tmpmnt   # mount remotemachine:/partition /tmpmnt  If this generates errors, your problems is with NFS. SunService has a seperate NFS Tip sheet which describes common NFS problems, and how to debug them.  If this mount works fine, the problem is with automounter   2.2: Turning on Automounter Debugging  automounter also has built in debugging, which can be used to examine exactly what the automounter is doing. It is best to kill automount and restart it with the debug flags, so that you can see everything from the start:    SunOS:   # automount -v -TT    Solaris 2.3:   # automountd -vTT   # automount -v    Solaris 2.4 and 2.5 in a /bin/sh or /bin/ksh to redirect to a file:   # automountd -vTT 2&amp;gt; /var/automount-debug-file  If you do not wish to kill the automounter, you can instead enable some debugging with the following commands:    # ls /net/=2   # ls /net/=v  [The above "ls"es may not work in some cases. If this occurs, you should simply restart automount as noted above.]  After debugging has been enabled, output will start appearing on your console (Solaris 2.3 or earlier) or in your current window (Solaris 2.4). You will see lots of instances of mounts and unmounts, but should look, in particular, for errors that are recorded when you try and access the trouble automount directory.   2.3: Testing New Maps Under Solaris  Under Solaris, if you are having problems with a brand new map, you can run automount with the -v flag. This will tell you what automount is doing as it tries to create autofs mount points for new maps:    # automount -v  You can also look in the /etc/mnttab file for your automount map definitions.  TIP:  if you don't see the map definition in /etc/mnttab (or /etc/mtab for SunOS), there is something wrong with it.  Here is the map definition for an indirect map entry from the master file for /autohome1   auto.home1:  auto.home1      /autohome1      autofs  ignore,indirect,dev=28c0002     81842871  ...and here is an example mount using that map:  ace:/home1/ace  /autohome1/ace1 nfs     dev=2880002     818428801  3.0 Common How-Tos   3.1: How to Set Up a SunOS Automount Client Using Files  Under SunOS, the automounter is centered around the file /etc/auto.master. This file must contain a number of lines in the following format:    directory     mapname options  Where: directory is the directory to mount an indirect map in, or /- for a direct map  mapname is the file which contains the map  and options are any standard NFS options which should be used for the entire map. An example of an auto.master file follows:    %% cat /etc/auto.master   /-    /etc/auto.direct        -ro   /home /etc/auto.home  In this example, /etc/auto.direct will be a direct map, which mounts a number of filesystems readonly, while /etc/auto.home will be a indirect map, which mounts filesystems under the /home directory.  A typical map contains a number of lines as follows:    mountpoint    [options]       remotemachine:/remotelocation  The [options] can be omitted if only the standard options should be used. montpoint will be a full path for a direct mount (/usr/local) or just a directory name for an indirect mount (joe).  For example, the auto.direct map may read:    %% cat /etc/auto.direct   /usr/man      -soft   server:/usr/man   /usr/local            server:/export/sunos/usr/local  This would create automount points for /usr/man and /usr/local, and /usr/man would be mounted soft.  While the auto.home map (or any indirect map) would look something like this:    %% cat /etc/auto.home   joe           server:/export/home/joe   fred          server:/export/home/fred  This would create automount points for /home/joe and /home/fred.  Please note that automount will use an auto.master NIS map by default. Thus, to force automounter to use local files, you must start is as follows:    # automount -f /etc/auto.master &amp;amp;  You will also want to modify the automount startup in /etc/rc.local.   3.2: How to Set Up a SunOS Automount Client Using NIS  To force your automounter to read in NIS maps, you must change the way that the mapname is referenced in your auto.master file. If the mapname is listed without any "/"s, NIS maps will be automatically checked. The following auto.master file says to get the direct listing from the auto.direct NIS map, and the /home listing from the auto.home NIS map:    # cat /etc/auto.master   /-    auto.direct     -ro   /home auto.home  (Compare this to Section 3.1, where the mapname column of the /etc/auto.master map contains "/"s, directing the automounter to a local path.)  In order to get a SunOS client to start automount, using the NIS maps, all you need to do is either create an auto.master map in NIS, and distribute it (See Section 3.5), or create a local map, as noted above. Other maps should be created on the NIS master, with the same format as is described in Section 3.1 (see Section 3.5 for how to modify those NIS maps).  Afterwards, simply reboot the machine, or start up automount:    # automount &amp;amp;  [As a note, you may also read in NIS maps by putting a +mapname entry, ie +auto.home, in a local file  this is usually done to set up a unique automounter on a certain machine. The references in Section 7.0 should be used if you wish to implement a more complex set up, such as this.   3.3: How to Set Up a Solaris Automount Client Using Files  Follow the instructions in Section 3.1, but be aware that under Solaris, the names of the files are expected to contain "_"s instead of "."s. ie:    /etc/auto_master   /etc/auto_direct   /etc/auto_home  So, using only files, your auto_master should look something like this:    # cat /etc/auto_master   /-    /etc/auto_direct        -ro   /home /etc/auto_home  The other files would follow with the same format as described in Section 3.1.  When everything is set up, you can get automount starting by rebooting the machine, or running:    # /etc/init.d/autofs start   3.4: How to Set Up a Solaris Automount Client Using Other Naming Services  If the /etc/auto_master file contains mapnames without "/"s, additional naming services are consulted, according to the order listed in the nsswitch.conf. For example, the following /etc/nsswitch.conf line would say to check first files, then NIS:    automount:  files nis  In addition, the local files may say to read other naming services, by listing the entry "+mapname".  Following is an extremely typical automount setup for Solaris:    # cat /etc/auto_master   +auto_master   /net            -hosts          -nosuid   /home           auto_home  [The +auto_master line says to first check naming services (NIS/NIS+) for an auto_master map. Afterwards, it includes a special net map, which is described in the man page, and also a /home indirect map, which is read from the naming services.]    # cat /etc/auto_home   +auto_home  [This file says to just go out to naming services. It is necessary because "files" is one of the options listed in the nsswitch.conf.]    # ypcat auto_master   [any additional auto_master entries are listed here]   # ypcat auto_home   ...   [the full auto_home map is here]  [Thus you will need to setup all of your normal maps in NIS or NIS+, as is described in Sections 3.5 and 3.6.]  Of special note here is this: If NIS is listed as the naming service, and automountd can't find an auto_map, then it will try instead to lookup auto.map, since that is the older NIS standard. So, the above would work fine if you were using NIS, and the actual NIS map was auto.home.  When everything is set up, you can get automount started by rebooting the machine, or running:    # /etc/init.d/autofs start   3.5: How to Modify Automount Maps Under NIS  The auto.master and auto.home maps are automatically part of NIS. To distribute these maps, simply edit the files /etc/auto.master and /etc/auto.home on the master, using the format described in Section 3.1, and then make the maps to distribute them:    # cd /var/yp   # make  Section 3.7 describes how to create new NIS maps.   3.6: How to Modify Automount Maps Under NIS+  The auto_master and auto_home tables are automatically part of NIS+. They may be modified, using the format described in Section 3.1. The auto_home table may be modified via admintool, nistbladm or nisaddent (admintool is suggested). The auto_master table may be modified via nistbladm or nisaddent. nisaddent is probably the best options for making this modification.  To make a modification with nisaddent, you should first dump your map to a text file:    # /usr/lib/nis/nisaddent -d -t auto_master.org_dir key-value &amp;gt; /etc/auto_master.nisplus  Then, you can edit the file with your favorite editor. Remember to use only tabs between the fields, not embedded spaces:    # cat /etc/auto_master.nisplus   +auto_master   /net            -hosts          -nosuid   /home           auto_home  Afterwards, run nisaddent again to replace the NIS+ map with your text file:    # /usr/lib/nis/nisaddent -r -f /etc/auto_master.nis -t auto_master.org_dir key-value  Section 3.8 describes how to create new NIS+ maps   3.7: How to Create New NIS Automount Maps  The following example explains how to create an auto_direct map under NIS. Other new maps can be created with similar syntax.  In order to create an auto.direct map, you need to make a new entry in /var/yp/Makefile for auto.direct, mimicking the already existing auto.home entry:    auto.direct.time:  $(DIR)/auto.direct         -@if [ -f $(DIR)/auto.direct ]  then                 sed -e "/^#/d" -e s/#.*$$// $(DIR)/auto.direct                   $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.direct                  touch auto.direct.time                  echo "updated auto.direct"                  if [ ! $(NOPUSH) ]  then                 $(YPPUSH) auto.direct                          echo "pushed auto.direct"  \                 else                 :                   fi         else                 echo "couldn't find $(DIR)/auto.direct"          fi  NOTE: all INDENTED $lines in the Makefile entry MUST be indented with the TAB key, without any imbedded spaces!!  In addition, auto.direct must be added to the all: line, near the top of the Makefile:    all: passwd group hosts ethers networks rpc services protocols         netgroup bootparams aliases publickey netid netmasks c2secure         timezone auto.master auto.home auto.direct  And, finally, near the bottom, the following line must be added:    auto.direct: auto.direct.time  [Be very careful if you just copy the above lines -- Makefile entries MUST begin with TABS, not spaces  if you text copy the above, you will end up with spaces at the beginning of each line, and make will fail.]  When this is all done, you may create an /etc/auto.direct map, put the appropriate files in it, and then do a Make:    # cd /var/yp   # make  After you have done the first make, you will probably gets some errors like the following:    "can't bind master to send ypclear message to ypserv for map ..."  This occurs because NIS is confused due to the maps not existing on the slave machines. To resolve this, you must manually copy the map to the slaves. This can be done by copying /var/yp/`domainname`/auto.direct.* from the master to /var/yp/`domainname` on each of the slaves, using either rcp or ftp.  Afterwards, do a second make:    # cd /var/yp   # make   3.8: How to Create New NIS+ Automount Maps  The following example explains how to create an auto_direct map under NIS+. Other new maps can be created with similar syntax.  STEP ONE: create a new auto_direct table, on the master server:     # nistbladm -c automount_map key=S value=S auto_local.org_dir.`domainname`.  STEP TWO:  set the group ownership of the table:     # nischgrp admin.`domainname`. auto_local.org_dir  STEP THREE:  set the correct permissions.     # nischmod n=r, o=rmcd,g=rmcd, w=r auto_local.org_dir  STEP FOUR:  create a text file, and read it into NIS+, just as is described in section 3.6:    # cat /etc/auto_local.nisplus   /usr/local/bin        server:/usr/local/bin   /usr/local/lib        server2:/usr/local/lib   # /usr/lib/nis/nisaddent -r -f /etc/auto_local.nisplus     -t auto_local.org_dir key-value  STEP FIVE:  verify the data is in the map:   # niscat -m auto_local.org_dir    (your data should display)  NOTE:  You will also want to add an entry to your NIS+ auto_master map, as is described in 3.6.   3.9: How to Make Changes to SunOS Automounters  Many changes to the Automounter will take place at once. There are two exceptions: if an automounted filesystem (or group of filesystems) is changed, that change will not take place until the filesystem (or the filsystem group) is unmounted and remounted  if a change is made to the auto.master map, or to a direct map, those changes will not take place until the automounter is restarted.  If you want to make sure that your new changes are available, your best option is to reboot the client machine running automounter.   3.10: How to Make Changes to Solaris Automounters  As with the SunOS automounter, the Solaris automounter will not see changes to already mounted partitions, the auto_master file, and direct maps. (See Section 3.9).  You must still wait for already mounted partitions to get umounted in orderto see changes on them.  However, you can force auto_master and direct map changes to get immediatelly recognised by running automount from the command line:    # automount -   3.11: How to Upgrade Automount from SunOS to Solaris  To upgrade your Automounter from SunOS to Solaris, you must first change your map names from using dots to underscores. ie:    auto.direct -&amp;gt; auto_direct   auto.home -&amp;gt; auto_home  Make sure you change all references inside the files as well.  Another common problem involves the /home directory. SunOS machines often used it as a normal directory, while Solaris typically uses it as an automounter point.  If you prefer to use /home as a normal directory, disable the /home automounting, by removing /home lines from all of your auto_direct files:    # cat /etc/auto_master   +auto_master   /net            -hosts          -nosuid   # /home           auto_home  [make sure to modify NIS or NIS+ maps too, if necessary]  If you prefer to use /home as an automount point, move everything in /home to a new directory (/export/home) and then set up an auto_home map which references that directory:    # cat /etc/auto_home   joe   machine:/export/home/joe   fred  machine:/export/home/fred   3.12: How to use cachefs With the Automounter  cachefs may be used with the automounter. The following example shows a direct cachefs map being created:    %% cat /etc/auto_master   ...   /-    /etc/auto_new    %% cat /etc/auto_new  /mydir -fstype=cachefs,cachedir=/var/mycache,backfstype=nfs  remotemachine:/dir  NOTE:  we put the "-fstype..." options into the auto_new map because a bug exists at 2.3 and 2.4 where any "fstype" options in the master map are ignored.  This bug is fixed in 2.5.   3.13: How to automount into an existing directory  If you want to automount something like /tools/compilers into an existing /tools directory, use a direct map such as:    # cat /etc/auto_master   ...   /-    /etc/auto_direct    # cat /etc/auto_direct   ...   /tools/compilers  -rw,hard,intr remotemachine:/opt/compilers  If you had used an indirect map (e.g. /tools /etc/auto_tools in the master map), the existing directory would be overlaid by /tools and disappear!  Therefore, use a direct map for EXISTING directories that you wish to use.  4.0 Frequently Asked Questions   Regarding this Section  Many apparent automount problems will actually be due to deeper NFS problems. Many of these are covered in the NFS Tip Sheet. If none of the problems listed below are familiar, you might want to see if other NFS services are also having problems, and examine the NFS Tip Sheet   4.1: Miscellaneous Questions  Q: Why does my entire automounter lock up under SunOS, whenever one automounted partitions becomes unavailable?  A: This is a design limitation of the automounter under SunOS. There is no work around for it. If you upgrade your machine to Solaris, you will find that automount reacts much better to individual partitions becoming unavailable.  Q1: What is this /tmp_mnt directory? Q2: Why does SunOS use /tmp_mnt when Solaris doesn't? Q3: How do I get rid of the /tmp_mnt directory?  A: If you are using the automounter under SunOS, whenever you do pwd or df, you will always see that your fileystem is mounted on /tmp_mnt. This is part of the functionality of SunOS automounter. You can work around the pwd problem in csh with the following alias:    # alias pwd echo \$cwd  If you wish this to be permanent, you can add the following to your .cshrc:    alias pwd (echo $cwd)  If the /tmp_mnt directory is causing you other problems, you should simply mount the partition through normal NFS.  In addition, if you upgrade your machine to Solaris, you will find that it does not have to go through the /tmp_mnt directory.  Q: Why is automount taking up lots of CPU time?  A: umount is a fairly expensive operation, and automount does it regularly. If you find that automount is taking up too much CPU, and you have all the listed automount and NFS patches installed, you are probably running into the limitations of your current setup. You can work around it by increasing the timeout value of automount (this is the length of time before automount will unmount an unused partition).  On a SunOS machine, edit the automount line of /etc/rc.local. The following line increases the automount timeout to 3600 seconds, or 60 minutes:    automount -tl 3600 &amp;amp;&amp;amp;            echo -n ' automount'  On a Solaris machine, edit the automount line of /etc/init.d/autofs. The following line increases the automount timeout to 3600 seconds, or 60 minutes:    /usr/sbin/automount -t 3600                             # do mounts  The above two fixes are only workarounds. Your system probably will still have some performance problems which SunService is unable to help you resolve. Sections 8.0 and 9.0 explain your alternatives in this case.  Q: Should I use dots or underscores in my map names!?  A: In general, use dots under SunOS and underscores under Solaris. The following two fallbacks make this easier to do:  If an auto_map is distributed via NIS+ in YP-compatibility mode, an auto.map will also be distributed.  If a Solaris machines looks up auto_map in NIS, and can not find it, it will also try and look up auto.map.  In cases when neither of these apply (ie, if you have a Solaris NIS server), your clients should use either dots or underscores, according to what your NIS/NIS+ server uses.  Q: Should I specify mount options in the auto.master file, or the subfile (ie auto.home)?  A: You can specify mount options in either (or both). The last option encountered will be the one that's used. If you need a mount option to be global for a map, you should put it in the auto.master file. If you need it to be specific for a mount, you should put it in the subfile (ie auto.home).   4.2: Automount Startup Errors  Q: What does the following error mean:    "automount: /directory/name: Not a directory"  A: This usually means that /directory/name, which is a mount point listed in one of your auto.* files, either is a file or a symbolic link. It must be a directory.  Q: What does the following error mean:    "automount: Can't get my address"  A: Your current naming service does not have an entry for your hostname. Correct this in files/NIS/NIS+/DNS as appropriate.   4.3: Automount Runtime Errors  Q: What does the following error mean:    "automountd: server [machine] not responding"  A: This correlates to the standard "NFS server [machine] not responding" error. This can mean a number of things, including (1) [machine] is down, or otherwise unavailable (2) you are experiencing certain old NFS bugs, which are corrected by the NFS patches listed in the NFS Tip Sheet (3) you are experiencing a NFS performance problem. If this is a performance problem, you will usually find that automounted partitions are very slow to access, and the "not responding" error appears intermittently. In the case of performance problems, SunService can do nothing further  Sections 8.0 and 9.0 explain your other options.   4.4: Automount Shutdown  Q: How should I kill the automounter?  A: Always give automounter a "friendly kill"  never kill -9. This will allow the automounter to clean up all those symlinks and umount those file systems. Busy mounts are NOT left alone, after a valiant attempt to umount. What happens is this: automount spawns a child to service any NEW requests to the automounte and the parent spends its time trying to umount all busy mounts.  Note: if you do a kill -9 at this point you WILL have to clean up your mess (remove symlinks, umount old automount NFS mounts, and clear up /tmp_mnt).   4.5: /home Problems  Q: Why are my /home mounts not working?  A: It is common for /home mounts to fail because something has been put in the /home directory of the problem client. Make sure that the /home directory is totally empty before the automounter is started.   4.6: /net Questions  Q: Can you explain the /net -hosts entry in the auto_master file?  A: The -hosts map is a special case of an indirect map, that provides for the dynamic mounting of a host upon reference. It is usually referenced as:  	cd /net/hostname  If you start the automounter with /net -hosts, the automounter will do the following for you:  When you reference a pathname, e.g. ls -l /net/hostname, and the hostname is an NFS server, the automounter will do an NFS mount of all exported filesystems on that NFS server for you, place the physical mount into /tmp_mnt/hostname, and let you access that NFS server thru a symlink, /net/hostname -&amp;gt; /tmp_mnt/net/hostname. You access the NFS files thru the /net/hostname symlink and do not need to worry about managing NFS mounts.   4.7:  How do I tell automount NOT to use a certain map?  Q:  I have a local /home directory on a certain host, that I do     not want the automounter to overwrite.  How do I tell automount     NOT to use a certain map?  A:  Create an /etc/auto_master, if one does not already exist.     Move the "+auto_master" entry to the BOTTOM of the file.     Change (or add) the /home entry so that it reads as follows: /home -null     This tells the automount to NOT create a /home map, which will     allow you to use a local /home directory on the host.      IMPORTANT:  you may NOT specify "-null" anywhere EXCEPT the     master map!  You can exclude an entire map, but NOT     individual entries within a map.  5.0 Patches   5.0: Patches  The following is the list of all of the automount related patches for 4.1.3, 4.1.3_u1, 4.1.4, 5.3 and 5.4. If you are having automount problems, installing the patches is a good place to start, especially if you recognize the general symptoms noted below.  In order for a machine to be stable, all of the recommended patches should be installed as well. The list of recommended patches for your operating system is available from sunsolve1.sun.com.  There are also a number of NFS patches which are described in the NFS Tip Sheet. All of the Core NFS patches described there should be installed as well   5.1: Automount Patches for SunOS  100249-14 SunOS 4.1.2,4.1.3: automounter jumbo patch    Fixes a very large number of automounter errors, including a big   memory leak. Should be installed on any machine running automount.  102684-02 SunOS 4.1.3_U1: automounter problems when many filesystems shar    Resolves a problem where a SunOS machine could fail to automount   from a Solaris server with the error "RPC: can't decode results".  103467-01 SunOS 4.1.4: Automount fails with replicated filesystems   5.2: Automount Patches for Solaris  SOLARIS 2.3:  101318-81 SunOS 5.3: Jumbo patch for kernel (includes libc, lockd)    Resolves a very large number of autofs and nfs problems. Should   be installed on any machine, but are an absolute necessity for   machines running automount.  103059-01 SunOS 5.3: automountd /dev rdev not in mnttab    This completes the fixes for this problem (except when using AFS)  SOLARIS 2.4 and 2.4x86:  101945-42 SunOS 5.4: jumbo patch for kernel 101946-35 SunOS 5.4_x86: jumbo patch for kernel    Resolves a very large number of autofs and nfs problems. Should   be installed on any machine, but are an absolute necessity for   machines running automount.  atch-ID#  SunOS 5.4_x86: automounter fixes     Fixes problems with automounter related to 4.1.3 interoperability   and NIS+. Should be installed on any systems having troubles with   either 4.1.3 or NIS+.  Solaris 2.5 and 2.5x86:  103048-03 SunOS 5.5: automountd fixes  SunOS 5.5x86 automountd fixes    Adds support for the "retry" parameter at 2.5   Fixes 1211172 "dev ... rdev not in mnttab" problem with lofs mounts  103492-01 SunOS 5.5: autofs is not MT-safe  6.0 Bugs and RFEs   Notes about Bugs and RFEs (Request For Enhancement)  The following bugs &amp;amp; RFEs reflect currently open issues with the automounter   6.1: Bugs  1151774 extra spaces and tabs in /etc/mnttab cause odd things to happen    As you can guess by the problem description, the automounter will   do odd things like unmount a directory and never mount it again.    The workaround is to clear out ANY and ALL whitespace from the   automount map entries, and use only the TAB key to seperate   the elements on a line e.g. /homeTAB-retry=2TABauto_homeRETURN  1220400 lofs becomes confused about where the present working directory "."    If you use autofs to mount local file systems on a Solaris machine,   pwd will give you the error "cannot determine current directory!"   while df . will give you the error "cannot canonicalize .: Error 0".   These are due to a bug in automount under 2.4. They should have no   other adverse effects. This is fixed under 2.5, but will not be   patched under older OSes.   NOTE:  This will be fixed in 101945-37  1226421, 1211172, 1207102 "dev... rdev... not in mnttab"    There are several circumstances in which the Solaris 2.3 and 2.4   automounter encounter these bugs.  They are fixed in 2.5 (except   if the mount is an Andrew File System AFS mount).   To solve this problem:  upgrade any and all automount clients to   the latest kernel jumbo patch.  If after doing this,   you still encounter the problem, it should only occur with a lofs   (loopback) mount, or an AFS mount.   If that is the case, there might be a T-patch available to fix the   error message.   NOTE: Patch 103059-01 fixes the lofs mount problem on 2.3!         Patch 101945-37 will fix the lofs mount problem on 2.4.   6.2: RFEs  We still need to provide this information - under construction  7.0 References   7.1: Important Man Pages  automount automountd      (Solaris only)   7.2: Sunsolve Documents  There are a number of Sunsolve documents concerning the automounter. The ones listed below are simply those which contain some amount of information which is not already in this document.  7.2.1: Sun Infodocs  2090   How Does One Customize the Automounter Setup?  7.2.2: Sun SRDBs  3033   automounter gobbling cpu time 3073   Compiler embeds/tmp_mnt automounter in  .stab entries 4087   Using automounter with PCNFS 3.5   7.3: Sun Educational Services  [pending   7.4: Solaris Documentation  _NFS Administration Guide_, part #801-6634-10    Information on autofs setup and administration under Solaris.  _Network and Administration_    Manual for SunO   7.5: Third Party Documentation  _Managing NFS and NIS_, bu Hal Stern, published by O'Reilly &amp;amp; Associates, ISBN #0-937175-75-7    A definitive source of information for the automounter under SunOS.   7.6: RFCs  There are no automounter RFCs.  8.0 Supportability   8.0: Supportability  SunService is not responsible for the initial configuration of your automount environment. In addition, SunService can not diagnose your NFS performance problems, or suggest NFS tuning guidelines.  We can help resolve problems where automount is not behaving correctly, but in such cases the contact must be a system administrator who has a good understanding of the automount environment.  9.0 Additional Support   9.0: Additional Support  For initial configuration, or NFS performance tuning guidelines, please contact your local SunService office for possible consulting offerings. Sun's Customer Relations organization can put you in touch with your local SunIntegration or Sales office. You can reach Customer Relations at 800-821-4643.  PATCH ID: n/a PRODUCT AREA: Gen. Network PRODUCT: Automounter SUNOS RELEASE: any UNBUNDLED RELEASE: n/a HARDWARE: any &lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-5857919765179706757?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/5857919765179706757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=5857919765179706757&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5857919765179706757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/5857919765179706757'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/sunservice-tip-sheet-sun-automounter.html' title='SunService Tip Sheet: Sun Automounter'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-280011050920602361</id><published>2006-12-01T04:13:00.001-08:00</published><updated>2006-12-01T04:13:29.237-08:00</updated><title type='text'>Network failover using Solaris multipathing - in.mapthd</title><content type='html'>&lt;H1&gt;Network failover using Solaris multipathing&lt;/H1&gt; &lt;DIV class=nav&gt;I've got this Sun box running Solaris 8 that I've managed to get  three 10/100 hme ethernet cards into. All are connected to the 100Mbit switch  that runs most of our LAN. This the quick guide to how I set up multipathing on  those three interfaces. As clearly stated in Sun's docs, each interface involved  in failover must be assigned to a group (I use the same group for all three, it  can be named about whatever you want), and assigned an additional IP address for  in.mpathd to use for testing whether the interface is up or not. While these  additional IPs will only be relevant to this host, they must NOT be in use  anywhere else on your subnet.&lt;/DIV&gt; &lt;DIV class=main&gt; &lt;H3&gt;Conventions&lt;/H3&gt; &lt;P&gt;Network: 10.0.0.0/24&lt;BR&gt;Hostname: acadie&lt;BR&gt;Domain: internal&lt;BR&gt;Interfaces:  hme0 hme1 hme2&lt;BR&gt;Failover group name: mofo&lt;BR&gt;Main "live" address:  10.0.0.101&lt;BR&gt;hme0 "test" address: 10.0.0.110&lt;BR&gt;hme1 "test" address:  10.0.0.111&lt;BR&gt;hme2 "test" address: 10.0.0.112&lt;BR&gt;&lt;/P&gt; &lt;H3&gt;Configuration files&lt;/H3&gt; &lt;P&gt;/etc/hosts:&lt;/P&gt;&lt;PRE class=code&gt;# # Internet host table # 127.0.0.1   localhost               loghost 10.0.0.101  acadie.internal         acadie 10.0.0.110  acadie-hme0 10.0.0.111  acadie-hme1 10.0.0.112  acadie-hme2 &lt;/PRE&gt; &lt;P&gt;/etc/netmasks:&lt;/P&gt;&lt;PRE class=code&gt;10.0.0.0        255.255.255.0 &lt;/PRE&gt; &lt;P&gt;/etc/hostname.hme0:&lt;/P&gt;&lt;PRE class=code&gt;acadie netmask + broadcast + up \ group mofo \ addif acadie-hme0 netmask + broadcast + \ deprecated -failover up &lt;/PRE&gt; &lt;P&gt;/etc/hostname.hme1:&lt;/P&gt;&lt;PRE class=code&gt;acadie-hme1 netmask + broadcast + \ group mofo \ deprecated -failover standby up &lt;/PRE&gt; &lt;P&gt;/etc/hostname.hme2:&lt;/P&gt;&lt;PRE class=code&gt;acadie-hme2 netmask + broadcast + \ group mofo \ deprecated -failover standby up &lt;/PRE&gt; &lt;H3&gt;Command line&lt;/H3&gt; &lt;P&gt;The above configuration is all that is required to make this configuration  persistent across reboots. If, however, you are in the position of having to  implement this on a running machine without rebooting, you pretty much just run  `ifconfig` for each interface, with the arguments shown in the  /etc/hostname.hme? files above.&lt;/P&gt; &lt;P&gt;For example, if you're already up and running on hme0, and want to add hme1  and hme2 as failover interfaces to hme0:&lt;/P&gt;&lt;PRE class=shell&gt;&lt;B&gt;acadie#&lt;/B&gt; ifconfig hme0 hme0: flags=1000843&amp;lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&amp;gt; mtu 1500 index 2         inet 10.0.0.101 netmask ffffff00 broadcast 10.0.0.255         ether 8:0:20:c5:10:15 &lt;/PRE&gt; &lt;P&gt;Assign hme0 to your failover group, and add an alias to it for the testing  address:&lt;/P&gt;&lt;PRE class=shell&gt;&lt;B&gt;acadie#&lt;/B&gt; ifconfig hme0 group mofo &lt;B&gt;acadie#&lt;/B&gt; ifconfig hme0 addif 10.0.0.110 netmask 255.255.255.0 \     broadcast 10.0.0.255 -failover deprecated up &lt;/PRE&gt; &lt;P&gt;Then add hme1 and hme2 in:&lt;/P&gt;&lt;PRE class=shell&gt;&lt;B&gt;acadie#&lt;/B&gt; ifconfig hme1 plumb 10.0.0.111 netmask 255.255.255.0 \     broadcast 10.0.0.255 group mofo deprecated -failover standby up &lt;B&gt;acadie#&lt;/B&gt; ifconfig hme2 plumb 10.0.0.112 netmask 255.255.255.0 \     broadcast 10.0.0.255 group mofo deprecated -failover standby up &lt;/PRE&gt; &lt;P&gt;Note: You can substitute in hostnames for the IP addresses in those ifconfig  commands, provided they are in /etc/hosts.&lt;/P&gt;&lt;PRE class=shell&gt;&lt;B&gt;acadie#&lt;/B&gt; ifconfig -a lo0: flags=1000849&amp;lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4&amp;gt; mtu 8232 index 1         inet 127.0.0.1 netmask ff000000  hme0: flags=1000843&amp;lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&amp;gt; mtu 1500 index 2         inet 10.0.0.101 netmask ffffff00 broadcast 10.0.0.255         groupname mofo         ether 8:0:20:c5:10:15  hme0:1: flags=9040843&amp;lt;UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER&amp;gt; mtu 1500 index 2         inet 10.0.0.110 netmask ffffff00 broadcast 10.0.0.255 hme1: flags=9040843&amp;lt;UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE&amp;gt; mtu 1500 index 3         inet 10.0.0.111 netmask ffffff00 broadcast 10.0.0.255         groupname mofo         ether 8:0:20:c5:c0:53  hme2: flags=9040843&amp;lt;UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER,STANDBY,INACTIVE&amp;gt; mtu 1500 index 4         inet 10.0.0.112 netmask ffffff00 broadcast 10.0.0.255         groupname mofo         ether 0:60:5b:e:2:dd  &lt;/PRE&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-280011050920602361?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/280011050920602361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=280011050920602361&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/280011050920602361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/280011050920602361'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/12/network-failover-using-solaris.html' title='Network failover using Solaris multipathing - in.mapthd'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-6404701654125242584</id><published>2006-11-27T22:26:00.000-08:00</published><updated>2006-11-27T23:26:02.638-08:00</updated><title type='text'>SCSI Sense Keys</title><content type='html'>&lt;DIV&gt;&lt;FONT face=Verdana color=#000080 size=2&gt; &lt;H1&gt;SCSI Sense Keys&lt;/H1&gt; &lt;TABLE cellSpacing=0 width=623 border=0&gt;   &lt;TBODY&gt;   &lt;TR&gt;     &lt;TD vAlign=center width="3%"&gt;&lt;B&gt;       &lt;P align=center&gt;KEY&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=center width="97%"&gt;&lt;B&gt;       &lt;P align=center&gt;DESCRIPTION&lt;/B&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;0&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;NO SENSE&lt;/B&gt;&lt;BR&gt;There is no specific sense key information        to be reported for the designated logical unit. This would be the case for        a successful command or a command that received CHECK CONDITION or COMMAND        TERMINATED status because one of the filemark, EOM, or ILI bits is set to        one. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;RECOVERED DATA&lt;/B&gt;&lt;BR&gt;The last command completed        successfully with some recovery action performed by the target. Details        may be determined by examining the additional sense bytes and the        information field. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;NOT READY&lt;/B&gt;&lt;BR&gt;The logical unit addressed cannot be        accessed. Operator intervention may be required to correct this condition.        &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;MEDIUM ERROR&lt;/B&gt;&lt;BR&gt;The command terminated with a        non-recovered error condition that was probably caused by a flaw in the        medium or an error in the recorded data. This sense key may also be        returned if the target is unable to distinguish between a flaw in the        medium and a specific hardware failure (sense key 4). &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;HARDWARE ERROR&lt;/B&gt;&lt;BR&gt;The target detected a non-recoverable        hardware failure while performing the command or during self test.    &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;5&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;ILLEGAL REQUEST&lt;/B&gt;&lt;BR&gt;There was an illegal parameter in the        command descriptor block or in the additional parameters supplied as data        for some commands. If the target detects an invalid parameter in the        command descriptor block, then it shall terminate the command without        altering the medium. If the target detects an invalid parameter in the        additional parameters supplied as data, then the target may have already        altered the medium. This sense key may also indicate that an invalid        IDENTIFY message was received. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;6&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;UNIT ATTENTION&lt;/B&gt;&lt;BR&gt;The removable medium may have been        changed or the target has been reset. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;7&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;DATA PROTECT&lt;/B&gt;&lt;BR&gt;A command that reads or writes the        medium was attempted on a block that is protected from this operation.      &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;8&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;BLANK CHECK&lt;/B&gt;&lt;BR&gt;A write-once device or a        sequential-access device encountered blank medium or format-defined        end-of-data indication while reading or a write-once device encountered.        &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;9&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;Vendor Specific&lt;/B&gt;&lt;BR&gt;This key is available for reporting        vendor specific conditions. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;a&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;COPY ABORTED&lt;/B&gt;&lt;BR&gt;A COPY, COMPARE, or COPY AND VERIFY        command was aborted due to an error condition on the source device, the        destination device, or both. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;b&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;ABORTED COMMAND&lt;/B&gt;&lt;BR&gt;The target aborted the command. The        initiator may be able to recover by trying the command again. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;c&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;HARDWARE ERROR&lt;/B&gt;&lt;BR&gt;The target detected a non-recoverable        hardware failure while performing the command or during self test.    &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;d&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;VOLUME OVERFLOW&lt;/B&gt;&lt;BR&gt;A buffered peripheral device has        reached the end-of-partition and data may remain in the buffer that has        not been written to the medium. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;e&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;MISCOMPARE&lt;/B&gt;&lt;BR&gt;The source data did not match the data        read from the medium. &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;   &lt;TR&gt;     &lt;TD vAlign=top width="3%"&gt;       &lt;P&gt;f&lt;/P&gt;&lt;/TD&gt;     &lt;TD vAlign=top width="97%"&gt;&lt;B&gt;       &lt;P align=left&gt;Reserved&lt;/B&gt; &lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt; &lt;P&gt; &lt;HR&gt;  &lt;P&gt;&lt;/P&gt; &lt;P&gt;&lt;A href="http://infoserver.central/hp_bin/fehb-comments.html"&gt;&lt;/A&gt;&amp;nbsp;&lt;/P&gt; &lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/714742118606354868-6404701654125242584?l=unixtechtips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixtechtips.blogspot.com/feeds/6404701654125242584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=714742118606354868&amp;postID=6404701654125242584&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6404701654125242584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/714742118606354868/posts/default/6404701654125242584'/><link rel='alternate' type='text/html' href='http://unixtechtips.blogspot.com/2006/11/scsi-sense-keys.html' title='SCSI Sense Keys'/><author><name>HuggyPuggy</name><uri>http://www.blogger.com/profile/04602550959022896368</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://photos1.blogger.com/blogger/5880/632/1600/9c64.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-714742118606354868.post-6942109983393436142</id><published>2006-11-27T22:22:00.000-08:00</published><updated>2006-11-27T22:59:47.623-08:00</updated><title type='text'>Solaris Tips and Tricks</title><content type='html'>&lt;H2&gt;Solaris Tips and Tricks&lt;/H2&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="/unixtips/solaris.html#accounts"&gt;Accounts&lt;/A&gt;&lt;/H4&gt;&lt;/DIR&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Solaris 10 allows you to &lt;A  href="http://blogs.sun.com/roller/page/gbrunett/20040923"&gt;lockout accounts after  a certain number of failed logins&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Solaris 10 has new features to &lt;A  href="http://blogs.sun.com/roller/page/gbrunett/20040921"&gt;manage non-login  accounts and locked accounts which is no longer dainbread&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=B&gt;&lt;A name=backups&gt;&lt;A  href="/unixtips/solaris.html#backups"&gt;Backups&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-40133-1"&gt;correct  the device paths when replacing a FCAL boot disk after ufsrestoring&lt;/A&gt;? (CC)  &lt;/H4&gt; &lt;H4&gt;How can I use &lt;A href="fssnap.txt"&gt;fssnap to take file-system snapshots of  active UFS file-systems&lt;/A&gt;? There was also a &lt;A  href="http://www.samag.com/documents/s=1824/sam0201j/0201j.htm"&gt;Sys Admin  article&lt;/A&gt; on the subject. &lt;/H4&gt; &lt;H4&gt;One technique for &lt;A href="poor_mans_mirror.dump.txt"&gt;poor man's disk  mirroring&lt;/A&gt; using ufsdump/ufsrestore. &lt;/H4&gt; &lt;H4&gt;Another technique for &lt;A href="poor_mans_mirror.txt"&gt;poor man's disk  mirroring&lt;/A&gt; that allows the 2nd disk to be usable (read hands off as in no  messing with vfstab). &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=boot&gt;&lt;A href="/unixtips/solaris.html#boot"&gt;Boot&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Solaris 10 has a new feature boot -m verbose which allows you to customize  boot console output. &lt;/H4&gt; &lt;H4&gt;Common &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-28291-1"&gt;boot  errors and their workarounds&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;In case you ever wanted to know what the heck is going on &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-24473-1"&gt;during  the boot process&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;The &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-48569-1"&gt;basics of  the boot command&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;If you haven't sat down and figured out what all those scripts do, here is  an &lt;A  href="http://www.mgmg-interactive.com/mgmg/solaris_startup_files.html"&gt;analysis  of Solaris 8 Startup Files&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Ever wonder what the box is doing &lt;A href="boot_diagnostics.txt"&gt;before the  banner and OBP prompt is displayed&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=C&gt;&lt;A href="/unixtips/solaris.html#cd"&gt;CD / CD-R&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-26-102139-1"&gt;Internal  DVD-ROM/CD-ROM SD-C2732 May Return Incorrect Data&lt;/A&gt; (CC) &lt;/H4&gt; &lt;H4&gt;What is the &lt;A href="find_cdrom.txt"&gt;CD-ROM called&lt;/A&gt; on this box? &lt;/H4&gt; &lt;H4&gt;How can I &lt;A href="create_bootable_cdrom.txt"&gt;create a bootable CD-ROM for  Solaris&lt;/A&gt;? Another &lt;A  href="http://mah.everybody.org/docs/bootable-cdrom-for-solaris"&gt;method&lt;/A&gt;.  &lt;/H4&gt; &lt;H4&gt;How to &lt;A href="cdr.html"&gt;burn things to a CD-R with Solaris 8&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://thsun1.jinr.ru/file-archive/doc/cdr/suncdfaq/"&gt;Sun CD-ROM  FAQ&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=chown&gt;&lt;A href="/unixtips/solaris.html#chown"&gt;Chown&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I allow/prevent users from &lt;A href="chown.txt"&gt;giving files away&lt;/A&gt;  to someone else? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=cluster&gt;&lt;A href="/unixtips/solaris.html#cluster"&gt;Cluster&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Want to do something to multiple machines at once? Use the Sun &lt;A  href="cluster.txt"&gt;Cluster Console Tool&lt;/A&gt;. NOTE: you also need the &lt;A  href="scripts.jar"&gt;scripts.jar&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Need help with &lt;A href="cluster_disk.txt"&gt;disk contention problems&lt;/A&gt; in a  "shared" storage configuration? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=commands&gt;&lt;A href="/unixtips/solaris.html#commands"&gt;Cool  Commands&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Peter Baer Galvin has some &lt;A  href="http://www.samag.com/documents/s=7762/sam0301n/0301n.htm"&gt;Cool  Commands&lt;/A&gt; to help you get your job done faster and easier. &lt;/H4&gt; &lt;H4&gt;&lt;A href="wgrep.txt"&gt;wgrep&lt;/A&gt; is a windowing grep that is useful for  grabbing X number of lines before and after a match. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=coolthreads&gt;&lt;A href="/unixtips/solaris.html#coolthreads"&gt;CoolThreads  servers (T1000/T2000)&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Here are some great resources for the &lt;A  href="http://www.sun.com/servers/coolthreads/tnb/resources.jsp"&gt;Sun Fire  CoolThreads servers such as kernel params, FAQ, app tuning settings, etc.&lt;/A&gt;  &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://www.sun.com/products-n-solutions/hardware/docs/html/819-3801-10/"&gt;Sun  Fire T2000 Disk Volume Management Guide&lt;/A&gt; shows you how to setup and maintain  your hardware RAID 0 and RAID 1 configurations. &lt;/H4&gt; &lt;H4&gt;Here are the &lt;A  href="http://www.sun.com/servers/coolthreads/tnb/parameters.jsp"&gt;required kernel  params for the T2000 server&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://blogs.sun.com/roller/page/ipgeTuningGuide?entry=ipge_ethernet_device_driver_tunable"&gt;T2000  IPGE Ethernet tuning parameters&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://blogs.sun.com/roller/page/rmc?entry=welcome_to_the_cmt_era"&gt;Richard  McDougall has LOTS of links to more CoolThreads info&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;The &lt;A href="http://cooltools.sunsource.net/cooltst/index.html"&gt;CoolThreads  Selection Tool allows you to see if your software will be a good candidate for  the T1000/T2000&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;If you are planning on &lt;A  href="http://cooltools.sunsource.net/consolidation/index.html"&gt;using the  T1000/T2000 to consolidate several other servers, the Consolidation Tool will  help simplify Solaris Zone creation, Resource Pools and Psets&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Sun has written several &lt;A  href="http://www.sun.com/blueprints/browsedate.html#1205"&gt;Blueprints articles on  the T1000/T2000&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;The &lt;A href="http://www.sun.com/blueprints/browsedate.html#0306"&gt;CoolThreads  servers come bundled with a FREE cryptographic accelerator&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;The &lt;A href="http://www.sun.com/servers/coolthreads/tnb/faq.jsp"&gt;CoolThreads  FAQ&lt;/A&gt; has lots of good info. &lt;/H4&gt; &lt;H4&gt;You can &lt;A href="http://www.sun.com/servers/coolthreads/tnb/index.jsp"&gt;try a  CoolThreads server (T1000/T2000) at no risk for 60days&lt;/A&gt; so you can play  around with it to see how well it will handle your workloads. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=compiler&gt;&lt;A href="/unixtips/solaris.html#compiler"&gt;Compiler&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="http://cooltools.sunsource.net/gcc/index.html"&gt;GCC has been  optimized for Sparc servers&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;You can now &lt;A  href="http://developers.sun.com/prodtech/cc/index.jsp"&gt;download Sun Studio 11  for FREE&lt;/A&gt;! &lt;/H4&gt; &lt;H4&gt;Lost your uninstall file and need to &lt;A  href="uninstall_old_sun_workshop.txt"&gt;uninstall your old version of Sun  Workshop&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=cron&gt;&lt;A href="/unixtips/solaris.html#cron"&gt;Cron&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Can't remember what field is what? Just add this &lt;A  href="crontab_header.txt"&gt;header to your crontab&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Want to see if your &lt;A href="cronlog.txt"&gt;cronjob is running without  errors&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=D&gt;&lt;A name=date&gt;&lt;A href="/unixtips/solaris.html#date"&gt;Date&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I get the current &lt;A href="prevdate.txt"&gt;date/time for  yesterday&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=debug&gt;&lt;A href="/unixtips/solaris.html#debug"&gt;Debug&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Solaris &lt;A  href="http://blogs.sun.com/roller/resources/jwadams/mdb-cheatsheet.pdf"&gt;Modular  Debugger (mdb) cheatsheet&lt;/A&gt; (PDF) &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=dhcp&gt;&lt;A href="/unixtips/solaris.html#dhcp"&gt;DHCP&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Why doesn't my &lt;A href="dhcp_unknown.txt"&gt;hostname get set when using  DHCP&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=docs&gt;&lt;A href="/unixtips/solaris.html#docs"&gt;Docs&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A  href="http://www.sun.com/bigadmin/content/solSysadminGuide/solsysadmin.pdf"&gt;Solaris  OE Guide for New System Administrators&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;Sun's &lt;A href="Sun-BestPracticesGuide.pdf"&gt;Best Practices Guide&lt;/A&gt; (PDF)  &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://www.sun.com/products-n-solutions/hardware/docs/index.html"&gt;Sun  documentation by product&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://www.fisica.uson.mx/carlos/Software/RefCards/Solaris_quickref.pdf"&gt;Solaris  Admininstror's Quick Reference&lt;/A&gt; (PDF) &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=dtrace&gt;&lt;A href="/unixtips/solaris.html#dtrace"&gt;DTrace&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;H4&gt;Scripts &lt;/H4&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="http://www.solarisinternals.com/si/dtrace/index.php"&gt;Solaris  Internals DTrace scripts&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://www.opensolaris.org/os/community/dtrace/scripts/"&gt;OpenSolaris.org  DTrace scripts&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://blogs.sun.com/roller/page/eschrock?entry=top_i_o_consumers_in"&gt;iotop.d  - prstat-like tool for showing the most I/O hungry processes&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://daemons.net/~matty/articles/solaris.dtracetopten.html"&gt;Top  10 DTrace scripts&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://users.tpg.com.au/adsln4yb/dtrace.html"&gt;Lots of DTrace  tools/scripts&lt;/A&gt; &lt;BR&gt;&lt;BR&gt;Articles &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.sun.com/bigadmin/content/dtrace/"&gt;DTrace home&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://docs-pdf.sun.com/817-6223/817-6223.pdf"&gt;Solaris DTrace  Guide&lt;/A&gt; (PDF) &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://www.sunpackevents.com/solaris10/documents/Dtrace-CCamp.pdf"&gt;Introduction  to DTrace&lt;/A&gt; (PDF) &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.samag.com/documents/s=9915/sam0512a/0512a.htm"&gt;Using  DTrace to Observe I/O Behavior&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.samag.com/documents/s=9915/sam0512b/"&gt;Security Forensics  Using DTrace&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.samag.com/documents/s=9171/sam0406h/0406h.htm"&gt;DTrace --  Most Exposing Solaris Tool Ever&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://solaris.reys.net/english/archives/45-DTrace-aggregation-functions-aggregations.html"&gt;DTrace  aggregation functions&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=dvd&gt;&lt;A href="/unixtips/solaris.html#dvd"&gt;DVD&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-26-102139-1"&gt;Internal  DVD-ROM/CD-ROM SD-C2732 May Return Incorrect Data&lt;/A&gt; (CC) &lt;/H4&gt; &lt;H4&gt;Having problems &lt;A href="dvdboot.html"&gt;booting from your DVD drive in  Solaris&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=E&gt;&lt;A name=email&gt;&lt;A  href="/unixtips/solaris.html#email"&gt;E-mail&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I prevent my mail server from &lt;A  href="http://mail-abuse.org/tsi/ar-fix.html"&gt;being used as a third-party  relay&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Why doesn't my &lt;A href="forward_file.txt"&gt;.forward file&lt;/A&gt; work?  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=emacs&gt;&lt;A href="/unixtips/solaris.html#emacs"&gt;Emacs&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="http://rgrjr.dyndns.org/emacs/emacs_cheat.html"&gt;Emacs  cheatsheat&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=F&gt;&lt;A name=files&gt;&lt;A  href="/unixtips/solaris.html#files"&gt;Files&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I &lt;A href="find_remove_file.txt"&gt;remove a file with a wierd  character&lt;/A&gt; in the name? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=filesystem&gt;&lt;A  href="/unixtips/solaris.html#filesystem"&gt;Filesystems&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;If you are having some problems like &lt;A href="determine_cd.txt"&gt;cannot  determine current directory&lt;/A&gt; even if the perms look ok...there is a fix.  &lt;/H4&gt; &lt;H4&gt;How many &lt;A href="number-inodes.txt"&gt;inodes are being used in a particular  filesystem&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Is there a way to quickly &lt;A href="full-filesytems.txt"&gt;determine which  filesystems are over 90% full&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=flash&gt;&lt;A href="/unixtips/solaris.html#flash"&gt;Flash&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;NOTE: Flash requires at least Solaris 8 4/01 and does not work well with  DiskSuite/softpartitions. &lt;/H4&gt; &lt;H4&gt;How to &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-47413-1"&gt;exclude  multiple directories and filesystems without using the "-x" option&lt;/A&gt; for Web  Start Flash Archives&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Example of &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-40131-1"&gt;installing  Web Start Flash Archives with the Solaris 8 interactive installation  program&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;How to &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-44580-1"&gt;install  Web Start Flash Archives on a Boot Environment using Live Upgrade  (Command-Line)&lt;/A&gt; (CC) &lt;/H4&gt; &lt;H4&gt;Infodoc on how to &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-40820-1"&gt;run  Jumpstart with a "separate" boot and install server and utilizing a Flash  Archive&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;Solaris 8 software &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-49462-1"&gt;Jumpstart  with a Boot Server only utilizing Flash Archive&lt;/A&gt; (CC) &lt;/H4&gt; &lt;H4&gt;How to &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-41341-1"&gt;install a  Flash Archive from a CD-ROM&lt;/A&gt;. (CC) &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=ftp&gt;&lt;A href="/unixtips/solaris.html#ftp"&gt;FTP&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="autogen_ftpusers.txt"&gt;Autogenerate your /etc/ftpusers file&lt;/A&gt; so  you don't have to remember to modify it. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.ncftp.com/"&gt;NcFTP&lt;/A&gt; and &lt;A  href="http://www.proftpd.org/"&gt;ProFTPD&lt;/A&gt; are some handy, secure, configurable  FTP servers. Article on &lt;A  href="http://www.samag.com/documents/s=7667/sam0213k/0213k.htm"&gt;configuring  NcFTP&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;How do I &lt;A href="anon_ftp.txt"&gt;setup an anonymous FTP server&lt;/A&gt; the long  way or the &lt;A href="anon_ftp2.txt"&gt;Sun script way&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How can I &lt;A href="ftp_only_account.txt"&gt;create an account that only allows  FTP access&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How can I change the &lt;A href="ftp_banner.txt"&gt;ftp daemon's banner&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Why &lt;A href="cannot_ftp.txt"&gt;can't I ftp to the box if I can telnet to  it&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=H&gt;&lt;A name=hardware&gt;&lt;A  href="/unixtips/solaris.html#hardware"&gt;Hardware&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Sun now has a utility to &lt;A  href="http://www.sun.com/download/products.xml?id=4304155a"&gt;store your Chassis  Serial Number in EEPROM with a utility called Sneep&lt;/A&gt;. Ok, so it isn't  perfect...but is a step in the right direction. &lt;/H4&gt; &lt;H4&gt;Sun System Handbook &lt;A  href="http://sunsolve.sun.com/handbook_pub/Systems/"&gt;Systems List&lt;/A&gt; &lt;A  href="http://sunsolve.sun.com/handbook_pub/Devices/"&gt;Components List&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;Article on &lt;A  href="http://developers.sun.com/solaris/articles/devicemapping.html"&gt;Solaris  device mappings&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A href="ftp://ftp.cs.toronto.edu/pub/jdd/suntype"&gt;suntype&lt;/A&gt; is a script  to help determine what model of Sun box you have. &lt;/H4&gt; &lt;H4&gt;Some info about &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-23476-1"&gt;Sun  Hardware Diagnostics&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-23479-1"&gt;prtdiag&lt;/A&gt;  is helpful in checking out what state your system is in. (CC) &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://sunsolve.sun.com/handbook_pub/"&gt;Sun System Handbook&lt;/A&gt;  &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://040.digital-bless.com/texts/Unofficial_Sun_Blade_100_FAQ.htm"&gt;SunBlade  100 FAQ's&lt;/A&gt; and &lt;A  href="http://www.mit.edu/afs/sipb.mit.edu/project/eichin/photogallery/test_002.html"&gt;pictures&lt;/A&gt;.  &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://sunsolve.sun.com/handbook_pub/General/LEDs_TOC.html"&gt;Sun  System LED Descriptions&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=hostid&gt;&lt;A href="/unixtips/solaris.html#hostid"&gt;Hostid&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can you &lt;A  href="http://www.squirrel.com/squirrel/sun-nvram-hostid.faq.html"&gt;replace your  nvram chip or change your hostid&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=I&gt;&lt;A name=inetd&gt;&lt;A  href="/unixtips/solaris.html#inetd"&gt;Inetd&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I &lt;A href="inetd_logging.txt"&gt;log all telnet/ftp connections&lt;/A&gt;?  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=J&gt;&lt;A name=jumpstart&gt;&lt;A  href="/unixtips/solaris.html#jumpstart"&gt;Jumpstart&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Solaris 10 has a new &lt;A  href="http://blogs.sun.com/roller/page/gbrunett/20040927"&gt;Reduced Networking  Software Group&lt;/A&gt; that you can build up to have exactly what you want in it.  &lt;/H4&gt; &lt;H4&gt;Article on how to &lt;A  href="http://www.sun.com/solutions/blueprints/0504/817-7288.pdf"&gt;boot off CD-ROM  to do Jumpstart installations&lt;/A&gt;. (PDF) &lt;/H4&gt; &lt;H4&gt;Great Blueprints article on &lt;A  href="http://www.sun.com/solutions/blueprints/0802/816-7587-10.pdf"&gt;Customizing  JumpStart Framework for Installation and Recovery&lt;/A&gt; (PDF) &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;&lt;A href="http://clue.eng.iastate.edu/uberjs/"&gt;UberJS&lt;/A&gt; is designed to help  with jumpstarting w/o RARP'ing over the network. &lt;/H4&gt; &lt;H4&gt;Method for having a &lt;A  href="http://unix.derkeiler.com/Newsgroups/comp.unix.solaris/2003-05/1450.html"&gt;self-contained  jumpstart/flash DVD&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;The &lt;A href="http://www.sun.com/bigadmin/content/jet/"&gt;JumpStart Enterprise  Toolkit&lt;/A&gt; helps simplify the JumpStart process. &lt;/H4&gt; &lt;H4&gt;The &lt;A  href="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=8&amp;amp;PartDetailId=MR-SYS-1.0-G-ALL-F&amp;amp;TransactionId=Try"&gt;MR  System for Rapid Recovery Toolkit&lt;/A&gt; helps you create a mini-root (via  JumpStart) that will allow you to access VxVM, Networker, NetBackup&lt;/A&gt;, etc.  &lt;/H4&gt; &lt;H4&gt;There are several very good &lt;A  href="http://www.sun.com/solutions/blueprints/browsesubject.html#jumpstart"&gt;Sun  BluePrints for setting up Jumpstart and customizing it for a recovery  mini-root&lt;/A&gt;. &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;I need help &lt;A href="automate_pkg_install.txt"&gt;automating package  installs&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Here is a &lt;A  href="http://www.samag.com/documents/s=1165/sam0005a/0005a.htm"&gt;SysAdmin article  to get you started with JumpStart&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Tips for automating a &lt;A href="jumpstart_sol8.txt"&gt;Solaris 8 jumpstart&lt;/A&gt;.  &lt;/H4&gt; &lt;H4&gt;How would I &lt;A href="jumpstart_kernel_patch.txt"&gt;add a kernel patch to a  jumpstart image&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=K&gt;&lt;A name=kernel&gt;&lt;A  href="/unixtips/solaris.html#kernel"&gt;Kernel&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;If you are still running Solaris 2.6, &lt;A href="sol26_kernel_bug.txt"&gt;don't  apply 105181-33&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;What are the different tunable kernel paramters for Solaris &lt;A  href="kernel_2.6.txt"&gt;2.3 - 2.6&lt;/A&gt;, &lt;A  href="http://docs-pdf.sun.com/816-0607/816-0607.pdf"&gt;Solaris 8&lt;/A&gt;, &lt;A  href="http://docs-pdf.sun.com/806-7009/806-7009.pdf"&gt;Solaris 9&lt;/A&gt;, &lt;A  href="http://192.18.109.11/817-0404/817-0404.pdf"&gt;Solaris 10&lt;/A&gt;? (PDF)  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=keyboard&gt;&lt;A href="/unixtips/solaris.html#keyboard"&gt;Keyboard&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I &lt;A href="suspend_key.txt"&gt;disable the power/suspend key&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How can you &lt;A href="remove_keyboard.txt"&gt;remove the keyboard&lt;/A&gt; from a  running machine? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=L&gt;&lt;A name=library&gt;&lt;A  href="/unixtips/solaris.html#library"&gt;Libraries&lt;/A&gt;&lt;FONT size=4&gt; (or the lack of  them)&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt;&lt;/FONT&gt; &lt;H4&gt;&lt;A href="library_crle.txt"&gt;CRLE will allow you to configure your runtime  linking environment from the system level&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A href="missing_library.txt"&gt;Accidentally removed/renamed a critical  library file&lt;/A&gt; and can't get it back? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=links&gt;&lt;A href="/unixtips/solaris.html#links"&gt;Links&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="http://www.coolcommands.com/"&gt;coolcommands.com&lt;/A&gt; has a searchable  database of commands or one-line scripts which provide a function in a UNIX  environment. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.stokely.com/"&gt;Celeste Stokely&lt;/A&gt; has information and  links to just about anything and everything UNIX related. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.sun.com/bigadmin/"&gt;Sun's One-Stop Location for SA's&lt;/A&gt;  web site. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.sundot.com/"&gt;Sundot has real life UNIX observations and  tips&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.sunhelp.org/"&gt;Sunhelp - the name speaks for itself&lt;/A&gt;  &lt;/H4&gt; &lt;H4&gt;If you are needing used Sun equipment, &lt;A  href="http://www.acclinet.com/"&gt;Acclinet gives you a 48 month warranty on  anything they sell&lt;/A&gt;! &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://unixguide.net/sun/sunobscure.shtml"&gt;Solaris Infrequently  Asked and Obscure Questions&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=M&gt;&lt;A name=memory&gt;&lt;A  href="/unixtips/solaris.html#memory"&gt;Memory&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A  href="http://sunsolve.sun.com/handbook_pub/Devices/Memory/MEM_TOC.html"&gt;Sun  Memory Module Compatibility Chart&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.4schmidts.com/unix.html"&gt;memconf&lt;/A&gt; will tell you what  kind of memory is in your Sun box without opening it. &lt;/H4&gt; &lt;H4&gt;Why do I have more &lt;A href="sol8_more_free_mem.txt"&gt;free memory after I  upgrade to Solaris 8&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=modem&gt;&lt;A href="/unixtips/solaris.html#modem"&gt;Modems&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I setup my external modem to... Go directly to &lt;A  href="http://www.stokely.com/unix.serial.port.resources/index.html"&gt;Celeste's  serial port resources pages&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=N&gt;&lt;A name=nfs&gt;&lt;A href="/unixtips/solaris.html#nfs"&gt;NFS&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;You can now &lt;A  href="http://docs.sun.com/db/doc/816-7125/6md5dso1m?q=logging&amp;amp;a=view"&gt;log  NFS file operations.  &lt;H4&gt;How can I fix the &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt;&lt;/A&gt;&lt;A href="stale_nfs.txt"&gt;Stale NFS  file handle&lt;/A&gt; error message? &lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Having problems &lt;A href="umount.txt"&gt;unmounting a busy FS in Solaris 7 or  8&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=network&gt;&lt;A href="/unixtips/solaris.html#network"&gt;Network&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;If you &lt;A href="whichswitch.txt"&gt;need to figure out which switch port you  are plugged into, the switch name and IOS version&lt;/A&gt;, you are in luck! &lt;/H4&gt; &lt;H4&gt;Trying to decide &lt;A href="http://www.faqs.org/rfcs/rfc1178.html"&gt;what to  call your servers&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.networkuptime.com/faqs/ethernet/"&gt;Ethernet FAQ&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://colin.bitterfield.com/virtual-ethernet.html"&gt;How to setup  more than 255 virtual ethernets&lt;/A&gt; on Solaris 8 (Sparc) &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=8&amp;amp;PartDetailId=SolOpEnBlueP-1.0-ALL-G-F&amp;amp;TransactionId=try"&gt;nddconfig&lt;/A&gt;  sets network driver parameters to prevent some network attacks. &lt;/H4&gt; &lt;H4&gt;If I have multiple NIC's, how can I do outbound load spreading for Solaris 8  or have redundant network connections? &lt;A href="ip_network_multipathing.pdf"&gt;Sun  Answerbook&lt;/A&gt; &lt;A  href="http://www.samag.com/documents/s=7933/sam0305a/0305a.htm"&gt;SysAdmin  article&lt;/A&gt; &lt;A  href="http://www.sun.com/solutions/blueprints/1102/806-7230.pdf"&gt;Sun BluePrints  article&lt;/A&gt; (PDF) &lt;/H4&gt; &lt;H4&gt;Where can I find a &lt;A  href="http://www.sun.com/software/securenet/lite/"&gt;FREE firewall program&lt;/A&gt; for  Sol 8? SunScreen is included in Solaris 9. &lt;/H4&gt; &lt;H4&gt;How can I log or limit/deny certain hosts from telnet/ftp/etc. to my box?  Download tcp-wrappers from &lt;A  href="http://sunfreeware.com/"&gt;Sunfreeware.com&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;How do I &lt;A href="change_hostname_ip.txt"&gt;manually change the hostname or  IP&lt;/A&gt; or &lt;A href="solaris_change_hostname_script.txt"&gt;change the hostname via a  script&lt;/A&gt;? &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;How do I &lt;A href="set_nic_settings.txt"&gt;set the NIC speed/duplex&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How can I &lt;A href="nic_check.txt"&gt;display what my current NIC speed/duplex  settings&lt;/A&gt; are? &lt;/H4&gt; &lt;H4&gt;What are the &lt;A href="sun_nic_faqs.txt"&gt;limitations when using multiple  NIC's&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Ok, what about &lt;A href="trunking.txt"&gt;setting up trunking on a QFE card&lt;/A&gt;?  &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;When multiple interfaces are installed and it complains they are not plugged  in, you can stop those error messages with setenv tpe_link test false at the ok  prompt. &lt;/H4&gt; &lt;H4&gt;How can I &lt;A  href="ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/ifstatus/ifstatus-4.0.tar.gz"&gt;determine  if an interface is in promiscuous mode&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How can I &lt;A href="sniffer-trick.txt"&gt;prevent being detected while  snooping&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How do I interpret the output of &lt;A  href="http://www.cymru.com/Documents/Sun/netstat-k-stats.txt"&gt;netstat -k&lt;/A&gt;?  &lt;/H4&gt; &lt;H4&gt;How do I &lt;A href="broadcast_pings.txt"&gt;turn off replies to broadcast  pings&lt;/A&gt;? &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;Where can I find information about &lt;A  href="http://www.sean.de/Solaris/soltune.html"&gt;tuning my TCP/IP stack&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;I have heard that Solaris web servers are slow to serve MS clients? How can  I &lt;A href="http://www.sun.com/sun-on-net/performance/tcp.slowstart.html"&gt;speed  up their access&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;What if I don't want to use the &lt;A  href="default_router.txt"&gt;/etc/defaultrouter&lt;/A&gt; file? &lt;/H4&gt; &lt;H4&gt;So what do those &lt;A href="fddi.txt"&gt;lights on the back of my FDDI card&lt;/A&gt;  mean? &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;How do &lt;A href="trunking_v_interface_group.txt"&gt;interface groups differ from  trunking&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Why should I &lt;A href="interface_group_overview.txt"&gt;use interface  groups&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;I want to know more about &lt;A href="interface_group_details.txt"&gt;interface  groups&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=nis&gt;&lt;A href="/unixtips/solaris.html#nis"&gt;NIS&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Some info on &lt;A href="protect_nis.txt"&gt;protecting your NIS maps&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Here is a nice &lt;A href="securing_nis.txt"&gt;method to secure NIS&lt;/A&gt;.  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=null&gt;&lt;A href="/unixtips/solaris.html#null"&gt;/dev/null&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I &lt;A href="dev_null.txt"&gt;recreate /dev/null&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=O&gt;&lt;A name=obp&gt;&lt;A href="/unixtips/solaris.html#obp"&gt;OBP&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I reset the default boot-file (or anything else)? set-default  boot-file &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-19290-1"&gt;Change/create  the boot-device alias&lt;/A&gt; while the server is running using the "eeprom"  command. (CC) &lt;/H4&gt; &lt;H4&gt;How to &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-45692-1"&gt;view OBP  aliases from a booted system&lt;/A&gt; (CC) or have a &lt;A  href="obp_print_aliases.txt"&gt;script cut out the relevant OBP aliases section for  you&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A href="SunOBP_Quick_Ref.pdf"&gt;Sun OBP Quick Reference Guide&lt;/A&gt; (PDF) &lt;/H4&gt; &lt;H4&gt;Available &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-23476-1"&gt;OpenBoot  Prom diagnostic commands&lt;/A&gt; (CC) &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=os&gt;&lt;A href="/unixtips/solaris.html#os"&gt;OS&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;The &lt;A href="http://www.science.uva.nl/pub/solaris/solaris2/"&gt;Solaris 2  FAQ&lt;/A&gt; has been recently updated. &lt;/H4&gt; &lt;H4&gt;The &lt;A  href="http://sunsolve.sun.com/pub-cgi/show.pl?target=content/content6"&gt;Top 10  reasons you should upgrade at least to Solaris 8&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Reasons you should consider &lt;A  href="http://wwws.sun.com/software/solaris/programs/sol9upgrade.html"&gt;upgrade to  Solaris 9&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;How can I tell if I am running in &lt;A href="32v64bit.txt"&gt;32 bit or 64 bit  mode&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Where can I find out more info about &lt;A  href="http://developers.sun.com/solaris/articles/64_bit_booting.html"&gt;booting  the 32 or 64-Bit Kernel&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Which OS release am I running? cat /var/sadm/softinfo/INST_RELEASE OR cat  /etc/release &lt;/H4&gt; &lt;H4&gt;What is the &lt;A  href="http://wwws.sun.com/software/solaris/fcc/releases.html"&gt;latest version of  Solaris&lt;/A&gt; that is available? &lt;/H4&gt; &lt;H4&gt;Where can I find the &lt;A  href="http://wwws.sun.com/software/solaris/fcc/fcc.html"&gt;Solaris Family  Comparison Chart&lt;/A&gt; of features for each OS version? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=P&gt;&lt;A name=package&gt;&lt;A  href="/unixtips/solaris.html#package"&gt;Packages&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Info on how you can &lt;A href="http://www.eek.org/docs/spdoc.html"&gt;make your  own Solaris packages&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;How can you &lt;A href="file-n-package.txt"&gt;determine which package a file  belongs to&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=password&gt;&lt;A  href="/unixtips/solaris.html#password"&gt;Passwords&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Solaris 10 has a &lt;A  href="http://blogs.sun.com/roller/page/gbrunett/20040928"&gt;new password history  feature&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=patch&gt;&lt;A href="/unixtips/solaris.html#patch"&gt;Patches&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can you &lt;A href="initial_or_upgrade.txt"&gt;determine if this is a clean  install or an upgraded Solaris system&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;What are the various &lt;A href="patch_exit_codes.txt"&gt;patch exit codes&lt;/A&gt;?  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=performance&gt;&lt;A href="/unixtips/solaris.html#performance"&gt;Performance  Tips&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-21622-1"&gt;Performance  and Tuning on Solaris 2.6, 7 and 8&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=perl&gt;&lt;A href="/unixtips/solaris.html#perl"&gt;PERL&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;If you are tired of using the switcheroo method of editing files with sed to  a temp file, then moving them back, take a look at using the inplace editing  function of PERL (perl -i -p -e). However, don't edit files that are really  softlinks such as /etc/hosts. It breaks the softlink and makes it a real file.  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=power&gt;&lt;A href="/unixtips/solaris.html#power"&gt;Power/CPR&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Why do I get some error message about &lt;A  href="power_cpr.txt"&gt;/etc/power.conf&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=paging&gt;&lt;A href="/unixtips/solaris.html#paging"&gt;Priority  Paging&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Why &lt;A  href="http://sunsolve.sun.com/pub-cgi/show.pl?target=content/content8"&gt;shouldn't  I be using priority paging on Solaris 8 and 9&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;What is &lt;A href="priority_paging.txt"&gt;priority paging&lt;/A&gt; and why do I need  it if I am running pre Solaris 8? &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://www.sun.com/sun-on-net/performance/priority_paging.html"&gt;Priority  Paging FAQ&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=ports&gt;&lt;A href="/unixtips/solaris.html#ports"&gt;Ports&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can you determine &lt;A href="port2pid"&gt;which process is using that  port&lt;/A&gt;? Otherwise, you must use LSOF. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=printing&gt;&lt;A href="/unixtips/solaris.html#printing"&gt;Printing&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Tech article on the &lt;A  href="http://developers.sun.com/solaris/articles/basicprinting.html"&gt;basics of  printing&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=process&gt;&lt;A href="/unixtips/solaris.html#process"&gt;Processes&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Solaris 10 allows you to &lt;A  href="http://blogs.sun.com/roller/page/gbrunett/20040924"&gt;limit the display of  other user's processes&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;pargs -e will display a process' environment variables &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=R&gt;&lt;A name=raid&gt;&lt;A href="/unixtips/solaris.html#raid"&gt;RAID&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;The Sun Fire v440 has onboard hardware RAID 1. &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-72294-1"&gt;raidctl  Solaris 8 man page&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;Here's how to &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-73040-1"&gt;detect a  failed v440 hardware RAID 1 disk and the process to replace it&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Why can't I &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-25-73595-1"&gt;create a  2nd mirrorset using the v440's onboard RAID card&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.ofb.net/~jheiss/raid10/"&gt;Why is RAID 1+0 better than  RAID 0+1&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Description and summary chart of the &lt;A  href="http://www.pcguide.com/ref/hdd/perf/raid/levels/index.htm"&gt;different RAID  levels&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;AC&amp;amp;NC &lt;A href="http://www.acnc.com/04_01_00.html"&gt;describes the  different RAID levels&lt;/A&gt; in an easy to understand format. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.acnc.com/04_02.html"&gt;RAID benchmarking tools&lt;/A&gt;  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=rm6&gt;&lt;A href="/unixtips/solaris.html#rm6"&gt;Raid Manager / RM6 /  A1000&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How to &lt;A href="http://www.3113.com/dave/sun/a1000-reset.txt"&gt;reset the  A1000/A3x00 configuration&lt;/A&gt; if you have been swapping disks with other A1000's  or have the orange light on w/o any hardware errors. &lt;/H4&gt; &lt;H4&gt;Here is &lt;A href="/unixtips/a1000.html"&gt;another/quicker method to reset the  A1000 configuration&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;How can you &lt;A href="remove_a1000_dacstore.txt"&gt;wipe the DACstore from an  A1000 drive&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How can I create &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-14818-1"&gt;A1000  &amp;amp; A3x00 luns with Raid Manager 6.22 and not have to reboot&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Here are the &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-26765-1"&gt;CLI  equivalents to saving a raid module profile in RM6&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Here are some &lt;A  href="http://www.eng.auburn.edu/pub/mail-lists/ssastuff/Solaris8-A1000.html"&gt;instructions  on how to setup an A1000 on Solaris 8&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;Is it possible to &lt;A href="swap_a1000_battery.html"&gt;swap the A1000 cache  battery without powering the array off&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Known bug with RM 6.22 results in the following error messages: &lt;A  href="raid_manager_622_bug.txt"&gt;"Auto configure failed" or "Wrong number of  drives entered for the RAID level given"&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Think you have a &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-21825-1"&gt;failing  power supply&lt;/A&gt; on your A1000/A3000? (CC) &lt;/H4&gt; &lt;H4&gt;Some info on the different &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-24532-1"&gt;RM6  Controller States&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;You need to read this Infodoc if you are trying to &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-22176-1"&gt;run RM on  Solaris 8&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;Having &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-25-22142-1"&gt;long  boot times&lt;/A&gt; (90mins) with &amp;gt;8 LUN support on A1000 and A3x00  configurations? (CC) &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=register&gt;&lt;A  href="/unixtips/solaris.html#register"&gt;Registration&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;You can &lt;A href="never_register.txt"&gt;disable prompting for user or system  registration reminder&lt;/A&gt; after installing Solaris. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=rosetta&gt;&lt;A href="/unixtips/solaris.html#rosetta"&gt;Rosetta  Stones&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;SysAdmin quick &lt;A  href="http://www.unixporting.com/quickguide.html"&gt;comparison of Solaris 8,  HP-UX, FreeBSD, Linux, AIX&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;Compares: &lt;A href="http://www.unixguide.net/unixguide.shtml"&gt;AIX, FreeBSD,  HP-UX, Redhat, Solaris, Tru64&lt;/A&gt; (&lt;A  href="http://www.unixguide.net/unixguide.pdf"&gt;PDF&lt;/A&gt;) &lt;/H4&gt; &lt;H4&gt;Compares: &lt;A href="http://www.bhami.com/rosetta.html"&gt;Everything and the  kitchen sink&lt;/A&gt; (&lt;A href="http://www.bhami.com/unix-rosetta.pdf"&gt;PDF&lt;/A&gt;)  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=S&gt;&lt;A name=scsi&gt;&lt;A href="/unixtips/solaris.html#scsi"&gt;SCSI  disks&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Here is how to &lt;A  href="http://www.eng.auburn.edu/pub/mail-lists/ssastuff/booted.html"&gt;determine  which root disk you are booted from&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Quick how-to on &lt;A  href="http://www.sundot.com/cgi-bin/blosxom.cgi/unix/solaris/#bootalias"&gt;setting  up Sun eeprom aliases for alternative boot disks&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;The script &lt;A href="ftp://ftp.cs.toronto.edu/pub/jdd/scsiinfo/"&gt;scsiinfo&lt;/A&gt;  will displays information about SCSI devices attached to a given system (like  probe-scsi, but from the OS). &lt;/H4&gt; &lt;H4&gt;iostat -En will also provide you with SCSI device information. &lt;/H4&gt; &lt;H4&gt;&lt;A href="wd.txt"&gt;WD&lt;/A&gt; converts sd instance numbers to logical device names  and vice versa. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.sarcheck.com/dmap.htm"&gt;dmap&lt;/A&gt; is a utility from  SarCheck that also provides instance numbers/logical device names. &lt;/H4&gt; &lt;H4&gt;&lt;A href="getspace.txt"&gt;Getspace&lt;/A&gt; is a handy little script to grab the  used and free space via df -k. &lt;/H4&gt; &lt;H4&gt;Need to &lt;A href="add_disks_hot.txt"&gt;add SCSI disks "hot"&lt;/A&gt; or make it see  your cdrom (Solaris 7 and earlier)? In Solaris 8, use &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-14818-1"&gt;devfsadm&lt;/A&gt;  -c disk. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=security&gt;&lt;A href="/unixtips/solaris.html#security"&gt;Security&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;The &lt;A  href="http://www.sun.com/bigadmin/content/submitted/Solaris_build_document.pdf"&gt;Solaris  8 Build Document&lt;/A&gt; has lots of handy security checks, scripts, etc. (PDF) [&lt;A  href="Solaris_build_document.pdf"&gt;locally&lt;/A&gt;] &lt;/H4&gt; &lt;H4&gt;Solaris Security Toolkit &lt;A  href="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=8&amp;amp;PartDetailId=817-0074-10&amp;amp;TransactionId=try"&gt;FixModes&lt;/A&gt;  &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.spitzner.net/armoring.html"&gt;Armoring Solaris&lt;/A&gt; &lt;A  href="http://www.spitzner.net/armoring2.html"&gt;Armoring Solaris: II&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;The &lt;A  href="http://www.itworld.com/Comp/2377/security-faq/pfindex.html"&gt;Solaris  Security FAQ&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;Here are some suggestions for &lt;A  href="http://www.samag.com/documents/s=1157/sam0013c/0013c.htm"&gt;securing  Solaris&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=sed&gt;&lt;A href="/unixtips/solaris.html#sed"&gt;Sed&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Handy &lt;A  href="http://www.student.northpark.edu/pemente/sed/sed1line.txt"&gt;sed  one-liners&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=sendmail&gt;&lt;A href="/unixtips/solaris.html#sendmail"&gt;Sendmail&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I easily &lt;A href="sendmail_lookups.txt"&gt;look up where this e-mail  address will go&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Need to know which &lt;A href="sendmail_version.txt"&gt;version of sendmail I'm  running&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;How can I allow &lt;A  href="http://www.samag.com/documents/s=8228/sam0306a/0306a.htm"&gt;Sendmail to run  w/o accepting mail from other servers&lt;/A&gt;? (also check ou the Oct. 2003 issue  for more info) &lt;/H4&gt; &lt;H4&gt;How can I change the &lt;A href="sendmail_banner.txt"&gt;sendmail banner&lt;/A&gt;?  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=smf&gt;&lt;A href="/unixtips/solaris.html#smf"&gt;Service Management Facility  (SMF)&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;SMF has a new function svcs -x to &lt;A  href="http://blogs.sun.com/roller/page/dp/20041029"&gt;help figure out what is  wrong with my system&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;SMF has &lt;A href="http://blogs.sun.com/roller/page/dp/20041029"&gt;changed the  way the system starts up and shuts down. The /etc/rc?.d/ directories are all  LEGACY facilities&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Solaris 10 has some &lt;A  href="http://blogs.sun.com/roller/page/tobin/20040928"&gt;new features with  svcadm&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A  href="http://www.sun.com/bigadmin/content/selfheal/smf-quickstart.html"&gt;SMF  quickstart guide&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;Solaris 10 allows &lt;A  href="http://blogs.sun.com/roller/page/sch/20040726"&gt;enabling and disabling of  services using the svc* commands&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Here's the &lt;A  href="http://www.sun.com/bigadmin/content/selfheal/sdev_intro.html"&gt;SMF  developer introduction&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=setk&gt;&lt;A href="/unixtips/solaris.html#setk"&gt;SE Toolkit&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Where can I find the &lt;A href="http://www.setoolkit.com/"&gt;SE Toolkit&lt;/A&gt;?  &lt;/H4&gt; &lt;H4&gt;Please be careful when running &lt;A  href="http://www.sun.com/980922/tuning2/"&gt;virtual_adrian&lt;/A&gt; as it will make  changes to the kernel following Adrian's rules. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=shell&gt;&lt;A href="/unixtips/solaris.html#shell"&gt;Shell&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can you &lt;A href="interactive_login.txt"&gt;determine if you have an  interacive login&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;Lots of &lt;A href="/aixtips/ksh_tips.txt"&gt;good info (memory refreshers) on  KSH&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.kornshell.com/doc/faq.html"&gt;KSH FAQ&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;&lt;A href="http://www.kornshell.com/examples/"&gt;KSH examples&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;How can I &lt;A  href="http://www.gnu.org/directory/Software_development/shell/shc.html"&gt;compile  a shell script&lt;/A&gt; so people can't change it or strings/view the password? &lt;A  href="http://www.datsi.fi.upm.es/~frosal/frosal.html"&gt;Francisco's home page&lt;/A&gt;  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=svm&gt;&lt;A href="/unixtips/solaris.html#svm"&gt;Solstice DiskSuite/Solaris  Volume Manager (SDS/SVM)&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-26-101686-1"&gt;Booting  off of a single disk from a mirrored root pair in Solaris 10 may fail with a  panic unless you have 120254-02 or later&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;If you are running SVM and have slow disk transfer rates, make sure to apply  &lt;A  href="http://sunsolve.sun.com/search/advsearch.do?collection=PATCH&amp;amp;type=collections&amp;amp;max=50&amp;amp;language=en&amp;amp;queryKey5=113073&amp;amp;toDocument=yes"&gt;113073  to speed things up by a factor of 3&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Please note the &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-73132-1"&gt;NEW  procedure to replace SVM disks that have gone bad&lt;/A&gt;. The old method for SDS no  longer works with those device ID's. &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;Here is a nice &lt;A href="soft-partitions.html"&gt;soft partitioning doc for  DiskSuite/SVM&lt;/A&gt; The only other docs are the man pages. &lt;/H4&gt; &lt;H4&gt;Undocumented setting to &lt;A href="ignore_quorum.txt"&gt;ignore the quorum rule  in DiskSuite 4.2.1&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;What to do when &lt;A href="sds_fix_broken_mirror.txt"&gt;one of your DiskSuite  mirrors went bad&lt;/A&gt; and you didn't use the above tip. &lt;/H4&gt; &lt;H4&gt;Where can I get the newest version of &lt;A  href="http://wwws.sun.com/software/solaris/ds/ds-disksuite/"&gt;Solstice DiskSuite  that supports soft partitions&lt;/A&gt;? The Solaris 8 patch is actually &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-21-108693-25-1"&gt;108693&lt;/A&gt;.  It is built into Solaris 9 as Solaris Volume Manager. (CC) &lt;/H4&gt; &lt;H4&gt;If you are running Solaris 2.6/7 and want to use soft partions, you must  upgrade to Solaris 8/9&lt;/A&gt;. The patch revision (106628-18) has a serious, silent  4 GB bug, so they have withdrawn it. &lt;/H4&gt; &lt;H4&gt;BluePrints article on &lt;A  href="http://www.sun.com/solutions/blueprints/1103/817-4368.html"&gt;SVM  Performance Best Practices&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Can I convince &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-25-45222-1"&gt;DiskSuite  do RAID 1+0&lt;/A&gt; (which is better than 0+1, &lt;A  href="/unixtips/solaris.html#raid"&gt;and why&lt;/A&gt;)? (CC) &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;It is hard to keep all these different names Sun assigns to everything  straight. Where can I find a &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-9-24824-1"&gt;list of  all the product aliases for SDS/SVM/etc&lt;/A&gt;? (CC) &lt;/H4&gt; &lt;H4&gt;Great way to have &lt;A  href="http://samag.com/solaris/column/0106.htm"&gt;DiskSuite/SVM coexist with  Veritas&lt;/A&gt; and let each do what it does best. &lt;/H4&gt; &lt;H4&gt;Nice doc on how to &lt;A href="Disk.Replacement.Procedure-SDS4.2.doc"&gt;replace a  mirror gone bad&lt;/A&gt;. &lt;A href="Disk.Replacement.Procedure-SDS4.2.pdf"&gt;PDF&lt;/A&gt;  &lt;/H4&gt; &lt;H4&gt;Quick method for &lt;A href="disksuite.txt"&gt;mirroring your root disk with  DiskSuite (Solaris Volume Manager)&lt;/A&gt; and an example of how the &lt;A  href="svm_root_disk_layout.html"&gt;SVM root disk could be laid out&lt;/A&gt;. &lt;BR&gt;&lt;/H4&gt; &lt;H4&gt;How do I increase the number of metadevices? Check the &lt;A  href="ods_faq.txt"&gt;DiskSuite FAQ&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;How do I remove the boot disk from DiskSuite control? Check the &lt;A  href="ods_faq.txt"&gt;DiskSuite FAQ&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=sort&gt;&lt;A href="/unixtips/solaris.html#sort"&gt;Sort&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Sort can be used to &lt;A  href="http://blogs.sun.com/roller/page/sch/20040702"&gt;generate a list sorted by  the first field, with only the highest valued second field for each first field  value&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=ssh&gt;&lt;A href="/unixtips/solaris.html#ssh"&gt;SSH&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="http://sourceforge.net/projects/clusterssh/"&gt;ClusterSSH&lt;/A&gt; allows  you to control a number of xterm windows via a single console. &lt;/H4&gt; &lt;H4&gt;How do I get &lt;A  href="http://www.snailbook.com/faq/trusted-host-howto.auto.html"&gt;trusted-host  authentication working&lt;/A&gt;? &lt;/H4&gt; &lt;H4&gt;How can I get &lt;A  href="http://www.employees.org/~satch/ssh/faq/ssh-faq-9.html#ss9.4.5"&gt;hostbased  authentication to work with SSH2&lt;/A&gt;? &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=starfire&gt;&lt;A href="/unixtips/solaris.html#starfire"&gt;Starfire /  E10k&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;A short article on &lt;A  href="http://www.samag.com/documents/s=1157/sam0013b/0013b.htm"&gt;Starfire  Administration&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=stopa&gt;&lt;A href="/unixtips/solaris.html#stopa"&gt;Stop-A, L1-A, break key  sequence&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can we &lt;A href="disable_stopa.txt"&gt;prevent the Stop-A key from being  used&lt;/A&gt; if we don't have a keyswitch? &lt;/H4&gt; &lt;H4&gt;How can we create an &lt;A href="alternate_break_sequence.txt"&gt;alternate  keyboard sequence for the BREAK signal&lt;/A&gt; on a dumb terminal? &lt;/H4&gt; &lt;H4&gt;How do I prevent a spurious BREAK (includes terminal server reboot) signal  from halting my Sun server? &lt;A  href="http://www.cisco.com/warp/public/770/fn-tsbreak.html"&gt;Cisco method  (Workaround section)&lt;/A&gt; or the &lt;A  href="http://www.stokely.com/unix.sysadm.resources/faqs.sun.html#sun.break.link"&gt;Stokely  method&lt;/A&gt; &lt;/H4&gt; &lt;H4&gt;How the different &lt;A  href="http://www.conserver.com/consoles/breakoff.html"&gt;terminal servers stack  up&lt;/A&gt; on this issue. &lt;/H4&gt; &lt;H4&gt;How do I send the &lt;A  href="http://www.cisco.com/warp/public/701/61.html"&gt;break sequence (aka STOP-A  or L1-A)&lt;/A&gt; using my terminal program? &lt;/H4&gt; &lt;H4&gt;Here is the explanation of the &lt;A href="break_signal_answer.txt"&gt;resistor  between the pins fix&lt;/A&gt; and where it came from. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=storage&gt;&lt;A href="/unixtips/solaris.html#storage"&gt;Storage  Arrays&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;&lt;A href="http://www.eng.auburn.edu/pub/mail-lists/ssastuff/"&gt;Storage Array  helpful tips&lt;/A&gt; &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=syslog&gt;&lt;A href="/unixtips/solaris.html#syslog"&gt;Syslog&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How to prevent &lt;A href="turn_off_remote_syslog.txt"&gt;syslog from accepting  remote messages&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=su&gt;&lt;A href="/unixtips/solaris.html#su"&gt;Su&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Need to log when someone uses su? Use this &lt;A  href="ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/dummy_su/dummy_su.c"&gt;dummy  su program instead&lt;/A&gt;. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=sysunconfig&gt;&lt;A  href="/unixtips/solaris.html#sysunconfig"&gt;Sys-unconfig&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;If sys-uconfig wipes out your LDAP config files during Flash installs in  Solaris 9, you need &lt;A  href="http://sunsolve.sun.com/search/document.do?assetkey=1-21-112941-09-1"&gt;Patch-ID#  112941&lt;/A&gt;. (CC) &lt;/H4&gt; &lt;H4&gt;Is your &lt;A href="sysunconfig_sol8.txt"&gt;sys-unconfig broken in Solaris 8&lt;/A&gt;?  &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=T&gt;&lt;A name=tar&gt;&lt;A href="/unixtips/solaris.html#tar"&gt;Tar&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;Show me the easiest way to &lt;A href="tartips.txt"&gt;move files between  directories using tar&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;Oops, I accidentally created a &lt;A href="absolute_path_tar.html"&gt;tar file  with an absolute path&lt;/A&gt;. &lt;/H4&gt; &lt;H4&gt;How can I &lt;A href="tar_wildcard.txt"&gt;use wildcards when extracting only  certain files&lt;/A&gt; from a tarfile? &lt;/H4&gt; &lt;H4&gt;Trying to use &lt;A href="tar_dev_null.txt"&gt;tar with include/exclude lists&lt;/A&gt;?  Use /dev/null as the destination. &lt;/H4&gt;&lt;/DIR&gt;&lt;/DIR&gt; &lt;H4&gt;&lt;A name=telnet&gt;&lt;A href="/unixtips/solaris.html#telnet"&gt;Telnet&lt;/A&gt;&lt;/H4&gt; &lt;H4&gt;&amp;nbsp;&lt;/H4&gt; &lt;DIR&gt; &lt;DIR&gt; &lt;H4&gt;How can I create an account that &lt;A href="telnet_only_account.txt"&gt;only  allows telnet/lo
