HostOnNet Blog

Author Archives: admin

OpenVZ BC proc entries

To see resource usage on all VPS, run one of the following commands on Node. cat /proc/user_beancounters cat /proc/bc/resources To see iostat [root@server12 233]# cat /proc/bc/iostat sda 233 I 0 0 1 0 19 1 8 sda 222 I 0


OpenVZ Commands

To start a VPS vzctl start <VPSID> To Stop a VPS vzctl stop <VPSID> To Restart a VPS vzctl restart <VPSID> To Delete a VPS (all data will be deleted, no confirmation, so be careful) vzctl destroy <VPSID> To show


Show All OpenVZ Virtual Machines On A Server

vzlist shows all virtual machines on a server To get currently running VPS, run vzlist [root@server12 ~]# vzlist CTID NPROC STATUS IP_ADDR HOSTNAME 244 27 running 174.36.130.247 sam.localhost [root@server12 ~]# To get all VPS on the server, run vzlist -a


Change ls color in bash CentOS/RHEL/Fedora

By default CentOS/RHEL show directorys in ls listing in dark green. With dark color, i found it difficult to read directory names. To change directory color, do cp /etc/DIR_COLORS ~/.dir_colors Edit ~/.dir_colors vi ~/.dir_colors Find DIR 01;34 # directory Replace


PHP function to find file extension

To find file extension with PHP, use pathinfo function


Show Detailed ASP Error Message in Windows 2008

Start “Internet Information Services (IIS) Manager”, Click on your server name, you will get a Screen like following. Click on ASP Button, Set “Send Errors To browser” to True and Click “Apply” Now go back to previous page (or click


Install software with RPM

To install rpm file, run Here -i = install -v = verify -h = show progress with # To upgrade an existing rpm package, run -U = Upgrade already installed package.


Sending Mail With ASP on Windows 2008

To send mail with ASP on Windows 2008, create an email address on WebSitePanel, replace “[email protected]” with email address you created. Replace PASSWORD with password of the email account created.


Installing Ruby Rails on Fedora

I wanted to try some ruby on rails code, so installed rails on Fedora test server [root@linux ~]# yum search rails =============================================== Matched: rails =============================================== php-ezc-EventLog.noarch : Allows you to log events or audit trails php-pear-Net-URL-Mapper.noarch : Simple and flexible


SSL certificate location on Cpanel Server

On Cpanel servers, SSL certificates are stored in folder /etc/ssl/certs To get list of certificates, run cd /etc/ssl/certs ls -l *.crt