⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch2_tun.htm

📁 Debian中文参考手册,系统介绍了Debian系统
💻 HTM
📖 第 1 页 / 共 5 页
字号:
</div><a id="CHEGIDAE" name="CHEGIDAE"></a>
<br /><strong><font face="arial, helvetica, sans-serif">sar <a id="sthref285" name="sthref285"></a><a id="sthref286" name="sthref286"></a>
</font></strong><br />
<p>Use the <code>sar</code> command to display cumulative activity counters in the operating system, depending on the switches that you supply with the command. The following command displays a summary of I&#047;O activity ten times, at ten-second intervals:
</p>
<pre>&#036; sar -b 10 10

</pre>
<p>The following example shows sample output from the command on Solaris:
</p>
<pre>13:32:45 bread&#047;s lread&#047;s &#037;rcache bwrit&#047;s lwrit&#047;s &#037;wcache pread&#047;s pwrit&#047;s
13:32:55       0      14     100       3      10      69       0       0
13:33:05       0      12     100       4       4       5       0       0
13:33:15       0       1     100       0       0       0       0       0
13:33:25       0       1     100       0       0       0       0       0
13:33:35       0      17     100       5       6       7       0       0
13:33:45       0       1     100       0       0       0       0       0
13:33:55       0       9     100       2       8      80       0       0
13:34:05       0      10     100       4       4       5       0       0
13:34:15       0       7     100       2       2       0       0       0
13:34:25       0       0     100       0       0     100       0       0

Average        0       7     100       2       4      41       0       0

</pre>
<div align="center">
<br /><table summary="This is a layout table to format a note" title="This is a layout table to format a note" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>Note:</strong>
</font>
</p>On Tru64 systems, the <code>sar</code> command is available in the UNIX SVID2 compatibility subset, OSFSVID2400.
</td>
</tr></tbody>
</table><br />
</div><a id="CHEHHDEG" name="CHEHHDEG"></a>
<br /><strong><font face="arial, helvetica, sans-serif">iostat <a id="sthref287" name="sthref287"></a><a id="sthref288" name="sthref288"></a>
</font></strong><br />
<p>Use the <code>iostat</code> command to view terminal and disk activity, depending on the switches you supply with the command. The output from the <code>iostat</code> command does not include disk request queues, but it shows which disks are busy. This information is valuable when you must balance I&#047;O loads.
</p>
<p>The following command displays terminal and disk activity five times, at five-second intervals:
</p>
<pre>&#036; iostat 5 5

</pre>
<p>The following example shows sample output from the command on Solaris:
</p>
<pre>tty          fd0           sd0           sd1           sd3          cpu
 tin tout Kps tps serv  Kps tps serv  Kps tps serv  Kps tps serv  us sy wt id
   0    1   0   0    0    0   0   31    0   0   18    3   0   42   0  0  0 99
   0   16   0   0    0    0   0    0    0   0    0    1   0   14   0  0  0 100
   0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
   0   16   0   0    0    0   0    0    0   0    0    0   0    0   0  0  0 100
   0   16   0   0    0    0   0    0    2   0   14   12   2   47   0  0  1 98

