Htop on centos
When it comes to monitoring the cpu and ram usage on your linux machine, htop is the best tool to use. It is an ncurses based commandline too that does not require any gui like desktop, but still provides a very interactive and featureful interface to monitor processes running on the system along with other details like cpu usage, ram usage etc. It is a must have when you want to monitor the resources of your linux server over an ssh connection for example.
On centos/redhat, the htop tool is not available in the yum repository by default. But the rpm is easily available for download from here
http://pkgs.repoforge.org/htop/The url has rpm packages for various versions of redhat and centos and both 32bit and 64bit architectures. Download the one that is suitable for your os version.
I am using centos 6.4 so I would download
http://pkgs.repoforge.org/htop/htop-1.0.2-1.el6.rf.x86_64.rpmDownload the rpm file on your centos machine and install with the rpm command
# rpm -i htop-1.0.2-1.el6.rf.x86_64.rpm
Now launch htop and monitor the resources like a pro.
If you are running centos from the terminal then you can use the lynx browser to navigate to the website and download the file.
Install from RpmForge
Htop and many other packages are available from the rpmforge repository for centOS.
The steps to install are again quite simple.
Setup rpmforge on your centOS system
1. Get the rpm installer for the rpmforge repository from http://wiki.centos.org/AdditionalResources/Repositories/RPMForge.
Make sure you download the correct rpm file matching your system architecture and centOS version.
For centOS 6.4 on 64bit machine I would download the following.
http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm2. Install DAG's GPG Key
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
3. Verify the downloaded rpm
$ rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm
4. Install the rpm
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
Install htop
Now that rpmforge repository has been setup we can install htop right away using yum.
$ yum install htop
Htop is now installed.
[root@Web01]# rpm -ihv rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
warning: rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 6b8d79e6
error: Failed dependencies:
rpmlib(FileDigests) <= 4.6.0-1 is needed by rpmforge-release-0.5.2-2.el6.rf.x86_64
rpmlib(PayloadIsXz) <= 5.2-1 is needed by rpmforge-release-0.5.2-2.el6.rf.x86_64
Maybe you should talk about the dependencies (how many are there and where to get them) if you're not using yum…
it really helped. Thanks