Showing posts with label Monitor. Show all posts
Showing posts with label Monitor. Show all posts

Tuesday, August 9, 2011

Make *nix automatic re-spawn a process/service if stopped


To make your *nix system automatic re-spawn a process/service if stopped ~

Write a shell script to check for presence of a service and start it if it is not running.
Then attach that shell-script to a cronjob running at frequent intervals.

Example Script to monitor Apache HTTPD web server and start it if is not started ~
#!/bin/sh
pids_=`ps ax | grep /usr/sbin/httpd | grep -v grep | wc -l `
if [ $pids_ -ne 0 ];
then
     echo "Apache is running"
else
     echo "Apache was stopped. Starting..."
     apache_start_=`/etc/init.d/httpd start`
     if [ $? -eq 0 ];
     then
         echo "Apache Started Successfully"
     fi
fi
#############################
 this simply checks for HTTPD process to be present and re-spawn the service in absence of even a single process thread.

There is a wonderful Ruby utility "bluepill" to achieve the same solution in a more advanced and comfortable manner. Cover it sooooon.....

Wednesday, June 23, 2010

Microsoft Network Monitor {its free, it's efficient}

Microsoft Network Monitor

Brief Description:
One of the best network analysis utilities on Windows. 
You can choose any Physical/Virtual NIC present on your machine to capture traffic.
It shows the traffic in a nested tree menu ordered by Application Name generating that traffic.
This way you can analyse entire network traffic per application from your machine.
Tool to allow capturing and protocol analysis of network traffic.
It's free, it's fine network packets analysis utility.

It also allows you to save captured data into PCAP files, and can even open and analyze PCAP files.

Download Link & Installation:

How To Capture Network Traffic:

msnm.jpg