Friday, July 31, 2009

Virtual consoles in RHEL4/RHEL 5

There are Five virtual consoles in Redhat enterprise Linux servers.
There are certain key combinations to be used to access the virtual console,it helps alot for troubleshooting machines.
The Key Combinations are as below:
ALT-F1 : to access installer in text mode.
ALT-F2: to access bash shell .
ALT-F3 to view log of installer.
ALT-F4: to view log of kernel messages.
ALT-F5 stdout of mke2fs and grub.
ALT-F7 : access installer in Graphical mode.

Cheerz.
@$H

Wednesday, July 29, 2009

Being Yourself...




I just went through this , one of my colleagues forwarded it to me after an hour long debate on topic what we call as "Living LIFE Being Yourself" ... he he .. was heavy for me though , I never prefer to be a part of any debate, the only thing I believe that makes life complete is if I have "my people" ( grrrr yea obssessive haan ;), thats wat some think though ) with me and spending time with them being myself, thats what I believe life is...
But still.. she managed to agree me to a point that people do change with new people, surroundings, with places they go and get used to it.. If you read this which is pasted in hindi, its a story of a guy who visited delhi , its cool, see how his experience goes... interesting though. ... People then start getting used to it...


Hope you like it..
Cheerz..
@$H

Monday, July 27, 2009

Creative Zen X-Fi 8GB






A long time plan to own my mp3 player, my options were as below:


- To use my cellphone for music : Naah , i own a HTC Touch, already use it alot for browsing, mails and chattin. The battery also would not support me in that cause. Rather I also believe that a cellphone shouldnt be used for music purposes to prevent the wear n tear of your device.


- The first name strikes every mind , Apple iPod... in my case, Give me a break !
Personal preference though, no offenses, it’s just that i don’t want to be limited to itunes etc to transfer and manage music on my player.

My requirements were :
1. Portable.. small.. sleek with max features possible.
2. Can be used as a pendrive, music transfer easy.
3. High Sound quality.

On doing some research, i found creative zen x-fi, it comes with a wlan model too… but asks for more money..
Creative has been a leader in the digital entertainment industry for PC and interner for quite a while now.. most of us also own the creative 2.1 speakers for PC too.. me too.. which has a top sound quality.. we all know.. and is quality for money.


X-fi means extreme fidelity which is an audio standard owned by creative , which truly makes a difference, you will experience the difference once you just use this device..
Using creative zen is extremely easy, and the quality.. the first word which will drop out of your mouth after listening to music on it will be .. WooooW… And its not only music, you can save your photographs in it and view it while travelling, slideshows etc, videos – it supports mp4, avi etc.


The earphones which comes with this powerhouse is also a creative earplug, which along would cost you about 20$ I guess , approx.


To see the details of this powerhouse click the below link
http://in.creative.com/products/product.asp?category=213&subcategory=214&product=17810
Now about the cost, dude creative products are seriously expensive in india, if you have some contacts in US, call them now !


I sent this requirement to a dear friend of mine (creative zen x-fi 8GB), who went to US for an assignment, and she also agreed that this was one of her best buy’s. I got this for 99$ , I also purchased the armband along with this player which I use while working out.

In India you will get this for about Rs.14,700 , so you can see the difference.

Hope this helps in deciding your next purchase .. ;)

Cheerz.. @$H

Thursday, July 16, 2009

3 Doors Down - Let Me Be Myself

See this video , premiere of "Let me be myself", a beautiful song by 3 Doors Down.


Find more videos like this on 3 Doors Down

"Let Me Be Myself"

I guess i just got lost
Bein' someone else
I tried to kill the pain
Nothin ever helped
I left myself behind
Somewhere along the way
Hopin to come back around
To find myself someday

Lately i'm so tired of waiting for you
To say that it's ok, but tell me
Please, would you one time
Just let me be myself
So i can shine with my own light
Let me be myself
Would you let me be myself

I'll never find my heart
Behind someone else
I'll never see the light of day
Living in this cell
It's time to make my way
Into the world i knew
Take back all of these times
That i gave in to you

Lately i'm so tired of waiting for you
To say that it's ok, but tell me
Please, would you one time
Let me be myself
So i can shine with my own light
And let me be myself
For a while, if you don't mind
Let me be myself
So i can shine with my own light
Let me be myself

That's all i've ever wanted from this world
Is to let me be me

Please would you one time
Let me be myself
So i can shine with my own light
Let me be myself
Please would you one time
Let me be myself
So i can shine with my own light
Let me be myself
For a while, if you don't mind
Let me be myself
So i can shine with my own light
Let me be myself
Would you one time... oooh
Let me be myself
Let me be me

Tuesday, July 14, 2009

Ganglia across VLANs

