<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>System Hardware (系统硬件) &#8211; Eternal Center</title>
	<atom:link href="https://eternalcenter-sep-2022.github.io/category/system/system-computer-system-hardware-system-installation-system-upgradation/system-hardware/feed/" rel="self" type="application/rss+xml" />
	<link>https://eternalcenter-sep-2022.github.io/</link>
	<description></description>
	<lastBuildDate>Thu, 01 Sep 2022 06:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>[步骤] Wake On Lan （WOL） 功能的开启 （ Rocky Linux &#038; RHEL 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/wol-rocky-linux-rhel/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sun, 31 Jul 2022 15:01:21 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=27458</guid>

					<description><![CDATA[步骤一：在 BIOS 开启 Wake On Lan （WOL） 功能 （步骤略） 步骤二：在系统开启 Wake On Lan （WOL） 功能 2.1 确保 net-tools 已经安装 2.2 查看网卡的 Wake On Lan （WOL） 功能状态 2.2.1 Wake On Lan （WOL） 功能状态列表 1) p, Wake on PHY activity2) u, Wake on unicast messages3) m, Wake on multicast messages4) b, Wake on broadcast messages5) a, Wake &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/wol-rocky-linux-rhel/" class="more-link">Continue reading<span class="screen-reader-text"> "[步骤] Wake On Lan （WOL） 功能的开启 （ Rocky Linux &#038; RHEL 版）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>步骤一：在 BIOS 开启 Wake On Lan （WOL） 功能</h3>



<p>（步骤略）</p>



<h3>步骤二：在系统开启 Wake On Lan （WOL） 功能</h3>



<h4>2.1 确保 net-tools 已经安装</h4>



<pre class="wp-block-code"><code># yum install net-tools</code></pre>



<h4>2.2 查看网卡的 Wake On Lan （WOL） 功能状态</h4>



<h5>2.2.1 Wake On Lan （WOL） 功能状态列表</h5>



<p>1) p, Wake on PHY activity<br>2) u, Wake on unicast messages<br>3) m, Wake on multicast messages<br>4) b, Wake on broadcast messages<br>5) a, Wake on ARP<br>6) g, Wake on MagicPacket<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br>7) s, Enable SecureOn<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /> password for MagicPacket<img src="https://s.w.org/images/core/emoji/14.0.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" /><br>8) d, Disable (wake on nothing). This option clears all previous options</p>



<h5>2.2.2 查看网卡的 Wake On Lan （WOL） 功能状态</h5>



<pre class="wp-block-code"><code># ethtool enp16s0
Settings for enp16s0:
	Supported ports: &#91; TP ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Supported pause frame use: Symmetric
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised pause frame use: Symmetric
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Auto-negotiation: on
	Port: Twisted Pair
	PHYAD: 1
	Transceiver: internal
	MDI-X: off (auto)
	Supports Wake-on: pumbg
	Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
	Link detected: yes</code></pre>



<p>（<br>补充：<br>1) 这里以使用 enp16s0 网卡开启 Wake On Lan （WOL） 功能为例<br>2) 这里的 Wake On Lan （WOL） 功能状态是 g<br>）</p>



<h4>2.3 临时开启 Wake On Lan （WOL） 功能</h4>



<pre class="wp-block-code"><code># ethtool -s enp16s0 wol p</code></pre>



<p>（补充：这里以给 enp16s0 网卡开启 Wake On Lan （WOL） 功能为例）</p>



<h4>2.4 永久开启 Wake On Lan （WOL） 功能</h4>



<pre class="wp-block-code"><code># vi /etc/sysconfig/network-scripts/ifcfg-enp16s0</code></pre>



<p>添加以下内容：</p>



<pre class="wp-block-code"><code>......
ETHTOOL_OPTS="-s ${DEVICE} wol p"</code></pre>



