How to check CentOS version

Sometimes you just login in into a box using ssh and need to check the OS version.

If this box runs CentOS you can use this command to determine what is the CentOS version:

[root@box ~]# cat /etc/*release*
CentOS release 4.3 (Final)

How to use RPM Commands

How to use RPM Commands

This is a post cointain some basic rpm commands to manage RPM packages.

1. Install a RPM package - you can use the command:
# rpm -ivh somepackage.arc.rpm

2. Uninstall a RPM package - you can use the command:
# rpm -e packagename
# rpm -e horde (e.g.)

3. Upgrade a RPM package - you can use the command:
# rpm -Uvh somepackage.arc.rpm
Note: When this command is used, RPM will uninstall the old version of package and install the new version.

4. Query a RPM package - you can use the command:
# rpm -q packagename
[root@box ~]# rpm -q glib
Note: rpm -q command will print the package name, version, and release number of installed package. You can use this command to verify that a package is or is not installed on your system.

5. Package information - you can use the command:
# rpm -qi package
[root@box ~]# rpm -qi glib
Name : glib Relocations: (not relocatable)
Version : 1.2.10 Vendor: CentOS
Release : 15 Build Date: Tue Feb 22 05:32:17 2005
Install Date: Tue Mar 28 01:14:49 2006 Build Host:
Group : System Environment/Libraries Source RPM: glib-1.2.10-15.src.rpm
Size : 321141 License: LGPL
Signature : DSA/SHA1, Sat Feb 26 20:42:07 2005, Key ID a53d0bab443e1821
Packager : Karanbir Singh
Summary : A library of handy utility functions.
Description :
GLib is a handy library of utility functions. This C library is
designed to solve some portability problems and provide other useful
functionality which most programs require.

GLib is used by GDK, GTK+ and many applications. You should install
th glib package because many of your applications will depend on this

As you can see, this command display package information, including name, version, and description of the installed program.

6. List files in package - you can use the command:
# rpm -ql package
[root@box ~]# rpm -ql glib
Note that this command will list all files in a installed RPM package. So it only works when the package is already installed on your system.

7. Check a RPM signature package - you use the command:
# rpm --checksig package
Note: This command will check the PGP signature of specified package to ensure its integrity and origin, it is secure to verify that ;)

Yum "GLib-CRITICAL" How To Fix

Yum fails "GLib-CRITICAL"

[root@box ~]# yum check-update
Repository atomic is listed more than once in the configuration
Repository plesk is listed more than once in the configuration
Setting up repositories
update 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
atomic 100% |=========================| 951 B 00:00
addons 100% |=========================| 951 B 00:00
extras 100% |=========================| 1.1 kB 00:00
Reading repository metadata in from local files

(process:7349): GLib-CRITICAL **: file gtimer.c: line 106 (g_timer_stop): assertion `timer != NULL' failed

(process:7349): GLib-CRITICAL **: file gtimer.c: line 88 (g_timer_destroy): assertion `timer != NULL' failed
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
File "/usr/share/yum-cli/", line 97, in main
result, resultmsgs = do()
File "/usr/share/yum-cli/", line 534, in doCommands
ypl = self.returnPkgLists()
File "/usr/share/yum-cli/", line 1176, in returnPkgLists
ypl = self.doPackageLists(pkgnarrow=pkgnarrow)
File "", line 904, in doPackageLists
File "/usr/share/yum-cli/", line 75, in doRepoSetup
File "", line 260, in doSackSetup
File "", line 277, in populateSack
File "/usr/lib/python2.3/site-packages/", line 40, in getPrimary
TypeError: Can not create index on requires table: near "NOT": syntax error

Possible Solution "GLib-CRITICAL":

First try it:
# rpm -Uvh

It should fix the problem, it worked on CentOS. If didnt, go to

And install or re-install the next packets:
- glib
- yum
- sqlite
- python-sqlite
- python-elementtree
- python-urlgrabber

Remember to use:
# rpm -Uvh somerpm.rpm

What is mrtstub.exe - mrtstub process

mrtstub.exe - mrtstub process information

mrtstub.exe is a process that belongs to malware category thta can download other malicious processes and cause unwanted behavior on your computer. You should run a tool like spybot to disable and remove mrtstub.exe, it is most likely an adware or spyware.

Linux partition possibility

Linux partition possibility

A normal linux installation requires at least two partitions. It usually improves performance to more partitions.

Disk be divided into 4 partitions.
About 33% to linux bootable

About 33% to Windows bootable
Windows requires residency on the first primary partition

128M to swap
Note that a filesystem optimized for memory caching improves performance, that partition must have a filesystem supported by the operating system that will use it.

About 33% to data
This partition should be used by either or both OS if is compartible, it will be used for data, and can have any filesystem. The Windows bootable partition must be one of the filesystems supported by Windows, the linux bootable partition must be one of the filesystems supported by linux.

Fix svchost.exe high loads on Windows

Problem: svchost.exe file take up 100% of cpu resources (when Internet is turned on)

One possible cause of high loads from svchost is the DNS Client service. On some cases, it can cause high CPU loads. So, if you are facing this problem and dont need Windows DNS Client service you can disable it.

How to stop/disable the DNS Client
Type "services.msc" on the run box, find "DNS Client" and on the proprieties, chance it to "Disabled". If you are running a firewall, you can also disable Windows Firewall to, if you are using other there is no reason to keep both because can provoke conflicts.

After it, everything should back normal.

How to Change cPanel Theme via command line

If you need to change all cpanel account themes, you can use this command as root:

# replace RS=oldtheme RS=newtheme -- /var/cpanel/users/*

This will change all the cpanel users theme, if you need to change only one account,

# cd /var/cpanel/users/
# nano user_account

and replace rhe "RS=" line