RSS

Monthly Archives: May 2012

How to install Ganglia and Nagois on Ubuntu

Ganglia

There are some problems besides these huge documents and experience trace for Ganglia installation, so I will list them as well as the solutions.

1 There is a blog for how to install Ganglia on Ubuntu

Sometimes, you spent a lot of time to figure out how to install something, but when you found that it is so simple when you follow other’s guide. You will feel how import the blog is.

How to monitor Hadoop and HBase with Ganglia in Amazon EC2. http://blog.kenweiner.com/2010/10/monitor-hbase-hadoop-with-ganglia-on.html (***)

2 Nagois

  • Install Nagios

    Find and follow the instruction in the user manual to install it. It is easy to get it. Therefore, you can download it and the user manual to install it. Or you can follow this link, but I’ve not verified this link yet. https://help.ubuntu.com/10.04/serverguide/nagios.html

  • Nagios plugins

It provides a framework, so users should write plugins by themselves and register them into Nagios.  A very useful link for how to write and register a plugin http://www.ibm.com/developerworks/cn/aix/library/au-nagios/#N10071

  • Trends, Map, hist missing(CGI cannot show up)

Best guess is that you did not install gd library. Please run the following command to install it. THIS IS also mentioned in the install guide. Please pay attention to that.  “ubuntu 7.10 and later it asks you to install this:

sudo apt-get install libgd2-xpm-dev
1 run the above command.
2 reinstall nagios, make sure with ROOT, Solution: Reference [5]
   #make devclean
   # ./configure –with-gd-lib=/usr/lib –with-gd-inc=/usr/include
   #./configure –with-command-group=nagcmd
   # make all; make install; make install-init; make install-config; make install-commandmode; make install-webconf
  • Nagiosgrapher

This can be installed and provides better grapher. But I did not get it through.

Reference
Advertisements
 
Leave a comment

Posted by on May 29, 2012 in Cloud Monitor

 

Nutch vs Heritrix

Hetrix home page: https://webarchive.jira.com/wiki/display/Heritrix/Heritrix

 

According to the project requirement, I prefer to use Heritrix because of the following

  • claw all contents in website
  • easier to extend based on the project

Heritrix Architecture
 

 
Leave a comment

Posted by on May 29, 2012 in Web Clawler

 

Time Saving Tricks in Cloud (*)

1 CLuster Time Saving Tricks: http://debianclusters.org/index.php/Cluster_Time-saving_Tricks

For example, execute the same command across all nodes.

gyrfalcon:~# for x in `cat ~/machines`
> do
> ssh $x apt-get update
> done
 
Leave a comment

Posted by on May 28, 2012 in Uncategorized

 

Tags:

How to use Hudson

1 project

2 Multiple Configuration project

3 Practice

 
Leave a comment

Posted by on May 28, 2012 in Uncategorized

 

Monitor Web Application Servers with tools

Ganglia

Nagios

Hyeric

There are three other tools. I will compare them in detail later.

Nagios http://www.nagios.org/

Cacti http://www.cacti.net/what_is_cacti.php

Ganglia http://ganglia.sourceforge.net/

 
Leave a comment

Posted by on May 27, 2012 in Cloud Computing

 

how to test file uploading with apache benchmark

Useful link for explanation of metrics http://ngenuity.ngmoco.com/2012/01/testing-with-apache-bench.html

There is an extension for multiple urls: http://code.google.com/p/apachebench-for-multi-url/

Supported blog for some examples and experience of how to use AB:

There really are some difficult for how to compose the data which is sent via apache benchmark. A sample below is from an experienced guy

-- Post data included in file post_data
your_name=fredrik&fruit=ApricotFromAB

-- man ab to see options
ab -n 20 -c 5 -p post_data -v 4 -T 'application/x-www-form-urlencoded' http://hroch486.icpf.cas.cz/cgi-bin/echo.pl

The below content is from the 3rd link

All the content below is copied from this link. This is because sometimes I cannot access this link. It is only for recording somethings.

Multipart posting with Apache Benchmark

Last week I wanted to load test an upload functionality created for one of the projects. The testing team was busy with other stuff so I decided to do it on my own. Being a hardcore programmer and someone who has never used any of the regular testing tools (read M$ Window$ based tools) I had the only option of using Apache Benchmark on my Ubuntu 10.10

Since I had already used ab (the Apache Benchmark command name), I was pretty confident that within few minutes I will be done. But multipart form posting wasn’t as straightforward as I had thought. My initial assumption was to provide a file path to -p option of ab and it would handle the stuff required for multipart posting. Unfortunately that wasn’t the case. I realized that I had to provide a file name but it should contain the complete information about the data to be posted. In other words, I had to manage the boundary required for multipart posting.

After some research and this small but important tip, I managed to prepare the POST data in the required format along with the correct Content-type required by Apache Benchmark. The final command looked like

1.ab -n 10 -c 2 -C PHPSESSID=rk53j7gsrmaiuc3gvo86ipltr1 -p /var/www/post_data.txt -T "multipart/form-data; boundary=1234567890"http://my-domain.com/upload.php

Following is the breakdown of options provided to the command –

I provided the cookie information (option -C ) along with the command since my upload script checks for authentication.
-p allows me to provide a file name which contains the complete information about the data to be POSTed along with multipart boundaries.
-T is for Content-type header. This is where I also tell ab about the boundary in my POST data along with the standard multipart/form-data content type.
And then finally the URL of where all the data has to be posted.

The contents of the post_data.txt file are

01.--1234567890
02.Content-Disposition: form-data; name="ID"
03.
04.3
05.--1234567890
06.Content-Disposition: form-data; name="videofile"; filename="ab1_pod.avi"
07.Content-Type: video/x-msvideo
08.
09.[base64 encoded file content here]
10.--1234567890--

Remember that the format of the file should be exactly the same (your boundary label can be different than mine though). Even if you miss a single new line or add an extra new line somewhere then you won’t get the expected results.

Finally to base64 encode the file to be posted, you can simply use PHP code as follows and paste the content in the above placeholder.

1.echobase64_encode(file_get_contents('/home/aditya/Videos/my_video.avi'));

That’s it. Happy testing.
As always, comments and suggestions are most welcome.

Reference

https://snipt.net/fredrikbach/command-to-run-performance-test-post-with-apachebench/

 
Leave a comment

Posted by on May 25, 2012 in Cloud Computing

 

How to use Seige

How to install it. Follow this blog, you can do it. http://wordpressapi.com/2010/06/08/how-to-install-siege-linux-box/ But there are a small tip

 
Leave a comment

Posted by on May 25, 2012 in Uncategorized