Wednesday, September 23, 2015

Explain each system calls used for process management in linux ?

Process management uses certain system calls. 

They are explained below.

1. fork () is used to create a new process.
2. exec () is used to run a new program.
3. wait () is used to make the process to wait.
4. exit () is used to terminate the process.
5. getpid () is used to find the unique process id.
6. getppid () is used to find the parent process id.
7.  nice () is used to bias the currently running process property.

Saturday, September 19, 2015

List of Free And Open Source Monitoring System

The Linux monitoring systems are often used to follow system resources, such as CPU load, the amount of free RAM, network traffic statics or memory consumption. Which are ones from the most important tasks for every administrators. Furthermore, those tools notify the network administrator (via email, SMS or other alarms) when something interrupts or goes down which makes their life easier.

From those monitoring tools we will list the 7 most important in this article which will be described and identified by giving their features and mentioning their current version.


One from the most known, open source, powerful monitoring systems nowadays is Nagios. It enables organizations to identify and resolve IT infrastructure problems before affecting critical business processes.

Nagios is licensed under GNU General Public License which gives you permission to copy, broadcast and/or change it under certain conditions obviously. For more details, you can check the license as either as by using the LICENSE file of the Nagios distribution or by reading the online version of license.
Concerning its features we can list the following:
Ø  Monitor network services (SMTP, POP3, HTTP, NNTP, and PING), applications, operating systems, network protocols and system metrics with the same tool.
Ø  Detect infrastructure outages rapidly and send e-mail, SMS or call phone notifications to the right people when a problem is detected.
Ø  Define network host hierarchy
Ø  Users can easily develop their own services due to the simple plugin design of Nagios.
Ø  Ability to check the current network status, notifications and problem history
Ø  Open source software, full access to source code, licensed under GPL.
Seriously, Nagios is one awesome IT infrastructure monitoring tool which I strongly recommend it for every administrator wishes to make his work easier and organized but it is good also to use it with other monitoring tools since Nagios doesn’t show any graphs such as the network interface.


Cacti is another monitoring system licensed also under GPL but unlike Nagios, Cacti is a network graphing solution designed to exploit the power of RRDTool in storing data and building graphs.

It enables users to view CPU load graphs, RAM usage and other information collected from different hosts. Like Nagios, Cacti supports SNMP that makes it possible to monitor: Linux’s, BSD’s and windows hosts.
We can list the following features of Cacti:
Ø  Unlimited number of graph items.
Ø  Graph data can be manipulated using the CDEF math functions built in RRDTools.
Ø  Support all RRDTool’s graph items including AREA, STACK, LINE, COMMENT, VRULE, and HRULE.
Ø  Data sources can be created by utilizing RDDTool’s functions.
Ø  Permissions can be specified per-graph for each user.
But unlike Nagios, Cacti doesn’t notify users while problems appear so it is recommended to use other flexible tools supporting alerts.


Centreon is our third type of free monitoring systems. Mostly called CES referencing to the Centreon Enterprise Server, is the choice of some world’s largest company. It lets company supervise all their infrastructure and applications comprising their information system.

Centreon has many advantages, we can list the following:
Ø  Enable to monitor the user’s servers, active elements and applications.
Ø  Real-time operating and component management console.
Ø  Ability to maintain and support the whole platform using the publisher solution.
Ø  Unlimited number of uses and extensions via open software mechanisms.
Ø  Currently there are 4 different solutions available to suit different organizations with evolving business needs.
Ø  The CES Standard is the only open and unlimited trial version. Unless it has a free access, a powerful industry-standard monitoring solution is offered.
Ø  CES Essentials is CES Standards including access to new software products and services such as Platinum level supports and various software extensions which allow users to automate the daily tasks of administration and monitoring.
Ø  CES Advanced is CES Essentials adding also the Centreon’s complementary plugin pack and different templates comprising databases, applications and infrastructure services.
Ø  The last one is CES Complete which is the mix of all the centreon software products and modules, including BI, BAM and Map. It is also delivered with Platinum level support.

Zabbix :                              

Zabbix is our fourth free monitoring system which is licensed as Nagios and Cacti under GPL and it is written in PHP. We can say that Zabbix is the mix of Nagios and Cacti functions: it is characterized by its simple way of monitoring data with graphs and its alerts sending to user in case of any problem.