<p>（补充：这里以给 enp16s0 网卡开启 Wake On Lan （WOL） 功能为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 uname （显示系统信息）</title>
		<link>https://eternalcenter-sep-2022.github.io/uname/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 15 Jul 2022 08:13:46 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Installation (系统安装)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26799</guid>

					<description><![CDATA[内容一：uname 命令的格式 内容二：uname 命令的选项 1) -a 或者 &#8211;all，显示所有系统信息 （补充：如果系统处理器类型和系统硬件平台处于未知状态则不显示） 2) -s 或者 &#8211;kernel-name，显示系统内核3) -n 或者 &#8211;nodename，显示系统节点名称4) -r 或者 &#8211;kernel-release，显示系统内核发布版本5) -m 或者 &#8211;machine，显示系统硬件名称6) -p 或者 &#8211;processor，显示系统处理器类型7) -i 或者 &#8211;hardware-platform，显示系统硬件平台8) &#8211;help，显示帮助信息9) &#8211;version，显示 uname 命令版本]]></description>
										<content:encoded><![CDATA[
<h3>内容一：uname 命令的格式</h3>



<pre class="wp-block-code"><code># uname &lt;option&gt;</code></pre>



<h3>内容二：uname 命令的选项</h3>



<p>1) -a 或者 &#8211;all，显示所有系统信息</p>



<p>（补充：如果系统处理器类型和系统硬件平台处于未知状态则不显示）</p>



<p>2) -s 或者 &#8211;kernel-name，显示系统内核<br>3) -n 或者 &#8211;nodename，显示系统节点名称<br>4) -r 或者 &#8211;kernel-release，显示系统内核发布版本<br>5) -m 或者 &#8211;machine，显示系统硬件名称<br>6) -p 或者 &#8211;processor，显示系统处理器类型<br>7) -i 或者 &#8211;hardware-platform，显示系统硬件平台<br>8) &#8211;help，显示帮助信息<br>9) &#8211;version，显示 uname 命令版本</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 多路径存储的显示</title>
		<link>https://eternalcenter-sep-2022.github.io/multipath-storage-display/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 11 Jul 2022 02:43:03 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26667</guid>

					<description><![CDATA[或者：]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code># multipath -ll</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># rpm -qa | grep device-mapper</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 hwclock （硬件时钟的管理）</title>
		<link>https://eternalcenter-sep-2022.github.io/hwclock/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 11 Jul 2022 02:13:30 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26664</guid>

					<description><![CDATA[内容一：hwclock 命令的格式 内容二：hwclock 命令的功能 1) &#8211;adjust，以前每次更改硬件时钟的记录，都会被写入到 /etc/adjtime 文件中。使用 &#8211;adjust 功能可以根据过往来记录估算和校正硬件时钟2) &#8211;debug，显示执行 hwclock 命令时的详细过程3) &#8211;directisa，hwclock 默认从 /dev/rtc 存取硬件时钟，&#8211;directisa 功能可以直接从 I/O 存取硬件时钟4) &#8211;hctosys，将硬件时钟调整到和系统时钟一致5) &#8211;help，显示帮助信息6) &#8211;set &#8211;date=，设置硬件时钟的时间7) &#8211;show，显示硬件时钟的时间8) &#8211;systohc，当硬件时钟和系统时钟一致时，将硬件时钟的时区调整到和系统时钟一致9) &#8211;test，测试命令10) &#8211;localtime，将硬件时钟视为本地时间11) &#8211;version，显示命令的版本]]></description>
										<content:encoded><![CDATA[
<h3>内容一：hwclock 命令的格式</h3>



<pre class="wp-block-code"><code># hwclock &lt;function&gt; &lt;option...&gt;</code></pre>



<h3>内容二：hwclock 命令的功能</h3>



<p>1) &#8211;adjust，以前每次更改硬件时钟的记录，都会被写入到 /etc/adjtime 文件中。使用 &#8211;adjust 功能可以根据过往来记录估算和校正硬件时钟<br>2) &#8211;debug，显示执行 hwclock 命令时的详细过程<br>3) &#8211;directisa，hwclock 默认从 /dev/rtc 存取硬件时钟，&#8211;directisa 功能可以直接从 I/O 存取硬件时钟<br>4) &#8211;hctosys，将硬件时钟调整到和系统时钟一致<br>5) &#8211;help，显示帮助信息<br>6) &#8211;set &#8211;date=，设置硬件时钟的时间<br>7) &#8211;show，显示硬件时钟的时间<br>8) &#8211;systohc，当硬件时钟和系统时钟一致时，将硬件时钟的时区调整到和系统时钟一致<br>9) &#8211;test，测试命令<br>10) &#8211;localtime，将硬件时钟视为本地时间<br>11) &#8211;version，显示命令的版本</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 系统 UUID 的显示 （主板 UUID）</title>
		<link>https://eternalcenter-sep-2022.github.io/uuid/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 22 Jun 2022 08:30:55 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=26096</guid>

					<description><![CDATA[内容一：系统 UUID 1) UUID 全名 Universally Unique Identifier，即通用唯一识别码2) 系统 UUID 是主板产品的 UUID 内容二：系统 UUID 的显示 如果是虚拟机： 如果是虚拟机或物理机：]]></description>
										<content:encoded><![CDATA[
<h3>内容一：系统 UUID</h3>



<p>1) UUID 全名 Universally Unique Identifier，即通用唯一识别码<br>2) 系统 UUID 是主板产品的 UUID</p>



<h3>内容二：系统 UUID 的显示</h3>



<p>如果是虚拟机：</p>



<pre class="wp-block-code"><code># cat /sys/devices/virtual/dmi/id/product_uuid</code></pre>



<p>如果是虚拟机或物理机：</p>



<pre class="wp-block-code"><code># dmidecode -s system-uuid</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 虚拟机和物理机的区分</title>
		<link>https://eternalcenter-sep-2022.github.io/virtual-machine-physical-check/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 09 Jun 2022 11:10:32 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23731</guid>

					<description><![CDATA[如果是虚拟机： （补充：从输出结果可以看出此为 VMware7,1 虚拟机） 或者： （补充：从输出结果可以看出此为 vmware 虚拟机） 如果是物理机： （补充：从输出结果可以看出此为 PowerEdge R940 物理机） 或者： （补充：从输出结果可以看出此为物理机）]]></description>
										<content:encoded><![CDATA[
<p>如果是虚拟机：</p>



<pre class="wp-block-code"><code># dmidecode -s system-product-name
VMware7,1</code></pre>



<p>（补充：从输出结果可以看出此为 VMware7,1 虚拟机）</p>



<p>或者：</p>



<pre class="wp-block-code"><code># systemd-detect-virt
vmware</code></pre>



<p>（补充：从输出结果可以看出此为 vmware 虚拟机）</p>



<p>如果是物理机：</p>



<pre class="wp-block-code"><code># dmidecode -s system-product-name
PowerEdge R940</code></pre>



<p>（补充：从输出结果可以看出此为 PowerEdge R940 物理机）</p>



<p>或者：</p>



<pre class="wp-block-code"><code># systemd-detect-virt 
none</code></pre>



<p>（补充：从输出结果可以看出此为物理机）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 网卡的显示</title>
		<link>https://eternalcenter-sep-2022.github.io/network-card/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 27 Apr 2022 15:36:01 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23346</guid>

					<description><![CDATA[方法一：ip 命令 方法二：ifconfig 命令 方法三：iwconfig 命令]]></description>
										<content:encoded><![CDATA[
<h3>方法一：ip 命令</h3>



<pre class="wp-block-code"><code># ip a s
1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:1c:42:c9:3c:81 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.129/24 brd 10.10.10.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fdb2:2c26:f4e4:0:55da:1265:541f:8007/64 scope global temporary dynamic 
       valid_lft 563315sec preferred_lft 44695sec
    inet6 fdb2:2c26:f4e4:0:21c:42ff:fec9:3c81/64 scope global dynamic mngtmpaddr 
       valid_lft 2591846sec preferred_lft 604646sec
    inet6 fe80::21c:42ff:fec9:3c81/64 scope link 
       valid_lft forever preferred_lft forever</code></pre>



<h3>方法二：ifconfig 命令</h3>



<pre class="wp-block-code"><code># ifconfig
eth0: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500
        inet 10.10.10.129  netmask 255.255.255.0  broadcast 10.10.10.255
        inet6 fdb2:2c26:f4e4:0:21c:42ff:fec9:3c81  prefixlen 64  scopeid 0x0&lt;global&gt;
        inet6 fe80::21c:42ff:fec9:3c81  prefixlen 64  scopeid 0x20&lt;link&gt;
        inet6 fdb2:2c26:f4e4:0:55da:1265:541f:8007  prefixlen 64  scopeid 0x0&lt;global&gt;
        ether 00:1c:42:c9:3c:81  txqueuelen 1000  (Ethernet)
        RX packets 698666  bytes 485434755 (462.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 372557  bytes 699406543 (667.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73&lt;UP,LOOPBACK,RUNNING&gt;  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10&lt;host&gt;
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 73792  bytes 394285172 (376.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 73792  bytes 394285172 (376.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0</code></pre>



<h3>方法三：iwconfig 命令</h3>



<pre class="wp-block-code"><code># iwconfig 
lo        no wireless extensions.

eth0      no wireless extensions.
</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[工具] Shell 显示系统常用信息</title>
		<link>https://eternalcenter-sep-2022.github.io/shell-display-system-common-information/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 26 Apr 2022 16:14:48 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[Language (语言)]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Shell Monitor (监控)]]></category>
		<category><![CDATA[Shell Tools (工具)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Directory (系统目录)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Network (系统网络)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Performance (系统性能)]]></category>
		<category><![CDATA[System Port Security (系统端口安全)]]></category>
		<category><![CDATA[System Process & System Performance (系统进程 & 系统性能)]]></category>
		<category><![CDATA[System Security (系统安全)]]></category>
		<category><![CDATA[System Software (系统软件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23311</guid>

					<description><![CDATA[介绍 基本信息 作者：朱明宇名称：显示系统常用信息作用：显示系统常用信息 使用方法 1. 在此脚本的分割线内写入相应的内容2. 给此脚本添加执行权限3. 执行此脚本 脚本分割线里的变量 1. times=5 #显示系统常用信息的次数2. sleeptime=0.3 #大部分行与行之间显示的间隔时间 注意 1. 需要安装 sysstat 软件2. 执行此脚本的用户能够使用 sudo ip a s 命令3. 执行此脚本的用户能够使用 sudo ss -ntulap 命令4. 搭建了 KVM 虚拟化平台后执行此脚本的用户能够使用 sudo virsh list 命令后才能实现 脚本]]></description>
										<content:encoded><![CDATA[
<h2>介绍</h2>



<h3>基本信息</h3>



<p>作者：朱明宇<br>名称：显示系统常用信息<br>作用：显示系统常用信息</p>



<h3>使用方法</h3>



<p>1. 在此脚本的分割线内写入相应的内容<br>2. 给此脚本添加执行权限<br>3. 执行此脚本</p>



<h3>脚本分割线里的变量</h3>



<p>1. times=5 #显示系统常用信息的次数<br>2. sleeptime=0.3 #大部分行与行之间显示的间隔时间</p>



<h3>注意</h3>



<p>1. 需要安装 sysstat 软件<br>2. 执行此脚本的用户能够使用 sudo  ip a s 命令<br>3. 执行此脚本的用户能够使用 sudo ss -ntulap 命令<br>4. 搭建了 KVM 虚拟化平台后执行此脚本的用户能够使用 sudo virsh list 命令后才能实现</p>



<h2>脚本</h2>



<pre class="wp-block-code"><code>#!/bin/bash

####################### Separator ########################
times=5
sleeptime=0.3
####################### Separator ########################

nowtime=1

while (( nowtime &lt;= times))
do
        echo -e "Start Monitoring: \c"
	for i in {1..94}
	do
	        echo -e "#\c"
		sleep 0.01
        done
	echo

	sleep $sleeptime
        host=`hostname`
        echo -e "Name:\t\t\t\t\t\t\t \033&#91;1m$host\033&#91;0m"

        ip=`sudo ip a s | awk '/&#91;1-2]?&#91;0-9]{0,2}\.&#91;1-2]?&#91;0-9]{0,2}/&amp;&amp;!/127.0.0.1/{print $2}' | awk -F/ '{print $1}'`
	for iip in $(echo $ip)
        do
		sleep $sleeptime
                echo -e "IP Address:\t\t\t\t\t\t \033&#91;1m$iip\033&#91;0m"
        done

        sleep $sleeptime

        cpu=`top -bn 1 | awk -F',' '/^%Cpu/{print $4 }' | awk '{print $1}' | awk '{print 100-$1}'`
        echo -e "CPU Usage (Total):\t\t\t\t\t \033&#91;1m$cpu%\033&#91;0m"

        sleep $sleeptime

        mem=`free | grep Mem | awk '{print $3/$2 * 100.0}' | egrep -o "&#91;1]?&#91;0-9]{0,2}\.&#91;0-9]"`
        echo -e "Memory Usage (Total):\t\t\t\t\t \033&#91;1m$mem%\033&#91;0m"

	directory=`df -h | grep -v run | grep -v boot | awk '$1~/\/dev/{print $6}'`
        for idirectory in `echo $directory`
        do
                sleep $sleeptime
                directoryusage=`df -h | grep -v run | grep -v boot | awk '$1~/\/dev/{print}' | grep $idirectory$ | awk '{print $5}'`
		if &#91; $idirectory == / -o $idirectory == /sda -o $idirectory == /sdb  ];then
                        echo -e "Directory Usage ($idirectory):\t\t\t\t\t \033&#91;1m$directoryusage\033&#91;0m"
	        else
                        echo -e "Directory Usage ($idirectory):\t\t\t\t \033&#91;1m$directoryusage\033&#91;0m"
		fi
        done

	sudo -l | grep 'virsh list' &amp;&gt; /dev/null
        if &#91; $? -eq 0 ];then
	        sleep $sleeptime
	        virtual=`sudo virsh list | egrep &#91;0-9] | wc -l`
	        echo -e "Number of Virtual Machines (Total):\t\t\t \033&#91;1m$virtual\033&#91;0m"
        fi

        sleep $sleeptime

        user=`who | wc -l`
        echo -e "Number of User Logins (Total):\t\t\t\t \033&#91;1m$user\033&#91;0m"

        soft=`rpm -qa | wc -l`
        echo -e "Number of Softwares (Total):\t\t\t\t \033&#91;1m$soft\033&#91;0m"

        sleep $sleeptime

        port=`sudo ss -ntulap | wc -l`
        echo -e "Number of Open Ports (Total):\t\t\t\t \033&#91;1m$port\033&#91;0m"

        which sar &amp;&gt; /dev/null
        if &#91; $? -eq 0 ];then
                networkcard=`ifconfig | awk -F: '/flags/&amp;&amp;!/lo/{print $1}'`
                for inetworkcard in `echo $networkcard`
                do
                        networkread="`sar -n DEV 1 1 | grep $inetworkcard | awk '/&#91;0-9]&#91;0-9]:&#91;0-9]&#91;0-9]/{print $3/1000}'` m/s"
                        networkwrite="`sar -n DEV 1 1 | grep $inetworkcard | awk '/&#91;0-9]&#91;0-9]:&#91;0-9]&#91;0-9]/{print $4/1000}'` m/s"
			echo $inetworkcard | grep eth &amp;&gt; /dev/null
			if &#91; $?  -ne 0 ];then
	                echo -e "Network Card IO ($inetworkcard):\t\t\t\t \033&#91;1m$networkread\033&#91;0m (Read)\t\033&#91;1m$networkwrite\033&#91;0m (Write)"
		        else
	                echo -e "Network Card IO ($inetworkcard):\t\t\t\t\t \033&#91;1m$networkread\033&#91;0m (Read)\t\033&#91;1m$networkwrite\033&#91;0m (Write)"
			fi
                done
        fi

        which iostat &amp;&gt; /dev/null
        if &#91; $? -eq 0 ];then
	        disk=`iostat -d -k 1 1 | awk '!/^$/&amp;&amp;!/Device/&amp;&amp;!/Linux/{print $1}'`
                for idisk in `echo $disk`
	        do
			sleep $sleeptime
		        diskread="`iostat -d -k 1 1 | grep $idisk |  awk '{print $3/1000}'` m/s"
		        diskwrite="`iostat -d -k 1 1 | grep $idisk |  awk '{print $4/1000}'` m/s"
			echo $idisk | grep 'nvme' &amp;&gt; /dev/null
			if &#91; $? -eq 0 ];then
		                echo -e "Disk IO (/dev/$idisk):\t\t\t\t\t \033&#91;1m$diskread\033&#91;0m (Read)\t\033&#91;1m$diskwrite\033&#91;0m (Write)"
		        else
		                echo -e "Disk IO (/dev/$idisk):\t\t\t\t\t \033&#91;1m$diskread\033&#91;0m (Read)\t\033&#91;1m$diskwrite\033&#91;0m (Write)"
			fi
	        done

        fi

        echo -e "Complete Monitoring: \c"
        for i in {1..91}
        do
                echo -e "#\c"
                sleep 0.01
        done
        echo
        sleep $sleeptime

        let nowtime++
done

        echo -e "Terminal Monitoring: \c"
        for i in {1..91}
        do
                echo -e "#\c"
                sleep 0.01
        done

exit</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 lsscsi （查看硬盘类型，例：SSD、HD、SATA、FC &#8230;&#8230;）</title>
		<link>https://eternalcenter-sep-2022.github.io/lsscsi/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sun, 17 Apr 2022 07:52:04 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=23173</guid>

					<description><![CDATA[内容一：lsscsi 命令的格式 内容二：lsscsi 命令的选项 1) -c 以硬盘全称的形式显示硬盘默认信息2) -d 显示硬盘主设备号和次设备号3) -g 显示硬盘对应的 sg 设备4) -H 显示硬盘的控制器列表5) -i 显示硬盘的 udev 信息6) -l 显示硬盘状态7) -ll 显示硬盘状态，比 -l 选项能显示更多信息8) -lll 或者 -L 显示硬盘状态，比 -ll 选项能显示更多信息9) -p 显示硬盘的 DIF DIX 保护类型10) -P 显示硬盘有效的保护类型11) -s 显示硬盘容量12) -v 显示硬盘设备所在目录13) -w 显示硬盘的 WWN 信息14) -x 以 16 进制显示硬盘的 lun 号]]></description>
										<content:encoded><![CDATA[
<h3>内容一：lsscsi 命令的格式</h3>



<pre class="wp-block-code"><code># lsscsi &lt;option&gt;</code></pre>



<h3>内容二：lsscsi 命令的选项</h3>



<p>1) -c 以硬盘全称的形式显示硬盘默认信息<br>2) -d 显示硬盘主设备号和次设备号<br>3) -g 显示硬盘对应的 sg 设备<br>4) -H 显示硬盘的控制器列表<br>5) -i 显示硬盘的 udev 信息<br>6) -l 显示硬盘状态<br>7) -ll 显示硬盘状态，比 -l 选项能显示更多信息<br>8) -lll 或者 -L 显示硬盘状态，比 -ll 选项能显示更多信息<br>9) -p 显示硬盘的 DIF DIX 保护类型<br>10) -P 显示硬盘有效的保护类型<br>11) -s 显示硬盘容量<br>12) -v 显示硬盘设备所在目录<br>13) -w 显示硬盘的 WWN 信息<br>14) -x 以 16 进制显示硬盘的 lun 号</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 常用日志 （openSUSE &#038; SUSE 版）</title>
		<link>https://eternalcenter-sep-2022.github.io/log-opensusesuse/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 07 Apr 2022 09:24:12 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System General Log (系统普通日志)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Log (系统日志)]]></category>
		<category><![CDATA[System Network & System Security & System Log (系统网络 & 系统安全 & 系统日志)]]></category>
		<category><![CDATA[System Security Log (系统安全日志)]]></category>
		<category><![CDATA[System Statistic Log (系统统计日志)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=22930</guid>

					<description><![CDATA[1) /var/log/boot.msg，包含系统启动时显示在屏幕上的信息（补充：当进入系统时，可以同时按下 “ctrl” 键和 “alt” 键和 “f10” 键切换到显示日志的界面，之后可以再通过 KVM 显示系统启动时显示在屏幕上的信息。）2) /var/log/boot.omsg，包含上一次系统启动时显示在屏幕上的信息3) /var/log/messages，包含几乎所有日志4) /var/log/warn，包含 WARNING 也就是级别 4 以上的所有日志5) /var/log/wtmp，包含和系统登录和重启的所有日志（补充：可以通过 last 命令读取）6) /var/log/YaST2/y2log，包含 YaST 的所有日志7) /var/log/xinetd.log，包含 xinetd 服务的所有日志8) /var/log/dump/，包含 Kdump 工具在系统宕机时收集的所有故障信息9) /var/log/atop，包含 Atop 工具收集的系统资源 （CPU、内存、系统进程、IO） 的所有使用信息]]></description>
										<content:encoded><![CDATA[
<p>1) /var/log/boot.msg，包含系统启动时显示在屏幕上的信息<br>（补充：当进入系统时，可以同时按下 “ctrl” 键和 “alt” 键和 “f10” 键切换到显示日志的界面，之后可以再通过 KVM 显示系统启动时显示在屏幕上的信息。）<br>2) /var/log/boot.omsg，包含上一次系统启动时显示在屏幕上的信息<br>3) /var/log/messages，包含几乎所有日志<br>4) /var/log/warn，包含 WARNING 也就是级别 4 以上的所有日志<br>5) /var/log/wtmp，包含和系统登录和重启的所有日志<br>（补充：可以通过 last 命令读取）<br>6) /var/log/YaST2/y2log，包含 YaST 的所有日志<br>7) /var/log/xinetd.log，包含 xinetd 服务的所有日志<br>8) /var/log/dump/，包含 Kdump 工具在系统宕机时收集的所有故障信息<br>9) /var/log/atop，包含 Atop 工具收集的系统资源 （CPU、内存、系统进程、IO） 的所有使用信息</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux CPU 温度的显示 （直接显示）</title>
		<link>https://eternalcenter-sep-2022.github.io/cpu-temperature/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 04 Apr 2022 15:53:35 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=22845</guid>

					<description><![CDATA[内容一：显示 CPU 的瞬时温度 （补充：1) 这里以显示第 1 个 CPU 的瞬时温度为例2) 将显示的数值除以 1000 就是以摄氏为单位的温度3) 如果显示第 2 个 CPU 的瞬时温度则将 thermal_zone0 换成 thermal_zone1） 内容二：显示 CPU 的瞬时温度，并对数值进行处理 （补充：1) 这里以显示第 1 个 CPU 的瞬时温度为例2) 如果显示第 2 个 CPU 的瞬时温度则将 thermal_zone0 换成 thermal_zone1）]]></description>
										<content:encoded><![CDATA[
<h3>内容一：显示 CPU 的瞬时温度</h3>



<pre class="wp-block-code"><code># cat /sys/class/thermal/thermal_zone0/temp</code></pre>



<p>（<br>补充：<br>1) 这里以显示第 1 个 CPU 的瞬时温度为例<br>2) 将显示的数值除以 1000 就是以摄氏为单位的温度<br>3) 如果显示第 2 个 CPU 的瞬时温度则将 thermal_zone0 换成 thermal_zone1<br>）</p>



