Prakash Sawarkar: Kernel 3.8 Released, how to Compile in Redhat, CenOS and Fedora..

Kernel 3.8 Released, how to Compile in Redhat, CentOS and Fedora.

Sunday, 26 September 2010

Memory use by which process Centos/RHEL/Fedora

# ps aux | awk '{if ($5 != 0 ) print $2,$5,$6,$11}' | sort -k2n
[root@microair ~]# ps aux | awk '{if ($5 != 0 ) print $2,$5,$6,$11}' | sort -k2n
PID VSZ RSS COMMAND
1960 4128 640 /usr/sbin/acpid
1706 6208 600 /sbin/portreserve
1781 6820 280 /usr/sbin/mcelog
1828 8404 368 /usr/sbin/fcoemon
396 11372 1408 /sbin/udevd
1815 12420 2636 /sbin/udevd
1816 12420 2408 /sbin/udevd
1803 13600 652 lldpad
2067 14912 596 tgtd
2068 14912 384 tgtd
2015 17856 1028 hald-addon-acpi:
1970 18156 1144 hald-runner
1767 19024 932 rpcbind
1 19408 1508 /sbin/init
2264 20088 408 dbus-launch
2014 20272 888 hald-addon-input:
2212 21544 392 /usr/sbin/atd
1941 23140 392 rpc.idmapd
1871 23396 1352 rpc.statd
1969 26524 5148 hald
2265 29648 912 /bin/dbus-daemon
1841 30080 1488 dbus-daemon
2158 32304 444 /usr/sbin/htcacheclean
144 36016 1352 /bin/plymouthd
1901 45020 488 /usr/sbin/wpa_supplicant
6667 49992 3956 /usr/libexec/polkit-1/polkitd
1856 55880 2320 /usr/sbin/modem-manager
2237 62312 416 /usr/sbin/certmonger
2082 66584 1228 /usr/sbin/sshd
2557 68876 1748 /usr/sbin/saslauthd
2559 68876 1664 /usr/sbin/saslauthd
2560 68876 1664 /usr/sbin/saslauthd
2561 68876 1732 /usr/sbin/saslauthd
2562 68876 1664 /usr/sbin/saslauthd
1852 80188 4416 NetworkManager
2108 93572 1688 /usr/sbin/exim
24965 100328 3984 sshd:
25145 106008 788 awk
2146 108116 804 abrt-dump-oops
2242 108516 1680 /bin/bash
1519 108520 1744 /bin/bash
24969 108520 1888 -bash
2134 110228 996 /usr/sbin/abrtd
25144 110244 1120 ps
2189 117256 1384 crond
2248 127460 16140 /usr/bin/Xorg
2268 131916 4084 /usr/libexec/gconfd-2
25146 155488 836 sort
2173 186424 5252 /usr/sbin/httpd
16817 186556 3684 /usr/sbin/httpd
631 186556 3684 /usr/sbin/httpd
632 186556 3804 /usr/sbin/httpd
633 186556 3756 /usr/sbin/httpd
634 186556 3684 /usr/sbin/httpd
635 186556 3784 /usr/sbin/httpd
636 186556 3684 /usr/sbin/httpd
637 186556 3684 /usr/sbin/httpd
638 186556 3848 /usr/sbin/httpd
1713 242988 1904 /sbin/rsyslogd
2253 251264 8452 /usr/bin/metacity
2251 270292 16956 /usr/bin/python2
2090 289524 196316 clamd
2047 381604 1652 automount
2246 412056 36420 /usr/bin/python2
6669 1031644 2480 /usr/sbin/console-kit-daemon
682 1106792 58480 /usr/bin/python
[root@microair ~]#

Sunday, 19 September 2010

GPT(GUID Partition Table) problem during the linux installation on CentOS5.6

During the installation process of CentOS 5.6 one can face following error

Error: - "Your boot partition is on a disk using the GPT partitioning scheme but this machine cannot boot using GPT".

Reason:- This error mainly arises in the event where the total disk size is more than 2TB, irrespective of the primary partition disk.

Solution:-Enter the rescue mode and delete the MBR on the disk as below:-

#  dd if=/dev/zero of=/dev/sda bs=512 count=1

Reinstall the system again and it should work right.

Monday, 13 September 2010

How To Enable EPEL Repository in RHEL/CentOS 6/5

Why we use EPEL (Extra Packages for Enterprise Linux) repository ?
Provides lots of open source packages to install via Yum.
Epel repo is 100% open source and free to use.
It does not provide any core duplicate packages and no compatibility issues.
All epel packages are maintained by Fedora repo.
First, you need to download the file using Wget and then install it using RPM on your system to enable the EPEL repository. Use below links based on your Linux OS versions. (Make sure you must be root user).
For RHEL/CentOS 6 32-64 Bit
## RHEL/CentOS 6 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
## RHEL/CentOS 6 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm
For RHEL/CentOS 5 32-64 Bit
## RHEL/CentOS 5 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm
## RHEL/CentOS 5 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -ivh epel-release-5-4.noarch.rpm
For RHEL/CentOS 4 32-64 Bit
## RHEL/CentOS 4 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/i386/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm
## RHEL/CentOS 4 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/4/x86_64/epel-release-4-10.noarch.rpm
# rpm -ivh epel-release-4-10.noarch.rpm
How Do I Verify EPEL Repo?
# yum repolist
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
epel/metalink                                            | 5.6 kB     00:00
 * base: centos.aol.in
 * epel: mirror.neu.edu.cn
 * extras: mirrors.digipower.vn
 * remi: fr2.rpmfind.net
 * rpmforge: mir01.syntis.net
 * updates: centos.aol.in
base                                                     | 3.7 kB     00:00
epel                                                     | 4.2 kB     00:03
epel/primary_db                                          | 5.8 MB     01:13
extras                                                   | 3.4 kB     00:00
rpmforge                                                 | 1.9 kB     00:00
updates                                                  | 3.4 kB     00:00
updates/primary_db                                       | 1.3 MB     00:29
repo id        repo name                                               status
base           CentOS-6 - Base                                          6,327+40
epel           Extra Packages for Enterprise Linux 6 - x86_64          9,712+518
extras         CentOS-6 - Extras                                              14
remi           Les RPM de remi pour Enterprise Linux 6 - x86_64        200+1,174
rpmforge       RHEL 6 - RPMforge.net - dag                              4,627+23
updates        CentOS-6 - Updates                                         254+43
repolist: 21,134
How Do I Use EPEL Repo?
You need to use YUM command for searching and installing packages. For example we search for Zabbix package using epel repo, lets see it is available or not under epel.
# yum --enablerepo=epel info zabbix
Sample Output
Available Packages
Name       : zabbix
Arch       : i386
Version    : 1.4.7
Release    : 1.el5
Size       : 1.7 M
Repo : epel
Summary    : Open-source monitoring solution for your IT infrastructure
URL        : http://www.zabbix.com/
License    : GPL
Description: ZABBIX is software that monitors numerous parameters of a network
Let’s install Zabbix package using epel repo option –enablerepo=epel switch.
# yum --enablerepo=epel install zabbix
Note: The epel configuration file is located under /etc/yum.repos.d/epel.repo.
This way you can install as many as high standard open source packages using EPEL repo