Personally, I like the way how Zabbix can check and make report about every authorized or not change happen at one of the user’s servers.  This free monitoring tool, can from remote hosts where Zabbix is used. It offers different types of graphs such as network statistics, CPU load and others.
It is a little bit complicate for beginners and some additional time to be familiar with this monitoring system is recommended.
Zabbix as I mentioned offers the functions of Nagios and Cacti at same time, we can list the following features of this tool:
Ø  It is fully open source, free for commercial and non-commercial use.
Ø  It enables users to easily monitor their servers, network devices and applications, collecting appropriate statistics and performance data.
Ø  It is designed to scale from small environments with a few devices to large ones with thousands of monitored devices.
Ø  Like Nagios, it can send notification messages via e-mail, SMS for each notable event.


OpenNMS is another free network monitoring system and it is the world’s first enterprise grade monitoring tool which can be used a big number of unlimited devices. It enables users to discover and monitor services or nodes automatically in their network.

OpenNMS has many advantages make it a very beneficial free network monitoring tool when we can list the following:
Ø  Automatic Service Discovery and Provisioning
Ø  Performance Data Collection Protocols (such as HTTP, JDBC, JMX, SNMP, XML etc)
Ø  Multi-Resource Performance Reports
Ø  Best Practical Solutions RT (Request Tracker)
Ø  Import of nodes, interfaces, and services from external provisioning system
Ø  Performance Data Export via simple XML Schema
Ø  Possibility to send e-mail or SMS notifications to the administrators


Icinga is another enterprise grade free monitoring system which enables users to follow network and its resources and also notifies them when any problem appear. This tool can monitor as either as complex or large environments across various locations.

Some of its various features include:
Ø  Its capability to monitor different network services (SMTP, POP3, HTTP, NNTP, PING…)
Ø  Also monitor host resources (CPU load, disk usage…)
Ø  It allows users to easily develop their own services checks due to its simple plugin design.
Ø  It has support for monitoring redundant monitoring hosts.
Ø  It notifies users when service or host problems occur and when they also get resolved.


MRTG (Multi Router Traffic Grapher) is our last type of free monitoring system. It is simpler than Nagios, Cacti and Zabbix which can be more beneficial to use it with small projects. Mostly, it is used for monitoring network interfaces, CPU, memory and network interfaces statistics.

Regarding its features, we can list the following:
Ø  It works on most UNIX platforms and Windows NT.
Ø  It is written with Perl and delivered with full source.
Ø  No need to install any external SNMP package since MRTG uses a highly portable SNMP implementation written fully in Perl.
Ø  It creates visual representations of the traffic seen during the last week, month and year.
Ø  It is possible to monitor 200 or more network links from any halfway decent UNIX box.
Ø  It is also possible to monitor any SNMP and to assemble to data sources in one graph.

 Thank you for reviewing our article and please don’t forget to share it.

Monday, September 14, 2015

How to install eclipse on ubuntu 14.04

Eclipse is a open-source development environment used to develop applications . In this article we can see about installing eclipse in ubuntu 14.04 Manually.

Step 1 » Update repostories.
sudo apt-get update

Step 2 »check the java version
java  -version

Step 3 »Install Java by the below command.
sudo apt-get install openjdk-7-jdk

Step 4 » Download latest eclipse from here ( Download Eclipse )
Download from below link

Step 5 » Move the downloaded package to /opt/ directory.
sudo mv Downloads/eclipse-standard-kepler-SR2-linux-gtk-x86_64.tar.gz  /opt/

Step 6 » Unzip the downloaded file.

cd  /opt/
sudo tar -xvf eclipse-standard-kepler-SR2-linux-gtk-x86_64.tar.gz

Step 7 » Create a new file eclipse.desktop in /usr/share/applications/ and add the below code .

cd /usr/share/applications/

sudo nano eclipse.desktop

[Desktop Entry]
Comment=Integrated Development Environment

Step 8 » Now install that desktop file using the below command.

sudo desktop-file-install /usr/share/applications/eclipse.desktop

sudo ln -s /opt/eclipse/eclipse /usr/local/bin

you can launch by 

how to install apache tomcat on ubuntu 14.04

Step 1 » Install JDK 7 before installing tomcat.

Step 2 » Download latest tomcat version ( Choose latest version from here –Download Apache Tomcat ).
cd /usr/local

Step 3 » Extract the package
sudo tar –xvf apache-tomcat-7.054.tar.gz

Step 4 » Configure  /etc/environment

set the java and tomcat home directories
PATH=":/usr/local/games:/usr/lib/jvm/java-7-openjdk-amd64/bin: /usr/local/apache-tomcat-7.0.54/bin”

