Skip to content

How to optimize Ganglia for too much Disk IO

I was facing ganglia server performance issues. It was showing too much disk IO and too much Load average on the server. So I thought of some optimization. All of my setup is on AWS and I was using 10000 IOPS EBS volume for my server but still was facing disk performance issues.

My Server Details:
8 CPU – 2.1 GHZ
No. of hosts graphing – ~150

Current Load on server:
avg-cpu: %user %nice %system %iowait %steal %idle
9.88 0.00 9.11 20.02 1.28 59.72

Device: rrqm/s wrqm/s r/s w/s rMB/s wMB/s avgrq-sz avgqu-sz await svctm %util
xvdap1 0.00 8.00 0.00 13.00 0.00 0.33 51.32 0.09 7.02 1.11 1.44
xvdh 0.00 473.00 98.60 9700.00 0.39 40.39 8.52 145.26 14.82 0.10 100.00

I have used RRDCache for disk IO improvement. Below are the steps to setup.

* Uninstall your existing rrdtool rpm and install it from rpmforge or download them from site as below:

rpm -e rrdtool --nodeps
rpm -e rrdtool-perl --nodeps
yum install -y perl-Time-HiRes
yum install -y libdbi
yum install -y xorg-x11-fonts-Type1
rpm -ivh perl-rrdtool-1.4.7-1.el5.rf.x86_64.rpm perl-rrdtool-1.4.7-1.el5.rf.x86_64.rpm rrdtool-devel-1.4.7-1.el5.rf.x86_64.rpm

* Since gmetad runs as ganglia user and rrdcached requires access to write to rrd files and apache needs access of same directory. So, Add ganglia to apache group.

usermod -a -G apache ganglia

* Give apache group access to rrd dir. In my case, I am saving RRDs to /ganglia partition. By default its /var/lib/ganglia.
chown -R ganglia:apache /ganglia/rrds/

* Now change the rrdcached startup options:

vim /etc/sysconfig/rrdcached
OPTIONS="rrdcached -s apache -m 664 -l unix:/tmp/rrdcached.sock -s apache -m 777 -P FLUSH,STATS,HELP -l unix:/tmp/ -b /ganglia/rrds -B"

* Also update the gmetad startup variables to use rrdcache socket file.

vim /etc/sysconfig/gmetad

* Now you have to tell ganglia web to read from socket file.

Change the below variable with the socket file location. By default it does not have any value.

$conf['rrdcached_socket'] = "/tmp/rrdcached.sock";

* Always make sure, rrdcached is started before gmetad process. So

/etc/init.d/gmetad stop
/etc/init.d/rrdcached start
/etc/init.d/gmetad start

* Now monitor your logs ganglia logs:

tail -f /var/log/messages

If you don’t see any error like: “Unable to connect to rrdcache: No such file or directory” then you are good to assume your rrdcache setting are correct.

Now check “ps aux | grep -i rrdcached“, if you see couple of rrdcache processes are running with ganglia user. You are good.

By checking both the above commands you can consider rrdcache is working fine.

* Alternatively you can check if RRDcache is working on not with:

while true; do clear ; echo STATS | socat - /var/rrdtool/rrdcached/rrdcached.sock; sleep 1; done

Now you should check your iostat command output again and see the IO difference. It would have decreased by atleast 10 times. :)

There is another method to improve the ganglia performance by moving the RRD dir to tmpfs. As suggested: here:

Posted in Linux, Open Source, Optimization.

Download all files of certain extension from website using wget

Issue this command in a terminal to download all mp3s linked to on a page using wget

wget -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off [url of website]

OR if you want to download all linked mp3s from multiple pages then make a text file containing each url on a separate line, then issue:

wget -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off -i ~/mp3blogs.txt

If the site is behind basic http authentication you can use something like:

wget --http-user [username] --http-passwd [passwd] -r 

Posted in Linux.

Linux Tricks and Useful Commands

pwd -P # Print path to the dir you are in, converting any symlinks in the path into their real/(P)hysical directory name.
grep -ril inactive /etc # Show matching files(-l) with the string “inactive” regardless of case(-i) in all subdirs of /etc (-r)

for i in {0..365};do date -d “Jan 1 2012 + $i day” +”*%B %_d – “; done # Generate days of the year list with some formatting. Req. GNU date

sox song.wav -t wav – pitch 1200 | play – # Play a song an octave higher without saving an intermediary file. 1200 cents == 1 octave

