Archive for the ‘Not Really Technical’ Category

RedHat Cluster custom Oracle “Agent”/script V1.0

Friday, April 24th, 2009

Working with RH Cluster quite a lot, I have decided to create an online store of customer agents/scripts.

I have not, so far, invested the effort of making these agents accept settings from the cluster.conf file, but this might happen.

Let the library be!

Oracle DB script/agent:

Although I discovered (a bit late) that RH Cluster for Oracle Ent. Linux 5.2 does include oracle DB agent, this script should be good enough for RHEL4 RH Cluster versions as well.

This script only checks that the ‘smon’ process is up. Nothing fancy. This script can include, in the future, the ability to check that Oracle responses to SQL queries (meaning – actually working).

#!/bin/bash
#Service script for Oracle DB under RH Cluster
#Written by Ez-Aton
#http://run.tournament.org.il
 
# Global variables
ORACLE_USER=oracle
HOMEDIR=/home/$ORACLE_USER
OVERRIDE_FILE=/var/tmp/oracle_override
REC_LIST="user@domain.com"
 
function override () {
	if [ -f $OVERRIDE_FILE ]
	then
		exit 0
	fi
}
 
function start () {
	su - $ORACLE_USER -c ". $HOMEDIR/.bash_profile ; sqlplus / as sysdba << EOF
startup
EOF
"
	status
}
 
function stop () {
	su - $ORACLE_USER -c ". $HOMEDIR/.bash_profile ; sqlplus / as sysdba << EOF
shutdown immediate
EOF
"
	status && return 1 || return 0
}
 
function status () {
	ps -afu $ORACLE_USER | grep -v grep | grep smon
	return $?
}
 
function notify () {
	mail -s "$1 oracle on `hostname`" $REC_LIST < /dev/null
}
 
override
case "$1" in
start)	start
	notify $1
	;;
stop)	stop
#	notify $1
	;;
status)	status
	;;
*)	echo "Usage: $0 start|stop|status"
	;;
esac

I usually place this script (with execution permissions, of course) in /usr/local/sbin and call it as a “script” from the cluster configuration. You will probably be required to alter the first few variable lines to match to your environment.

Listener Agent/script:

The tnslsnr should be started/stopped as well, if we want the $ORACLE_HOME to migrate as well. This is its agent/script:

#!/bin/bash
#Service script for Oracle DB under RH Cluster
#Written by Ez-Aton
#http://run.tournament.org.il
 
ORACLE_USER=oracle
HOMEDIR=/home/$ORACLE_USER
OVERRIDE_FILE=/var/tmp/oracle_override
 
function override () {
if [ -f $OVERRIDE_FILE ]
then
exit 0
fi
}
 
function start () {
su - $ORACLE_USER -c ". $HOMEDIR/.bash_profile ; lsnrctl start"
status
}
 
function stop () {
su - $ORACLE_USER -c ". $HOMEDIR/.bash_profile ; lsnrctl stop"
status && return 1 || return 0
}
 
function status () {
su - $ORACLE_USER -c ". $HOMEDIR/.bash_profile ; lsnrctl status"
}
 
override
case "$1" in
start)    start
;;
stop)    stop
;;
status)    status
;;
*)    echo "Usage: $0 start|stop|status"
;;
esac

Again – place it in /usr/local/sbin and call it from the cluster configuration file as type “script”.

I will add more agents and more resources for RedHat Cluster in the future.

Blog Migration

Monday, January 12th, 2009

I have been quiet during the last few days as I was playing with WordPress Mu as a solution for containing several WordPress sites, with one management interface. This is an amazing product, and following my implementation, about 18 blogs are already there.
My site required some special handling. As you know, my URL was http://www.tournament.org.il/run up until now, however, looking up – you will see the address http://run.tournament.org.il in the address bar. This required some special handling, and I hope it will do no evil to my page ranks. The previous change did horrible things to it…
So – using Apache redirection methods, as can be found in this link, was the easiest solution to maintain the whole URL with only a minor shift.

Comments, please

Friday, January 9th, 2009

As of today, I have switched back to using akismet and not the “Yawasp” plugin which was theoretically amazing, but as it seems – blocked too many legitimate comments, and allowed spam (only a little, but still). So you can feel free to comment whenever and however you want.  I was disconnected for too long…

Engrish, anyone?

Sunday, September 14th, 2008

I love it when I get an Engrish product. Their manuals, their texts – I just love it.