sorce the environment file by using
source /etc/environment command.

Step 5 »

Choose username and password to manage tomcat and add to the file /usr/local/apache-tomcat-7.0.54/conf/tomcat-users.xml like the below. The below code must be within < tomcat-users > …. < /tomcat-users > tags.

<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="tomcat" password="passwd" roles="manager-gui,admin-gui"/>

Step 6 »

Tomcat and Java should now be installed and configured on your server. To activate Tomcat, run the following script:

start the server


You should get a result similar to:

Step 7 »

Now open http://serve-IP:8080 in your browser, you will get

Step 8 »
stop the server


Sunday, September 13, 2015

How to install NFS server on ubuntu 14.04

NFS ( Network file systems ) is used to share files with other computers over the network.
It is mainly used for centralized home folders. This article explains, how to setup NFS server on ubuntu 14.04 . also explains about mounting nfs shares on client machine .

Setup NFS server on ubuntu 14.04

Step 1 » Update the repositories.
sudo apt-get update

Step 2 » Install nfs server package by typing the command.
sudo apt-get install nfs-kernel-server

Step 3 » Make directory you want to share with other computers.
sudo mkdir /nhome

Step 4 » Here /etc/exports is the main config file for NFS.
Vim /etc/exports

#Share access to all networks
/nhome        *(rw,sync,no_root_squash)
#Share access to particular network
#Share access to particular host
#Share access to all hosts in particular domain
/nhome4       *,sync,no_root_squash)

·         rw: This option gives the client computer both read and write access to the volume.
·         ro:  This option gives the client computer both read-only access to the volume.
·         sync: This option forces NFS to write changes to disk before replying. This results in a more stable and consistent environment, since the reply reflects the actual state of the remote volume.
·         nosubtreecheck: This option prevents subtree checking, which is a process where the host must check whether the file is actually still available in the exported tree for every request. This can cause many problems when a file is renamed while the client has it opened. In almost all cases, it is better to disable subtree checking.
·         norootsquash: By default, NFS translates requests from a root user remotely into a non-privileged user on the server. This was supposed to be a security feature by not allowing a root account on the client to use the filesystem of the host as root. This directive disables this for certain shares.

Step 5 » Start service by the below command.
sudo /etc/init.d/nfs-kernel-server start

Step 6 » Now check the NFS share status.
linux@ubuntu:~$ sudo exportfs -u
/nhome3 *
/nhome world

Ubuntu – Client side

Step 1 » Install nfs client and dependencies .
sudo apt-get install nfs-common rpcbind

Step 2 » Create a directory /rhome .
sudo mkdir /rhome

Step 3 » Mount the remote share /nhome on local directory /rhome.
Temporary mount
sudo mount -t nfs /rhome
add the following line in /etc/fstab file for permanent mount. /rhome nfs rw,sync,hard,intr 0 0

Step 4 » Check the mounted share directory using mount command.
linux@ubuntu:~$ mount
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw) on /rhome type nfs (rw,vers=4,addr=,clientaddr=

Now local rhome is remote NFS directory . whatever data copied to that folder will be stored in remote directory /nhome.

Tuesday, September 8, 2015

How to mount NFS file systems on Rhel6 ?

mount -t nfs <IP Address>:/<Share Directory>    /mnt/

What all this means:

-t : Is used to tell the system that this is just an ordinary mount command. You use this when you do not have the drive information located in /etc/fstab
nfs : Tells the type of share you are trying to mount.
<IP Address>:/ : IP address of the drive you are trying to mount.
<share directory> : The Share within the Volume of the hard drive that you want to mount.
/mnt  : The location to which you want your share to be mounted.

Temporary Mount


mount -t nfs     /mnt/data

permanent Mount 

Open /etc/fstab

vim /etc/fstab
Ipaddress:/sharename   mount_point filesystem type defaults 0 0

example:     /mnt      nfs  defaults 0 0

save and exit

mount -a

Troubleshooting NFS

showmount -e <IPaddress>
showmount  -e
The -e stands for "exports" or a list of shares exported by NFS.

What command can you use to review boot messages in Linux ?


#dmesg   or   #dmesg |more  (for page vise view)

The dmesg command displays the system messages contained in the kernel ring buffer. By using this command immediately after booting your computer, you will see the boot messages.

dmesg keeps track of all log messages generated by the system. The boot messages can be viewed using following command

cat /var/log/messages