займ на карту без процентов
Riz Khan on February 13th, 2011

Few days back I came across an issue on CentOS vps where the sshd service was failing,  everything looked fine and reinstall of the service did not work either.

There was no error shown at service startup, but the service status showed it was down :
-bash-3.2# /etc/init.d/sshd start
Starting sshd: [ OK ]
-bash-3.2# /etc/init.d/sshd status
openssh-daemon is stopped

I checked the /var/log/secure logs to see what error is being thrown and it showed below error :

Feb 8 13:54:54 vps sshd[18431]: fatal: daemon() failed: No such device

I had to do some search to find out which device its referring to in this error,  it turned out that its related to /dev/null which is suppossed to be a proper character device and not a regular file.

In this case it was a regular file so I removed it and recreated the character device as below :

-bash-3.2# rm -f /dev/null
-bash-3.2# mknod /dev/null c 1 3

Once the character device is created the permissions should look like below :

-bash-3.2# ls -lh /dev/null
crw-rw-rw- 1 root root 1, 3 Jan 12 16:07 /dev/null

After this was confirmed that /dev/null is a proper character device , I restarted the service and it came up fine this time :

-bash-3.2# /etc/init.d/sshd start
Starting sshd: [ OK ]
-bash-3.2# /etc/init.d/sshd status
openssh-daemon (pid 27662) is running...

So if you came across this error for ssh service failure, then make sure that /dev/null is a proper character device, recreating that as proper character device should fix the issue.

Tags: , , ,

Riz Khan on February 7th, 2011

The VPS management control Panel SolusVM is a very good choice for OpenVZ and Xen based servers. It is a stable and feature rich control panel and has a very low cost compared to the Virtouzzo platform and Panel from the popular brand Parallels.

SolusVM use an Administrator user login to manage the VPSs, Clients and other options.

If you enter wrong logins number of times for the Solsuvm admin section it can lock you by adding your IP to blacklist.

In this case if you have the root logins then you can clear the blacklist logs to get your access again yourself and if you do not have root logins then you will need to contact the admin with root logins to do this for you.

Below is the command you can use to clear the blacklist log :

php /usr/local/solusvm/scripts/clearauthlog.php --system --clear=all

Once you clear the logs, you should be able to login fine into the Admin section of SolusVM.

Tags: , ,

cPanel stands among all other hosting control panels, and the reason is that its not only easy to use for end users, its also easy to manage for server admins. The ease of use it provides to end users is through a very good and friendly gui it provides for them to manage day to day hosting needs.

The ease it provides to server admins is a set of excellent scripts which can be used for managing software upgrades and hosting server in general. Like mysqlup script helps you upgrades Mysql, the easyapache scripts help you upgrade apache and php along with their related modules , the eximup scripts help upgrades exim mail server and so on.

These useful cPanel server management scripts are available at below path :


The easyapache scripts is a very powerful and useful script, and this post I will list the command that can be used to find the latest versions of php4, php5 and apache that are available with a build on a cPanel servers. Below is the command you can use for this purpose :

root@cPanelServer [~]# /scripts/easyapache --latest-versions
Easy::Apache v3.2.0 Build 5291

1.3.42, 2.0.63, 2.2.17

[PHP 4]
4.4.6, 4.4.7, 4.4.8, 4.4.9

[PHP 5]
5.2.9, 5.2.16, 5.3.3, 5.3.4

root@cPanelServer [~]#

This is a handy cli switch for easyapache script that admins should know as second nature as it will help them quickly know their upgrade options, without running the script and then browse through available options.

For complete list of easyapache cli switches use the help switch as below :

/scripts/easyapache –help

Tags: , , , ,

Riz Khan on January 30th, 2011

Parallel provides two graphical options to create and manage VPSs.  VZCC , the  Virtuozzo control center is one of those gui options, the second is the desktop based application VZMC  the Virtuozzo management console, which is a powerful tool and is capable of creating and managing vpss with all details.

However techs or admins that spend most of their time on shell, mostly prefer to do these things on shell, in this article I will list the commands that can be used to setup new vps on shell and can set its basic parameters.

The main commands used for this process are ‘vzctl create‘ to create the vps and then ‘vzctl set‘ to set the configs.

Below is complete set of commands to achieve this :

vzctl create VEID --ostemplate centos-5-x86 --config basic
vzctl set VEID --onboot yes --save
vzctl set VEID --offline_management yes --save
vzctl set VEID --hostname vps.domainname.net --save
vzctl set VEID --userpasswd root:Bh@tu76Ghyt --save
vzctl set VEID --ipadd --ipadd --save
vzctl set VEID --nameserver "" --save

The first command contains the main paramter –ostemplate using which you select the tmplate on which you will create the vps, it can be centos, ubuntu, fedora core etc. The second parameters is –config which applies default values for different QOS parameters from a config files.

You can see complete list of templates available on the node using vzpkg list command , or vzpkgls for older tempaltes. The vzpkg list command will list the newer EZ templates only.

The –onboot option is set to yes so that the vps boots up automatically on node reboot.  The –offline_management is set to yes as well so that the vps user has access to the vzpp ( Virtuozzo Power Panel ) so they can reboot their vps themselves and access other vzpp options.

