﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-honzeland-随笔分类-Linux</title><link>http://www.blogjava.net/honzeland/category/19364.html</link><description>记录点滴。。。</description><language>zh-cn</language><lastBuildDate>Fri, 08 Jan 2010 16:14:39 GMT</lastBuildDate><pubDate>Fri, 08 Jan 2010 16:14:39 GMT</pubDate><ttl>60</ttl><item><title>RAM percentage utilised in Linux</title><link>http://www.blogjava.net/honzeland/archive/2008/12/26/248410.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Fri, 26 Dec 2008 04:08:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2008/12/26/248410.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/248410.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2008/12/26/248410.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/248410.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/248410.html</trackback:ping><description><![CDATA[--zz: http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1230261484567+28353475&amp;threadId=1213960<br />
<br />
<span class="Text"><span style="color: red;"><span style="color: red;"><span style="color: red;"><span style="color: #0e0000;"><span style="color: red;"><span style="color: #0e0000;"><span style="color: red;"><span style="color: #0e0000;"><span style="color: red;">Question:</span></span></span></span></span></span></span></span></span></span><br />
<span class="Text">We are planning to calculate the percentage of physical memory utilised as below:<br />
<span style="color: red;"><span style="color: red;"><span style="color: red;"><span style="color: #0e0000;"><span style="color: red;"><span style="color: #0e0000;"><span style="color: red;"><span style="color: #0e0000;"></span></span></span></span></span></span></span></span><br />
System Page Size: 4Kbytes<br />
Memory: 5343128K (1562428K) real, 13632356K (3504760K) virtual, 66088K free  Page# 1/604<br />
<br />
Now the formula goes as below:<br />
<br />
(free memory / actual active real memory) * 100<br />
(66088/1562428) * 100 = 4.22 %<br />
<br />
Please let us know if its the correct formula .<br />
<br />
Mainly we are interested in RAM percentage utilised
<br />
<br />
<span style="color: red;">Reply 1:</span><br />
</span><span class="Text">Red Hat/Centos v 5 take spare ram and use it for a buffer cache.<br />
<br />
100%
memory allocation is pretty meaningless because allocation is almost
always near 100%. The 2.6.x kernel permits rapid re-allocation of
buffer to other purposes eliminating a performance penalty that you see
on an OS like HP-UX<br />
<br />
I'm not thrilled with your formula because
it includes swap(virtual memory). If you start digging too deep into
virtual memory, your system start paging processes from memory to disk
and back again and slows down badly.<br />
<br />
The formula is however essentially correct.<br />
<br />
</span><span class="Text"><span style="color: red;">Reply 2:</span></span><br />
<span class="Text">Here, a quick example from the machine under my desk:<br />
Mem:&nbsp; &nbsp;3849216k total,&nbsp; 3648280k used,&nbsp; &nbsp;200936k free,&nbsp; &nbsp;210960k buffers<br />
Swap:&nbsp; 4194296k total,&nbsp; &nbsp;&nbsp; &nbsp; 64k used,&nbsp; 4194232k free,&nbsp; 2986460k cached<br />
<br />
If
the value of 'Swap used' is up (i.e. hundreds of megabytes), then
you've got an issue, but as you can see, it's only 64k here.<br />
Your formula for how much memory is used is something along the lines of this:<br />
<br />
(Used - (Buffers + Cached) / Total) * 100 = Used-by-programs%<br />
(Free + Buffers + Cached / Total) * 100 = Free%<br />
<br />
.. Roughly ..</span><br />
<br />
<br />
<img src ="http://www.blogjava.net/honzeland/aggbug/248410.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2008-12-26 12:08 <a href="http://www.blogjava.net/honzeland/archive/2008/12/26/248410.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Vim使用技巧，长期更新中。。。</title><link>http://www.blogjava.net/honzeland/archive/2008/05/31/204865.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Sat, 31 May 2008 09:22:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2008/05/31/204865.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/204865.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2008/05/31/204865.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/204865.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/204865.html</trackback:ping><description><![CDATA[1. <span class="postbody">多行注释:<br />
</span><span class="postbody">&nbsp;ctrl+v 进入列模式,向下或向上移动光标,把需要注释的行的开头标记起来,然后按大写的I,再插入注释符,比如#,再按esc,就会全部注释了.</span>
<img src ="http://www.blogjava.net/honzeland/aggbug/204865.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2008-05-31 17:22 <a href="http://www.blogjava.net/honzeland/archive/2008/05/31/204865.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu下Vim设置高亮</title><link>http://www.blogjava.net/honzeland/archive/2008/03/05/183915.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Wed, 05 Mar 2008 03:55:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2008/03/05/183915.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/183915.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2008/03/05/183915.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/183915.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/183915.html</trackback:ping><description><![CDATA[1、sudo vim ~/.exrc<br />
添加如下内容：<br />
if ＆t_Co &gt; 1<br />
syntax enable<br />
endif <br />
2、如果不行，再sudo apt-get install vim<br />
<img src ="http://www.blogjava.net/honzeland/aggbug/183915.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2008-03-05 11:55 <a href="http://www.blogjava.net/honzeland/archive/2008/03/05/183915.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu下安装字体</title><link>http://www.blogjava.net/honzeland/archive/2008/03/05/183876.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Wed, 05 Mar 2008 02:44:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2008/03/05/183876.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/183876.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2008/03/05/183876.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/183876.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/183876.html</trackback:ping><description><![CDATA[<span>/usr/share/fonts/truetype/ 下面 的某文件夹，例如yahei
<br />
<br />
cd /usr/share/fonts/truetype/yahei
<br />
<br />
sudo mkfontscale &amp;&amp; sudo mkfontdir &amp;&amp; sudo fc-cache -fv</span><br />
<img src ="http://www.blogjava.net/honzeland/aggbug/183876.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2008-03-05 10:44 <a href="http://www.blogjava.net/honzeland/archive/2008/03/05/183876.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu下安装vmvare</title><link>http://www.blogjava.net/honzeland/archive/2008/01/25/177813.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Fri, 25 Jan 2008 09:41:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2008/01/25/177813.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/177813.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2008/01/25/177813.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/177813.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/177813.html</trackback:ping><description><![CDATA[参考： https://help.ubuntu.com/community/VMware/Workstation<br />
下载tar包， rpm包安装没成功<br />
<pre>sudo apt-get install ia32-libs这句好像没影响，因为测试机是amd－64<br />
安装好后，登录guest OS后，再装vmware-tools，不要单独下载，之间vm-install vmware-tools就可以<br />
<br />
</pre>
<br />
<br />
<img src ="http://www.blogjava.net/honzeland/aggbug/177813.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2008-01-25 17:41 <a href="http://www.blogjava.net/honzeland/archive/2008/01/25/177813.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu下配置匿名vsftp</title><link>http://www.blogjava.net/honzeland/archive/2008/01/17/175957.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Thu, 17 Jan 2008 07:19:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2008/01/17/175957.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/175957.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2008/01/17/175957.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/175957.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/175957.html</trackback:ping><description><![CDATA[1. edit /etc/vsftpd.conf:<br />
listen=YES<br />
anonymous_enable=YES<br />
local_enable=YES<br />
write_enable=YES<br />
local_umask=022<br />
anon_upload_enable=YES<br />
anon_mkdir_write_enable=YES<br />
dirmessage_enable=YES<br />
xferlog_enable=YES<br />
connect_from_port_20=YES<br />
chown_uploads=YES<br />
chown_username=honzeland<br />
ftpd_banner=Welcome to blah FTP service.<br />
secure_chroot_dir=/var/run/vsftpd<br />
pam_service_name=vsftpd<br />
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem<br />
anon_root=/home/ftp<br />
<br />
2. Now we must make writable directory for anonymous user.<br />
cd /home/ftp<br />
sudo mkdir opendir<br />
sudo chmod 777 opendir/<br />
<br />
Note: 采用proftp作server，安装配置更容易<br />
<br />
<img src ="http://www.blogjava.net/honzeland/aggbug/175957.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2008-01-17 15:19 <a href="http://www.blogjava.net/honzeland/archive/2008/01/17/175957.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Pidgin for ubuntu 6.10</title><link>http://www.blogjava.net/honzeland/archive/2007/06/02/121563.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Sat, 02 Jun 2007 15:28:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2007/06/02/121563.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/121563.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2007/06/02/121563.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/121563.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/121563.html</trackback:ping><description><![CDATA[zz from http://swik.net/User:dnoble/Distributed+Collaboration+Blog/Pidgin+on+Ubuntu+6.10+(Edgy+Eft)/8ik1<br><br><span style="font-weight: bold;">1. Get the source bundle from the Pidgin download site</span><br><br><a  href="http://pidgin.im/pidgin/download/source/">http://pidgin.im/pidgin/download/source/</a><br><br><span style="font-weight: bold;">2. Extract the contents</span>
<pre>tar jxf pidgin-2.0.0.tar.bz2<br>cd pidgin-2.0.0</pre>
<span style="font-weight: bold;">3. Install some prerequisites</span>
<pre>sudo apt-get install \<br>    libglib1.2-dev \<br>    libglib2.0-dev \<br>    libgtk2.0-dev<br><br>sudo apt-get install \<br>    libnspr-dev \<br>    libnspr4 \<br>    libnspr4-0d \<br>    libnss3 \<br>    libnss3-0d \<br>    libnss-db \<br>    libnss-dev \<br>    libssl0.9.8 \<br>    libssl-dev \<br>    openssl \<br>    ssl-cert</pre>
(Thanks to the <a  href="http://ubuntuforums.org/showthread.php?p=2610442">Ubuntu forums</a> for tips on the SSL library packages)<br><br><span style="font-weight: bold;">4. Configure the build</span><br><br>Override defaults pointing to older versions of GLib and GTK, then generate the makefiles and other build configuration.
<pre>export GLIB_LFLAGS=-lglib-2.0<br>export GLIB_CFLAGS="-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include"<br><br>export GTK_LFLAGS="-lgtk-x11-2.0 -lcairo -latk-1.0"<br>export GTK_CFLAGS="-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include \<br>       -I/usr/include/cairo -I/usr/include/atk-1.0"<br><br>export pango_LIBS=-lpango-1.0<br>export pango_CFLAGS=-I/usr/include/pango-1.0<br><br>export CFLAGS="$GLIB_CFLAGS $GTK_CFLAGS $pango_CFLAGS"<br><br>./configure</pre>
Add a "--prefix=DIR" option to the <span style="font-family: courier new;">configure</span> command if you prefer to specify a custom installation directory.<br><br>*<span class="postbody">***************************************************************************<br>&nbsp;./configure 出现错误
<br>
<br>
checking for LIBXML... no
<br>
no
<br>
configure: error:
<br>
<br>
You must have libxml2 &gt;= 2.6.0 development headers installed to build.
<br>
<br>
于是安装
<br>
sudo apt-get install libxml2-dev
<br>*****************************************************************************<br><br><br></span><br><span style="font-weight: bold;">5. Build the software</span>
<pre>make</pre>
If that doesn't work, redirect the output of "make" to a file and search for the string "errors:" to see what went wrong:
<pre>make &gt; OUTPUT 2&gt;&amp;1</pre>
<span style="font-weight: bold;">6. Install the software</span>
<pre>sudo make install</pre>
If
you ran the configure script with a custom prefix option pointing to a
directory that you can write to without root privileges, then you can
run "make install" without the "sudo".<br><br><span style="font-weight: bold;">7. Done</span><br><br>So that's it. If you are upgrading from Gaim 1.5, all of your configuration will be copied from the <span style="font-family: courier new;">.gaim</span> directory to <span style="font-family: courier new;">.purple</span> in your home directory. Your log files will also be moved, but a symbolic link will point from the <span style="font-family: courier new;">.gaim/logs</span> directory to the .purple/logs directory.<br><br><br><img src ="http://www.blogjava.net/honzeland/aggbug/121563.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2007-06-02 23:28 <a href="http://www.blogjava.net/honzeland/archive/2007/06/02/121563.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Ubuntu6.10安装日记</title><link>http://www.blogjava.net/honzeland/archive/2007/01/20/95067.html</link><dc:creator>honzeland</dc:creator><author>honzeland</author><pubDate>Sat, 20 Jan 2007 10:51:00 GMT</pubDate><guid>http://www.blogjava.net/honzeland/archive/2007/01/20/95067.html</guid><wfw:comment>http://www.blogjava.net/honzeland/comments/95067.html</wfw:comment><comments>http://www.blogjava.net/honzeland/archive/2007/01/20/95067.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/honzeland/comments/commentRss/95067.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/honzeland/services/trackbacks/95067.html</trackback:ping><description><![CDATA[1. 修改源并更新升级Ubuntu:参见 http://wiki.ubuntu.org.cn/%E5%BF%AB%E9%80%9F%E8%AE%BE%E7%BD%AE%E6%8C%87%E5%8D%97/EdgyEft<br />   注意：基本上可以按照该网页上的配置来实现，只是Lumaqq就不用装了<br /><br />2. 以下软件安装可以先通过ubuntu自带的工具：应用程序 -&gt; 添加/删除...来搜索关键字来查看是否存在<br /><br />3. qq软件：eva      msn:使用gaim中自带的就可以了<br /><br />4. 音乐：audacious or beep-media-player<br /><br />5. 视频：参见 http://wiki.ubuntu.org.cn/EdgyGuide#head-a12a543ea800098877d88c7a8e2813dfb5253a55<br />   1) totem-xine: sudo apt-get install totem-xine w32codecs libxine-extracodecs<br />       注意：totem-xine在打开url时，需要在 打开位置 后，右击鼠标将选择的 X输入法 改成 默认，否则，点击打开位置后 ，totem-xine将会停止相应。<br />   2) vlc<br />   3) Mplayer<br />   4) realplayer<br /><br />6. ftp client: KFTPgrabber or filezilla<br />   对于KFTPGrabber可以采用apt-get直接安装,安装后在 Setting -&gt; Configure KFTPGrabber... -&gt; 常规 -&gt; Bookmarks 中的编码选择gb2312,然后在Bookmarks -&gt; 编辑书签 中每一站点Advanced中的服务器编码中选择gb2312<br />   对于filezilla：<br />在 Windows 上有個好用的 FTP client -- Filezilla，它就可以設定遠端 FTP Server 的編碼，而現在 Filezilla 也有 Linux 版本了，可以到它官方網站下載（http://filezilla-project.org/nightly.php），解開後（用 tar -jxvf）會有一個 filezilla3 的目錄，裡面分別有 bin, share 的目錄，你可以按照下面步驟來安裝：<br /><br />   1) 把 filezilla3/bin/ 目錄下的檔案放在 /usr/local/bin 下（sudo mv filezilla3/bin/* /usr/local/bin/）。<br />   2) 把 filezilla3/share/ 目錄下的檔案放在 /usr/local/share/filezilla 目錄下（sudo mv filezilla3/share/filezilla /usr/local/share/）。<br />   3) 然後在 /usr/share/applications 下新增一個 filezilla.desktop 的檔案，內容如下：<br /><br />          [Desktop Entry]<br />          Encoding=UTF-8<br />          Name=Filezilla 3<br />          Comment=Filezilla FTP Client<br />          Exec=filezilla<br />          Icon=/usr/local/share/filezilla/resources/filezilla.png<br />          Terminal=false<br />          Type=Application<br />          Categories=Application;Network;<br />  這樣就可以在選單下啟動 Filezilla 了。<br />  而設定遠端伺服器編碼的地方，必須要在站臺管理員裡設定才行，在站点管理 -&gt; 字符集 -&gt; 使用自定义字符集 中选择gb2312<br /><br />7. Qterm: 直接apt-get<br /><br />8. chm 和 pdf浏览器采用添加/删除工具来实现<br /><br />9. ubuntu默认没有装ssh服务，直接apt-get ssh就可以了<br /><br />10. 更多参考<a href="http://hi.baidu.com/wmywind/blog/item/16cb6c6089a251de8cb10d62.html">http://hi.baidu.com/wmywind/blog/item/16cb6c6089a251de8cb10d62.html</a><img src ="http://www.blogjava.net/honzeland/aggbug/95067.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/honzeland/" target="_blank">honzeland</a> 2007-01-20 18:51 <a href="http://www.blogjava.net/honzeland/archive/2007/01/20/95067.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>