Thursday, April 23, 2009

Installing and configuring Ganglia

-->
Prerequisites:
· A server , say MASTER , with RHEL version installed, I used RHEL 4
· Install the below packages (rpms)
1. ganglia-web-3.0.6-1.el4
2. ganglia-3.0.6-1.el4
3. ganglia-gmond-3.0.3-1
4. ganglia-gmetad-3.0.6-1.el4
Scenario:
We will setup a basic architechture, Though I had finally worked on a multi tier architecture of it. Incase any issue please feel free to post, maybe I can be of any help.
Configurations on Master:
Once you install the above packages, you need to run the below commands to start the services. Once started you can check by opening http://master/ganglia

$/etc/init.d/gmetad start
$/etc/init.d/httpd start
$ vi /etc/gmond.conf
You can mention the name of the cluster being monitored as below:
/* If a cluster attribute is specified, then all gmond hosts are wrapped inside
* of a tag. If you do not specify a cluster tag, then all will
* NOT be wrapped inside of a tag. */
cluster {
name = "Test Cluster"
owner = "My Team"
}
$ /etc/init.d/gmond start
-->
Configuration on cluster hosts:
For cluster hosts to send data to the master, you need to install gmond clients on all of the hosts.
Once you install the clients , you have to edit the /etc/gmond.conf file for pointing these hosts to update MASTER with the status. Please see below:
$ rpm –ivh ganglia-gmond-3.0.3-1.rpm
$ vi /etc/gmond.conf
/* If a cluster attribute is specified, then all gmond hosts are wrapped inside
* of a tag. If you do not specify a cluster tag, then all wi
ll
* NOT be wrapped inside of a tag. */
cluster {
name = "Test Cluster"
owner = "My Team"
latlong = "unspecified"
url = "unspecified"
}

The other change is for specifying the udp_SEND_channels
/* Feel free to specify as many udp_send_channels as you like. Gmond
used to only support having a single channel */
udp_send_channel {
# mcast_join = 239.2.11.71
host = (Master IP)
port = 8649
}
Now once you are done with all the configurations , you just need to wait for a while, it takes some time for the master to fetch the data and then create RRDs (graphs) for the hosts.
Then open http://master/ganglia and there you go, you are now monitoring your hosts with ganglia.
Happy Monitoring, enjoy

Cheerz.
Ash

Saturday, April 18, 2009

Linux Performance Testing Commands

Some basics, I use while checking the health of the Linux Box , whenever in a trap.

$top - overall UT of the machine
$mpstat - display utilization of each CPU individually
$mpstat -P ALL

$sar - todays cpu activity
$sar -u 2 5 : todays cpu activity ,comaprison of cpu 2 seconds apart.. 5 times
$sar -o output.file 12 8 >/dev/null 2>&1 & - redirect output to file
$sar -f data.file - read file

$ps -eo pcpu,pid,user,args | sort -k 1 -r | head -10 : who is monopolizing or eating the CPUs
$ps -eo pcpu,pid,user,args | sort -r -k1 | less : who is monopolizing or eating the CPUs

iostat : avg cpu ut since last reboot
$iostat -xtc 5 3 : You may want to use following command, which gives you three outputs every 5 seconds (as previous command gives information since the last reboot)


Monitoring Disk utilisation:


Display 3 reports of extended statistics at 5 second intervals for disk type the following command:
$ iostat -d -x 5 3

$iostat -d -x interval count

-d : Display the device utilization report (d == disk)
-x : Display extended statistics including disk utilization

interval : It is time period in seconds between two samples . iostat 2 will give data at each 2 seconds interval.
count : It is the number of times the data is needed . iostat 2 5 will give data at 2 seconds interval 5 times

Will add more to it sooon.....

Keep reading..

Cheerz
@$H

Yum Error

I struggled a long time doing lotsa googling and opening up books to get hold of this error.

I faced this error while using YUM in some versions of linux, the error looks as below:

Traceback (most recent call last):
File "/usr/bin/yum", line 6, in ?
import yummain
File "/usr/share/yum-cli/yummain.py", line 23, in ?
import yum
ImportError: No module named yum

Now after lots of search i managed to find the reason and a workaround for it:

This error is caused because yum installs the python modules in: /usr/lib/python2.3/site-packages and some versions of RHEL uses python2.2.

To make yum work we only have to tell python to search for modules in this new directory using the variable PYTHONPATH.

I just did: (ofcourse here i am using bash shell)
#export PYTHONPATH=/usr/lib/python2.3/site-packages
And then used the yum command
#yum list all

booom.. here it worked like magic.. so thats my take on this error if you have any suggestions on this please feel free to post.

Cheerz.
Ash

Saturday, April 4, 2009

Gadgets :: HTC Touch - Must Have Programs

Hi,

I own a HTC Touch and have been using it for quite a while now. Have done alot of R&D on it and resetted it many times ;-). But yea neva lost my data coz always used to sync it with data on my lappy.
  • First of all you made a wrong investment purchasing a HTC Touch if you dont have a GPRS/mobile office etc etc enabled on your Phone connection, please change your phone, buy a typical Nokia :-)
  • I am an Airtel fan, same number , same service since last 7 years approx.

