tag:blogger.com,1999:blog-76060742798410562152024-03-05T20:59:57.089-08:00General Knowledge on ICTVijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-7606074279841056215.post-3255964812794076612015-07-19T18:45:00.003-07:002015-07-19T18:45:34.864-07:00Unix - Welcome MessageThough not a big technical feature, having the right welcome message in a Unix server would be very much helpful in case of multiple server usages.<br />
<br />
To change the welcome message modify <tt>/etc/motd</tt> file with the custom message and add <tt>update_motd="NO"</tt> line in <tt>/etc/rc.conf</tt>.<br />
<br />
To have a custom SSH terminal welcome message create <tt>/etc/banner</tt> file with the custom message and add Banner <tt>/etc/banner</tt> line in <tt>/etc/ssh/sshd_config</tt>.<br />Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-46730291138697714852014-09-20T01:30:00.000-07:002015-06-18T17:38:27.681-07:00Unix - Details of the processor <!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:RelyOnVML/>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-AU</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin-top:0cm;
mso-para-margin-right:0cm;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0cm;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-fareast-language:EN-US;}
</style>
<![endif]-->
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<b><span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;"># sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">E.g.1:</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">hw.machine: i386<br />hw.model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz<br />hw.ncpu: 8<br />hw.machine_arch: i386</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">E.g.2:</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">hw.machine: amd64<br />hw.model: Intel(R) Pentium(R) D CPU 3.00GHz<br />hw.ncpu: 2<br />hw.machine_arch: amd64</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
Note: 'amd64' does not mean AMD processor, but 64 bit operating system.<br />
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<b><span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;"># </span><code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">dmesg |
grep -i cpu</span></code></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">E.g.1:</span> </span></code></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">CPU: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz (3392.32-MHz 686-class CPU)<br />FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs<br /> cpu0 (BSP): APIC ID: 0<br /> cpu1 (AP): APIC ID: 1<br /> cpu2 (AP): APIC ID: 2<br /> cpu3 (AP): APIC ID: 3<br /> cpu4 (AP): APIC ID: 4<br /> cpu5 (AP): APIC ID: 5<br /> cpu6 (AP): APIC ID: 6<br /> cpu7 (AP): APIC ID: 7<br />cpu0: <acpi cpu=""> on acpi0<br />cpu1: <acpi cpu=""> on acpi0<br />cpu2: <acpi cpu=""> on acpi0<br />cpu3: <acpi cpu=""> on acpi0<br />cpu4: <acpi cpu=""> on acpi0<br />cpu5: <acpi cpu=""> on acpi0<br />cpu6: <acpi cpu=""> on acpi0<br />cpu7: <acpi cpu=""> on acpi0<br />est0: <enhanced control="" frequency="" speedstep=""> on cpu0<br />p4tcc0: <cpu control="" frequency="" thermal=""> on cpu0<br />est1: <enhanced control="" frequency="" speedstep=""> on cpu1<br />p4tcc1: <cpu control="" frequency="" thermal=""> on cpu1<br />est2: <enhanced control="" frequency="" speedstep=""> on cpu2<br />p4tcc2: <cpu control="" frequency="" thermal=""> on cpu2<br />est3: <enhanced control="" frequency="" speedstep=""> on cpu3<br />p4tcc3: <cpu control="" frequency="" thermal=""> on cpu3<br />est4: <enhanced control="" frequency="" speedstep=""> on cpu4<br />p4tcc4: <cpu control="" frequency="" thermal=""> on cpu4<br />est5: <enhanced control="" frequency="" speedstep=""> on cpu5<br />p4tcc5: <cpu control="" frequency="" thermal=""> on cpu5<br />est6: <enhanced control="" frequency="" speedstep=""> on cpu6<br />p4tcc6: <cpu control="" frequency="" thermal=""> on cpu6<br />est7: <enhanced control="" frequency="" speedstep=""> on cpu7<br />p4tcc7: <cpu control="" frequency="" thermal=""> on cpu7<br />SMP: AP CPU #1 Launched!<br />SMP: AP CPU #6 Launched!<br />SMP: AP CPU #3 Launched!<br />SMP: AP CPU #2 Launched!<br />SMP: AP CPU #7 Launched!<br />SMP: AP CPU #4 Launched!<br />SMP: AP CPU #5 Launched!<br /> </cpu></enhanced></cpu></enhanced></cpu></enhanced></cpu></enhanced></cpu></enhanced></cpu></enhanced></cpu></enhanced></cpu></enhanced></acpi></acpi></acpi></acpi></acpi></acpi></acpi></acpi></span></code></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"><span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">E.g.2:</span> </span></code></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">CPU: Intel(R) Pentium(R) D CPU 3.00GHz (3000.17-MHz K8-class CPU)<br />FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs<br /> cpu0 (BSP): APIC ID: 0<br /> cpu1 (AP): APIC ID: 1<br />cpu0: <acpi cpu=""> on acpi0<br />cpu1: <acpi cpu=""> on acpi0<br />est0: <enhanced control="" frequency="" speedstep=""> on cpu0<br />est: CPU supports Enhanced Speedstep, but is not recognized.<br />est: cpu_vendor GenuineIntel, msr f2500000f25<br />p4tcc0: <cpu control="" frequency="" thermal=""> on cpu0<br />est1: <enhanced control="" frequency="" speedstep=""> on cpu1<br />est: CPU supports Enhanced Speedstep, but is not recognized.<br />est: cpu_vendor GenuineIntel, msr f2500000f25<br />p4tcc1: <cpu control="" frequency="" thermal=""> on cpu1<br />SMP: AP CPU #1 Launched!</cpu></enhanced></cpu></enhanced></acpi></acpi></span></code></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"> </span></code></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<b><code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"># grep -i cpu /var/run/dmesg.boot</span></code></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">(Mostly the same output as above) </span></code></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<b><code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;"># sysctl -a | grep -i cpu | less</span></code></b><span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;"></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">kern.ccpu: 0<br /> <cpu count="8" mask="0xff">0, 1, 2, 3, 4, 5, 6, 7</cpu><br /> <cpu count="8" mask="0xff">0, 1, 2, 3, 4, 5, 6, 7</cpu><br /> <cpu count="2" mask="0x3">0, 1</cpu><br /> <cpu count="2" mask="0xc">2, 3</cpu><br /> <cpu count="2" mask="0x30">4, 5</cpu><br /> <cpu count="2" mask="0xc0">6, 7</cpu><br />kern.smp.cpus: 8<br />kern.smp.maxcpus: 32<br />debug.cpufreq.verbose: 0<br />debug.cpufreq.lowest: 0<br />debug.kdb.stop_cpus: 1<br />debug.PMAP1changedcpu: 1866<br />hw.model: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz<br />hw.ncpu: 8<br />hw.acpi.cpu.cx_lowest: C1<br />machdep.hlt_cpus: 0<br />security.jail.param.cpuset.id: 0<br />dev.cpu.0.%desc: ACPI CPU<br />dev.cpu.0.%driver: cpu<br />dev.cpu.0.%location: handle=\_PR_.CPU0<br />dev.cpu.0.%pnpinfo: _HID=none _UID=0<br />dev.cpu.0.%parent: acpi0<br />dev.cpu.0.freq: 3401<br />dev.cpu.0.freq_levels: 3401/95000 3000/79831 2800/72677 2600/65779 2400/59147 2200/52789 2000/46677 1800/40818 1600/35981 1400/31483 1200/26985 1000/22488 800/17990 600/13492 400/8995 200/4497<br />dev.cpu.0.cx_supported: C1/1 C2/80 C3/104<br />dev.cpu.0.cx_lowest: C1<br />dev.cpu.0.cx_usage: 100.00% 0.00% 0.00% last 500us</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">dev.acpi_perf.0.%parent: cpu0<br />dev.est.0.%parent: cpu0</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">dev.cpufreq.0.%driver: cpufreq</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<span style="font-family: "Courier New"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman"; mso-fareast-language: EN-AU;">dev.cpufreq.0.%parent: cpu0<br />dev.p4tcc.0.%desc: CPU Frequency Thermal Control<br />dev.p4tcc.0.%parent: cpu0<br />... (similar outputs for each processor in the system)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;">
<b style="mso-bidi-font-weight: normal;">Note: </b></div>
<br />
<ul>
<li>Some outputs like hw architecture are not correct, do not give actual platform details, and are operating system dependent. For example, 'FreeBSD amd64' is generally installed on Intel i386 based platforms if 64 bit operation is expected.</li>
<li>Similar is the ‘<code><span style="font-size: 10.0pt; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin;">uname
–p’</span></code> command. It returns the OS choice, not the actual hardware platform.
</li>
</ul>
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-58257570502354370452014-08-24T19:30:00.000-07:002014-10-22T01:40:31.439-07:00Unix - Symbolic linksA symbolic link or soft link is very much like a shortcut in Windows. Unlike a hard link, a symbolic link does not contain the data in the target file, and instead points to another file in the system.<br />
<br />
<ul>
<li>Let's create a hard link of new directory as the source file<br />
<tt># mkdir /usr/test</tt><br />
</li>
<br />
<li>Let's create a symbolic link <br />
<tt># ln -s /usr/test/ /test</tt> ( # ln –s sourceFile symbolicLinkFile )<br />
</li>
<br />
<li>
<tt># ls –al /</tt><br />
<tt>…<br />
lrwxr-xr-x 1 root wheel 10 Sep 25 11:18 test -> /usr/test/<br />
…</tt><br />
</li>
<br />
<li>
<tt># touch /usr/test/sample.txt</tt><br />
</li>
<br />
<li>
<tt># ls /test</tt><br />
<tt>sample.txt </tt> <br /><br />
<b>Note:</b> sample.txt IS listed.<br />
</li>
<br />
<li>
<tt># ls -al /test</tt><br />
<tt>lrwxr-xr-x 1 root wheel 10 Sep 25 11:18 /test -> /usr/test/</tt><br /><br />
<b>Note:</b> sample.txt IS NOT listed during detailed listing.<br />
</li>
<br />
<li>
<tt># ls -al /usr/test/<br />
total 6<br />
drwxr-xr-x 2 root wheel 512 Sep 25 11:21 .<br />
drwxr-xr-x 18 root wheel 512 Sep 25 11:18 ..<br />
-rwxr-xr-x 1 root wheel 61 Sep 25 11:22 sample.txt</tt><br />
</li>
<br />
<li>
<tt># touch /test/sample2.txt</tt><br />
</li>
<br />
<li>
<tt># ls -al /test<br />
lrwxr-xr-x 1 root wheel 10 Sep 25 11:18 /test -> /usr/test/</tt><br /><br /><b>
Note:</b> sample2.txt is NOT listed either.<br />
</li>
<br />
<li>
<tt># ls /test<br />
sample.txt sample2.txt</tt><br />
</li>
<br />
<li>
<tt># rm /test</tt><br /><br />
<b>Note:</b> Symbolic link is deleted without any complain about files within directory<br />
</li>
<br />
<li>
<tt># ls /usr/test/<br />
sample.txt sample2.txt</tt><br />
</li>
<br />
<li>
<tt># rm /usr/test<br />
rm: /usr/test: is a directory</tt>
</li>
</ul>
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-91448807718517743082014-06-23T19:56:00.002-07:002014-10-22T01:40:13.445-07:00Unix - Z File System (ZFS)The Z file system (ZFS) developed by Sun Microsystems is a feature rich file system for server solutions. It is designed for high storage volumes, mirror and RAID options for redundancy, data snapshots, integrity checking, and automatic repairs. <br />
<br />
Here are some ZFS troubleshooting commands and typical outputs:<br />
<ul>
<li><b><tt># zpool status</tt></b><br />
<pre> pool: zroot
state: ONLINE
scan: resilvered 30.6M in 0h0m with 0 errors on Sep 16 10:18:02 2013
config:
NAME STATE READ WRITE CKSUM
zroot ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
gpt/disk0 ONLINE 0 0 0
gpt/disk1 ONLINE 0 0 3
errors: No known data errors </pre>
</li>
<br />
<li><b><tt># zpool list</tt></b><br />
<pre>NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
zroot 228G 124G 104G 54% 1.00x ONLINE - </pre>
</li>
<br />
<li><tt><b># zfs list</b></tt> <br />
<pre>NAME USED AVAIL REFER MOUNTPOINT
zroot 31.8G 417G 31K /zroot
zroot/ROOT 3.38G 417G 3.38G /
zroot/scratch 4.94G 417G 4.94G /scratch
zroot/tmp 58.9M 417G 58.9M /tmp
zroot/usr 21.0G 417G 31K /usr
zroot/usr/home 17.9G 417G 17.9G /usr/home
zroot/usr/local 813M 417G 813M /usr/local
zroot/usr/obj 997M 417G 997M /usr/obj
zroot/usr/ports 965M 417G 896M /usr/ports
zroot/usr/ports/distfiles 67.6M 417G 67.6M /usr/ports/distfiles
zroot/usr/ports/packages 1.30M 417G 1.30M /usr/ports/packages
zroot/usr/src 359M 417G 359M /usr/src
zroot/var 2.46G 417G 109M /var
zroot/var/crash 2.15G 417G 2.15G /var/crash
zroot/var/db 206M 417G 204M /var/db
zroot/var/db/pkg 1.90M 417G 1.90M /var/db/pkg
zroot/var/empty 31K 417G 31K /var/empty
zroot/var/log 706K 417G 706K /var/log
zroot/var/mail 59.5K 417G 59.5K /var/mail
zroot/var/run 56.5K 417G 56.5K /var/run
zroot/var/tmp 1.79M 417G 1.79M /var/tmp
</pre>
</li>
<br />
<li><tt><b># ls -l /etc/zfs</b></tt><br />
<pre>total 1
-rw------- 1 root wheel 181 Jun 10 12:59 exports</pre>
</li>
<br />
<li>
<tt><b># ls -l /boot/zfs /boot/zfsboot /boot/zfsloader</b></tt><br />
<pre>-r--r--r-- 1 root wheel 66048 Dec 4 2012 /boot/zfsboot
-r-xr-xr-x 1 root wheel 303104 Oct 16 2013 /boot/zfsloader
/boot/zfs:
total 3
-rw-r--r-- 1 root wheel 1588 Sep 13 2013 zpool.cache</pre>
</li>
<br />
<li>
<tt><b># ls -l /boot/gptboot /boot/gptzfsboot</b></tt><br />
<pre>-r--r--r-- 1 root wheel 16723 Dec 4 2012 /boot/gptboot
-r--r--r-- 1 root wheel 43443 Dec 4 2012 /boot/gptzfsboot</pre>
</li>
</ul>
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-57981509386555513532014-06-12T18:42:00.000-07:002014-10-22T18:04:29.913-07:00Unix - Hardware Timer Selection<ul>
<li>To find the timer counter being used by the computer:
<br />
<br />
<tt>myhost# sysctl kern.timecounter.hardware</tt><br />
<tt>kern.timecounter.hardware: HPET</tt></li>
<br />
<br />
<li>List of available timers:
<br />
<br />
<tt>myhost# sysctl kern.timecounter.choice</tt><br />
<tt>kern.timecounter.choice: TSC(-100) HPET(900)</tt></li>
<br />The integer value within brackets defines the quality of the time counter compared to others. A negative value<span class="Apple-tab-span" style="white-space: pre;"> </span>means this time counter is broken and should not be used.<br /><br /><br />
<li>Selecting the timer of your choice:
<br />
<tt>myhost# sysctl kern.timecounter.hardware=TSC</tt>
<br />
<br />
<b>Note:</b> This selection does not persist after a reboot. To make this change persistent add the following line to the file <tt>/etc/sysctl.conf</tt>: <br />
<tt>sysctl kern.timecounter.hardware=HPET</tt></li>
</ul>
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-70388208912088013432014-05-31T01:03:00.000-07:002014-10-22T18:06:05.546-07:00Network Troubleshooting CommandsThe following are the basic commands that helps to locate network issues. To open the command line interface or consoles:<br />
<span style="color: #0b5394;"><span style="color: black;">* Ubuntu : 'Ctrl + Alt + T' </span></span><br />
<span style="color: #0b5394;">* Windows Systems : 'Window key + R' --> type 'cmd' and click 'OK/Run'</span><br />
<br />
<br />
<b>ifconfig / <span style="color: #0b5394;">ipconfig</span></b><br />
<br />
It is generally the very first to check whether the computer's network interface has got a valid IP address to establish communication with other devices in the network. MAC (physical) address of the network can also be found using these commands.<br />
<br />
On Unix based systems,<br />
<br />
e.g.1: ifconfig ==> Displays all the network interfaces, such as Ethernet and Loopback, MAC addresses, IP addresses, and subnet masks. Depending on the flavour of Unix and type of interface, some additional details such as number of packets transmitted and received, errors, active/disabled status, and size of the maximum transmittable unit (MTU) can also be found.<br />
<br />
e.g.2: ifconfig eth0 down ==> Disables the Ethernet interface 'eth0'. Super user (root) only.<br />
<br />
e.g.3: ifconfig eth0 up ==> Enables the Ethernet interface 'eth0'. Super user (root) only.<br />
<br />
e.g.4: ifconfig eth0 192.168.1.1 netmask 255.255.255.0 ==> Assigns IP address and netmask manually. Super user (root) only.<br />
<br />
<span style="color: #0b5394;">On Windows systems,</span><br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">e.g.1: ipconfig ==> Displays the IP address, netmask, and default gateway of all the network interfaces.</span><br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">e.g.2: ipconfig /all ==> Displays more information about the network interfaces, including MAC address, DHCP status, and DNS servers used.</span><br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">e.g.3: ipconfig /renew ==> Re-establishes TCP/IP connections on all network adapters and refreshes IP address with the DHCP server.</span><br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">e.g.4: ipconfig /flushdns ==> Flushes the DNS cache stored locally (URL to IP address conversion)</span><br />
<br />
<br />
<b>ping</b><br />
<br />
It is the basic command to check network reachability based on echos received from a network interface. It works in both Unix and Windows systems. However, command switches for a given additional option, such continuous ping, may vary.<br />
<br />
On both Unix and Windows based systems, <br />
<br />
e.g.1: ping 127.0.0.1 ==> reveals whether the IP protocol is up on you own computer (localhost). On Unix, continuously sends echo requests until terminated with 'Ctrl + C'. <br />
<br />
e.g.2: ping www.yahoo.com ==> shows whether you can reach yahoo.com's server over the internet<br />
<br />
<span style="color: #0b5394;">On Windows, </span><br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">e.g.1: ping -t www.google.com ==> On windows, continuously sends echo requests until terminated with 'Ctrl + C'. </span><br />
<br />
Note:<br />
<ul>
<li>If no response for a well known server, then ping to the gateway IP addess found from the ifconfig / ipconfig command above. This reveals the connectivity to your network gateway.</li>
<li>When URL is used with the ping command instead of an IP address, and it does not get resolved into an IP address, then the Domain Name System (DNS) resolution could be tested. </li>
</ul>
<br />
<b>traceroute / <span style="color: #0b5394;">tracert</span></b><br />
<br />
A command to identify the hops in the network, and in case of failures the output indicates the intermediate hops which packets travel successfully.<br />
<br />
On Unix based systems, <br />
<br />
e.g.1: traceroute www.yahoo.com ==> Names of hops along the network path and time taken to receive an echo response from them <br />
<br />
<span style="color: #0b5394;">On Windows, </span><br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">e.g.1: tracert www.yahoo.com ==> Names of hops along the network path and time taken to receive an echo response from them </span><br />
<br />
<br />
<b>nslookup</b><br />
<br />
Returns the corresponding IP address for a given URL (also vice-versa).<br />
<br />
On both Unix and Windows based systems,<br />
<br />
e.g.1: nslookup www.yahoo.com <br />
<br />
<br />
<b>netstat </b><br />
<br />
A command to visualize the details of the ongoing network communication.<br />
<br />
On both Unix and Windows based systems,<br />
<br />
e.g.1: netstat ==> Details of all the established TCP connections<br />
<br />
e.g.2: netstat -r ==> The routing table of your computer, including the default route and gateway details.<br />
<br />
<br />
<b>arp</b><br />
<br />
Displays the IP address to MAC address conversion, and vice versa.<br />
<br />
e.g.1: arp -a ==> Displays all the IP addresses and corresponding MAC addresses of the known network interfaces in the local broadcast domain<br />
<br />
<br />
<b>hostname</b><br />
<br />
Gives the name assigned to your computer.<b> </b><br />
<b><br /></b>
e.g.1: hostname ==> Hostname of your system<br />
<br />
<br />
<b>whoami / set U</b><br />
<br />
Reveals the username currently used by you.<br />
<br />
On Unix systems:<br />
<br />
e.g.1: whoami ==> Shows your username (or 'root' in the case of superuser)<br />
<br />
<span style="color: #0b5394;">On Windows systems,</span><br />
<span style="color: #0b5394;"><br /></span>
<span style="color: #0b5394;">e.g.2: set U ==> Shows your username, domain, and user profile location.</span><br />
<br />
<br />Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-14498810681341678932014-04-13T00:01:00.000-07:002017-03-06T15:14:07.500-08:00IPv4 Martian AddressesMartian addresses are the blocks of IPv4 addresses that are reserved for special use by the Internet Assigned Numbers Authority (IANA), and are <b>NOT</b> meant to be reached over the Internet. The following are the IANA reserved category addresses which are generally considered as Martian addresses:<br />
<br />
<table>
<colgroup><col width="180"></col>
<col width="200"></col>
</colgroup><tbody>
<tr>
<td><b>Address block</b></td>
<td><b>Use</b></td>
</tr>
<tr>
<td>0.0.0.0/8</td>
<td>"This" network</td>
</tr>
<tr>
<td>100.64.0.0/10</td>
<td>Carrier-grade NAT</td>
</tr>
<tr>
<td>127.0.0.0/8</td>
<td>Loopback</td>
</tr>
<tr>
<td>169.254.0.0/16</td>
<td>Link local</td>
</tr>
<tr>
<td>192.0.0.0/24</td>
<td>IETF protocol assignments</td>
</tr>
<tr>
<td>192.0.2.0/24</td>
<td>TEST-NET-1</td>
</tr>
<tr>
<td>198.18.0.0/15</td>
<td>Network interconnect device benchmark testing</td>
</tr>
<tr>
<td>198.51.100.0/24</td>
<td>TEST-NET-2</td>
</tr>
<tr>
<td>203.0.113.0/24</td>
<td>TEST-NET-3</td>
</tr>
<tr>
<td>224.0.0.0/4</td>
<td>Multicast</td>
</tr>
<tr>
<td>240.0.0.0/4</td>
<td>Reserved for future use</td>
</tr>
</tbody></table>
<br />
Depending on the manufacturer of routers used at the customer premises or at the network service providers end these Martian addresses may also be blocked within Layer 3 Virtual Private Networks (IP VPNs) or Local Area Networks (LANs). E.g., Juniper Network routers block Martian addresses within IP VPNs.<br />
<br />
<b>Private Network IP Address Blocks</b> <br />
<br />
IP address blocks that are dedicated for private LANs are also included within the Martian Address blocks according to some definitions.<br />
<br />
<table>
<colgroup><col width="180"></col>
<col width="300"></col>
</colgroup><tbody>
<tr>
<td><b>Subnet Address block</b></td>
<td><b>Use</b></td>
</tr>
<tr>
<td>10.0.0.0/8</td>
<td>Class A private networks (used as /8 subnets)</td>
</tr>
<tr>
<td>172.16.0.0/12</td>
<td>Class B private networks (used as /16 subnets)</td>
</tr>
<tr>
<td>192.168.0.0/16</td>
<td>Class C private networks (used as /24 subnets)</td>
</tr>
</tbody></table>
<br />
<b>Bogon IP Address Blocks</b><br />
<br />
IP address blocks that are yet to be allocated to any user or delegated to any regulator agency by the IANA are called Bogon IP addresses. These blocks change with time. Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-62603953567375874502014-04-10T18:54:00.000-07:002017-03-06T15:03:34.756-08:00Unix - SSH/SCP<ul>
<li>Check SSH server running:<br />
<pre># cat /etc/rc.conf | grep ssh
sshd_enable="YES"</pre>
</li>
<br />
<li>SSH access to a remote machine:<br />
<pre>#/$ ssh username@remoteMachine</pre>
<br />
'remoteMachine' is the DNS resolvable hostname of the remote host. IP address can also be used instead of the remote machine's hostname.
</li>
<br />
<li>Securely transfer file over SSH:<br />
<pre>#/$ scp -q -C -l 80000 username@remoteMachine:/home/username/test.txt \</pre>
<pre>/home/username/. </pre>
</li>
<br />
<li>Enable root access over SSH (only if it is essential):<br />
<pre># vi /etc/ssh/sshd_config
PermitRootLogin yes
# service sshd restart (or, # /etc/rc.d/sshd restart) </pre>
</li>
<br />
<li>Generate and copy SSH keys:<br />
<pre>#/$ cd ~
#/$ ssh-keygen -t rsa
#/$ scp ~/.ssh/id_rsa.pub remoteMachine:.ssh/authorized_keys </pre>
<br />
'RSA' is used here as authentication mechanism. Similarly 'DSA' can also be used.
</li>
<br />
<li>Verify whether SSH key is working:<br />
<pre>#/$ ssh remoteMachine hostname</pre>
<br />
Displays remote machine's hostname without a password prompt.</li>
<br />
<li>Monitoring/tracing SSH/SCP activities:<br />
<pre># cat /var/log/auth.log</pre>
Displays detailed log.</li>
</ul>
<br />
<br />
<b>Note</b>: Unix commands and file locations used here have been tested on FreeBSD systems. Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-44930882089989648272014-04-08T01:01:00.001-07:002017-03-06T14:57:30.240-08:00Crimping an Ethernet LAN cable<b>Steps:</b>
<br />
<ol>
<li>Insert the cat 5e/6 cable into the boot/cap. </li>
<li>Remove approximately 1 inch of the sleeve of the wire.</li>
<li>Straighten the wires (ie, untwist the twisted pairs).</li>
<li>Arrange the wires in the right order as shown below. Choose either (EIA/TIA 568) A or B type, and if it is a straight cable follow the colour sequence of the first image on both the ends of the cable.</li>
<li>Cutoff excess length of the wire (to make it levelled inside the RJ-45 clip). </li>
<li>Insert the wire into the RJ-45 clip while maintaining the order of the wires all the way in until you can see all the wires touching on the right side wall of the clip as shown by the red line (ie, you have to insert the beyond the end of arrows shown here.)</li>
<li>Crimp the RJ-45 clip firmly with the crimping tool. </li>
<li>Fix the boot.</li>
</ol>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQJTW_Gb8dkaMW4ozFEkRH-8Rcyy9xdYfw-LZ7CUxvQudUMIakrUyLtZVMFcj2OvQymxS3VD_bDyMatx4PxvasIe1tRVPNoyZ7pBuE5kJ6p277tXyJ21eiJA_8eDl2lX12bJrHCPPGneH/s1600/Cat5ColourCodes568A.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQJTW_Gb8dkaMW4ozFEkRH-8Rcyy9xdYfw-LZ7CUxvQudUMIakrUyLtZVMFcj2OvQymxS3VD_bDyMatx4PxvasIe1tRVPNoyZ7pBuE5kJ6p277tXyJ21eiJA_8eDl2lX12bJrHCPPGneH/s1600/Cat5ColourCodes568A.png" width="400" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinsBFnmvlslJBvrw_DHOP_I3epc_kJjNHx2znzez-5X2CCTtw_1FK4Y72mnbuThOVHOJSbgxDIwhpDGPT8nWFDKCFcA_SGhXTEkC9uX47pGKqORn7zYCcbiBEP7EqxxC-5edPJJPj6UA2X/s1600/Cat5ColourCodes568B.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="110" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinsBFnmvlslJBvrw_DHOP_I3epc_kJjNHx2znzez-5X2CCTtw_1FK4Y72mnbuThOVHOJSbgxDIwhpDGPT8nWFDKCFcA_SGhXTEkC9uX47pGKqORn7zYCcbiBEP7EqxxC-5edPJJPj6UA2X/s1600/Cat5ColourCodes568B.png" width="400" /></a></div>
<br />Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-16394766214414387722014-03-22T20:12:00.000-07:002014-10-22T18:07:51.036-07:00Unix - Memory and Disk Usages<ul>
<li><b>Statistics of process, virtual memory, disk, trap and cpu activity:</b><br /><br />
<b><tt># vmstat -m</tt></b><br /><br />
<pre> Type InUse MemUse HighUse Requests Size(s)
USBdev 32 3K - 50 32,64,128,256,2048
USB 56 18K - 95 16,32,64,128,512,2048,4096
isadev 10 1K - 10 64
ppbusdev 3 1K - 3 128
cdev 7 1K - 7 128
entropy 1024 64K - 1024 64
sigio 1 1K - 1 32
filedesc 46 12K - 291905 16,32,256,512,2048
kdtrace 248 54K - 273670 64,256
kenv 83 7K - 92 16,32,64,128,4096
...
</pre>
</li>
<br />
<li><b>Swap memory usage</b><br /><br />
<b><tt># swapinfo</tt></b><br /><br />
<pre>Device 1K-blocks Used Avail Capacity
/dev/ada0p3 4194304 424 4193880 0%</pre>
</li>
<br />
<li><b>Top processes on the system</b><br /><br />
<b><tt># top -d1</tt></b><br /><br />
<pre>last pid: 73598; load averages: 0.00, 0.00, 0.00
26 processes: 1 running, 25 sleeping
CPU: % user, % nice, % system, % interrupt, % idle
Mem: 114M Active, 1683M Inact, 234M Wired, 121M Cache, 91M Buf, 843M Free
Swap: 4096M Total, 424K Used, 4095M Free
PID USER THR PRI NICE SIZE RES STATE C TIME WCPU COMMAND
1130 root 1 20 0 11296K 2944K select 0 0:39 0.00% sendmail
1137 root 1 20 0 9584K 1380K nanslp 0 0:10 0.00% cron
1003 root 1 20 0 9544K 1300K select 1 0:05 0.00% syslogd
70226 vijay 1 20 0 15852K 4200K select 1 0:03 0.00% sshd
70186 root 1 20 0 15852K 3992K select 0 0:03 0.00% sshd
928 root 1 29 0 9544K 1364K select 0 0:02 0.00% dhclient
966 _dhcp 1 20 0 9544K 1408K select 1 0:01 0.00% dhclient
813 root 1 20 0 12132K 2868K select 1 0:01 0.00% devd
1133 smmsp 1 20 0 11296K 2816K pause 1 0:01 0.00% sendmail
71182 root 1 20 0 11256K 2940K select 1 0:01 0.00% ntpd
70223 root 1 20 0 15852K 4056K select 1 0:00 0.00% sshd
1127 root 1 20 0 13096K 3148K select 1 0:00 0.00% sshd
70189 root 1 20 0 10864K 3188K pause 0 0:00 0.00% csh
1183 root 1 20 -4 10092K 1868K ttyin 1 0:00 0.00% login
73598 root 1 20 0 9872K 2008K CPU1 1 0:00 0.00% top
1185 root 1 52 0 9544K 1240K ttyin 1 0:00 0.00% getty
1187 root 1 52 0 9544K 1240K ttyin 1 0:00 0.00% getty
1189 root 1 52 0 9544K 1240K ttyin 0 0:00 0.00% getty
1188 root 1 52 0 9544K 1240K ttyin 0 0:00 0.00% getty
...
</pre>
</li>
<br />
<li><b>Finding size of folders (total size of files and subfolders underneath)</b><br /><br />
<ul>
<li><tt># du –sh myfolder</tt></li>
<br />
<li><tt># du –sh * </tt> => Size of all the folders in the current directory</li>
<br />
<li><tt># du –sk | sort –n </tt> => Size of folders, sorted by size (k kilo byte. h gives false sorting results)</li>
<br />
</ul>
</li>
</ul>
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-22031770524432230852014-02-15T20:52:00.000-08:002014-05-05T19:41:49.828-07:00IPv4 Address ClassesThough Classless Inter-Domain Routing (CIDR) and Variable-Length Subnet Mask (VLSM) are the order of today's IPv4 networking, classification of IPv4 address spaces into classes A, B, C, or D remains common. The following table shows the classes that were designated during the days of classful routing:<br />
<br />
<table>
<tbody>
</tbody><colgroup><col width="70"></col>
<col width="70"></col><col width="210"></col><col width="140"></col>
</colgroup>
<tbody>
<tr>
<td><b>Class</b></td>
<td><b>First bits</b></td>
<td><b>Address range</b></td>
<td><b>Subnet mask</b></td>
</tr>
<tr>
<td>Class A</td>
<td>0</td>
<td>1.x.x.x ~ 127.x.x.x</td>
<td>255.0.0.0 (/8)</td>
</tr>
<tr>
<td>Class B</td>
<td>10</td>
<td>128.0.x.x ~ 191.255.x.x</td>
<td>255.255.0.0 (/16)</td>
</tr>
<tr>
<td>Class C</td>
<td>110</td>
<td>192.0.0.x ~ 223.255.255.x</td>
<td>255.255.255.0 (/24)</td>
</tr>
<tr>
<td>Class D</td>
<td>1110</td>
<td>224.0.0.0 ~ 239.255.255.255</td>
<td>-</td>
</tr>
<tr>
<td>Class E</td>
<td>1111</td>
<td>240.0.0.0 ~ 255.255.255.254</td>
<td>-</td>
</tr>
</tbody></table>
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-25272408222135244702014-01-04T19:17:00.000-08:002017-03-06T15:02:03.331-08:00Unix - Disk Management<h1>
Identifying the harddisks installed</h1>
<ul>
<li>Listing all the disks and drives attached to the system<br /><br />
<pre><b># camcontrol devlist</b> (or, atacontrol list)
at scbus2 target 0 lun 0 (ada0,pass0)
at scbus3 target 0 lun 0 (cd0,pass1)</pre>
</li>
<br />
<li>Listing harddisks detected during the system bootup<br /><br />
<pre><b># dmesg | grep ad </b>
ada0 at ata4 bus 0 scbus2 target 0 lun 0
ada0: <wdc 01.03e01="" wd2500aajs-75m0a0=""> ATA-8 SATA 2.x device
ada0: 300.000MB/s transfers (SATA 2.x, UDMA5, PIO 8192bytes)
ada0: 238418MB (488281250 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad4
Trying to mount root from ufs:/dev/ada0p2 [rw]...</wdc></pre>
</li>
<br />
<li>Listing harddisks and their partitions<br /><br />
<pre><b># ls /dev | grep ad</b>
ad4
ad4p1
ad4p2
ad4p3
ada0
ada0p1
ada0p2
ada0p3</pre>
</li>
<br />
<li>Listing hardware level information of a harddisks<br /><br />
<pre><b># diskinfo -c ada0</b>
ada0
512 # sectorsize
250000000000 # mediasize in bytes (232G)
488281250 # mediasize in sectors
0 # stripesize
0 # stripeoffset
484406 # Cylinders according to firmware.
16 # Heads according to firmware.
63 # Sectors according to firmware.
WD-WMAV12345678 # Disk ident.
I/O command overhead:
time to read 10MB block 0.124816 sec = 0.006 msec/sector
time to read 20480 sectors 2.126440 sec = 0.104 msec/sector
calculated command overhead = 0.098 msec/sector
</pre>
</li>
<br />
<li><b><tt>#fdisk ada0</tt></b><br /><br />
<pre>******* Working on device /dev/ada0 *******
parameters extracted from in-core disklabel are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)
Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)
Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 238 (0xee),(EFI GPT)
start 1, size 488397167 (238475 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 1023/ head 255/ sector 63
<unused><unused></unused></unused></pre>
</li>
</ul>
<br />
<h1>
Identifying the harddisk partitions</h1>
<ul>
<li>Identifying basic information about harddisk partitions<br /><br />
<pre><b># gpart show</b>
=> 34 488281183 ada0 GPT (232G)
34 128 1 freebsd-boot (64k)
162 478150528 2 freebsd-ufs (228G)
478150690 8388608 3 freebsd-swap (4.0G)
486539298 1741919 - free - (850M)
</pre>
</li>
<br />
<li>Displaying detailed information of harddisk partitions<br /><br />
<pre><b># gpart list</b>
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 488281216
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
Mediasize: 65536 (64k)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r0w0e0
rawuuid: 740aff84-9a1e-11e3-b778-002219173177
rawtype: 83bd6b9d-7f41-11dc-be0b-001560b84f0f
label: (null)
length: 65536
offset: 17408
type: freebsd-boot
index: 1
end: 161
start: 34
2. Name: ada0p2
Mediasize: 244813070336 (228G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 82944
Mode: r1w1e1
rawuuid: 740b80b0-9a1e-11e3-b778-002219173177
rawtype: 516e7cb6-6ecf-11d6-8ff8-00022d09712b
label: (null)
length: 244813070336
offset: 82944
type: freebsd-ufs
index: 2
end: 478150689
start: 162
3. Name: ada0p3
Mediasize: 4294967296 (4.0G)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 17408
Mode: r1w1e0
rawuuid: 740eaebd-9a1e-11e3-b778-002219173177
rawtype: 516e7cb5-6ecf-11d6-8ff8-00022d09712b
label: (null)
length: 4294967296
offset: 244813153280
type: freebsd-swap
index: 3
end: 486539297
start: 478150690
Consumers:
1. Name: ada0
Mediasize: 250000000000 (232G)
Sectorsize: 512
Mode: r2w2e3
</pre>
</li>
<br />
<li><pre><b>df -h</b>
Filesystem Size Used Avail Capacity Mounted on
/dev/ada0p2 220G 7.6G 195G 4% /
devfs 1.0k 1.0k 0B 100% /dev
nfsServer:/home 435G 15G 420G 3% /usr/home
</pre>
</li>
</ul>
<h1>
Mounting and unmounting external drives</h1>
For a USB memory stick,<br />
<ul>
<li><tt># mount -t msdosfs /dev/da0<span style="color: #cc0000;"><b>s1</b></span> /tmp/usb</tt></li>
<li><tt># umount /tmp/usb</tt></li>
</ul>
While inserting a USB memory stick, a notification on the console will indicate the new device location like <tt>/dev/da0</tt>. But, you have to find the active partition of the drive like <tt>/dev/da0<span style="color: #cc0000;"><b>s1</b></span></tt> to mount (<tt># ls /dev | grep da </tt> could be used). <br />
<br />
<br />
<b>Note:</b> Unix commands and file locations used here have been tested on FreeBSD systems.
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-67225139084499157622013-12-28T19:46:00.000-08:002017-03-06T15:00:19.463-08:00Unix - File Access Rights and Ownerships<h2>
File Attributes</h2>
<pre>#/$ ls -l /tmp
drwxr-xr-x 4 vijay wheel 10 Apr 16 2010 testFolder
-rw-r--r-- 2 vijay wheel 368884 Feb 13 2012 news.txt
-rwx------ 2 vijay wheel 2687 Feb 13 2012 secret.txt
-rwxr-xr-x 2 vijay wheel 11762 Nov 10 2011 code.c
</pre>
<br />
<h3>
Symbolic permissions</h3>
<br />
<table>
<tbody>
<tr>
<td><b>Option</b></td>
<td><b> Letter</b></td>
<td><b> Represents</b></td>
</tr>
<tr>
<td>(who)</td>
<td> u</td>
<td> User</td>
</tr>
<tr>
<td>(who)</td>
<td> g</td>
<td> Group owner</td>
</tr>
<tr>
<td>(who)</td>
<td> o</td>
<td> Other</td>
</tr>
<tr>
<td>(who)</td>
<td> a</td>
<td> All (“world”)</td>
</tr>
<tr>
<td>(action)</td>
<td> +</td>
<td> Adding permissions</td>
</tr>
<tr>
<td>(action)</td>
<td> -</td>
<td> Removing permissions</td>
</tr>
<tr>
<td>(action)</td>
<td> =</td>
<td> Explicitly set permissions</td>
</tr>
<tr>
<td>(permissions)</td>
<td> r</td>
<td> Read</td>
</tr>
<tr>
<td>(permissions)</td>
<td> w</td>
<td> Write</td>
</tr>
<tr>
<td>(permissions)</td>
<td> x</td>
<td> Execute</td>
</tr>
<tr>
<td>(permissions)</td>
<td> t</td>
<td> Sticky bit</td>
</tr>
<tr>
<td>(permissions)</td>
<td> s</td>
<td> Set UID or GID</td>
</tr>
</tbody></table>
<br />
To modify the access rights, modify the file attributes.<br />
<table>
<tbody>
<tr>
<td><tt># chmod 777 testfile</tt></td>
<td> Allows access by File Owner, Group Members, and All-other-users.</td>
</tr>
<tr>
<td><tt># chmod <span style="color: blue;">–R</span> 755 /tmp/test/</tt></td>
<td> <span style="color: blue;">-R</span> affects access rights all the files and sub-folders in <tt>/tmp/test/</tt></td>
</tr>
<tr>
<td><tt># chmod go= testfile</tt></td>
<td> Symbolic permission (who) (action) (permissions)</td>
</tr>
<tr>
<td><tt># chmod go-w,a+x testfile</tt></td>
<td></td>
</tr>
</tbody></table>
<br />
<h2>
Extended file attributes</h2>
<pre># getfacl testfile
# setfacl -k testfile
# setfacl -m u:trhodes:rwx,group:web:r--,o::--- testfile
</pre>
<br />
<h3>
setuid (4), setgid (2), and sticky (1) permissions</h3>
<tt># chmod 4755 testfile </tt> <br />
=> File will always use permissions and the same user ID of who assigned it)<br />
<tt>-rw<span style="color: blue;"><b>s</b></span>r-xr-x</tt> (x of owner is replaced with <span style="color: blue;">s</span>) <br />
<br />
<tt># chmod 2755 testfile </tt> <br />
=> File will always use permissions of the group (of the group to assigner belongs)<br />
<tt>-rwxr-<span style="color: blue;"><b>s</b></span>r-x</tt> (x of group is replaced with <span style="color: blue;"><b>s</b></span>) <br />
<br />
<tt># chmod 1777 testdir </tt><br />
=> Allows file deletion only by the owner (make sense for directories) <br />
<tt>drwxrwxrw<span style="color: blue;"><b>t</b></span></tt> (x of all-users is replaced with <b><span style="color: blue;">t</span></b>)<br />
<br />
<br />
<h2>
File flags (FreeBSD specific)</h2>
File flags are used to prevent accidental editing/removal of files (non-directory) by the root and/or the file owners in FreeBSD.<br />
<br />
To view them:
<br />
<pre># ls -lo /etc | grep rc.conf
-rw-r--r-- 1 root wheel schg 1897 Mar 1 2012 rc.conf
</pre>
<br />
In the above case, the secret tool 'schg' makes the file <tt>rc.conf</tt> unmodifiable even by the superuser (root) without removing the flag. This feature provides one additional level of protection for important files from accidental modifications by the system administrator(s).<br />
<br />
<h3>
Super user (root) only assignable flags</h3>
<ul>
<li><b>sappnd, sappend :</b> sets the system append-only flag (by super-user only)</li>
<li><b>sunlnk, sunlink :</b> sets the system undeletable flag (by super-user only)</li>
<li><b>schg, schange, simmutable :</b> sets the system immutable flag (by super-user only)</li>
</ul>
<br />
<h3>
Normal user assignable flags</h3>
<ul>
<li><b>uappnd, uappend :</b> sets the user append-only flag (by owner or super-user only)</li>
<li><b>uunlnk, uunlink :</b> sets the user undeletable flag (by owner or super-user only)</li>
<li><b>uchg, uchange, uimmutable :</b> sets the user immutable flag (by owner or super-user only)</li>
</ul>
<br />
To edit these flags <tt>chflags</tt> command is used. For example:
<br />
<pre># chflags sunlink testfile => Undeletable
# chflags nosunlink testfile
# chflags schg httpd.conf => System immutable (no change) flag
# chflags noschg httpd.conf
</pre>
<br />
<h2>
File Ownership </h2>
To change the file ownership:<br />
<tt># chown –R vijay:wheel * </tt>
<br />
<br />
<b>Note</b>: Unix commands and file locations used here have been tested on FreeBSD systems.
Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0tag:blogger.com,1999:blog-7606074279841056215.post-47607371495058701282013-09-11T22:32:00.000-07:002014-06-12T22:44:15.701-07:00Unix - DHCPAfter addition of a new network interface card (NIC) in a DHCP client and/or changing cable from one port to another, client might not establish the network connectivity. In such cases first check whether the active NIC's MAC address is there on DHCP server's database. If it is not there then add the MAC address and restart the server. If the problem persists, refresh the DHCP client as below:<br />
<br />
<tt># service netif restart</tt><br />
<br />
<tt># dhclient eth1</tt><br />
<br />
<br />Vijayhttp://www.blogger.com/profile/04927545958764162877noreply@blogger.com0