<h3>内容二：显示 CPU 的瞬时温度，并对数值进行处理</h3>



<pre class="wp-block-code"><code># echo "CPU Temperature: $&#91;$(cat /sys/class/thermal/thermal_zone0/temp)/1000]"</code></pre>



<p>（<br>补充：<br>1) 这里以显示第 1 个 CPU 的瞬时温度为例<br>2) 如果显示第 2 个 CPU 的瞬时温度则将 thermal_zone0 换成 thermal_zone1<br>）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 处理器详细信息的显示 （显示 /proc/cpuinfo 文件里的信息）</title>
		<link>https://eternalcenter-sep-2022.github.io/cpu/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 04 Apr 2022 14:04:20 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=22767</guid>

					<description><![CDATA[内容一：显示处理器详细信息 1.1 显示处理器详细信息 或者： 1.2 /proc/cpuinfo 文件里或者 lscpu 命令里重要参数 1) processor，进程 （虚拟核心） ID2) core ID，物理核心 ID3) physical id，物理封装处理器 ID （CPU socket ID）4) cpu cores， 每 1 个物理封装处理器 ID （CPU socket ID） 里的物理核心数量5) siblings， 每 1 个物理封装处理器 ID （CPU socket ID） 里的进程 （虚拟核心） 数量 内容二：显示 Linux 处理器详细信息的案例 2.1 案例一：显示处理器所有信息 2.2 案例二：显示处理器进程 （虚拟核心） 数 2.3 案例三：显示处理器物理核心数 2.4 &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/cpu/" class="more-link">Continue reading<span class="screen-reader-text"> "[内容] Linux 处理器详细信息的显示 （显示 /proc/cpuinfo 文件里的信息）"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3>内容一：显示处理器详细信息</h3>