ascii || man ascii # Quick access to the ASCII character table either through the ascii program or the man page if you don’t have the prog.

ionice -c 3 cp vm1.img vm1-clone.img # Copy a file using “ionice -c 3″ to give it idle IO priority to reduce load on the system.

mv somedata{,-20120720} # This is the same as mv somedata somedata-20120720 but is shorter. You don’t have to type somedata twice.

foremost # Foremost is a file recovery program that can extract files from disk images and more. # GNU ddrescue is a good tool for copying/recovering disk images.

dd if=/dev/sdc of=sdc.img bs=100M conv=sync,noerror # Image a disk, sync,noerror will continue on read errors and pad missing parts.
kill -USR1 $( pidof dd ) # Tell each dd process to print its current status (blocks written, etc). dd interprets the USR1 signal this way.

ls -d */ # View only the directories in the current directory. The / at the end of the wildcard makes this work.

convert -rotate -90 sideways.jpg rightsideup.jpg # Rotate an image 90 degrees counterclockwise. The convert command is from ImageMagick

gzip -l largefile.gz # A fast way to get the size of the uncompressed gzip file. However the uncompressed value can’t be more than 4GB.

montage -geometry 800×600+4+4 pic1.jpg pic2.jpg pic3.jpg pic4.jpg -tile x2 combined.jpg # Make 2×2 800×600 montage with 4 px border.

echo “1-800-SHOWNUM” | tr A-Z a-z | tr ‘a-z’ ‘22233344455566677778889999’ # Looks like a command that we could make shorter

[Ctrl-w] # Remove the previous word on the command line (before the cursor). This is highly useful when reusing old commands.

[Ctrl-l] # This is usually equivilent to running ‘clear’. Its usually quicker and doesn’t leave the command in your command line history.

[Ctrl-e] # Move your cursor to the end of the line. Faster than holding down right arrow

[Ctrl-a] # Move your cursor to the beginning of the line. Faster than holding down left arrow. In screen, you need to press

[Ctrl-r]string # Reverse search through your command history for ‘string’. Press Ctrl-r again to continue searching backwards. ESC when done

cd # Takes you back to your home directory.

cd – # Takes you back to the previous directory you were in. Good to know if you don’t already.

for d in /dev/sd? ; do sudo smartctl -H $d ; done # How are your drives doing? may need apt-get install smartmontools Thx

find dir1 dir2 dir3 | wc -l # Count the number of files in multiple directories.

echo “kernel.panic = 20″ | sudo tee -a /etc/sysctl.conf # so your headless Linux system reboots after a kernel panic (20 sec) Thx

getent services 993 # Look up in your services table to see what port 993 is. Can also look up by service name to get port.

ls -1 | tr A-Z a-z # List files and print them all in lowercase so you can copy and paste and compare with another list that got fatty.

getent passwd|while IFS=: read -r user n uid n n home n;do if [[ $uid -ge 500 ]];then printf “$user “;du -sh $home;fi;done # space per user

sleep 8h 30m 20 # In the GNU version of sleep you provide mixed time intervals to stack them together instead of just seconds.

sed -n ‘1,10p’ # Probably your best option is to put something like this into a script called or whatever

ls -ltrah | sponge | pee head tail # This also works. sponge also comes with moreutils and kinda fits with the naming there.

ls -ltrah | pee “sed -n ‘1,10p'” tail # Sorry, the last command suffers from head closing the input prematurely. So try this instead. # iodine is a client and server that allow you to tunnel IP traffic over DNS, bypassing many firewalls, etc.

alias dnsip=’dig +short’ # even gets your public ip behind pay hotspots.
df . # This is an easy way to find out what partition the current directory is on, regardless of symlinks.

curl “” |python -mjson.tool |grep ‘”text”:’ # Reformat JSON data and get latest updates
identify -format “%f F:%[EXIF:Flash]\n” *.jpg | egrep ” F:(0|16|24|32)$” # Show photo filenames where no flash was used.

identify -format “%f F:%[EXIF:Flash]\n” *.jpg | egrep ” F:(0|16|24|32)$” # Show photo filenames where no flash was used.
/usr/lib/xscreensaver/skyrocket # More fireworks! GUI output, but many CLI options. You need the rss-glx screensavers package.

