I/O multiplexing: select, poll and epoll in Linux

1.0 I/O multiplexing

I/O multiplexing is the the ability to perform I/O operations on multiple file descriptors. Input operations like read, accept and calls for receiving messages block when there is no incoming data. So, if an input call is made and it blocks, we may miss data from other file descriptors.… Read more

Interprocess Communication using Unix Domain Sockets

  • by kjohri

1.0 Unix Domain Sockets

A socket is a communication endpoint at a host computer. The socket API provides calls for communication between processes. The socket system call is,

int socket (int domain, int type, int protocol);

The first parameter to the socket system call is the domain.… Read more

Analyzing the NGINX web server log file

  • by kjohri

1.0 Introduction

Given an nginx web server log file, we might like to know who are the visitors to our website. One can go line by line through the log file, but that is tedious. It would be nice if we can get one line per client visiting the website, giving the IP address of the visitor and how many times that client has visited.… Read more


  • by kjohri

1.0 Syslog

Syslog is a protocol for conveying event notification messages.

Syslog was first developed by Eric Allman for logging as a part of the Sendmail project in the 1980s. It soon became a de-facto standard for logging on Unix-like systems.… Read more

D-Bus Tutorial

  • by kjohri

1.0 D-Bus

D-Bus is a mechanism for interprocess communication under Linux and other Unix-like systems. D-Bus has a layered architecture. At the lowest level is the D-Bus wire protocol described in the D-Bus Specification. The libdbus library is an implementation of the wire protocol.… Read more

POSIX message queues in Linux

  • by kjohri

1.0 POSIX Message queues

POSIX interprocess comunication (IPC) was introduced in the POSIX.1b standard (IEEE Std 1003.1b-1993) for real time extensions. POSIX message queues have been made available in Linux since the version 2.6.6 (May 2004). POSIX IPC calls are as per the standard but may not be available on older Unix-like systems.… Read more

System V message queues in Linux

  • by kjohri

1.0 Message queues

Message queues are one of the interprocess communication mechanisms available under Linux. Message queues, shared memory and semaphores are normally listed as the three interprocess communication mechanisms under Linux. Semaphores, though, are really for process synchronization. In practice, shared memory, aided by semaphores, makes an interprocess communication mechanism.… Read more

FIFOs in Linux

  • by kjohri

1.0 FIFO

FIFOs are pipes with a name and are also commonly referred to as named pipes. Pipes are common on Linux command lines but do not have a system-wide name. So, any two processes that wish to communicate using a pipe need to be related, either parent and child or, sharing a common parent, who sets up the pipe and passes its file descriptors to individual processes.… Read more

Using Git

  • by kjohri

1.0 Introduction

Git commands for common source code management use cases are listed.

2.0 Install Git

On an Ubuntu Linux system, Git can be installed with the command,

$ sudo apt-get install git

3.0 Set Identity

Before using Git, the user's identity (name, email) has to be set

$ git config --global
Read more

Getting WordPress to work with Varnish 4.0

  • by kjohri

With Varnish 4.0, the VCL has changed. So an update from Varnish 3 .0 to Varnish 4.0 requires a change in the VCL file, /etc/varnish/default.vcl. As a part of Varnish cache server configuration for a WordPress based site, using nginx web server, the following VCL is required in /etc/varnish/default.vclRead more