Monitoring Physical Disk with SMART under LSI 2108

This is a very short post. You may find it useful or consider it as piece of crap post, it depends on how you interpret it. I post this for my personal note. So please don’t complain .. lol.
Basically this post is about how to monitor physical disk using SMART under hardware RAID LSI 2108. It may applies to other controller supported by SMART (list of supported controller can be found here)
Continue reading “Monitoring Physical Disk with SMART under LSI 2108”

Your Server Got Hacked? Get Linux Process Detail Information

Once you server compromised, hacker usually put some backdoor on your server and it might be a tricky process on how to find it. Standard “netstat -anlp” let you see if there’s any unusual listening port on your server. It will display port number, pid, and process name.

Thing is that they usually hiding the process into another regular process name to make it harder to find. Continue reading “Your Server Got Hacked? Get Linux Process Detail Information”

Disable Crontab Mail Report

Crontab generated mail report can be such pain 😦
It will be generated on each scheduled cron time. Server filesystem performance will suffer from it.
This is how to disable crontab mail report :

  1. Add “>/dev/null 2>&1” or “&> /dev/null” at the end of cron line
  2. Nulling MAILTO variable. Run crontab -e and add ‘MAILTO=""' at the top of the file

Those steps above will save you a lot of time deleting huge number of mail files generated by cron report.

 

Install Flashcache on CloudLinux and Centos

Major issue on a hosting server which serve hundreds of website is remain the same: I/O bottleneck. My curiosity began when I received a newsletter from a VPS provider in US, they said they have added SSD as filesystem cache to their server fleet. I asked my Russian virtualization platform support fellow and he gave me link to Flashcache page.

Flashcache is a kernel module released by Facebook engineer back in April 2010 to speed up database I/O on a standard rotational drive with the speed of SSD. Since it works by caching filesystem blocks, so it can speed anything on the slow rotational disk.
We’ve already use RAID10 with SAS disk on all of our hosting servers, but still I/O bottleneck often happens. Continue reading “Install Flashcache on CloudLinux and Centos”

Install Munin Node on Virtuozzo Hardware Node

Default Virtuozzo monitoring is not detailed enough. I consider monitor all aspect of servers including CPU, IO, RAM, and many other aspects via Munin. Here’s how to Install Munin on a Virtuozzo Hardware Node :
Install EPEL Repo first :


rpm -ivh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

Disable EPEL Repo by default :


nano /etc/yum.repos.d/epel

Change enabled=1 to enabled=1

Install Munin Node


yum --enablerepo=epel install munin-node

Next is to configure munin-node configuration :


nano /etc/munin/munin-node.conf

Put your Munin IP address after “allow” :


#allow ^127\.0\.0\.1$
allow ^192\.168\.1\.10$

Add Munin-node on startup :


chkconfig munin-node on

By default we need to configure disktats data update to work. Make a config file :


nano /etc/munin/plugin-conf.d/disktat

Paste :


[diskstats]
user root

Now start munin :


/etc/init.d/munin-node start

Install NGINX & PHP 5.3 with FPM on Centos 6 (2)

Install mysql, mysql-devel, & mysql-libs with yum. Then add rpmforge repo because we’re going to install libmcrypt-devel that doesn’t available on standard Centos Repo.

rpm -Uvh http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

or you can follow direction here
Dont forget to disable RPMForge because all we need from there is just libmcrypt.

nano /etc/yum.repos.d/rpmforge.repo

Edit line contain “enabled=1” and change it to 0 :

enabled = 0

Install libmcrypt-devel & other dependencies:

yum --enablerepo=rpmforge install libmcrypt-devel
yum install libc-client-devel

Continue reading “Install NGINX & PHP 5.3 with FPM on Centos 6 (2)”