<h4>1.1 显示处理器详细信息</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo</code></pre>



<p>或者：</p>



<pre class="wp-block-code"><code># lscpu</code></pre>



<h4>1.2 /proc/cpuinfo 文件里或者 lscpu 命令里重要参数</h4>



<p>1) processor，进程 （虚拟核心）  ID<br>2) core ID，物理核心 ID<br>3) physical id，物理封装处理器 ID （CPU socket ID）<br>4) cpu cores， 每 1 个物理封装处理器 ID （CPU socket ID） 里的物理核心数量<br>5) siblings， 每 1 个物理封装处理器 ID （CPU socket ID） 里的进程 （虚拟核心） 数量</p>



<h3>内容二：显示 Linux 处理器详细信息的案例</h3>



<h4>2.1 案例一：显示处理器所有信息</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 23
model		: 1
model name	: AMD Ryzen 7 1700 Eight-Core Processor
stepping	: 1
microcode	: 0x8001138
cpu MHz		: 1371.214
cache size	: 512 KB
physical id	: 0
siblings	: 16
core id		: 0
cpu cores	: 8
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate sme ssbd sev ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca
bugs		: sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 5987.93
TLB size	: 2560 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate eff_freq_ro &#91;13] &#91;14]

......</code></pre>



<h4>2.2 案例二：显示处理器进程 （虚拟核心） 数</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | egrep "core id|physical id|processor" | tr -d "\n" | sed s/processor/\\nprocessor/g | sed 's/physical/     physical/' | sed 's/core/     core/' | grep -v ^$ | wc -l</code></pre>