</pre>
<p>Use the <code>iostat</code> command to look for large disk request queues. A request queue shows how long the I&#047;O requests on a particular disk device must wait to be serviced. Request queues are caused by a high volume of I&#047;O requests to that disk or by I&#047;O with long average seek times. Ideally, disk request queues should be at or near zero.
</p><a id="CHEFADHA" name="CHEFADHA"></a>
<br /><strong><font face="arial, helvetica, sans-serif">swap, <a id="sthref289" name="sthref289"></a><a id="sthref290" name="sthref290"></a>swapinfo, <a id="sthref291" name="sthref291"></a><a id="sthref292" name="sthref292"></a>swapon, and <a id="sthref293" name="sthref293"></a><a id="sthref294" name="sthref294"></a>lsps <a id="sthref295" name="sthref295"></a><a id="sthref296" name="sthref296"></a>
</font></strong><br />
<p>Use the <code>swap</code>, <code>swapinfo</code>, <code>swapon,</code> or <code>lsps</code> command to report information on swap space usage. A shortage of swap space can prevent processes from spawning, cause slow response times, or cause the system to stop responding. The following table lists the appropriate command to use for each platform:
</p>
<table title="Swap, Swapinfo, swapon, and lsps commands" summary="This table lists the appropriate command to use for your platform." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>
<tr align="left" valign="top">
<th id="r1c1" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Platform
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Command
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1">AIX
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1"><code>lsps -a</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1">HP
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1"><code>swapinfo -m</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r4c1" headers="r1c1" align="left" colspan="1" rowspan="1">Linux
</td>
<td headers="r4c1 r1c2" align="left" colspan="1" rowspan="1"><code>swapon -s</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r5c1" headers="r1c1" align="left" colspan="1" rowspan="1">Solaris
</td>
<td headers="r5c1 r1c2" align="left" colspan="1" rowspan="1"><code>swap -l</code>
</td>
</tr>
<tr align="left" valign="top">
<td id="r6c1" headers="r1c1" align="left" colspan="1" rowspan="1">Tru64
</td>
<td headers="r6c1 r1c2" align="left" colspan="1" rowspan="1"><code>swapon -s</code>
</td>
</tr></tbody>
</table>
<p>The following example shows sample output from the <code>swap -l</code> command on Solaris:
</p>
<pre>swapfile             dev        swaplo blocks   free
&#047;dev&#047;dsk&#047;c0t3d0s1    32,25      8 197592        162136

</pre>
</div class="sect2"><a id="i18961" name="i18961"></a>
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref297" name="sthref297"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Linux Tools
</font>
</h3>
<p>On Linux systems, use the <code><a id="sthref298" name="sthref298"></a><a id="sthref299" name="sthref299"></a>free</code> command to view information on swap space, memory, and buffer usage. A shortage of swap space can prevent processes from spawning, cause slow response times, or cause the system to stop responding.
</p>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref300" name="sthref300"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
Solaris Tools
</font>
</h3>
<p>On Solaris systems, use the <code><a id="sthref301" name="sthref301"></a><a id="sthref302" name="sthref302"></a>mpstat</code> command to view statistics for each processor in a multiprocessor system. Each row of the table represents the activity of one processor. The first row summarizes all activity since the last system reboot; each subsequent row summarizes activity for the preceding interval. All values are events per second unless otherwise noted. The arguments are for time intervals between statistics and number of iterations. The following example shows sample output from the <code>mpstat</code> command:
</p>
<pre>CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
  0    0   0    1    71   21   23    0    0    0    0    55    0   0   0  99
  2    0   0    1    71   21   22    0    0    0    0    54    0   0   0  99
CPU minf mjf xcal  intr ithr  csw icsw migr smtx  srw syscl  usr sys  wt idl
  0    0   0    0    61   16   25    0    0    0    0    57    0   0   0 100
  2    1   0    0    72   16   24    0    0    0    0    59    0   0   0 100

