Saturday, December 28, 2013

Installing MK Livestatus and Adding to Nagios 3 in Ubuntu

Livestatus is a new approach for accessing Nagios data. It has a lot of advantages over the classical NDO approach. Livestatus make use of Nagios Event Broker API. It loads a binary module into Nagios Process. Livestatus creates a socket from which data can be read whenever required.
Many Nagios addons use Livestatus as the backend like NagVis, Check_MK etc.

Installing Livestatus

Tuesday, November 26, 2013

How to screen capture in Sony Xperia U with ICS

To take screenshot in Xperia U, press Power button and Volume down button simultaneously till it captures with a sound. The image will be stored in /mnt/sdcard/Pictures/Screenshots.

Friday, November 22, 2013

Automatic back up of Cisco routers - Kron scheduler

If your are a network engineer, it is a monthly or weekly job to take back up of the router configurations . If it is a small network with a few routers or switches, it is easy to manage. But if it is a large network , It is a hectic job. So I rely on Cisco Kron command.

Configuring Mozilla Thunderbird for Microsoft Exchange mail

Microsoft Exchange is the widely used mail solution in buisiness world. Microsoft Outlook is the email client used with this . But if we have to configure mail in our Linux machine, we have to go for some alternative email clients . Mozilla Thunderbird is a good alternative for Outlook. It is also pre-installed in many distros (like Ubuntu 13.10 )To configure Mozilla Thunderbird for Exchange mail , we can use an addon - ExQuilla. This addon is able to connect to Exchange 2007, 2010 and latest 2013 also.

Monday, September 09, 2013

Monitoring BGP using NAGIOS

We can use check_bgp NAGIOS plugin for monitoring BGP. Visit for more details.

How to install and configure check_bgp plugin?

In the demonstration, I will be using NAGIOS server installed in Ubuntu Linux, and i want to monitor BGP in a Cisco ASR 1006 router. Since this plugin uses BGP4-MIB and SNMP, It can be used to monitor any router with SNMP.
  1. Download perl script from the link given above. 0.4 is the recent version.

Friday, September 06, 2013

How to find which application is using a TCP port in Windows

If a port is already in use by some unknown program and when you try to use the same port , you get a lot of errors like "Port already in use" , "Bind Exception" , "Port 80 already in use" etc. So in such case, You have to find out which process is already using this port and you can kill that process.

Steps to find which application is using a TCP port in Windows

  1. Type the command to find the Process ID
  2. Go to Run -> cmd and Type
     netstat -ano | more 

Thursday, September 05, 2013

Installing TFTP Server on Ubuntu

TFTP Server is usefull for PXE booting or configuring automatic back up of Cisco routers and Switches etc. Installing TFTP Server can be done in a few steps :

We are going install TFTP Server on a machine running Ubuntu ( version 10.04 32 bit Desktop Edition).

Steps to Install and Configure TFTP Server on Ubuntu

  1. Step 1: Install TFTP Server
  2. Either you can install using command line or Go to Ubuntu Software center. In command line type"sudo apt-get install tftpd-hpa" Or Search for tftpd-hpa in Software Center and click install

Saturday, January 19, 2013

Active Directory Authentication for APACHE Web Server

For authenticating users against their Active Directory account in APACHE Web Server, you have to edit the /etc/apache2/httpd.conf .


  1. You should bind some other common AD account with LDAP
  2. Provide LDAP URL of you Domain Controller . Here I assume the Domain is DC.EXAMPLE.COM and IP of the Domain Controller is .
  3. I am binding with another account . So give FQDN of this acount .
  4. You should enable the authnz_ldap module for apache.

Sunday, January 13, 2013

PHP-MySQLi Class

What is MySQLi

MySQLi (MySQL improved) is a driver used in PHP to access MySQL databases. PHP 5.5.0 deprecate the use of old mysql driver and it gives warning that old driver will be removed in the future versions. Also it recommends the use of MySQLi or PDO_MySQL extension.

PHP-MySQLi Class provides a good PHP class for MySQLi, MySqliDb Class . Go get the code. Now import the Class into your project:

String to MySQL date format in PHP

String to Date in PHP

Sometimes when I export some MS Excel/ MS Access data to MySQL , It is required to convert some date in string to MySQL compatible date format. You can use DateTime class to convert the string to date in any format you want. The code is below.
function _mk_date($str)
 $temp = new DateTime($datestr);
 return date_format($temp, 'Y-m-d');

Tuesday, January 08, 2013

Configuring BSNL MTNL Internet on D-Link Wireless N 300 ADSL2+ (DSL-2750U) Router

New year wishes to all.
In this new year, the first thing i bought from Flipkart is a Dlink router/modem. They provided some CD along with the product. When i started to run the application in it , It got stuck at some stage. So i tried the usual way i configure a router . So i thought of sharing this so that it may help someone.

Configuring The modem

Physical set up

  1. Unpack your router. Connect the power adapter and switch on. Now the power led will be lit
  2. Connect a LAN cable from your computer to one of the four yellow LAN ports. And see whether the corresponding LED start blinking
  3. Now wait sometime so that the router will assign an IP to your computer.