LINUX CHEATSHEET – vmstat, ps, top

LINUX Quick Reference Cheat Sheet

vmstat, ps, top

v 0.1 : Last Updated: March 2009 : <kaiwan at designergraphix dot com>
(c) kaiwan billimoria.

Much of the information below gleaned from various Linux man pages.




vmstat fields quick reference

The -a switch displays active/inactive memory, given a 2.5.41 kernel or better.
The -f switch displays the number of forks since boot. This includes the fork, vfork, and clone system calls, and is equivalent to the total number of tasks created. Each process is represented by one or more tasks, depending on thread usage. This display does not repeat.
The -m displays slabinfo.
The -n switch causes the header to be displayed only once rather than periodically.
The -s switch displays a table of various event counters and memory statistics. This display does not repeat.

delay is the delay between updates in seconds. If no delay is specified, only one report is printed with
the average values since boot.
count is the number of updates. If no count is specified and delay is defined, count defaults to infinity.

The -d reports disk statistics (2.5.70 or above required)
The -p followed by some partition name for detailed statistics (2.5.70 or above required)
The -S followed by k or K or m or M switches outputs between 1000, 1024, 1000000, or 1048576 bytes
The -V switch results in displaying version information.



r: The number of processes waiting for run time << ready-to-run >>.
b: The number of processes in uninterruptible sleep << blocked >>.

Memory << (default) in kilobytes >>
swpd: the amount of virtual memory used.

free: the amount of idle memory.
buff: the amount of memory used as buffers.
cache: the amount of memory used as cache << page cache, not incl. swap cache>> .
inact: the amount of inactive memory. (-a option)
active: the amount of active memory. (-a option)

Swap << in kilobytes/second >>

si: Amount of memory swapped in from disk (/s).
so: Amount of memory swapped to disk (/s).
 Continue reading LINUX CHEATSHEET – vmstat, ps, top 

Linux and Stale? Never!

The words Linux (and all that it implies), stale/boring never go together.

Take a look at LinuxDevice’s excellent report on the LF’s (Linux Foundation) Collabaration Summit held last week in SF, USA.

A quick sampling to whet your appetite:

  • Intel hands over the Moblin project to the LF
  • KVM’s being pushed as the way to go within Linux virtualization
  • The Kernel Summit / Panel discussion was energetic, techy and interesting-
    • 2.6.29 kernel released two weeks back by LF
    • Andrew Morton bags the first-ever “Unsung Hero” award!
    • Intel and ATI will work towards greatly modernizing the kernel graphics stack
    • Ted Ts’o talks about moving to Oracle’s Btrfs filesystem
  • LF announces the winning entries to the “We’re Linux” 1-minute video contest.

Read about all this (and more!)  here.

Google-Android (ABO) Executive Conference, 5 Mar 2009, Bangalore, India


Was happy to be a speaker at the ‘Google-Android for Executives Conference ’09’ organized by ABO Ventures, held in Bangalore on 5 Mar ’09.

I made a brief presentation entitled “Android – A Look Under the Hood”, which was pretty well received. It included a couple of demos on the Android Developer Phone (ADP1):
– changing brightness of the LCD screen (using a shell script, low-level hardware access via /sys – not the recommended way to do it!)
– flashing the device: saving and restoring the bootloader, kernel and system/app images.

Some pics taken during the flashing process below:

ADP1 hooked up to the laptop via the USB cable

ADP1 (Android Developer Phone v1) hooked up to the laptop via the USB cable.

ADP1 showing the bootloader-loaded recovery util (JF v1.3)

ADP1 showing the bootloader-loaded recovery util (JF v1.3).


ADP1 ‘Settings/About phone’ screenshot after upgrade (flash).