<h4>2.3 案例三：显示处理器物理核心数</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l</code></pre>



<h4>2.4 案例四：显示物理封装处理器 （处理器 socket） 数</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l</code></pre>



<h4>2.5 案例五：显示处理器所有进程 （虚拟核心）  ID</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | grep processor
processor	: 0
processor	: 1
processor	: 2
processor	: 3
processor	: 4
processor	: 5
processor	: 6
processor	: 7
processor	: 8
processor	: 9
processor	: 10
processor	: 11
processor	: 12
processor	: 13
processor	: 14
processor	: 15</code></pre>



<h4>2.6 案例六：显示处理器所有物理核心 ID</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | grep 'core id'
core id		: 0
core id		: 1
core id		: 2
core id		: 3
core id		: 4
core id		: 5
core id		: 6
core id		: 7
core id		: 0
core id		: 1
core id		: 2
core id		: 3
core id		: 4
core id		: 5
core id		: 6
core id		: 7</code></pre>



<h4>2.7 案例七：显示处理器所有物理封装处理器 ID （处理器 socket ID）</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | grep 'physical id'
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0
physical id	: 0</code></pre>



<h4>2.8 案例八：显示处理器所有物理封装处理器 ID （处理器 socket ID） 和物理核心 ID 以及对应关系</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | sed 's/core/ core/'g |  grep -v ^$ | sort | uniq
physical id	: 0 core id		: 0
physical id	: 0 core id		: 1
physical id	: 0 core id		: 2
physical id	: 0 core id		: 3
physical id	: 0 core id		: 4
physical id	: 0 core id		: 5
physical id	: 0 core id		: 6
physical id	: 0 core id		: 7</code></pre>



<h4>2.9 案例九：显示处理器所有进程 （虚拟核心）  ID、物理封装处理器 ID （处理器 socket ID） 、物理核心 ID 以及对应关系</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | egrep "core id|physical id|processor" | tr -d "\n" | sed s/processor/\\nprocessor/g | sed 's/physical/     physical/' | sed 's/core/     core/' | grep -v ^$
processor	: 0     physical id	: 0     core id		: 0
processor	: 1     physical id	: 0     core id		: 1
processor	: 2     physical id	: 0     core id		: 2
processor	: 3     physical id	: 0     core id		: 3
processor	: 4     physical id	: 0     core id		: 4
processor	: 5     physical id	: 0     core id		: 5
processor	: 6     physical id	: 0     core id		: 6
processor	: 7     physical id	: 0     core id		: 7
processor	: 8     physical id	: 0     core id		: 0
processor	: 9     physical id	: 0     core id		: 1
processor	: 10     physical id	: 0     core id		: 2
processor	: 11     physical id	: 0     core id		: 3
processor	: 12     physical id	: 0     core id		: 4
processor	: 13     physical id	: 0     core id		: 5
processor	: 14     physical id	: 0     core id		: 6
processor	: 15     physical id	: 0     core id		: 7</code></pre>



<h4>2.10 案例十：显示每 1 个物理封装处理器 （处理器 socket） 里物理核心数</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | grep 'cpu cores'
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8
cpu cores	: 8</code></pre>



<h4>2.11 案例十一：显示每 1 个物理封装处理器 （处理器 socket） 里进程 （虚拟核心） 核心数</h4>



<pre class="wp-block-code"><code># cat /proc/cpuinfo | grep 'siblings'
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16
siblings	: 16</code></pre>



<h3>内容二：理解显示的处理器详细信息</h3>