My feedback for HTC Touch :

Pros
  • I simply love it, adore it, one of my best investments :-).
  • Sleek , trendy, light though abit low on memory (mine is an older model 64MB / 128MB).
  • Nice wide screen.
  • Very competitive in price.
  • TouchFlo works very well on cubes.
  • Mine has Windows mobile 6, alot of resources available on internet for it.
  • Easy to configure mails, access websites etc etc.
  • Chat clients available for free ( gtalk,yahoo,msn,aol,facebook etc etc)
  • Easy to use as wireless modem (using bluetooth).
Cons
  • Nothing bad about it :-P
  • Hard to find accessories for this phone.
  • The screen protector available alongwith the phone in box is of bad quality, better buy new one (chinese :-) ).
  • Very sophisticated, handle with care, more than your GF / BF :-). I paid a price of 4k for getting the screen changed when i broke it..
  • Battery Backup :-( , specially when using Wi-Fi.
  • Excuse me , its not a music phone, dont expect sony ericsson / nokia types sound quality. Also no radio available.

So here are some programs i suggest you for a must have on your HTC :

  • Advance Config (configurations for your mobile at a glance)
  • Palringo (Chat Client)
  • ClearTemp (To clear all temps, on all locations)
  • WinXplore (Shortcut to view folders within windows directory)
  • Total Commander (Nice file browser, also helps in editing registry for tweaks,reverse engineering ;-) )
I hope you find this article useful, I would come up with another article on HTC soon.

Have Fun and Keep Rocking !!

Ash

Friday, April 3, 2009

/dev/null Permission Denied Error

This was a problem i faced and found that /dev/null is is not a charector devide. This is causing failure for all messages which are directed to /dev/null.

$ cat ash > /dev/null
/dev/null: Permission denied.

$ ls -l /dev/null
-rw-r--r-- 1 root root 0 Aug 9 11:22 /dev/null


Solution:
The problem seems to be with the permissions of the /dev/null. This seems to be read only at the moment for you. Check this by logging in as root and listing it with the command:

ls -l /dev/null

You should see this if everything is correctly set:
crw-rw-rw- 1 root root 1, 3

If you get a different set of permissions like this maybe:
-rw-r--r-- 1 root root 1, 3

then you should (as root) delete the /dev/null with:
rm /dev/null

and recreate it (as root) again with:
mknod -m 0666 /dev/null c 1 3

(The device number according to the Kernel source in the documentation under Documentation/devices.txt supposed to be Major=1 und Minor=3)

Now, list the /dev/null again and you should see the permissions as above. Hope this helps & it worked for me..

Configure bonding on Linux !

Hello All,

This would be my first technical article in da blogging world.

We would talk about configuring bond interfaces on linux hosts (Tested on RedHat Enterprise Linux 3 & 4), these are used in case of configuring network failover interfaces on linux.

Prerequisites:

  • Connect network cables on both eth0 and eth1.
  • Try to work on console for this, as you may need to do a network restart and if anything goes wrong you would not be able to login again on the host.


Its very simple to configure by just following the below steps :

Step 1: Edit the file /etc/modules.conf

Add the below two lines in the end.

alias bond0 bonding
options bonding miimon=100 mode=1

Step 2: Edit the /etc/sysconfig/network-scripts/ifcfg-ethX configuration file for both eth0 and eth1 so that the files show identical contents. For example:

For ifcfg-eth0 :

DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

For ifcfg-eth1 :

DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none


Step 3. Now we will create a network script for the bonding device naming it /etc/sysconfig/network-scripts/ifcfg-bond0 , which would appear like the following example:

DEVICE=bond0
USERCTL=no
ONBOOT=yes
NETWORK=(Network IP)
NETMASK=(Subnet Mask)
GATEWAY=(Gateway IP)
IPADDR=(IP Address)


Step 4. /etc/init.d/network restart


Now you may test by giving a command "ifconfig -a" on terminal, you will say bond0 available alongwith the two slaves eth0 & eth1.

My First Blog !!

Hmmmm its time !

I have been thinking about this for a long time now but now i think its the time to start.
Well my reason of this would be a selfish one though ;-) just to record my learnings , my experience and to use it as reference if required ( I have a short memory problem he he he ).

Also i think... i said "i think" it may also be helpful for others who is seeking any info i have mentioned here.. now if you are reading the lines carefully, you muzz be thinking why I stressed on "I think" well its because i believe in one rule " Be humble, there are greater people around you.. LET'S LEARN " ..

Okie now cutting it short... Hope you have a nice time going through this blog and it may be helpful for you.

Dont forget to comment if you like anything inhere..

Cheerz and Njoi your stay here !

Ash Sethi

The Azure Synapse Resource Provider Error

  If you are get the error " The Azure Synapse resource provider (Microsoft.Synapse) needs to be registered with the selected subscript...