This is the cover of a flash light I was given during the latest RedHat summit here in Israel.

The interesting part is the text scanned above. I will quote (grammar and spelling mistakes are kept as in the original)

PRODUCT CHARACTERISTICS:

1. This product is a new science and technology product and made with high and new science and technology. It can illuminate only placing it in rhythm.

2. No need any power no environmental pollution. Low noise and health. Comparing with common torch,it can be several times on lift.

3. Con stantly using this health torch,  it can benefit to your palm, arm and shoulder stretching and blood circulation,so as to let your hands relax and brain clever,hand and brain coor dinate and promote your brain memory and health composition.

A manual flash light, right? :-)

A new blog engine!

Tuesday, August 12th, 2008

I have moved to a new blog system. From Serendipity to WordPress. I hope this will be for the best.

During the process of importing the blog’s content, most posts got into the “uncategorized” category. I am working on it.

If you got here through some external links, you have probably got to the main page due to broken links. I hope that the search will work very soon, so you will be able to find the issue you were aiming at. In the meanwhile, as a workaround, I will add a plain (non-google) search inside the blog. Later on, when Google decides to index the site correctly, I will remove it.

During the migration process, I have noticed some comments which were ignored by me, by a mistake. I will respond to these ASAP.

The blog’s design is not fully implemented yet. I hope it will be soon.

Enjoy the blog!

A new heir for the *nix family

Friday, May 9th, 2008

While he would require some ramp-up, this is the new guy in our technical group. He is a newbie, but I’m sure he will grow to be a great technical person, putting his father way behind.

Ugly like his dad, but shows a great technical potential

Creativity can look weird

Monday, September 10th, 2007

Air Conditioning is considered a complicated matter. Not that it is so mathematically, but measurements, except for the general notion of “hot”, “hotter”, “cold” and “colder” are rather complicated, and require tools which are not common with the maintainers of server rooms. We trust flow diagrams, and air flow schema, however, the outcome should be a colder server room, and with some luck, with some less expenses on electricity.

I have recently seen such a creative solution in a company I have visited. The A/C solution suggested by the external experts the company has hired were overpriced and complicated, while the company needed a temporary solution for several months, especially the (hot Israeli) summer time.

I laughed my stomach out when I have seen the creative solution used in that particular server room. I felt as if I was taken back to the sci-fi B-movies of the 70s, however, the solution works, and is rather effective…

The building. Looks like the beginning of an invasion
The Aliens are coming!

Bottom line – it works. That is almost all that matters.

Network Bridge

Wednesday, June 27th, 2007

Unlike the expected header, this is not about silently routing packets between interfaces, or bridging multiple networks. This is all about how ants, which find the summer the best time to start investigating our place, can show innovativeness, and can prove that even ants can use network bridges, when required.

The cable was in-air, not connected to wall along the line.

You can see a close-up of how ants actually use Cat5e cables for their own benefit

Resting on the ’5′

The first biological portable computer

Tuesday, June 19th, 2007

This is not exactly a technical post, but I had to bring it online.

I am proud to be one of the first persons, if not actually the first one to own a biological portable computer (BPC). You will find no other such thing, I think. I have searched Google, after all.

Although the docking station, or Biologic Electronic Interface (BEI) looks quite similar to the IBM X40′s docking station

The docking station, or Biological Electronic Interface (BEI)

You can see the difference. Unfortunately, in this picture you cannot clearly see the micro conductors which are used in the BEI plug, which is, actually, the method of connecting a simple and regular USB mouse to the BPC.

The BPC has the ability to self support. It is self propelled, and will walk(!!!) back to the BEI whenever the need arises. It has the computational power of hundreds of normal PCs, and although it runs its own unique OS, it has a simple interface which accepts commands. In the picture below, you can see the BPC in its docking station, charging.

The BPC inside its docking

As said, accepts commands, but only seldom performs them. It’s a prototype, and yet has a way to go. It has to fit the docking better (this prototype BEI has been developed as a case study), and should go through more modifications until it can be sold commercially. Yet, very impressive.

The cutest useless thing I could have wanted

Wednesday, March 28th, 2007

I’ve been browsing a blog of a friend of mine, xslf, when I read this post dealing with this cute wifi rabbit. I have been browsing its website.

I want one. This rabbit just cought me so badly that I even set the icon for the "Not Really Technical" section to be its figure. I hope I don’t break any trademark rule… Still – I do have a link directly to their website…