The –hostname option is simply used to set the hostname of the vps. The –userpasswd option as you can see is used to set the root password for the vps and the –ipadd parameter is used for assigning IPs, the more IPs can be added by adding more –ipadd sections in the command and lastly the –nameserver option is used to set the Nameservers for the vps.

You can see the command help on shell for complete details of vzctl set and vzctl create commands.

Tags: , , , , ,

Parallels provides a packages manager for the vps management which can be used for range of tasks e.g. it can be used to install a new template , to cache a new OS template or to list packages installed on some vps or node.

The same package manager utility can be used to install packages , update packages or remove packages from the vps.

In this short how to , I will describe the vz package manager command syntax for installing yum inside a vps.

When we install a new Linux vps on distribution like RHEL, CentOS or Fedora Core the most important application that we need to further add components and software to the vps is yum. Even if you try to install cPanel on a vps it will ask to install yum first.

Below is the simple command you can use to install yum on a vps :

vzpkg install -p VEID yum

where VEID is the ID of the VPS/VE.
-p or –package parameter is used for installing a package

This will install yum inside the vps for you in one single and simple command.

The complete syntax for the vzpkg install command is below :

vzpkg install [ options ] < CT_ID > | < CT_NAME > < object > [ ... ]

For more details of the command you can check command help on shell or check Virtuozzo documentation from Parallels.

Tags: , , ,

Benchmark is a piece of software or set of software which is used to assess the relative performance of a computer system.

I have used some Benchmarks and have found a WHT version of the Unix Benchmark for hosting servers to be a reasonable performance calculator.

Below are the steps to download and install the Unix Benchmark :

wget http://members.dslextreme.com/users/andylee/unixbench-4.1.0-wht.tar.gz
gunzip -dvc unixbench-4.1.0-wht.tar.gz | tar xvf -
cd unixbench-4.1.0-wht-2

When you initiate the benchmark run using the ./Run command , you will get a below header at start of the output :

#    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
#    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
#    #  # #  #  #    ##            #####   #####   # #  #  #       ######
#    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
#    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
####   #    #  #  #    #          #####   ######  #    #   ####   #    #

4 1 Based on the Byte Magazine Unix Benchmark
44 11
v v 4 4 1
v v 44444 1 v4.1 revisions mostly by David C. Niemi,
v 4 o 111 - WHT.2 Reston, VA, USA

WHT Variant by Andy A. Lee
See: http://www.webhostingtalk.com/showthread.php?s=&threadid=308055

After that the tests will continue to run for some time and will keep generating results for different kind of performance outputs.

Below is a real time output from a low use production VPS based on Virtouzzo :

Execl Throughput 1
Filesystem Throughput 1024 bufsize 2000 maxblocks 1
Filesystem Throughput 256 bufsize 500 maxblocks 1
Filesystem Throughput 4096 bufsize 8000 maxblocks 1
Pipe Throughput 1 2
Pipe-based Context Switching 1 2
Process Creation 1
System Call Overhead 1 2
Shell Scripts (8 concurrent) 1

BYTE UNIX Benchmarks (Version 4.1-wht.2)
System -- Linux cpanel.serverXX.net 2.6.9-023stab048.4 #1 Fri Jul 11 17:50:54 MSD 2008 i686 athlon i386 GNU/Linux
/dev/vzfs 104857600 13230620 91626980 13% /

Start Benchmark Run: Sun Jan 9 11:04:35 EST 2011
11:04:35 up 217 days, 4:12, 0 users, load average: 0.00, 0.00, 0.00

End Benchmark Run: Sun Jan 9 11:16:01 EST 2011
11:16:01 up 217 days, 4:23, 0 users, load average: 11.65, 5.57, 2.64


Dhrystone 2 using register variables 376783.7 3476908.5 92.3
Double-Precision Whetstone 83.1 864.0 104.0
Execl Throughput 188.3 1820.4 96.7
File Copy 1024 bufsize 2000 maxblocks 2672.0 46947.0 175.7
File Copy 256 bufsize 500 maxblocks 1077.0 14208.0 131.9
File Read 4096 bufsize 8000 maxblocks 15382.0 300208.0 195.2
Pipe Throughput 111814.6 728487.6 65.2
Pipe-based Context Switching 15448.6 204394.0 132.3
Process Creation 569.3 5585.0 98.1
Shell Scripts (8 concurrent) 44.8 441.7 98.6
System Call Overhead 114433.5 1015692.2 88.8

The benchmark will take a good 15-25 minutes to complete, so be patient. The total score depends on the server / vps specifications, a general rule is the higher the score the better it is.

Factors like cpu , memory and disks quality will have affect on the performance results so they will vary depending on the server and vps specifications and is mainly a relative result.

This benchmark performs different type of tests and give performance results like filesystem throughput, system calls overhead , file coy,  file read,  pipe thorough put etc.

e.g. you can run tests on same specifications VPSs on Virotuzzo and OpenVZ platforms, in most of the tests I have performed , I found Virtouzzo VPSs giving bit higher benchmark scores for same specs. But your mileage may vary.

Important Note :  During the test the load on the vps/server will go high , as you can see form the above output. So you should be careful of the timing of running the tests in some production and busy environment.

Have happy Benchmarking : )

Tags: , ,