<p>1) processor 的数字从 0 到 15，代表有 16 个进程 （虚拟核心）  <br>2) core id 的数字从 0 到 7，代表有 8 个物理核心<br>3) physical id 的数字都是 0，代表只有 1 个物理封装处理器 （处理器 socket）<br>4) cpu cores 的数字都是 8，代表每 1 个物理封装处理器 （处理器 socket） 里有 8 个物理核心<br>5) siblings 的数字都是 16，代表每 1 个物理封装处理器 （处理器 socket） 里有 16 个进程 （虚拟核心）  <br>6) 总结：1 个处理器，8 个物理核心，16 个进程 （虚拟核心）  </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[排错] 解决 Linux 运行时报错 “watchdog: Bug: soft lockup &#8211; CPU&#8230;&#8230;” （CPU 软锁）</title>
		<link>https://eternalcenter-sep-2022.github.io/debug-watchdog-bug-soft-lockup-cpu/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 15 Feb 2022 07:35:47 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Process (系统进程)]]></category>
		<category><![CDATA[System Process & System Performance (系统进程 & 系统性能)]]></category>
		<category><![CDATA[System Setting (系统设置)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21928</guid>

					<description><![CDATA[报错代码 分析 当 CPU 的负载过高时，一个 CPU 在运行某一个进程时，在内核模式下超过 20 秒没有回应，则看门狗程序会将系统所有 CPU 软锁住，然后会让这些 CPU 显示各自正在运行的进程堆栈跟踪 缓解方法 方法一：通过 /proc/sys/kernel/watchdog_thresh 文件延长看门狗软锁 CPU 的时间 （补充：这里以将看门狗的值延长到 20 为例，也可以根据自己的需求延长更多，默认值为 10） 方法二：通过新建文件延长看门狗软所 CPU 的时间 2.1 通过新建文件延长看门狗软所 CPU 的时间 （补充：这里以将看门狗的值延长到 20 为例，也可以根据自己的需求延长更多，默认值为 10） 2.2 让新建文件立刻生效 深究方法 开启 Kdump，等此报错再次发生时分析 Kdump 在内核崩溃时搜集信息 vmcore]]></description>
										<content:encoded><![CDATA[
<h2 id="报错代码">报错代码</h2>



<pre class="wp-block-code"><code>watchdog: Bug: soft lockup - CPU......</code></pre>



<h2 id="分析">分析</h2>



<p>当 CPU 的负载过高时，一个 CPU 在运行某一个进程时，在内核模式下超过 20 秒没有回应，则看门狗程序会将系统所有 CPU 软锁住，然后会让这些 CPU 显示各自正在运行的进程堆栈跟踪</p>



<h2 id="缓解方法">缓解方法</h2>



<h3 id="缓解方法">方法一：通过 /proc/sys/kernel/watchdog_thresh 文件延长看门狗软锁 CPU 的时间</h3>



<pre class="wp-block-code"><code># echo 20 &gt; /proc/sys/kernel/watchdog_thresh</code></pre>



<p>（补充：这里以将看门狗的值延长到 20 为例，也可以根据自己的需求延长更多，默认值为 10）</p>



<h3 id="方法二-通过新建文件提高看门狗软所-cpu-的时间2-1-通过新建文件提高看门狗软所-cpu-的时间">方法二：通过新建文件延长看门狗软所 CPU 的时间</h3>



<h4 id="方法二-通过新建文件提高看门狗软所-cpu-的时间2-1-通过新建文件提高看门狗软所-cpu-的时间">2.1 通过新建文件延长看门狗软所 CPU 的时间</h4>



<pre class="wp-block-code"><code># echo "kernel.watchdog_thresh = 20" >> /etc/sysctl.conf</code></pre>



<p>（补充：这里以将看门狗的值延长到 20 为例，也可以根据自己的需求延长更多，默认值为 10）</p>



<h4 id="2-2-让新建文件立刻生效">2.2 让新建文件立刻生效</h4>



<pre class="wp-block-code"><code># sysctl -p /etc/sysctl.conf</code></pre>



<h2 id="深究方法">深究方法</h2>



<p>开启 Kdump，等此报错再次发生时分析 Kdump 在内核崩溃时搜集信息 vmcore</p>



<div class="wp-container-1 is-content-justification-center wp-block-buttons">
<div class="wp-block-button aligncenter is-style-outline"><a class="wp-block-button__link no-border-radius" href="https://eternalcenter-sep-2022.github.io/kdump/">Linux Kdump 的开启 <br>（用于收集内核崩溃时的信息）</a></div>



<div class="wp-block-button is-style-outline"><a class="wp-block-button__link" href="https://eternalcenter-sep-2022.github.io/kdump-analysis/" style="border-radius:0px">Linux Kdump 内核奔溃信息的分析</a></div>
</div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 hdparm （测试硬盘读取速度）</title>
		<link>https://eternalcenter-sep-2022.github.io/hdparm/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Mon, 07 Feb 2022 11:22:26 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21888</guid>

					<description><![CDATA[（补充：这里以测试 /dev/sda 硬盘的读取速度为例）]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code> # hdparm -Ttv /dev/sda

/dev/sda:
 multcount     = 128 (on)
 IO_support    =  1 (32-bit)
 readonly      =  0 (off)
 readahead     = 1024 (on)
 geometry      = 8354/255/63, sectors = 134217728, start = 0
 Timing cached reads:   7304 MB in  2.00 seconds = 3658.90 MB/sec
 Timing buffered disk reads: 612 MB in  3.01 seconds = 203.07 MB/sec</code></pre>



<p>（补充：这里以测试 /dev/sda 硬盘的读取速度为例）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 sensors 的使用 （显示系统硬件温度）</title>
		<link>https://eternalcenter-sep-2022.github.io/sensors/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Sun, 06 Feb 2022 10:09:17 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=21881</guid>

					<description><![CDATA[步骤一：安装 sensors 命令 如果是 RHEL &#38; Rocky Linux： 如果是 openSUSE &#38; SLE： 步骤二：检测硬件 2.1 分别选择要检测的区域 （补充：此命令是交互式的，当需要确定要检测的区域时，如果要检测则可以按下 “y” 键再按下 “回车” 键或者直接按下 “回车” 键，如果不检测则可以按下 “n” 键） 2.2 检测所有区域 （注意：此命令会直接检测所有区域，不会再有选择的机会） 步骤三：显示系统硬件温度]]></description>
										<content:encoded><![CDATA[
<h3 id="步骤一-安装-sensors-命令">步骤一：安装 sensors 命令</h3>



<p>如果是 RHEL &amp; Rocky Linux：</p>



<pre class="wp-block-code"><code># yum install lm_sensors</code></pre>



<p>如果是 openSUSE &amp; SLE：</p>



<pre class="wp-block-code"><code># zypper install lm_sensors</code></pre>



<h3 id="步骤二-检查温度传感器">步骤二：检测硬件</h3>



<h4>2.1 分别选择要检测的区域</h4>



<pre class="wp-block-code"><code># sensors-detect</code></pre>



<p>（补充：此命令是交互式的，当需要确定要检测的区域时，如果要检测则可以按下 “y” 键再按下 “回车” 键或者直接按下 “回车” 键，如果不检测则可以按下 “n” 键）</p>



<h4>2.2 检测所有区域</h4>



<pre class="wp-block-code"><code># sh -c "yes|sensors-detect"</code></pre>



<p>（注意：此命令会直接检测所有区域，不会再有选择的机会）</p>



<h3 id="步骤三-查看系统硬件温度">步骤三：显示系统硬件温度</h3>



<pre class="wp-block-code"><code># sensors</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 格式化特点</title>
		<link>https://eternalcenter-sep-2022.github.io/linux-formatting-features/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 19 Aug 2021 12:02:18 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=17520</guid>

					<description><![CDATA[内容一：格式化后会产生的分区 格式化会格式出 inode 区和 block 区 内容二：inode 区和 block 区的作用 inode 区默认一格大小是 512 个字节，存储哪一份数据存在了哪些 block 里以及数据的所属者、权限创建时间等 metadata 元数据block 区默认一格大小是 4k，只存储数据本身 内容三：Linux 文件格式的特点 ext3 和 ext4 的 inode 区每一格较小，而 xfs 的 inode 区每一格更大，可以存储更多种类，例如快照等 metadata 元数据]]></description>
										<content:encoded><![CDATA[
<h3>内容一：格式化后会产生的分区</h3>



<p>格式化会格式出 inode 区和 block 区</p>



<h3>内容二：inode 区和 block 区的作用</h3>



<p>inode 区默认一格大小是 512 个字节，存储哪一份数据存在了哪些 block 里以及数据的所属者、权限创建时间等 metadata 元数据<br>block 区默认一格大小是 4k，只存储数据本身</p>



<h3>内容三：Linux 文件格式的特点</h3>



<p>ext3 和 ext4 的 inode 区每一格较小，而 xfs 的 inode 区每一格更大，可以存储更多种类，例如快照等 metadata 元数据</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux 内存机制</title>
		<link>https://eternalcenter-sep-2022.github.io/memory-mechanism/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Tue, 20 Apr 2021 07:37:39 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Performance (系统性能)]]></category>
		<category><![CDATA[System Process & System Performance (系统进程 & 系统性能)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=14027</guid>

					<description><![CDATA[内容一：Linux 显示内存的命令 内容二：Linux 内存机制 1) total 内存的总大小2) used 正在被使用的内存大小3) free 没有被使用的内存大小4) shared 正在被多个进程共享的内存大小5) buffers 内存中被系统分配但是还没有被使用的 buffers 大小。这些数据暂时存储在内存中，当下次再此使用时可以在内存中被快速调用。buffers （buffer page） 代表块设备 （硬盘等设备） 所占用的缓存页，对应从硬盘中直接获取的数据，处于内存和硬盘之间，由内核使用 （当 free 状态的内存不够时，它会自动释放出来，也可以手动释放出来）6) cached 内存中被系统分配但是还没有被使用的 cached 大小。这些数据暂时存储在内容中，当下次再此使用时可以在内存中被快速调用。cached （cache page） 代表普通文件数据 （硬盘里的数据） 所占用的缓存页，对应 vfs 页缓冲层的数据，处于内存和 CPU （处理器） 之间，由应用程序使用 （当 free 状态的内存不够时，它会自动释放出来，也可以手动释放出来）7) -buffers/cached = used &#8211; buffers &#8211; cached，也就是真实的内存使用量8) +buffers/cached = free + buffers + &#8230; <p class="link-more"><a href="https://eternalcenter-sep-2022.github.io/memory-mechanism/" class="more-link">Continue reading<span class="screen-reader-text"> "[内容] Linux 内存机制"</span></a></p>]]></description>
										<content:encoded><![CDATA[
<h3 id="内容一-linux-显示内存的命令">内容一：Linux 显示内存的命令</h3>



<pre class="wp-block-code"><code># free -m</code></pre>



<h3 id="内容二-linux-内存机制">内容二：Linux 内存机制</h3>



<p>1) total 内存的总大小<br>2) used 正在被使用的内存大小<br>3) free 没有被使用的内存大小<br>4) shared 正在被多个进程共享的内存大小<br>5) buffers 内存中被系统分配但是还没有被使用的 buffers 大小。这些数据暂时存储在内存中，当下次再此使用时可以在内存中被快速调用。buffers （buffer page） 代表块设备 （硬盘等设备） 所占用的缓存页，对应从硬盘中直接获取的数据，处于内存和硬盘之间，由内核使用 （当 free 状态的内存不够时，它会自动释放出来，也可以手动释放出来）<br>6) cached 内存中被系统分配但是还没有被使用的 cached 大小。这些数据暂时存储在内容中，当下次再此使用时可以在内存中被快速调用。cached （cache page） 代表普通文件数据 （硬盘里的数据） 所占用的缓存页，对应 vfs 页缓冲层的数据，处于内存和 CPU （处理器） 之间，由应用程序使用 （当 free 状态的内存不够时，它会自动释放出来，也可以手动释放出来）<br>7) -buffers/cached = used &#8211; buffers &#8211; cached，也就是真实的内存使用量<br>8) +buffers/cached = free + buffers + cached，也就是真实的内存剩余量<br>9) available = free + buffers + cached，也就是真实的内存剩余量</p>



<p>（<br>补充：释放处于 buffers 和 cached 状态内存的方法</p>



<p>1) 释放 page cache：</p>



<pre class="wp-block-code"><code># echo 1 &gt; /proc/sys/vm/drop_caches</code></pre>



<p>2) 释放 dentries 和 inodes：</p>



<pre class="wp-block-code"><code># echo 2 &gt; /proc/sys/vm/drop_caches</code></pre>



<p>3) 同时释放 pagecache、dentries 和 inodes：</p>



