How to setup and expand a replicated Glusterfs 3.2.4 volume on Debian 6.x

In this tutorial I will describe how to setup and expand a replicated Glusterfs Volume on Debian Squeeze. Glusterfs is a clustered, scalable network file system licensed under the GNU GPL. Glusterfs should be able to handle petabytes of data and thousands of clients – may be I will try that later .. In my tutorial I will use only four storage server and one client.

(more…)

how to setup gitorious on ubuntu server 11.10

In this tutorial I will describe how to setup gitorious on Ubuntu 11.10. Gitorious – a Ruby on Rails web application – can be used to conclude git projects in an easy to manage user interface. In the README of the gitorious repository I found the evidence “One of the main challenges in Gitorious is its installation process. It is anything but trivial.” – It appears correct ;) During the installation I got some errors by the sphinx search engine and some ruby gems. You will find the workarounds in this tutorial.

(more…)

how to determine the runtime and start time of a Linux process

Yesterday, I needed to determine the runtime of a Linux process for a monitoring script.

Cos the format for start_time of the ps command may change if the process was not started in the same year, I decided to take the neccessary informations from the /proc/<PID>/stat file.

In this file the process start time since boot is defined at the twenty-second field, expressed in Jiffies – the scale unit of the system timer. (One Jiffie is one tick of the system timer).

To convert Jiffies to seconds I just have to divide the number of Jiffies by the frequency (hertz) of the system timer, which is defined in the Linux Kernel header file include/asm-generic/param.h. The frequency may differ between Linux kernel versions and hardware platform! On my Linux systems the frequency is 100 HZ.

(more…)

Perl script for logfile monitoring

The following Perl script monitors a logfile for an error message, if the message is found the exit code of the Perl script is 1. Combine this error code with a cronjob to restart a daemon if the error message rise up. To save resources the script saves the file pointer position of the file, and reads at the next run only new lines behind this pointer. (all old lines are ignored)

(more…)

Performance monitoring with nmon

In this tutorial I will describe, how to use nmon (Nigel’s performance Monitor) to monitor performance data in the interactive mode or in the capture mode.

nmon can display / capture the following performance data

  • CPU utilization
  • Memory use
  • Kernel statistics and run queue
  • Disks I/O rates, transfers, and read/write ratios
  • File systems size and free space
  • Disk adapters
  • Network I/O rates, transfers, and read/write ratios
  • Paging space and paging rates
  • Machine details, CPU and OS specification
  • Top processors
  • User defined disk groups
  • Asynchronous I/O – AIX only
  • Workload Manager – AIX only
  • ESS and other disk subsystem – AIX only
  • Dynamic LPAR changes – AIX and Linux (on POWER hardware)

(more…)