Thursday, 21 April 2016

Package require to analyze kernel core dump in RHEL system


To analyze the system crash dump file (vmcore) , we must have crash and debuginfo package installed on system. 

To install the crash package in your system, run the following as root:
#yum install crash
To install the kernel-debuginfo package, make sure that you have the yum-utils package installed and run the following command as root:
#debuginfo-install kernel
If not able to download the debuginfo kernel package with above command, then download the package from ftp server: http://ftp.heanet.ie/mirrors/puias/updates/


For example to download the RHEL6 (32-bit) related debuginfo package from:
http://ftp.heanet.ie/mirrors/puias/updates/6Server/en/os/debug/i386/

For example to download the RHEL6 (64-bit) related debuginfo package from:
http://ftp.heanet.ie/mirrors/puias/updates/6Server/en/os/debug/x86_64/


Package need to download:
1) Determine the kernel version of generated "vmcore" system , by executing "uname -r" command
2) Download the kernel-debuginfo-`uname -r`.rpm and kernel-debuginfo-common-`uname -r`.rpm
3) Install the package through rpm command i.e "rpm -ivh <package name>




Thursday, 14 April 2016

Printk Timestamp Enable Method

We can enable and disable printk timestamps at runtime, by writing to /sys/module/printk/parameters/time.
By default printk timestamp is disable : 
[root@localhost ~]# cat /sys/module/printk/parameters/time
N

In order to enable the printk timestamp execute the below command:
[root@localhost ~]# echo "1" > /sys/module/printk/parameters/time
[root@localhost ~]# cat /sys/module/printk/parameters/time
Y


[root@localhost ~]# dmesg
[11320.847977] Hello World..

After that will able to see the timestamp. 

In order to disable to printk timestamp execute the below command
[root@localhost ~]# echo "0" > /sys/module/printk/parameters/time
[root@localhost ~]# cat /sys/module/printk/parameters/time
N


Wednesday, 27 January 2016

Fix locale issue in RedHat distro

Getting Error while logging into the RHEL system:

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory

OR

Getting Errot while executing locale command :

$ locale
The output is...
locale: Cannot set LC_ALL to default locale: No such file or directory LANGLANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
...



Solution for this issue:
Add the following line in "/etc/environment" file . 
LC_ALL=en_US.UTF-8
LC_CTYPE=en_US.UTF-8


To see the result, logout and login to shell again