<pre class="wp-block-code"><code># echo 3 &gt; /proc/sys/vm/drop_caches</code></pre>



<p>）</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[内容] Linux BIOS 和 EFI 的区分 （系统安装时启动分区种类的显示）</title>
		<link>https://eternalcenter-sep-2022.github.io/bios-efi/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 08:46:20 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<category><![CDATA[System Installation (系统安装)]]></category>
		<category><![CDATA[System Operation (系统操作)]]></category>
		<category><![CDATA[System Operation & System Setting & System Software (系统操作 & 系统设置 & 系统软件)]]></category>
		<category><![CDATA[System Storage (系统存储)]]></category>
		<category><![CDATA[System Storage & System Directory & System File (系统存储 & 系统目录 & 系统文件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=13591</guid>

					<description><![CDATA[内容一：判断 Linux 是 BIOS 还是 EFI 的方法 （补充：如果 /sys/firmware/efi 目录存在，则代表系统是 EFI，否则系统是 BIOS） 内容二：判断 Linux 是 BIOS 还是 EFI 的脚本]]></description>
										<content:encoded><![CDATA[
<h3 id="内容一-判断-linux-是-bios-还是-efi-的方法">内容一：判断 Linux 是 BIOS 还是 EFI 的方法</h3>



<pre class="wp-block-code"><code># ls -ld /sys/firmware/efi</code></pre>



<p>（补充：如果 /sys/firmware/efi 目录存在，则代表系统是 EFI，否则系统是 BIOS）</p>



<h3 id="内容二-判断-linux-是-bios-还是-efi-的脚本">内容二：判断 Linux 是 BIOS 还是 EFI 的脚本</h3>



<pre class="wp-block-code"><code># &#91; -d /sys/firmware/efi ] &amp;&amp; echo UEFI || echo BIOS</code></pre>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[命令] Linux 命令 ipmitool （管理服务器硬件）（转载）</title>
		<link>https://eternalcenter-sep-2022.github.io/ipmitool/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Fri, 23 Oct 2020 14:12:26 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=11597</guid>

					<description><![CDATA[注明：所有转载内容皆直接从被转载文章网页的标题和内容的文本中复制而来]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code>ipmitool安装，常用指令

IPMI: Intelligent Platform Management Interface
1.下载地址：

https:&#47;&#47;sourceforge.net/projects/ipmitool/
2.安装步骤

a. tar -xvf ipmitool-1.8.18.tar.bz2
b. cd ipmitool-1.8.18
c. ./configure
d. make
e.make install
f.
modprobe ipmi_si
modprobe ipmi_devintf
modprobe ipmi_msghandler
安装成功（实测Centos7.4）
3.常用指令

    远程电源控制类 远程电源控制类
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power off
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power on
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power reset
    Ipmitool -I lanplus –H 10.32.228.111 –U username –P Passwordchassis power cycle
    (注意power cycle 和power reset的区别在于前者从掉电到上电有１秒钟的间隔，而后者是很快上电)
    读取系统状态类
    Ipmitool sensor list 　显示系统所有传感器列表
    Ipmitool fru list　　　显示系统所有现场可替代器件的列表
    Ipmitool sdr list　　　显示系统所有SDRRepository设备列表　
    Ipmitool pef list 　　显示系统平台时间过滤的列表
    3 系统日志类
    Ipmitool sel elist　　　显示所有系统事件日志
    Ipmitool sel clear　　　删除所有系统时间日志
    Ipmitool sel delete ID 删除第ID条SEL
    Ipmitool sel time get 　显示当前BMC的时间
    Ipmitool sel time set XXX 设置当前BMC的时间
    启动设置类
    Ipmitool chassis bootdev bios 重启后停在BIOS 菜单
    Ipmitool chassis bootdev pxe　重启后从PXE启动
    系统相关的命令
    Ipmitool mc info 显示BMC版本信息
    Ipmitool bmc reset cold BMC 热启动
    Ipmitool bmc reset warmBMC冷启动
    网络接口相关命令
    Ipmitool lan print 1 显示channel1的网络配置信息
    Ipmitool lan set 1ipaddr 10.32.2.2 设置channel1的IP地址
    Ipmitool lan set 1 netmask 255.255.0.0 设置channel1的netmask
    Ipmitool lan set 4 defgw ipaddr255.255.0.254 设置channel4的网关
    Ipmitool lan set 2 defgw macaddr 　设置channel2的网关mac address
    Ipmitool lan set 2 ipsrc dhcp 设置channel2的ip 源在DHCP
    Ipmitool lan set 3 ipsrc static 设置channel2的ip是静态获得的
    通道相关命令
    Ipmitool channel info　显示系统默认channel
    Ipmitool channel authcap channel-number privilege 　修改通道的优先级别
    Ipmitool channel getaccess channel-number user-id　读取用户在通道上的权限
    Ipmitool channel setacccess channel-number user-id callin=on ipmi=on link=onprivilege=5 // 设置用户在通道上的权限
    看门狗相关命令
    Ipmitool mc watchdog get　读取当前看门狗的设置
    Ipmitool watchdog off 　　关掉看门狗
    Ipmitool watchdog reset 　　在最近设置的计数器的基础上重启看门狗
    用户管理相关命令
    Ipmitool user list chan-id 显示某通道上的所有用户
    Ipmitool set password &#91;] 修改某用户的密码
    Ipmitool disable 　　禁止掉某用户
    ipmitool enable 　　使能某用户
    ipmitool priv &#91;]　修改某用户在某通道上的权限
    ipmitool test &lt;16|20>&#91;&lt;password]>　测试用户
————————————————
版权声明：本文为CSDN博主「Rudy,Zhao」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。
原文链接：https://blog.csdn.net/weixin_40343504/article/details/82664389</code></pre>



<p>注明：所有转载内容皆直接从被转载文章网页的标题和内容的文本中复制而来</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img width="1013" height="191" src="https://eternalcenter-sep-2022.github.io/wp-content/uploads/2020/10/版权申明证明-ipmitool-.png" alt="" class="wp-image-11600" srcset="https://eternalcenter-sep-2022.github.io/wp-content/uploads/2020/10/版权申明证明-ipmitool-.png 1013w, https://eternalcenter-sep-2022.github.io/wp-content/uploads/2020/10/版权申明证明-ipmitool--300x57.png 300w, https://eternalcenter-sep-2022.github.io/wp-content/uploads/2020/10/版权申明证明-ipmitool--768x145.png 768w" sizes="(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px" /><figcaption>CC 4.0 BY-SA 版权协议网址：https://creativecommons.org/licenses/by-sa/4.0/deed.z</figcaption></figure></div>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>[步骤] Linux 光纤号的显示</title>
		<link>https://eternalcenter-sep-2022.github.io/optical-fiber/</link>
		
		<dc:creator><![CDATA[Mingyu Zhu]]></dc:creator>
		<pubDate>Wed, 15 Jul 2020 05:33:29 +0000</pubDate>
				<category><![CDATA[Chinese (中文)]]></category>
		<category><![CDATA[System (系统)]]></category>
		<category><![CDATA[System Computer & System Hardware & System Installation & System Upgradation (系统电脑 & 系统硬件 & 系统安装 & 系统升级)]]></category>
		<category><![CDATA[System Hardware (系统硬件)]]></category>
		<guid isPermaLink="false">https://eternalcenter-sep-2022.github.io/?p=10001</guid>

					<description><![CDATA[步骤一：显示有哪些光纤号 步骤二：显示光纤号有哪些配置文件 步骤三：显示光纤号配置文件里对应 FC HBA 卡的 WWN 信息 步骤四：显示光纤的状态 4.1 光纤正常在线的情况 4.2 光纤不正常或者不在线的情况]]></description>
										<content:encoded><![CDATA[
<h3 id="步骤一-查看有哪些光纤号">步骤一：显示有哪些光纤号</h3>



<pre class="wp-block-code"><code># lspci | grep -i fibre</code></pre>



<h3 id="步骤二-查看光纤号有哪些配置文件">步骤二：显示光纤号有哪些配置文件</h3>



<pre class="wp-block-code"><code># ls /sys/class/fc_host/
host1  host2  host3  host4</code></pre>



<h3 id="步骤三-查看光纤号配置文件里对应-fc-hba-卡的-wwn-信息">步骤三：显示光纤号配置文件里对应 FC HBA 卡的 WWN 信息</h3>



<pre class="wp-block-code"><code># cat /sys/class/fc_host/host&#91;1-4]/port_name</code></pre>



<h3 id="步骤四-显示光纤的状态-4-1-光纤正常在线的情况">步骤四：显示光纤的状态</h3>



<h4 id="步骤四-显示光纤的状态-4-1-光纤正常在线的情况">4.1 光纤正常在线的情况</h4>



<pre class="wp-block-code"><code># cat /sys/class/fc_host/host5/port_state
online</code></pre>



<h4 id="4-2-光纤不正常或者不在线的情况">4.2 光纤不正常或者不在线的情况</h4>



<pre class="wp-block-code"><code># cat /sys/class/fc_host/host7/port_state
linkdown</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