date -d “$(grep finish /proc/mdstat |sed -e ‘s/^.*finish=//;s/ .*$//;s/\..*$//’)min” # Figure out when your md-raid will finish.

todo(){ cd ~/.todo||return 1&& l=$(ls -1t|head -n1)&&t=$(date +%Y%m%d);[[ “$1″ == “last” ]]&&cp $l $t; ${EDITOR:-vi} $t;cd -;} # Todo list.

ls -l |sed ‘s/^/ /’ # Ever have one of those situations in console mode where you can’t read the first characters? This intents the output.

fsck -y /dev/sda1 || echo “You’re fscked!” | mail -s alert # Use || when you want to run a command only if the first one failed

service network start && service httpd start # Use && when you want to run a command after another only if the first one is successful

sleep 30m ; killall tcpdump # Use a ; in a statement if you want to run a command after another, but don’t care about the exit status of 1st
ssh-copy-id ‘user@remotehost’ # Automatically installs your public key to the remote host (this actually is included in the openssh package)

xargs -n1 -0 < /proc/$(pidof firefox| cut -d’ ‘ -f1)/environ # Print the environment of a running process (ie. firefox) awk ‘{if (a[$1]) { print; } else { a[$1]=1 }}’ md5sums.txt # And here is a way to print only duplicates using just awk. sort md5sums.txt | uniq -d -w 32 # Print only duplicate md5sums by looking only at first 32 chars for uniqueness. head -5 file1 |cat – file2 >combofile # One way of putting the first 5 lines of file1 before the contents of file2 and writing to combofile

last |awk ‘BEGIN {f=0;u=”YOURUSER”;} {if ($1==u && f==0){f=1; print $0;}else if(f==1 && $1!=u) {print $0;exit;}}’ # Display prev. user b4 u

grep -B2 Subj: maildrop.log | grep -v ^From: | grep -v ^– | xargs -d$’\n’ -n 2 # Join the Date and Subj line together in procmail log.

find . -type f | egrep -o “[^\.]+$” | tr A-Z a-z | sort | uniq -c # Show a count of all the file extensions in use below current directory.

awk ‘{a[$1] += $10} END {for (h in a) print h ” ” a[h]}’ access_log | sort -k 2 -nr | head -10 # Display top bandwidth hogs on website.

curl -s ‘…’ |grep -q ‘#500′ && echo “500 ready”|mail -s 500 you # site watcher

– ssh-keygen -R servername # Remove the host key for ‘servername’ from your known_hosts file. This is now the proper way to do it.

Next I’ll be showing 4+ different ways of doing the same thing, printing out the partition table entries for use in snmpd.conf.

df -TP | grep -E ” ext[34] ” | awk {‘print $NF’} | sed ‘s/.*/disk & 5%/’ # Print out the partition table and format it for snmpd.conf

df -TP | awk ‘$2=/ext[34]/ {print “disk ” $NF ” 5%”}’ # snmpd disk entries, same thing but let awk do most of the processing work.

df -P -t ext3 -t ext4 | grep / | awk ‘{print “disk ” $NF ” 5%”}’ # snmpd disk entries, Let df select the filesystems directly.

ethtool -p eth0 # Blink eth0’s LED so you can find it in the rat’s next of server cables. Ctrl-C to stop. Thanks

ls / fake 2>&1 > /dev/null | grep “cannot” # Redirect stdout to /dev/null, and make stderr go through the pipe.

df -TP | grep -E ” ext[34] ” | rev | cut -d’ ‘ -f1 | rev | while read -r fs ; do echo “disk $fs 5%” ; done # Disk entries. The Crazy Way!

ps aux | awk ‘/firefox/ {sum += $6} END { printf “%dMB\n”, sum/1024 }’ # Show the total memory used by Firefox processes (Probably a lot)

Tip ~ To test Internet connection speed from console over SSH command line:
## Download speed
lftp -e ‘pget; exit; ‘

## Upload speed
lftp -u userName -e ‘put largecd1.avi; bye’

## Get network throughput rate between two Linux or Unix servers:
iperf -s -B serverIP
iperf -c serverIP -d -t 60 -i 10

See for more info –

* More tips and howtos from our /faq/ section *
Debian / Ubuntu: Console Based Network Load Monitor or see a quick video demo –

Debian / Ubuntu Python: Set Planet Venus To Combine Two Or More RSS Feeds

OpenBSD: Boot / Install Using PXE (Preboot Execution Environment)

HowTo: Bash Extract Filename And Extension In Unix / Linux

HowTo: Bash Shell Split String Into Array

Sed: Find and Replace The Whole Line [ Regex ]

Bash Script: Find Out In What Directory Script Is Stored Under Unix Or Linux

find . -newerBt “24 hours ago” # Find files created in the last 24 hours. Note: This won’t work on all filesystems.

Posted in Linux.

Important Linux Commands

To get the list of username with its user ID in formatted way:-

awk -F":" '{ print "username: " $1 "\t\tuid:" $3 }' /etc/passwd

Find the particular string from the list of files in current directory:-

cd /etc
for i in $(find -type f); do grep -iH nfsnobody $i; done
grep -iH nfsnobody *

Get the number of occurrences of particular word in file:-

awk '/ServerName/ {i=i+1} END {print i}' /etc/httpd/conf/httpd.conf
grep ServerName /etc/httpd/conf/httpd.conf

To delete resources of semaphore arrays from memory:-

ipcs -s | grep apache | perl -e 'while () { @a=split(/\s+/); print`ipcrm sem $a[1]`}'

To get the list of IP addresses in the server:-

ifconfig | grep -vw inet6 | grep -w inet | cut -d : -f 2 | cut -d \ -f 1

Find list of IP address along with eth device and network mask:-

ifconfig | cut -d " " -f1,12,16 | grep -A 1 eth | tr -d - | tr -s "\n" |sed -e :a -e N -e 's/\n/ /'

Change the device address as per your servers configuration:-

hdparm -Tt /dev/sda

To get the listing of directories:-

ls -F $1 | grep \/ | sed -e 's/\/$/4/g'

To Get Real Time Network Activity Examples:-

watch -d "netstat -nalp |grep -v DGRAM |grep -v STREAM |grep -v LISTEN"
watch "netstat -nalp"|grep ":TCP PORT Number"
watch "netstat -nalp"|grep ":22"

The details of the present http connections can be found by using:-

netstat -plan | grep ":80 " | awk {'print $5'} |awk -F: {'print $1'}|sort
cat /proc/net/ip_conntrack | grep "port=80" | wc -l

Number of connection from perticular IP address:-

netstat -ntu | awk '{print $5}'| cut -d: -f1 | sort | uniq -c | sort -nr | more

Posted in Linux.

Solaris Jumpstart Server

Solaris JumpStart installation is method of network installation of Solaris OS. Below the steps that we need to follow:

  • Configure the JumpStart Installation Server
  • Create the Client profile files
  • Share the Installation directory and Configuration files
  • Create the client boot files using tftpboot
  • Configure the DHCP server with TFTPBOOT files

Final Silent Installation

First of all let me give you the details about our setup. We have one jumpstart server and two clients. IP and hostname details are given below:


IP address:

Mac ID: 00:0c:29:42:ed:ff

Client 1:

IP address:

Mac ID: 01:00:50:56:11:1A:BB

Client 2:

IP address:

Mac ID: 01:00:50:56:11:1A:CC

1. JumpStart installation server:

First of all download the DVD or ISO file of solaris-10u9. If you have downloaded the ISO file then you have to mount it localy using the below commands.


# lofiadm sol-10-u9-ga1-sparc-dvd.iso /dev/lofi/1
# mount -o ro -F hsfs /dev/lofi/1 /mnt

Now create an installation directory on the server:

# mkdir -p /export/install

Put the Solaris 10 OS for x86/x64 platforms DVD in the DVD player on the server. Create the installation server by going to the Solaris_10/Tools directory on the DVD and running the setup_install_server command. The Solaris software is copied to the newly created directory. Specify the absolute path name as the argument.

# cd /cdrom/cdrom0/Solaris_10/Tools
  # ./setup_install_server /export/install
  Verifying target directory...
  Calculating the required disk space for the Solaris_10 product
  Calculating space required for the installation boot image
  Copying the CD image to disk...
  Copying Install Boot Image hierarchy...
  Copying /boot x86 netboot hierarchy...
  Install Server setup complete

2. Create the Client Configuration Files:
Create a configuration directory where the files will reside:

# mkdir /export/config

Create the sysidcfg file:
Note: Each client can have its own sysidcfg file, or multiple clients can use the same sysidcfg file.
Below are the two Sysidcfg files that I have created for Jumpstart_Client1 and Jumpstart_Client2

# cd /export/config
# mkdir sysidcfg1
# cd sysidcfg1
# vi sysidcfg
network_interface=e1000g0 {primary
# cd ../
# mkdir sysidcfg2
# cd sysidcfg2
# vi sysidcfg

network_interface=e1000g0 {primary


Create the rules file:

# cd /export/config
  # vi rules

  hostname client1 begin1 profile1 finish1
  hostname client2 begin2 profile2 finish2


Create the begin file:

# cd /export/config
  # vi begin1

  echo "Begin Script for JumpStart client1..."


  # vi begin2

  echo "Begin Script for JumpStart client2..."


# chmod 755 begin*

Create the finish file:

# cd /export/config
  # vi finish1

  echo "Finish Script for JumpStart client1..."
  echo "Get rid of the nfs prompt during the initial boot"
  touch /a/etc/.NFS4inst_state.domain


  # vi finish2

  echo "Finish Script for JumpStart client2..."
  echo "Get rid of the nfs prompt during the initial boot"
  touch /a/etc/.NFS4inst_state.domain


  # chmod 755 finish*

Create the profile file:

# cd /export/config
  # vi profile1

  # install_type MUST be first
  install_type      initial_install

  # start with the minimal required number of packages
  cluster           SUNWCXall
  cluster           SUNWCapache delete
  cluster           SUNWCpcmc   delete
  cluster           SUNWCpcmcx  delete
  cluster           SUNWCthai   delete
  cluster           SUNWClp     delete
  cluster           SUNWCnis    delete
  cluster           SUNWCppp    delete

  # format the entire disk for Solaris
  fdisk   all   solaris all

  # define how the disk is partitioned
  partitioning      explicit
  filesys           rootdisk.s0 6144  /
  filesys           rootdisk.s1 1024  swap
  filesys           rootdisk.s7 free  /state/partition1

  # install systems as standalone
  system_type standalone

##### Below are the configuration for Patches and Packages installation
# specify patches to install
patch 119281-06 nfs

# specify packages to install
package SPROcc add nfs


# vi profile2

  # install_type MUST be first
  install_type      initial_install

  # start with the minimal required number of packages
  cluster           SUNWCXall
  cluster           SUNWCapache delete
  cluster           SUNWCpcmc   delete
  cluster           SUNWCpcmcx  delete
  cluster           SUNWCthai   delete
  cluster           SUNWClp     delete
  cluster           SUNWCnis    delete
  cluster           SUNWCppp    delete

  # format the entire disk for Solaris
  fdisk   all   solaris all

  # define how the disk is partitioned
  partitioning      explicit
  filesys           rootdisk.s0 6144  /
  filesys           rootdisk.s1 4096  swap
  filesys           rootdisk.s7 free  /state/partition1

  # install systems as standalone
  system_type standalone

##### Below are the configuration for Patches and Packages installation
# specify patches to install

patch 119281-06 nfs

# specify packages to install

package SPROcc add nfs

Create the check script:
The check script is used to validate that the rules and profile files are correctly set up. First copy the check script to the local directory, that is, /export/config, as shown:

 # cd /export/config
  # cp /export/install/Solaris_10/Misc/jumpstart_sample/check .
Run the check script:
  # ./check
  Validating rules...
  Validating profile profile1...
  Validating profile profile2...
  The custom JumpStart configuration is ok.

3. Share the Installation and Configuration Directories

Modify dfstab to share the JumpStart directories.
Edit the /etc/dfs/dfstab file:

# vi /etc/dfs/dfstab

  #       Place share(1M) commands here for automatic execution
  #       on entering init state 3.
  #       Issue the command 'svcadm enable network/nfs/server' to
  #       run the NFS daemon processes and the share commands, after
  #       adding the very first entry to this file.
  #       share [-F fstype] [ -o options] [-d ""] 
  #       [resource]
  #       for example,
  #       share  -F nfs  -o rw=engineering  -d "home dirs"  /export/home2

  share -F nfs -o ro,anon=0 /export/install
  share -F nfs -o ro,anon=0 /export/config
  share -F nfs -o ro,anon=0 /export/patches  ## Share the patches folder on Boot server
  share -F nfs -o ro,anon=0 /export/packages ## Share the Packages Folder on boot Server


Start the NFS server:
  # /etc/init.d/nfs.server start
Share the directories:
  # shareall
  # share
       -       /export/install   ro,anon=0   ""
/export/config   ro,anon=0   ""
/export/patches   ro,anon=0   ""
/export/packages   ro,anon=0   ""
Verify file sharing.
  # showmount -e localhost
  export list for localhost:
  /export/install  (everyone)
  /export/config   (everyone)
  /export/patches   (everyone)
  /export/packages   (everyone)

4. Create the Client tftpboot Files
Run the add_install_client script for each client.
Go to the location of the add_install_client script:

  # cd /export/install/Solaris_10/Tools

Run the add_install_client script for each client on the network that performs a JumpStart installation.

# ./add_install_client \
      -d \
      -e 00:01:00:50:56:11:1A:BB \
      -s \
      -c \
      -p i86pc

  enabling tftp in /etc/inetd.conf
  Converting /etc/inetd.conf
  enabling network/tftp/udp6 service
  copying boot file to /tftpboot/pxegrub.I86PC.Solaris_10-1

  If not already configured, enable PXE boot by creating
  a macro named 01005056111ABB with:
    Boot server IP (BootSrvA) :
    Boot file      (BootFile) : 01005056111ABB

# ./add_install_client \
      -d \
      -e 00:01:00:50:56:11:1A:CC \
      -s \
      -c \
      -p i86pc

  enabling tftp in /etc/inetd.conf
  Converting /etc/inetd.conf
  enabling network/tftp/udp6 service
  copying boot file to /tftpboot/pxegrub.I86PC.Solaris_10-1

  If not already configured, enable PXE boot by creating
  a macro named 01005056111ACC with:
    Boot server IP (BootSrvA) :
    Boot file      (BootFile) : 01005056111ACC

5. Configure and Run the DHCP Server

Run dhcpmgr:
  # /usr/sadm/admin/bin/dhcpmgr
  Java Accessibility Bridge for GNOME loaded.

NOTE: Its pretty straight forward from the GUI. But just make sure that you configured the tftpboot files as well for your clients.

6. Final Silent Installation

With the above setup you still need human intervention at two places in Solaris installation.
1. First is at Installation type selection where it shows you the 6 option menu like 1 for interactive installation,2 for jumpstart etc..
2. Second you need to fill the registration details manually. Registration page is been included in recent releases of the Solaris OS.

Actually both are because of the bug in Jumpstart installation. Though first one have the solution to tweak the kernel parameters in menu.lst.macid file under /tftpboot/ directory. You need to add
– install dhcp parameter to kernel line.

Default  menu.lst.macid file would be:

title Solaris_10 Jumpstart
    kernel /I86PC.Solaris_10-1/multiboot kernel/unix -B \
install_config=, \
sysid_config=, \
install_media=, \
    module /I86PC.Solaris_10-1/x86.miniroot

You have to change it to

title Solaris_10 Jumpstart
    kernel /I86PC.Solaris_10-1/multiboot kernel/unix - install dhcp -B \
install_config=, \
sysid_config=, \
install_media=, \
    module /I86PC.Solaris_10-1/x86.miniroot

Though I have modified the timeout value as well. I have set it to 0 which will not show you the OS selection page. By default it was 30 sec.

Now boot the clients via network card you are good to go.
NOTE: If you have need any alteration or modification or you think it needs some brief then please let me know.

Posted in UNIX.

Yum local repository

1.Copy Red Hat Enterprise Linux 5 DVD ISO RHEL5-Client-20070208.0-i386-DVD.iso from Red Hat Network and create a local repository on the local Repository server.

#mkdir -p /var/www/html/cdrom/iso
       #mount -o loop /RHEL5-Client-20070208.0-i386-DVD.iso
       #cd /var/www/html/cdrom
       #createrepo .
       #yum clean all

Created a file /etc/yum.repos.d/file.repo as follows:

#cat /etc/yum.repos.d/file.repo
       [RHEL 5 Repository]

2. Share with httpd:

# vi /etc/httpd/conf/httpd.conf
       ServerAdmin root@
       DocumentRoot /var/www/html

NOTE: Where is the local Repository server

 # httpd -t
 # service httpd start

3. Client side configuration:

vi /etc/yum.repos.d/my.repo
       name= RHEL 5.1 Server Repository

4. Verify from client:

# yum list
       Loading "installonlyn" plugin
       Setting up repositories
       Reading repository metadata in from local files
       Available Packages
       Deployment_Guide-as-IN.noarch 5.0.0-19
       RH51-Server Deployment_Guide-bn-IN.noarch
       5.0.0-19 RH51-Server
       Deployment_Guide-de-DE.noarch 5.0.0-19
       RH51-Server Deployment_Guide-en-US.noarch
       5.0.0-19 RH51-Server
       Deployment_Guide-es-ES.noarch 5.0.0-19
       RH51-Server Deployment_Guide-fr-FR.noarch
       5.0.0-19 RH51-Server ========
       # yum update

Posted in Linux, Open Source.

LAMP Optimization Tips

Below are couple of good points about LAMP optimization. I have figured that out after doing some googling and reading some PDF..

Disable unwanted Apache Modules:

  • Disable all the apache modules like perl,python,proxy etc except php,mysql which are required for your application.
  • Enable only mod_php and mod_rewrite
  • Disable everything else (java, python)

Tune MaxClients

  • Too low: you can’t serve a traffic spike
  • Too high: your memory cannot keep up with the load, and you start swapping (server dies!)


  • 5 to 10 seconds
  • More than that, it ties up procesess


  • You can set to None and move Drupal’s .htaccess contents to vhosts
  • Less filesystem accesses
  • mod_gzip/mod_deflate

Compromise of CPU usage vs. Bandwidth usage

  • nginx
  • use Nginx if possible, its very fast and stable.


  • USE MyISAM Engine wherever is possible – Its has good read speed

Query cache

  • Probably the most important thing to tune
  • Table cache
  • Also important Key buffer


  • Use a recent version
  • Install an Op­code cache / Accelerator
  • eAccelerator
  • APC
  • Xcache
  • Zend (commerical)

Op­code cache Benefits

  • Dramatic speed up of applications, specially complex ones like Drupal
  • Significant decrease in CPU utilization
  • Considerable decrease in memory utilization
  • The biggest impact on a busy site
  • Drawbacks:
  • May crash often
  • Use logwatcher to auto restart Apache

Note: eAccelerator uses the least memory and provides the most speed

Hope above point helps you in understanding what is important for your environment.

Posted in Linux.

Install and Configure Bandwidthd – IP Bandwidth Monitor

It is important to know traffic usage of your client if you’re a Linux network administrator.

You can monitor your client in text mode, graphic mode or html exported like mrtg, cacti

but bandwidthd is very good bandwidth monitoring tool…………..

You don’t need any database or snmp connection to monitor all of your client on bandwidthd,

all you need just libcap, libpng, libgd and apache installed on your Linux system. And other

good news is bandwidthd monitor all of your connected client per IP and per connection protocol.

Link to the download area on SourceForge: Download BandwidthD

[root@Ryan]# tar xvfz bandwidthd-2.0.1.tgz

[root@Ryan]# cd bandwidthd

Configure and install the Bandwidthd source:

[root@Ryan]# ./configure && make install

Please make sure you have:
libpcap from
libpng from
libgd from


# yum install libbap Or # apt-get install libcap

# yum install libpng Or # apt-get install libpng

# yum install apache Or # apt-get install apache2

Edit /usr/local/bandwidthd/etc/bandwidthd.conf

to suit your network environment. …..
Save your config and start bandwidthd using /usr/local/bandwidthd/bandwidthd.

Point your Apache Virtual Host to

/usr/local/bandwidthd/htdocs for browse
the bandwidthd graph

Alias /bandwidthd “/usr/local/bandwidthd/htdocs”

Order Allow,Deny
Allow from All

Save your work and restart apache. Next open your browser and point to http://yourserverip/bandwidth.

Posted in Linux.

Ten Qualities of an Effective Team Player

If you were choosing team members for a business team in your organization, who would the best team players be? Assuming that people have the right technical skills for the work to be done, what other factors would you use to select your team members?
Teams need strong team players to perform well. But what defines such people? Read on. (Also, check out How to Hire the Best Brains for the Best Team for some tips on putting a team together.)
Demonstrates reliability
You can count on a reliable team member who gets work done and does his fair share to work hard and meet commitments. He or she follows through on assignments. Consistency is key. You can count on him or her to deliver good performance all the time, not just some of the time.
Communicates constructively
Teams need people who speak up and express their thoughts and ideas clearly, directly, honestly, and with respect for others and for the work of the team. That’s what it means to communicate constructively. Such a team member does not shy away from making a point but makes it in the best way possible — in a positive, confident, and respectful manner.
Listens actively
Good listeners are essential for teams to function effectively. Teams need team players who can absorb, understand, and consider ideas and points of view from other people without debating and arguing every point. Such a team member also can receive criticism without reacting defensively. Most important, for effective communication and problem solving, team members need the discipline to listen first and speak second so that meaningful dialogue results.
Functions as an active participant
Good team players are active participants. They come prepared for team meetings and listen and speak up in discussions. They’re fully engaged in the work of the team and do not sit passively on the sidelines.
Team members who function as active participants take the initiative to help make things happen, and they volunteer for assignments. Their whole approach is can-do: “What contribution can I make to help the team achieve success?”
Shares openly and willingly
Good team players share. They’re willing to share information, knowledge, and experience. They take the initiative to keep other team members informed.
Much of the communication within teams takes place informally. Beyond discussion at organized meetings, team members need to feel comfortable talking with one another and passing along important news and information day-to-day. Good team players are active in this informal sharing. They keep other team members in the loop with information and expertise that helps get the job done and prevents surprises.
Cooperates and pitches in to help
Cooperation is the act of working with others and acting together to accomplish a job. Effective team players work this way by second nature. Good team players, despite differences they may have with other team members concerning style and perspective, figure out ways to work together to solve problems and get work done. They respond to requests for assistance and take the initiative to offer help.
Exhibits flexibility
Teams often deal with changing conditions — and often create changes themselves. Good team players roll with the punches; they adapt to ever-changing situations. They don’t complain or get stressed out because something new is being tried or some new direction is being set.
In addition, a flexible team member can consider different points of views and compromise when needed. He or she doesn’t hold rigidly to a point of view and argue it to death, especially when the team needs to move forward to make a decision or get something done. Strong team players are firm in their thoughts yet open to what others have to offer — flexibility at its best.
Shows commitment to the team
Strong team players care about their work, the team, and the team’s work. They show up every day with this care and commitment up front. They want to give a good effort, and they want other team members to do the same.
Works as a problem-solver
Teams, of course, deal with problems. Sometimes, it appears, that’s the whole reason why a team is created — to address problems. Good team players are willing to deal with all kinds of problems in a solutions-oriented manner. They’re problem-solvers, not problem-dwellers, problem-blamers, or problem-avoiders. They don’t simply rehash a problem the way problem-dwellers do. They don’t look for others to fault, as the blamers do. And they don’t put off dealing with issues, the way avoiders do.
Team players get problems out in the open for discussion and then collaborate with others to find solutions and form action plans.
Treats others in a respectful and supportive manner
Team players treat fellow team members with courtesy and consideration — not just some of the time but consistently. In addition, they show understanding and the appropriate support of other team members to help get the job done. They don’t place conditions on when they’ll provide assistance, when they’ll choose to listen, and when they’ll share information. Good team players also have a sense of humor and know how to have fun (and all teams can use a bit of both), but they don’t have fun at someone else’s expense. Quite simply, effective team players deal with other people in a professional manner.
Team players who show commitment don’t come in any particular style or personality. They don’t need to be rah-rah, cheerleader types. In fact, they may even be soft-spoken, but they aren’t passive. They care about what the team is doing and they contribute to its success — without needing a push.
Team players with commitment look beyond their own piece of the work and care about the team’s overall work. In the end, their commitment is about winning — not in the sports sense of beating your opponent but about seeing the team succeed and knowing they have contributed to this success. Winning as a team is one of the great motivators of employee performance. Good team players have and show this motivation.

Read more:

Posted in Soldier of Fortune.

How to Upgrade SugarCRM-5.2.0 to 6.2.0



SugarCRM can not be upgraded directly from version 5.2.x to 6.2.x. Its a multistep process. You have to upgrade SugarCRM to version 5.5.zx then from 5.5.x to 6.2.x. Below is the outlined procedure for that.

Step1: Check the server for Apache,PHP and MySQL version. (My server was having lower versions so I had to upgrade php and mysql before upgrading SugarCRM)
Step2: Login to SugarCRM with admin user or same access level user.
Step3: Click on Admin link
Step4: Scroll down and Click on Upgrade Wizard
Step5: Click Next, Next, when it asked for upload upgrade file go to website and download the suitable file according to your current version. I have download all the below files once as to avoid download them again and again.

Step6: After upload the suitable file complete the steps and on last step it will give you link of “DONE”. Click on that and logout
Step7: Repeat the step4 to step6 again for upgrade to 5.5.1 to 6.0.4 and one more time for 6.0.4 to 6.2.0

Posted in Linux.

I'm happy to use Increase Sociability.