</pre>
</div class="sect2">
<div class="sect2">
<!--
infolevel=all
infotype=general
--><a id="sthref303" name="sthref303"></a>
<h3>
<font face="arial, helvetica, sans-serif" color="#330099">
AIX Tools
</font>
</h3>
<p>The following sections list tools available on AIX systems. 
</p>
<div align="center">
<br /><table summary="This is a layout table to format a tip" title="This is a layout table to format a tip" dir="ltr" border="1" width="80%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"><tbody>
<tr>
<td align="left" colspan="1" rowspan="1">
<p>
<font face="arial, helvetica, sans-serif">
<strong>See Also:</strong>
</font>
</p>The AIX operating system documentation and man pages for more information on these tools.
</td>
</tr></tbody>
</table><br />
</div>
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref304" name="sthref304"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
<a id="sthref305" name="sthref305"></a>AIX System Management Interface Tool
</font>
</h4>
<p>The AIX System Management Interface Tool (SMIT) provides a menu-driven interface to various system administrative and performance tools. Using SMIT, you can navigate through large numbers of tools and focus on the jobs you want to execute.
</p>
</div class="sect3">
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref306" name="sthref306"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
Base Operation System Tools
</font>
</h4>
<p>The AIX Base Operation System (BOS) contains performance tools that are historically part of UNIX systems or are required to manage the implementation-specific features of AIX. The following table lists the most important BOS tools:
</p>
<table title="AIX Base Operation System Tools" summary="This table describes the AIX base operation system tools." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>
<tr align="left" valign="top">
<th id="r1c1" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Tool
</strong></font></th>
<th id="r1c2" align="left" colspan="1" rowspan="1" valign="bottom">
<font face="Arial, Helvetica, sans-serif">
<strong>Description
</strong></font></th>
</tr>
</thead><tbody>
<tr align="left" valign="top">
<td id="r2c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>lsattr</code>
</td>
<td headers="r2c1 r1c2" align="left" colspan="1" rowspan="1">Displays the attributes of devices
</td>
</tr>
<tr align="left" valign="top">
<td id="r3c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>lslv</code>
</td>
<td headers="r3c1 r1c2" align="left" colspan="1" rowspan="1">Displays information about a logical volume or the logical volume allocations of a physical volume
</td>
</tr>
<tr align="left" valign="top">
<td id="r4c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>netstat</code>
</td>
<td headers="r4c1 r1c2" align="left" colspan="1" rowspan="1">Displays the contents of network-related data structures
</td>
</tr>
<tr align="left" valign="top">
<td id="r5c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>nfsstat</code>
</td>
<td headers="r5c1 r1c2" align="left" colspan="1" rowspan="1">Displays statistics about Network File System (NFS) and 		Remote Procedure Call (RPC) activity
</td>
</tr>
<tr align="left" valign="top">
<td id="r6c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>nice</code>
</td>
<td headers="r6c1 r1c2" align="left" colspan="1" rowspan="1">Changes the initial priority of a process
</td>
</tr>
<tr align="left" valign="top">
<td id="r7c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>no</code>
</td>
<td headers="r7c1 r1c2" align="left" colspan="1" rowspan="1">Displays or sets network options
</td>
</tr>
<tr align="left" valign="top">
<td id="r8c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>ps</code>
</td>
<td headers="r8c1 r1c2" align="left" colspan="1" rowspan="1">Displays the status of one or more processes
</td>
</tr>
<tr align="left" valign="top">
<td id="r9c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>reorgvg</code>
</td>
<td headers="r9c1 r1c2" align="left" colspan="1" rowspan="1">Reorganizes the physical-partition allocation within a volume group
</td>
</tr>
<tr align="left" valign="top">
<td id="r10c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>time</code>
</td>
<td headers="r10c1 r1c2" align="left" colspan="1" rowspan="1">Displays the elapsed execution, user CPU processing, and system CPU processing time
</td>
</tr>
<tr align="left" valign="top">
<td id="r11c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>trace</code>
</td>
<td headers="r11c1 r1c2" align="left" colspan="1" rowspan="1">Records and reports selected system events
</td>
</tr>
<tr align="left" valign="top">
<td id="r12c1" headers="r1c1" align="left" colspan="1" rowspan="1"><code>vmtune</code>
</td>
<td headers="r12c1 r1c2" align="left" colspan="1" rowspan="1">Changes the operational parameters of the Virtual Memory Manager and other AIX components
</td>
</tr></tbody>
</table>
</div class="sect3">
<div class="sect3">
<!--
infolevel=all
infotype=general
--><a id="sthref307" name="sthref307"></a>
<h4>
<font face="arial, helvetica, sans-serif" color="#330099">
AIX Performance Toolbox
</font>
</h4>
<p>The AIX Performance Toolbox (PTX) contains tools for monitoring and tuning system activity locally and remotely. PTX consists of two main components, the <a id="sthref308" name="sthref308"></a><a id="sthref309" name="sthref309"></a>PTX Manager and the <a id="sthref310" name="sthref310"></a>PT<a id="sthref311" name="sthref311"></a><a id="sthref312" name="sthref312"></a>X Agent. The PTX Manager collects and displays data from various systems in the configuration by using the <code>xmperf</code> utility. The PTX Agent collects and transmits data to the PTX Manager by using the <code>xmserd</code> utility. The PTX Agent is also available as a separate product called Performance Aide for AIX. 
</p>
<p>Both PTX and Performance Aide include the following monitoring and tuning tools: 
</p>
<table title="AIX Performance Tools" summary="This table describes the AIX monitoring and tuning tools." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0">
<thead>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -