<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Central Processing Unit on Amit Agarwal Linux Blog</title>
    <link>/tags/central-processing-unit/</link>
    <description>Recent content in Central Processing Unit on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 06 Jan 2014 00:33:23 +0000</lastBuildDate>
    
	<atom:link href="/tags/central-processing-unit/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>cgroups – use to control your cpu and memory</title>
      <link>/2014/01/06/cgroups-control-cpu-memory/</link>
      <pubDate>Mon, 06 Jan 2014 00:33:23 +0000</pubDate>
      
      <guid>/2014/01/06/cgroups-control-cpu-memory/</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;a class=&#34;zem_slink&#34; title=&#34;Cgroups&#34; href=&#34;http://en.wikipedia.org/wiki/Cgroups&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;cgroups&lt;/a&gt;&lt;/strong&gt; is a kernel feature and with &lt;a class=&#34;zem_slink&#34; title=&#34;User space&#34; href=&#34;http://en.wikipedia.org/wiki/User_space&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;userspace&lt;/a&gt; utilities, we can use the feature to control the cpu and memory for per process. So, lets first install the required tools.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo yum install libcgroup-tools&lt;/pre&gt;
&lt;p&gt;Now, we need to enable the service.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;sudo systemctl enable cgconfig.service
sudo systemctl enable cgred.service&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;cgconfig.service&lt;/strong&gt; is to enable configuration for cgroups and&lt;br&gt;
&lt;strong&gt;cgred.service&lt;/strong&gt; is to enable configuration for cgroups for processes depending on the name.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Monitor your system with sysusage.</title>
      <link>/2013/12/02/monitor-system-sysusage/</link>
      <pubDate>Mon, 02 Dec 2013 01:02:31 +0000</pubDate>
      
      <guid>/2013/12/02/monitor-system-sysusage/</guid>
      <description>&lt;p&gt;First some information on sysusage:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Description :&lt;br&gt;
SysUsage continuously monitor your systems informations and generate&lt;br&gt;
periodical graph reports using &lt;a class=&#34;zem_slink&#34; title=&#34;RRDtool&#34; href=&#34;http://oss.oetiker.ch/rrdtool/&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;rrdtool&lt;/a&gt; or javascript jqplot library.&lt;br&gt;
All reports are shown throught a &lt;a class=&#34;zem_slink&#34; title=&#34;User interface&#34; href=&#34;http://en.wikipedia.org/wiki/User_interface&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;web interface&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;SysUsage grabs all system activities using Sar and system commands allowing&lt;br&gt;
you to keep tracks of your computer or &lt;a class=&#34;zem_slink&#34; title=&#34;Server (computing)&#34; href=&#34;http://en.wikipedia.org/wiki/Server_%28computing%29&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;server&lt;/a&gt; activity during his life.&lt;br&gt;
It is a great help for performance analysis and resources management. The&lt;br&gt;
threshold notification can alarm you when the system capabilities are&lt;br&gt;
reached by sending &lt;a class=&#34;zem_slink&#34; title=&#34;Simple Mail Transfer Protocol&#34; href=&#34;http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;SMTP&lt;/a&gt; messages or throught &lt;a class=&#34;zem_slink&#34; title=&#34;Nagios&#34; href=&#34;http://www.nagios.org&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;Nagios&lt;/a&gt; reports.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>zswap – compcache, compressed swap for better performance</title>
      <link>/2013/11/17/zswap-compcache-compressed-swap-performance/</link>
      <pubDate>Sun, 17 Nov 2013 01:45:06 +0000</pubDate>
      
      <guid>/2013/11/17/zswap-compcache-compressed-swap-performance/</guid>
      <description>&lt;p&gt;First, here is a link to article on compcache.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://code.google.com/p/compcache/wiki/CompilingAndUsingNew&#34;&gt;http://code.google.com/p/compcache/wiki/CompilingAndUsingNew&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;zswap is already in the &lt;a class=&#34;zem_slink&#34; title=&#34;Kernel (computing)&#34; href=&#34;http://en.wikipedia.org/wiki/Kernel_%28computing%29&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;kernel&lt;/a&gt; and you can see the documentation in the kernel documentation. Here is the name of the file if you need:&lt;/p&gt;
&lt;p&gt;/usr/share/doc/kernel-doc-$(&lt;a class=&#34;zem_slink&#34; title=&#34;Uname&#34; href=&#34;http://en.wikipedia.org/wiki/Uname&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;uname&lt;/a&gt; -r)/Documentation/vm/zswap.txt&lt;/p&gt;
&lt;p&gt;Here is the overview, in case you do not want to install kernel-doc&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Overview:&lt;/p&gt;
&lt;p&gt;Zswap is a lightweight &lt;a class=&#34;zem_slink&#34; title=&#34;Data compression&#34; href=&#34;http://en.wikipedia.org/wiki/Data_compression&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;compressed&lt;/a&gt; cache for swap pages. It takes pages that are&lt;br&gt;
in the process of being swapped out and attempts to compress them into a&lt;br&gt;
&lt;a class=&#34;zem_slink&#34; title=&#34;Memory management&#34; href=&#34;http://en.wikipedia.org/wiki/Memory_management&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;dynamically allocated&lt;/a&gt; &lt;a class=&#34;zem_slink&#34; title=&#34;Random-access memory&#34; href=&#34;http://en.wikipedia.org/wiki/Random-access_memory&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;RAM&lt;/a&gt;-based &lt;a class=&#34;zem_slink&#34; title=&#34;Memory pool&#34; href=&#34;http://en.wikipedia.org/wiki/Memory_pool&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;memory pool&lt;/a&gt;.  zswap basically trades &lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;CPU&lt;/a&gt; cycles&lt;br&gt;
for potentially reduced swap &lt;a class=&#34;zem_slink&#34; title=&#34;Input/output&#34; href=&#34;http://en.wikipedia.org/wiki/Input/output&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;I/O&lt;/a&gt;.  This trade-off can also result in a&lt;br&gt;
significant performance improvement if reads from the compressed cache are&lt;br&gt;
faster than reads from a swap device.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Disable a few cores when you want to save power.</title>
      <link>/2012/12/28/disable-cores-save-power/</link>
      <pubDate>Fri, 28 Dec 2012 01:23:46 +0000</pubDate>
      
      <guid>/2012/12/28/disable-cores-save-power/</guid>
      <description>&lt;p&gt;If you have a lot of &lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;CPU&lt;/a&gt; power and working on battery. If you do not need that much of power and would like to rather save some &lt;a class=&#34;zem_slink&#34; title=&#34;Batteries drain rates infographics&#34; href=&#34;http://blog.lenovo.com/products/when-will-batteries-last-the-work-week?cid=us|425522&#34; target=&#34;_blank&#34; rel=&#34;lenovo&#34;&gt;battery power&lt;/a&gt; by disabling some cpus then you can use the below script. This script disables cpus from 4 to 7. You can change the number in the &lt;a class=&#34;zem_slink&#34; title=&#34;For loop&#34; href=&#34;http://en.wikipedia.org/wiki/For_loop&#34; target=&#34;_blank&#34; rel=&#34;wikipedia&#34;&gt;for loop&lt;/a&gt;. You would need the &lt;a class=&#34;zem_slink&#34; title=&#34;Sudo&#34; href=&#34;http://www.sudo.ws&#34; target=&#34;_blank&#34; rel=&#34;homepage&#34;&gt;sudo&lt;/a&gt; to be setup or remove sudo and run the script as root. The script will show you the currently active cpu’s before and after disabling the CPU’s.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Music players on Linux – the poor mans random song player.</title>
      <link>/2012/07/20/music-players-linux-poor-mans-random-song-player/</link>
      <pubDate>Fri, 20 Jul 2012 06:06:43 +0000</pubDate>
      
      <guid>/2012/07/20/music-players-linux-poor-mans-random-song-player/</guid>
      <description>&lt;p&gt;If you have more applications running on your system then your system can handle them then you know what I mean when I say that the Music Players take a lot of &lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;CPU&lt;/a&gt;. Otherwise harmless, but when you are doing too many things, then lot of times you would feel that probably stopping the Music player might help. But then &lt;a class=&#34;zem_slink&#34; title=&#34;Linux&#34; href=&#34;http://en.wikipedia.org/wiki/Linux&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;Linux&lt;/a&gt; is all about alternatives. So, there is a &lt;a class=&#34;zem_slink&#34; title=&#34;Command-line interface&#34; href=&#34;http://en.wikipedia.org/wiki/Command-line_interface&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;command line&lt;/a&gt; player called &lt;a class=&#34;zem_slink&#34; title=&#34;Mpg123&#34; href=&#34;http://mpg123.org/&#34; rel=&#34;homepage&#34; target=&#34;_blank&#34;&gt;mpg123&lt;/a&gt;, which does not use so much CPU. But what about &lt;a class=&#34;zem_slink&#34; title=&#34;Playlist&#34; href=&#34;http://en.wikipedia.org/wiki/Playlist&#34; rel=&#34;wikipedia&#34; target=&#34;_blank&#34;&gt;playlist&lt;/a&gt; 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Benchmarking the system/CPU performance</title>
      <link>/2012/01/15/benchmarking-system-cpu-performance/</link>
      <pubDate>Sun, 15 Jan 2012 07:56:44 +0000</pubDate>
      
      <guid>/2012/01/15/benchmarking-system-cpu-performance/</guid>
      <description>&lt;p&gt;Have you ever wanted to have a quick check on your CPU performance. I know that lot of people will say that this is not the right way to do this, but here is something that you can use to check the CPU speed.&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;#!/bin/bash -
#===============================================================================
#
#          FILE:  benchmark.sh
#
#         USAGE:  ./benchmark.sh
#
#   DESCRIPTION:  Benchmark the CPU
#
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), amit.agarwal@roamware.com
#       COMPANY: Roamware India Pvt Ltd
#       CREATED: 09/21/2011 11:46:03 AM IST
# Last modified: Wed Sep 21, 2011  12:22PM
#      REVISION:  ---
#===============================================================================

add ()
{
    COUNTER=0
    exec 2&amp;gt;&amp;1
    time=$(exec 2&amp;gt;&amp;1;(time while [[  $COUNTER -lt 100000 ]]; do ((COUNTER++)) \
        ; done))
    echo &#34;Time for 100000 additions is &#34;$time
}	# ----------  end of function add  ----------
mul ()
{
    COUNTER=0
    test=2
    exec 2&amp;gt;&amp;1
    time=$(exec 2&amp;gt;&amp;1;(time while [[  $COUNTER -lt 100000 ]]; do ((COUNTER++)) \
        ; ((test=test*2));done))
    echo &#34;Time for 100000 mul is &#34;$time
}	# ----------  end of function add  ----------
div ()
{
    COUNTER=0
    test=1000000000000
    exec 2&amp;gt;&amp;1
    time=$(exec 2&amp;gt;&amp;1;(time while [[  $COUNTER -lt 100000 ]]; do ((COUNTER++)) \
        ; (( test=test/2)); done)|tr -d &#39;\n&#39;)
    echo &#34;Time for 100000 divisions is &#34;${time}
}	# ----------  end of function add  ----------

time add
time mul
time div&lt;/pre&gt;
&lt;p&gt;And here is the output :&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>BASH Script Performace</title>
      <link>/2012/01/06/bash-script-performace/</link>
      <pubDate>Fri, 06 Jan 2012 06:38:04 +0000</pubDate>
      
      <guid>/2012/01/06/bash-script-performace/</guid>
      <description>&lt;p&gt;Today we will look at some bash code snippests and the performance issues. Lets first look at the problem and the implemented solution:&lt;/p&gt;
&lt;p&gt;Problem: We needed to log the output of the ps command for all the process’s. This was required to be done on per minute basis and the output was required in comma separated files. So, here is what was implemented:&lt;/p&gt;
&lt;pre class=&#34;brush: bash; gutter: true; first-line: 1&#34;&gt;pslog=`ps -e -opid,ppid,user,nlwp,pmem,vsz,rss,s,time,stime,pri,nice,pcp:u,args|grep -v PID|sort -r -k 13,13`
        OLD_IFS=$IFS
        IFS=$&#39;\n&#39;
        logarr=( $pslog )
        for LOGLINE in ${logarr[@]}
        do
                LOGLINE=`echo $LOGLINE|awk &#39;{OFS=&#34;,&#34;;print $1,$2,$3,$4,$5,$6,$7,:$8,$9,$10,$11,$12,$13,$14}&#39;`
                echo $LOGLINE &amp;gt;&amp;gt; output
        done
        IFS=$OLD_IFS&lt;/pre&gt;
&lt;p&gt;This was working well and there were no issues. But suddenly we started seeing issues with the reported &lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34; rel=&#34;wikipedia&#34;&gt;CPU&lt;/a&gt; usages. We would see that whenever this script was running the &lt;a class=&#34;zem_slink&#34; title=&#34;CPU time&#34; href=&#34;http://en.wikipedia.org/wiki/CPU_time&#34; rel=&#34;wikipedia&#34;&gt;CPU usage&lt;/a&gt; was high, specially if there were too many process’s/thread’s on the system during that time.  This code was definitely part of a very large &lt;a class=&#34;zem_slink&#34; title=&#34;Codebase&#34; href=&#34;http://en.wikipedia.org/wiki/Codebase&#34; rel=&#34;wikipedia&#34;&gt;code base&lt;/a&gt;, and at this point of time we did not know what was causing the issues.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>qemu manager for Windows to run your linux distribution</title>
      <link>/2011/12/22/qemu-manager-windows-run-linux-distribution/</link>
      <pubDate>Thu, 22 Dec 2011 06:33:49 +0000</pubDate>
      
      <guid>/2011/12/22/qemu-manager-windows-run-linux-distribution/</guid>
      <description>&lt;p&gt;If you are into virtualization, then you must have heard about &lt;a class=&#34;zem_slink&#34; title=&#34;QEMU&#34; href=&#34;http://www.qemu.org/&#34; rel=&#34;homepage&#34;&gt;Qemu&lt;/a&gt;. And if you are on windows then this is a must:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.davereyn.co.uk/download.htm&#34; target=&#34;_blank&#34;&gt;&lt;a href=&#34;http://www.davereyn.co.uk/download.htm&#34;&gt;http://www.davereyn.co.uk/download.htm&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34;&gt;
  Related articles
&lt;/h6&gt;
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.cbsnews.com/8301-503544_162-57336185-503544/herman-cain-drops-white-house-bid/&#34;&gt;Political Hotsheet Herman Cain drops out 1 of 9 &amp;#8211; CBS News&lt;/a&gt; (cbsnews.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://abcnews.go.com/Politics/wireStory/romney-gingrich-proceed-carefully-gop-showdown-15080240&#34;&gt;Romney, Gingrich Proceed Carefully in GOP Showdown &amp;#8211; ABC News&lt;/a&gt; (abcnews.go.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://www.chicagotribune.com/sports/college/ct-spt-1204-wisconsin-msu-big-ten-championship--20111204,0,1014837.story&#34;&gt;Wisconsin rallies to beat Michigan State in Big Ten title game &amp;#8211; Chicago Tribune&lt;/a&gt; (chicagotribune.com)
  &lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34;&gt;
  &lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34; /&gt;&lt;/a&gt;
&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>faster bash operations on files with File Descriptors.</title>
      <link>/2011/06/11/faster-bash-operations-files-file-descriptors/</link>
      <pubDate>Sat, 11 Jun 2011 02:11:53 +0000</pubDate>
      
      <guid>/2011/06/11/faster-bash-operations-files-file-descriptors/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I was &lt;a class=&#34;zem_slink&#34; title=&#34;Writing&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Writing&#34;&gt;writing&lt;/a&gt; a &lt;a class=&#34;zem_slink&#34; title=&#34;Bash (Unix shell)&#34; rel=&#34;homepage&#34; href=&#34;http://tiswww.case.edu/php/chet/bash/bashtop.html&#34;&gt;bash script&lt;/a&gt; that would do some operations and read and write to file. Seems that that was pretty simple with&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;2&lt;br /&gt;3&lt;br /&gt;4&lt;br /&gt;5&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      while read line&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; do&amp;lt;br /&amp;gt; &amp;lt;br /&amp;gt; done&amp;lt;file
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;and then use redirection operations like “&amp;gt;” and “&amp;raquo;” to write to file. Done with the script pretty fast. So far so good, when I went for real life tests, no one was interested in using it, why? Simple, it was simply taking too long. The file was reading about 10K lines and writing about 50 lines and was taking about more than 10 minutes.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Total upload and download on any interface.</title>
      <link>/2011/06/05/total-upload-download-interface/</link>
      <pubDate>Sun, 05 Jun 2011 01:29:21 +0000</pubDate>
      
      <guid>/2011/06/05/total-upload-download-interface/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Something that I have been searching for a long time, finally some look inside the &amp;lt;a class=&amp;ldquo;zem_slink&amp;rdquo; title=&amp;ldquo;Procfs&amp;rdquo; rel=&amp;ldquo;wikipedia&amp;rdquo; href=&amp;ldquo;&lt;a href=&#34;http://en.wikipedia.org/wiki/Procfs%22&#34;&gt;http://en.wikipedia.org/wiki/Procfs&amp;quot;&lt;/a&gt; _mce_href=&amp;ldquo;&lt;a href=&#34;http://en.wikipedia.org/wiki/Procfs%22%3E/proc&#34;&gt;http://en.wikipedia.org/wiki/Procfs&amp;quot;&amp;gt;/proc&lt;/a&gt;&lt;/a&gt; got me what I wanted. Hope this will save someone’s day. So far, the only option I could think of was to run conky which becomes a little heave on some of the very old laptops I have to use sometimes 🙁&lt;/p&gt;
&lt;div class=&#34;codecolorer-container text solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;text codecolorer&amp;quot;&amp;gt;
      &amp;amp;nbsp;cat /proc/net/dev|grep eth2|awk &#39;{print $2/1024/1024&amp;quot;&amp;amp;nbsp; &amp;quot;$10/1024/1024}&#39;
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;&lt;h6 class=&#34;zemanta-related-title&#34; style=&#34;font-size: 1em;&#34; \_mce\_style=&#34;font-size: 1em;&#34;&gt;Related articles&lt;/h6&gt; 
&lt;ul class=&#34;zemanta-article-ul&#34;&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://jarneil.wordpress.com/2011/03/15/cpuspeed-slowing-you-down/&#34; _mce_href=&#34;http://jarneil.wordpress.com/2011/03/15/cpuspeed-slowing-you-down/&#34;&gt;CPUSPEED Slowing you down?&lt;/a&gt; (jarneil.wordpress.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://lingpipe-blog.com/2011/05/26/interface-curmudgeons/&#34; _mce_href=&#34;http://lingpipe-blog.com/2011/05/26/interface-curmudgeons/&#34;&gt;Interface Curmudgeons versus Gestures&lt;/a&gt; (lingpipe-blog.com)
  &lt;/li&gt;
  &lt;li class=&#34;zemanta-article-ul-li&#34;&gt;
    &lt;a href=&#34;http://michaeldaranto.wordpress.com/2011/05/28/alias-in-bashrc/&#34; _mce_href=&#34;http://michaeldaranto.wordpress.com/2011/05/28/alias-in-bashrc/&#34;&gt;Alias in .bashrc&lt;/a&gt; (michaeldaranto.wordpress.com)
  &lt;/li&gt;
&lt;/ul&gt;&lt;div class=&#34;zemanta-pixie&#34; style=&#34;margin-top: 10px; height: 15px;&#34; \_mce\_style=&#34;margin-top: 10px; height: 15px;&#34;&gt;&lt;a class=&#34;zemanta-pixie-a&#34; title=&#34;Enhanced by Zemanta&#34; href=&#34;http://www.zemanta.com/&#34; \_mce\_href=&#34;http://www.zemanta.com/&#34;&gt;&lt;img class=&#34;zemanta-pixie-img&#34; style=&#34;border: medium none; float: right;&#34; \_mce\_style=&#34;border: medium none; float: right;&#34; src=&#34;https://i1.wp.com/img.zemanta.com/zemified\_e.png?w=688&#34; \_mce\_src=&#34;https://i1.wp.com/img.zemanta.com/zemified\_e.png?w=688&#34; alt=&#34;Enhanced by Zemanta&#34; data-recalc-dims=&#34;1&#34;/&gt;&lt;/a&gt;&lt;br \_mce\_bogus=&#34;1&#34;/&gt;&lt;/div&gt;</description>
    </item>
    
    <item>
      <title>10 Useful Sar (Sysstat) Examples for UNIX / Linux Performance Monitoring</title>
      <link>/2011/04/22/10-sar-sysstat-examples-unix-linux-performance-monitoring/</link>
      <pubDate>Fri, 22 Apr 2011 02:20:48 +0000</pubDate>
      
      <guid>/2011/04/22/10-sar-sysstat-examples-unix-linux-performance-monitoring/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;h1&gt;&lt;strong&gt;&lt;span style=&#34;font-size: x-large;&#34;&gt;10 &lt;a class=&#34;zem_slink&#34; title=&#34;Utility&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Utility&#34;&gt;Useful&lt;/a&gt; &lt;a class=&#34;zem_slink&#34; title=&#34;Sar in UNIX&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Sar_in_UNIX&#34;&gt;Sar&lt;/a&gt; (Sysstat) Examples for UNIX / &lt;a class=&#34;zem_slink&#34; title=&#34;Linux&#34; rel=&#34;homepage&#34; href=&#34;http://www.kernel.org/&#34;&gt;Linux&lt;/a&gt; Performance Monitoring&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;by Ramesh Natarajan on March 29, 2011&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;https://i2.wp.com/www.thegeekstuff.com/wp-content/uploads/2011/12/sar-tutorial-300x176.png?resize=300%2C176&#34; border=&#34;0&#34; alt=&#34;&#34; width=&#34;300&#34; height=&#34;176&#34; align=&#34;bottom&#34; data-recalc-dims=&#34;1&#34; /&gt; Using sar you can monitor performance of various Linux subsystems (&lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34;&gt;CPU&lt;/a&gt;, Memory, I/O..) in real time.&lt;/p&gt;
&lt;p&gt;Using sar, you can also collect all performance data on an on-going basis, store them, and do historical analysis to identify bottlenecks.&lt;/p&gt;
&lt;p&gt;Sar is part of the sysstat package.&lt;/p&gt;
&lt;p&gt;This article explains how to install and configure sysstat package (which contains sar utility) and explains how to monitor the following Linux performance statistics using sar.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>use finch, less memory and cpu usage, in replacement for pidgin.</title>
      <link>/2011/03/27/use-finch-less-memory-and-cpu-usage-in-replacement-for-pidgin/</link>
      <pubDate>Sun, 27 Mar 2011 06:50:14 +0000</pubDate>
      
      <guid>/2011/03/27/use-finch-less-memory-and-cpu-usage-in-replacement-for-pidgin/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;Well, if you are on linux then you have options – is a known fact. But how those options help?&lt;/p&gt;
&lt;p&gt;I was working on a machine which had very less &lt;a class=&#34;zem_slink&#34; title=&#34;Random-access memory&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Random-access_memory&#34;&gt;RAM&lt;/a&gt; and was quite old system and it was running F14. Guess what would be the state of the system with pidgin, xmms, firefox, evolution and couple of terminals. Now, this is where if you could save a few cycles of &lt;a class=&#34;zem_slink&#34; title=&#34;Central processing unit&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Central_processing_unit&#34;&gt;CPU&lt;/a&gt; then you can actullay see the difference in sluggish &lt;a class=&#34;zem_slink&#34; title=&#34;Graphical user interface&#34; rel=&#34;wikipedia&#34; href=&#34;http://en.wikipedia.org/wiki/Graphical_user_interface&#34;&gt;GUI&lt;/a&gt; and and an okay sort of GUI. So, first off, kill pidgin and use finch.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>top - looks better and is more useful with a rc file...</title>
      <link>/2010/05/07/top-rc-file/</link>
      <pubDate>Fri, 07 May 2010 03:27:39 +0000</pubDate>
      
      <guid>/2010/05/07/top-rc-file/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;top is a very useful command to find out who is eating up the &amp;lt;a class=&amp;quot;zem_slink freebase/en/central_processing_unit&amp;quot; title=&amp;quot;Central processing unit&amp;quot; rel=&amp;quot;wikipedia&amp;quot; href=&amp;quot;http://en.wikipedia.org/wiki/Central_processing_unit&amp;quot;&amp;gt;CPU&lt;/a&gt; or the memory. But sometimes the plain and simple look simply would be boring so how about some fun. Copy the below code to file : ~/.toprc&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;RCfile for &amp;amp;#8221;top&amp;amp;#8221;&lt;br&gt;
Id:a, Mode_altscr=1, Mode_irixps=0, Delay_time=5.000, Curwin=0&lt;br&gt;
Def    fieldscur=mfcAbdEgHIursOpQTvyzWjKNLX&lt;br&gt;
winflags=32184, sortindx=10, maxtasks=0&lt;br&gt;
summclr=4, msgsclr=5, headclr=5, taskclr=4&lt;br&gt;
Job    fieldscur=ABcefgjlrstuvyzMKNHIWOPQDX&lt;br&gt;
winflags=62777, sortindx=0, maxtasks=0&lt;br&gt;
summclr=6, msgsclr=6, headclr=7, taskclr=6&lt;br&gt;
Mem    fieldscur=ANOPQRSTUVbcdefgjlmyzWHIKX&lt;br&gt;
winflags=62777, sortindx=13, maxtasks=0&lt;br&gt;
summclr=5, msgsclr=5, headclr=4, taskclr=5&lt;br&gt;
Usr    fieldscur=ABDECGfhijlopqrstuvyzMKNWX&lt;br&gt;
winflags=62777, sortindx=4, maxtasks=0&lt;br&gt;
summclr=3, msgsclr=3, headclr=2, taskclr=3&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
