Thursday, February 28, 2013

Upgrading Linux Kernel 3.7.5 (Stable) release in Ubuntu 12.10


Linux kernel 3.7.5 has recently released on January 28, 2013 with lots of bugfixes and improvements.

The changelog contains all the improvements and bugfixes made in the kernel.

* Below mentioned are some important fixes and improvements.
* ACPI: Add fixups for AMD P-state figures
* ACPI / processor: Get power info before updating the C-states
* ALSA: hda - Fix mute led for another HP machine
* ACPI / cpuidle: Fix NULL pointer issues when cpuidle is disabled
* module: fix missing module_mutex unlock
* usb: gadget: FunctionFS: Fix missing braces in parse_opts
* usb: dwc3: gadget: fix ep->maxburst for ep0
* USB: UHCI: fix IRQ race during initialization
* arm64: elf: fix core dumping to match what glibc expects
* arm64: makefile: fix uname munging when setting ARCH on native machine
* vfio-pci: Fix buffer overfill
* ioat: Fix DMA memory sync direction correct flag

We shall upgrade the default kernel version 3.5.0-17.28 shipped with Ubuntu 12.10 to 3.7.5-030705.

Download the script to perform an automated kernel upgrade process.

Now open the terminal and run the below command from the folder where script is downloaded to make it executable.
$ sudo chmod +x ker-upg-3.7.5.sh

$ sudo sh ker-upg-3.7.5.sh

After the completion, reboot the system for the changes to take effect and after reboot run the below command to confirm the version.

$ uname -r

In case if the kernel 3.7.5 is not compatible with your system hardware, then run the below command to remove the kernel 3.7.5 and switch back to previous kernel.

$ sudo apt-get purge linux-image-3.7.5-030705

Friday, February 15, 2013

Upgrading Linux Kernel 3.7.4 (Stable) release in Ubuntu 12.10

Linux kernel 3.7.4 has recently released on January 21, 2013 with lots of bugfixes and improvements.

The changelog contains all the improvements and bugfixes made in the kernel.

Below mentioned are some important fixes and improvements.

* wlan-ng: Fix clamping of returned SSID length
* Add support for Broadcom TruManage redirected serial port
* ifx6x60:Delete SPI timer when shut down port
* USB: option: blacklist network interface on ONDA MT8205 4G LTE
* USB: option: add TP-LINK HSUPA Modem MA180
* igb: release already assigned MSI-X interrupts if setup fails
* intel-iommu: Prevent devices with RMRRs from being placed into SI Domain
* drm/radeon: fix a bogus kfree
* usb: chipidea: Allow disabling streaming not only in udc mode
* ALSA: usb - fix race in creation of M-Audio Fast track pro driver
* x86/Sandy Bridge: reserve pages when integrated graphics is present

We shall upgrade the default kernel version 3.5.0-17.28 shipped with Ubuntu 12.10 to 3.7.4-030704.

Download the script to perform an automated kernel upgrade process.

Now open the terminal and run the below command from the folder where script is downloaded to make it executable.
$ sudo chmod +x ker-upg-3.7.4.sh

$ sudo sh ker-upg-3.7.4.sh

After the completion, reboot the system for the changes to take effect and after reboot run the below command to confirm the version.

$ uname -r

In case if the kernel 3.7.4 is not compatible with your system hardware, then run the below command to remove the kernel 3.7.4 and switch back to previous kernel.

$ sudo apt-get purge linux-image-3.7.4-030704

Thursday, February 14, 2013

Sar and vmstat in Linux & Solaris

Sar and vmstat utilities have been used to calculate the precise values of used/unused memory. Though there's a difference if we do so in UNIX based systems like solaris. Usually the linux operating system reports the same value for both sar and vmstat. The below screenshot shows the similarity of outputs of both sar and vmstat in Ubuntu 12.04.


where “free” and “kbmemfree” represent free unused memory. Both have equal values in case of linux.

Whereas as you can see in the below shown screenshot that on contrary to linux, solaris operating system gives different values for both commands.


This doesn't mean that sar or vmstat output is wrong. It's just that the “free” column in vmstat's output is represented in “kilobytes” whereas the “freemem” column in sar's output is represented in “number of pages”.
So in order to make both command outputs look similar, first we need to know exactly how many pages equals to 1 kilobyte. In order to do so we need to execute “pagesize” command to get the default size of a page in Solaris OS.

In my case I found the pagesize to be 4096 bytes (i.e. 4 kilobyte). Multiplying pagesize value (in kilobytes) with average freemem value of sar output, gives and output that is pretty much equal to vmstat free output. Refer below screenshot for more details.

There's a slight difference in output because I didnt run both the commands at exact same time.

Similarly, in case of swap in Solaris OS you will again find some difference in swap readings. The output vmstat command reports free swap memory in “swap” column and “freeswap” column in sar output. The only reason for both the outputs to be different is that sar reports the output in blocks whereas vmstat continues to report in kilobytes.
Since, the sar utility reports its swap in blocks, also we all know that one block is 512 bytes in size and two blocks will be 1024 bytes.
Hence, in order to convert the swap blocks to kilobytes we need to divide average freeswap output by 2 and we will get the freeswap size in kilobytes. Refer the below mentioned screenshot for more details.