Monday, January 20, 2014

A free tool to analyze AIX and Linux performance

One of the tools I use to monitor performance on IBM AIX 5.3 and Linux is NMON. Using nmon, you can monitor CPU, memory, network, disk, filesystems, NFS and Top Processes.

Install Nmon

CentOS users need to install nmon from rpmforge/repoforge repository. It is not present in Epel.

CentOs 4 :
i386     rpm -ivh

x86_64   rpm -ivh

CentOs5 :
i386     rpm -ivh

x86_64   rpm -ivh

CnetOs6 :
i686     rpm -ivh

x86_64   rpm -ivh

sudo yum install nmon
sudo apt-get install nmon

Usage :

$ nmon
And then choose what information you want to be displayed: C – for CPU; M – for Memory; T – for Processes

Keyboard shortcuts

The following keyboard shortcuts can be used turn on (and off) statistics about various components:

   c = CPU                 l = CPU Long-term   - = Faster screen updates
   m = Memory          j = Filesystems          + = Slower screen updates
   d = Disks               n = Network               V = Virtual Memory       
   r = Resource         N = NFS                     v = Verbose hints        
   k = kernel               t = Top-processes        .  = only busy disks/procs
   h = more options                                       q = Quit                  

Thursday, January 16, 2014

Audit Your Linux Security With Lynis

Lynis is an auditing tool for Unix/Linux. It performs a security scan and determines the hardening state of the machine. Any detected security issues will be provided in the form of a suggestion or warning. Beside security related information it will also scan for general system information, installed packages and possible configuration errors.

Examples of audit tests:
- Available authentication methods
- Expired SSL certificates
- Outdated software
- User accounts without password
- Incorrect file permissions
- Configuration errors
- Firewall auditing

Installation :

yum install lynis

Ubuntu :
apt-get install lynis

Install from source :
Create Directory
mkdir /usr/local/lynis

cd /usr/local/lynis
tar -xvf lynis-1.3.9.tar.gz

cd lynis-1.3.9.

Usage :
lynis -c

This will produce similar to the following output.
Once, you execute above command it will start scanning your system and ask you to Press Enter to continue, or CTRL+C to stop every process it scans and completes.


Vishal Vyas

For More :

Thursday, January 9, 2014

GoAccess a Real time Web Server Log Analyzer

GoAccess is an open source real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems. It provides fast and valuable HTTP statistics for system administrators that require a visual server report on the fly.

GoAccess parses the specified web log file and outputs the data to the X terminal.

  •     General Statistics, bandwidth, etc.
  •     Time taken to serve the request (useful to track pages that are slowing down your site.
  •     Top Visitors
  •     Requested files
  •     Requested static files, images, swf, js, etc.
  •     404 or Not Found
  •     Hosts, Reverse DNS, IP Location
  •     Operating Systems
  •     Browsers and Spiders
  •     Referring Sites
  •     Referrers URLs
  •     Keyphrases
  •     Geo Location - Continents/Countries New
  •     HTTP Status Codes
  •     Ability to output JSON and CSV New
  •     Different Color Schemes
  •     Support for IPv6
  •     Unlimited log file size
  •     Output statistics to HTML.

Installation :
GoAccess has minimal requirements, it's written in C, ncurses, GLib >= 2.0.0, and GeoIP (optional) for geolocation data

# yum install ncurses-devel glib2-devel GeoIP*
# cd /opt
# wget
# tar zxvf goaccess-0.5.tar.gz
# cd goaccess-0.5
# ./configure
#  make
# make install

How to use GoAccess :
once it has been installed (no configuration is needed), just run it against your web log file: (-a is optional)

To generate full statistics we can run GoAccess as:
 # goaccess -f /var/log/httpd/access_log -a

Select a log format and press F10

To generate an HTML report:
#goaccess -f  /var/log/httpd/access_log -a > report.html

To generate a CSV file:
# goaccess -f access.log -o csv > report.csv

Vishal Vyas

For more information and usage please visit

Install Darkstat - a network traffic analyzer

Darkstat is a opensource network monitoring tool, It is a packet sniffer which runs as a background process and serves its statistics to a ...