As per my earlier article we did a default configuration of Ganglia on the network.
By default it works on Multicast, now if we have servers spread in different network segments / locations, this will not work.

To make this work we will have to use unicast for Ganglia configurations, for that follow the steps below:

On the Ganglia machines:

$ vi /etc/gmond.conf

1. Comment all entries of mcast and add an entry of host = in the udp_send_channel

/* 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 = (server host)
port = 8649
}

/* You can specify as many udp_recv_channels as you like as well. */
udp_recv_channel {
#mcast_join = 239.2.11.71
port = 8649
#bind = 239.2.11.71
}


2. Restart the gmond service

/etc/init.d/gmond restart

(server host) = The host where Ganglia is hosted and which is collecting the data.

Now when you see the page on http://(server host)/ganglia

You will see the hosts coming up on the page.

Cheerz.
@$H

Sunday, July 12, 2009

Migrating the default Database location of MySQL

There are some simple steps if you need to change the default location of the MySQL Database.

1. Create new data directory data for new data directory.

mkdir data
chown -R mysql:mysql data

2、Stop MySQL process

# service mysqld stop
Stopping MySQL: [ OK ]

ps -efgrep mysql to check

3、Copy /var/lib/mysql to /home/data

cp -rfp /var/lib/mysql/* /home/data

4、Backup old /etc/my.cnf to /etc/my.conf.bak

5、Edit /etc/my.cnf

find line like bellow
#datadir=/var/lib/mysql
datadir=/data

6、Backup script /etc/init.d/mysqld to /etc/init.d/mysqld.bak and edit

# vi /etc/init.d/mysqld

#get_mysql_option mysqld datadir "/var/lib/mysql"
get_mysql_option mysqld datadir "/data"

7. Relink : ln -s /home/data /var/lib/mysql

8. Start mysqld servicce

# service mysqld start
Starting MySQL: [ OK ]

Cheerz.
@$H

Sunday, June 28, 2009

Linux :: Installing & Configuring JDK on Linux

You have to install JDK, or you already have one set-up, but you want a newer version ??

Follow some simple steps below, no need to uninstall older one.

Download the package from SUN website, package name would be something like jdk-6u14-linux-x64-rpm.bin

Now change the permissions to make it executable :

chmod 755 jdk-6u14-linux-x64-rpm.bin

Then run it:
./jdk-6u14-linux-x64-rpm.bin

You will need to type yes to indicate your acceptance to their agreement and the installation will complete on its own. Unfortunately you are not yet done. Type java -version on the command line and you will see that it still points to the crappy old JVM from gcj.

You may locate the installation folder by following steps below:

Step 1:
updatedb;locate javac |grep bin

You will see an entry like this:
/usr/java/jdk1.6.0_14/bin/javac

Here /usr/java/jdk1.6.0_14 is the actual JAVA_HOME for your machine. Note this as you will need it to run the future commands.

Now run the alternatives command to instruct OS to recognize Sun's JVM.
alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_14/bin/java 100
alternatives --install /usr/bin/jar jar /usr/java/jdk1.6.0_14/bin/jar 100
alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_14/bin/javac 100

Finally you should configure alternative to use Sun's JVM as the default JVM. To do this type:
/usr/sbin/alternatives --config java

This will present you with at least 2 options. Choose the one for Sun's JVM. Similarly repeat the process for other commands.

Type java -version and you should see something like this:

java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-ea-b02)
Java HotSpot(TM) Client VM (build 1.6.0_14, mixed mode, sharing)


Bingo, now you are using the latest JDK version.

Cheers
@$H

My Favs :: R.I.P MJ, The world will miss you...

Most of you, who know me and reading this, i know you will not believe but.. I still remember my school days i used to perform on MJ songs, there were 2 guys in my town who used to do it all da time, one was me and the other was my senior, who obviously was better than me in it :-(, it was the time of audio cartridges and those oversized walkmans.. which was a part of my stuff, when i used listen to MJ numbers alot....

With time, MJ slowly went of business and so as from my preferred artists list, but it was a shock to hear the news that MJ is no more...

Nothing more to say, but yes MJ, You would always be the King Of Pop !! You will always Rule and The World Will Miss You ...



R.I.P MJ.

Cheerz
@$H

Creating Files of a desired Size Linux

Greetings,

Suppose you doing some testing on the filesystem, say about quota etc, and you need to create files of a desired size, the golden command to be used is "dd".

Check out the usage as below:

$ dd if=/dev/zero of=bigfile bs=1024 count=1048576
This will create a file of size 1024 * 1048576 bytes (or 1 GB). In this command

if - input file
of - output file or the file to be created
bs - block size in bytes
count - # of blocks of size bs

Thats all for this day.

Cheerz.
Ash

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

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...