<?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>top command &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/tag/top-command/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Sun, 03 May 2020 11:43:31 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[原创]Linux top命令常用操作总结</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9blinux-top%e5%91%bd%e4%bb%a4%e5%b8%b8%e7%94%a8%e6%93%8d%e4%bd%9c%e6%80%bb%e7%bb%93/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9blinux-top%e5%91%bd%e4%bb%a4%e5%b8%b8%e7%94%a8%e6%93%8d%e4%bd%9c%e6%80%bb%e7%bb%93/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Mon, 19 Aug 2013 02:42:07 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[Linux top]]></category>
		<category><![CDATA[top]]></category>
		<category><![CDATA[top command]]></category>
		<category><![CDATA[top命令]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=6002</guid>

					<description><![CDATA[<p>
Linux下的top命令主要用来查看进程相关的实时信息。这货非常有用，以下是我常用的一些操作的总结。<br />
<span id="more-6002"></span><br />
<span style="background-color:#00ff00;">『1』</span>显示CPU每个核的使用情况<br />
进入top命令后，按键盘上的数字1，即可显示CPU每个核的使用情况，例如：</p>
<pre class="brush:plain;first-line:1;pad-line-numbers:true;highlight:null;collapse:false;">
top - 14:19:53 up 4 days, 22:59,  8 users,  load average: 0.74, 1.22, 1.25
Tasks: 291 total,   1 running, 289 sleeping,   0 stopped,   1 zombie
%Cpu0  :  6.4 us,  9.1 sy,  0.0 ni, 83.6 id,  0.0 wa,  0.0 hi,  0.9 si,  0.0 st
%Cpu1  :  4.2 us,  7.8 sy,  0.0 ni, 87.7 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st
%Cpu2  :  9.1 us,  5.7 sy,  0.0 ni, 85.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  4.5 us,  3.3 sy,  0.0 ni, 91.2 id,  0.9 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:  12231604 total, 11844400 used,   387204 free,   351760 buffers
KiB Swap:  9764860 total,   250272 used,  9514588 free,  5137928 cached
</pre>
<p>我的CPU有4核，所以显示出了Cpu0～Cpu3。</p>
<p><span style="background-color:#00ff00;">『2』</span>显示内存占用排行榜<br />
进入top命令行，按键盘的 <span style="color:#0000ff;">Shift+M</span>，即可显示<span style="font-family: Ubuntu;">进程的</span>内存占用从大到小的排行榜。其中，<span style="color:#b22222;">％M</span> 这一列就表示了此进程占用了百分之几的内存。<br />
但是，这样显示出来的结果是，你在 <span style="color:#b22222;">COMMAND</span>&#160;那一列，看到的是进程的名字，如果你有两个进程是一模一样的名字，那么你就区分不出来到底是哪个进程占用的内存多了，此时，你继续按键盘上的 <span style="color:#0000ff;">C</span> 键，就会发现 <span style="color:#b22222;">COMMAND</span> 那一列已经显示了运行该进程的完整命令了，这样你就便于区分了。</p>
<p>
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9blinux-top%e5%91%bd%e4%bb%a4%e5%b8%b8%e7%94%a8%e6%93%8d%e4%bd%9c%e6%80%bb%e7%bb%93/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<p>
Linux下的top命令主要用来查看进程相关的实时信息。这货非常有用，以下是我常用的一些操作的总结。<br />
<span id="more-6002"></span><br />
<span style="background-color:#00ff00;">『1』</span>显示CPU每个核的使用情况<br />
进入top命令后，按键盘上的数字1，即可显示CPU每个核的使用情况，例如：</p>
<pre class="brush:plain;first-line:1;pad-line-numbers:true;highlight:null;collapse:false;">
top - 14:19:53 up 4 days, 22:59,  8 users,  load average: 0.74, 1.22, 1.25
Tasks: 291 total,   1 running, 289 sleeping,   0 stopped,   1 zombie
%Cpu0  :  6.4 us,  9.1 sy,  0.0 ni, 83.6 id,  0.0 wa,  0.0 hi,  0.9 si,  0.0 st
%Cpu1  :  4.2 us,  7.8 sy,  0.0 ni, 87.7 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st
%Cpu2  :  9.1 us,  5.7 sy,  0.0 ni, 85.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  4.5 us,  3.3 sy,  0.0 ni, 91.2 id,  0.9 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:  12231604 total, 11844400 used,   387204 free,   351760 buffers
KiB Swap:  9764860 total,   250272 used,  9514588 free,  5137928 cached
</pre>
<p>我的CPU有4核，所以显示出了Cpu0～Cpu3。</p>
<p><span style="background-color:#00ff00;">『2』</span>显示内存占用排行榜<br />
进入top命令行，按键盘的 <span style="color:#0000ff;">Shift+M</span>，即可显示<span style="font-family: Ubuntu;">进程的</span>内存占用从大到小的排行榜。其中，<span style="color:#b22222;">％M</span> 这一列就表示了此进程占用了百分之几的内存。<br />
但是，这样显示出来的结果是，你在 <span style="color:#b22222;">COMMAND</span>&nbsp;那一列，看到的是进程的名字，如果你有两个进程是一模一样的名字，那么你就区分不出来到底是哪个进程占用的内存多了，此时，你继续按键盘上的 <span style="color:#0000ff;">C</span> 键，就会发现 <span style="color:#b22222;">COMMAND</span> 那一列已经显示了运行该进程的完整命令了，这样你就便于区分了。</p>
<p>
<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>

			<!--[syntaxhighlighter]-->
			<!--代码高亮，请勿编辑-->
			<script type="text/javascript" src="https://www.codelast.com/wp-content/plugins/ck-and-syntaxhighlighter/syntaxhighlighter/scripts/shCore.js"></script><script type="text/javascript" src="https://www.codelast.com/wp-content/plugins/ck-and-syntaxhighlighter/syntaxhighlighter/scripts/shBrushPlain.js"></script>

			<link type="text/css" rel="stylesheet" href="https://www.codelast.com/wp-content/plugins/ck-and-syntaxhighlighter/syntaxhighlighter/styles/shCoreCk.css" />
			<link type="text/css" rel="stylesheet" href="https://www.codelast.com/wp-content/plugins/ck-and-syntaxhighlighter/syntaxhighlighter/styles/shThemeCk.css" />
			<script type="text/javascript">
			SyntaxHighlighter.defaults['class-name']	= '';
			SyntaxHighlighter.defaults['smart-tabs']	= true;
			SyntaxHighlighter.defaults['tab-size']		= 2;
			SyntaxHighlighter.defaults['gutter']		= true;
			SyntaxHighlighter.defaults['quick-code']	= true;
			SyntaxHighlighter.defaults['collapse'] 		= false;
			SyntaxHighlighter.defaults['auto-links']	= true;
			SyntaxHighlighter.defaults['toolbar']		= true;
			SyntaxHighlighter.all();
			</script>
			<!--[/syntaxhighlighter]-->]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9blinux-top%e5%91%bd%e4%bb%a4%e5%b8%b8%e7%94%a8%e6%93%8d%e4%bd%9c%e6%80%bb%e7%bb%93/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
