අද මම හිතුවා සිංහලෙන් යමක් මගේ බ්ලෝග සටහනේ ලියන්න.
සිංහල යතුරැ පුවරැවත් තවම මට ඒ හැටි පුරැදු නැහැ.
සිංහලෙන් මොනවා ලියන්න ද කියලා කල්පනා කරෙ.
කොහොමටත් වැඩියමක් ලියන්න නම් බැහැ.
නමුත් සිංහල unicode නිර්මාණය කල අයට ස්තුති කල යුතුයි.
ඔන්න එහෙනම් මම ස්තුති කලා ............
ඔබලාගේ කර්තව්ය බොහෝමත් අගෙයි.
ඔන්න අදට මම නැවතුනා !
ස්තුතියි.
මීට,
පසන්.
Sunday, April 19, 2009
Tuesday, April 14, 2009
Mystery of /etc/ld.so.conf + ldconfig
Mmmmmmmmmmmmmmmmmmmmmmmmm ,
I tried to sleep but fortunately I was n't able to have a good time sleep. May be coz I had a looooong sleeeeeeeeep today eve. What to do other than sleeping on New Year Day.
Itz soooooooooooooooo lazy without doing anything interesting. Since I'm not getting my sleep mood I thought to write something interesting...............................
I thought to write about this as well in my blogger couple of days back since it'll be useful for someone who'll need to tackle simple problems.
Ok as usual I'm gonna talk about something regarding to linux environment. Today I'd like to tell something about ldconfig command and the file /etc/ld.so.conf
These two r very important if you re always doing source level compilations.
/etc/ld.so.conf file holds the locations where unix/linux .so files resides. (library files that comes with *nix operating system, juz like we have hell of a lot of .dll files need for various softwares run on top of windows)
sometimes a newly installed (*nix environment) softwares library file ( .so files) may copy to somewhere else other than traditional location /usr/lib/.
Then in a scenario like this may be you'll not able to run new applications which needs newly installed libraries. You'll probably getter error saying with missing .so file most of the time.
But if you run find or locate for that particular library files (.so files) you might able to locate 'em in different location other than /usr/lib/.
Therefore you have to specify the location of your library files (.so files) if they are nt in /usr/lib/ by default. Solution for this is simply add the location of your library files location to /etc/ld.so.conf and then juz run ldconfig command on a terminal, it'll update the system with new library location.
For an example I encountered this while I was building iaxmodem on a centos4 box. I juz add following line to /etc/ld.so.conf,
/usr/local/lib/
And run ldconfig on a terminal, then I didn't get any errors saying bla bla missing library files.
So as a part of debugging, sometime z this tip may be useful to you if you're frequently use *nix systems. Coz after I realized this for iaxmodem issue It helped me to clarify a similar problem with same solution.
Ok I hope this is enough about /etc/ld.so.conf and ldconfig. I hope you might have get something through this post. I'll try to post more useful hints on *nix systems in my upcoming posts.
Now I feel very sleepy. Dont know, coz of my own post. Anyway Thanks for being on my blogger
I'm going to my bed again ................................................................................
OOOooooooopz forgot to tell something about .so files. They are shared objectz ( thatz why they have .so as their extension) which usually can be used by several programs and at runtime they can dynamically load those library files and can use functions on those objectz bla bla bla.
Bye
Thanks
Pasan
I tried to sleep but fortunately I was n't able to have a good time sleep. May be coz I had a looooong sleeeeeeeeep today eve. What to do other than sleeping on New Year Day.
Itz soooooooooooooooo lazy without doing anything interesting. Since I'm not getting my sleep mood I thought to write something interesting...............................
I thought to write about this as well in my blogger couple of days back since it'll be useful for someone who'll need to tackle simple problems.
Ok as usual I'm gonna talk about something regarding to linux environment. Today I'd like to tell something about ldconfig command and the file /etc/ld.so.conf
These two r very important if you re always doing source level compilations.
/etc/ld.so.conf file holds the locations where unix/linux .so files resides. (library files that comes with *nix operating system, juz like we have hell of a lot of .dll files need for various softwares run on top of windows)
sometimes a newly installed (*nix environment) softwares library file ( .so files) may copy to somewhere else other than traditional location /usr/lib/.
Then in a scenario like this may be you'll not able to run new applications which needs newly installed libraries. You'll probably getter error saying with missing .so file most of the time.
But if you run find or locate for that particular library files (.so files) you might able to locate 'em in different location other than /usr/lib/.
Therefore you have to specify the location of your library files (.so files) if they are nt in /usr/lib/ by default. Solution for this is simply add the location of your library files location to /etc/ld.so.conf and then juz run ldconfig command on a terminal, it'll update the system with new library location.
For an example I encountered this while I was building iaxmodem on a centos4 box. I juz add following line to /etc/ld.so.conf,
/usr/local/lib/
And run ldconfig on a terminal, then I didn't get any errors saying bla bla missing library files.
So as a part of debugging, sometime z this tip may be useful to you if you're frequently use *nix systems. Coz after I realized this for iaxmodem issue It helped me to clarify a similar problem with same solution.
Ok I hope this is enough about /etc/ld.so.conf and ldconfig. I hope you might have get something through this post. I'll try to post more useful hints on *nix systems in my upcoming posts.
Now I feel very sleepy. Dont know, coz of my own post. Anyway Thanks for being on my blogger
I'm going to my bed again ................................................................................
OOOooooooopz forgot to tell something about .so files. They are shared objectz ( thatz why they have .so as their extension) which usually can be used by several programs and at runtime they can dynamically load those library files and can use functions on those objectz bla bla bla.
Bye
Thanks
Pasan
Sunday, April 5, 2009
A Week with Oracle
This story is related to something happened to me few weeks ago.
Its a monday, On mid march while I was went out for an urgent matter while working, I got a call from my buddy aka saying that I need to be in XYZ company immediately for an urgent matter.
First I was confused what da heck is going on................ and couple minutes later one of our team guy came to pick me and I got a lift to that XYZ company. (Truely saying this is a telecom operator).
After I went there my buddy told me bla bla stuff regarding an IVR (Interactive Voice Response) system that those ppl were struggling to launch.
Mmmmmmmmmmmmmmmmmm.. I think I'm still confused with what the situation is all about. I ask 'em couple times to explain the scenario without confusing me.
They were really messed up @ that point and telling so many bla bla stuff to me.
After about half an hour I realize what they need and what the heck wrong with 'em.
Ok ..................... This is the story. They need an IVR application to be develop to handle their ABC tariff package which is currently doing in a manual manner.
So first important thing to me was to figureout a way to connect with their backend database engine. It was an Oracle database. OOOOoooooooppppzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz........
Fortunately I never had came a cross with such a situation. Most of the time we use MySql as our backend database, so this is completely new and existing and I was also struggling to connect an Oracle database with perl from a long time ago ( about 3 months, fortunatley I didnt had a good server with some RAM to install an oracle database server)
I thought this will be a great chance for me to play around with Oracle and perl. Now you might have what the heck is perl is doing here. Whatz the use of perl in this story.
perllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll MMMMMMMMmmmmmmmmmmmm
I always use perl as our AGI (Asterisk Gateway Interface) scripting language. AGI is an API provided by asterisk server for programmers to do wonders with asterisk dialplan. We can write simple, smart, complex, long IVR applications using asterisks AGI API.
Ok hope now you got an idea about whatz perl is doing in this story.
Now I'm back on the story ok ?????. First I try to build perls database connector for oracle with following packages. I needed oracle client utility rpms for this. I'm using an CentOS box for this application.
I got these rpms from oracle site after registering with their services.
1. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
2. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
3. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
4. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-odbc-11.1.0.7.0-1.i386.rpm
5. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-tools-11.1.0.7.0-1.i386.rpm
Then I installed the above rpms and build the Oracle-DBD module for perl.
For this we need to have perls DBI module and the DBD-Oracle module installed. So I got those from here,
1. http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.50.tar.gz
2. http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.16.tar.gz
We can use following line to check whether our Oracle module has been successfully installed.
perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
It should give something like follwoing,
1.17
After successfully compiling the two modules. I try to connect their backup database with a simple script as follow,
............................................................................................................................
While I was writing this post last night C.E.B again played with me. They cut down the electricity again.
I started to continue writing today morning.
Ok i'll continue the story,
After I installed the oracle module for perl I use the following code snippet to connect to their oracle server.
#!/usr/bin/perl
use DBI;
$ora_host = "10.76.100.47";
$ora_user = "xxxx";
$ora_passwd = "xxxxx";
$ora_sid = "xxxx";
$dbh = DBI->connect("DBI:Oracle:host=$ora_host;sid=$ora_sid",$ora_user, $ora_passwd)
or &db_error("Error: Cannot connect to $ora_sid schema on $ora_host");
print "Connected to Oracle succeeded !\n";
When I run this script for the first time I was not able to connect to the database. I got an error saying that theres no listeners for the particular database I was trying to connect.
Then I complain about that to my co programmer who was handling the database. But He didn't accept that and keep on saying that Theres nothing wrong with their database server and some of their applications are using it @ that time.
Unfortunately I got access to their database server via a NATed IP. I never thought this could be the reason why my script does n't work.
After struggling about a day I gave up connecting with oracle , coz so many ppl told hell of a lot of assumptions about this and @ the end of the day I got the blame saying my code is nt correct and there must be something else to be done in order to connect oracle.
Next day When I go there (XYZ company). I suggested them to connect my client machine directly to the network that their Oracle server reside, for that we need to carry our (*) box to 1 of their highly secured area.
After we connect our (*) box there I ran the same script I have pasted above.
Here we gooooooooooooooooooooooooooooooooooooooooooooooooooooo
I got the following line in my terminal,
Connected to Oracle succeeded !
I said,
Hooooooooooooooooooooooooooooooooooooooooooooooooooray !!!!!!!!!!!!!
Then I told that I got able to connect with the server and they to realize and understood that there was a problem with their NAT network.
After I was able to connect with the oracle server I went there (XYZ company ) thru out that week and finally able to finish the IVR application that those ppl were struggling to finish.
Ok Thatz the story about Oracle that I had to said, I thought to write it down here coz I feel someday someone can get an idea about the same topic, and will help my post for 'em.
Ok I'm gonna stop for today coz got lot of work to finish @ office.
Thanks
Pasan
Its a monday, On mid march while I was went out for an urgent matter while working, I got a call from my buddy aka saying that I need to be in XYZ company immediately for an urgent matter.
First I was confused what da heck is going on................ and couple minutes later one of our team guy came to pick me and I got a lift to that XYZ company. (Truely saying this is a telecom operator).
After I went there my buddy told me bla bla stuff regarding an IVR (Interactive Voice Response) system that those ppl were struggling to launch.
Mmmmmmmmmmmmmmmmmm.. I think I'm still confused with what the situation is all about. I ask 'em couple times to explain the scenario without confusing me.
They were really messed up @ that point and telling so many bla bla stuff to me.
After about half an hour I realize what they need and what the heck wrong with 'em.
Ok ..................... This is the story. They need an IVR application to be develop to handle their ABC tariff package which is currently doing in a manual manner.
So first important thing to me was to figureout a way to connect with their backend database engine. It was an Oracle database. OOOOoooooooppppzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz........
Fortunately I never had came a cross with such a situation. Most of the time we use MySql as our backend database, so this is completely new and existing and I was also struggling to connect an Oracle database with perl from a long time ago ( about 3 months, fortunatley I didnt had a good server with some RAM to install an oracle database server)
I thought this will be a great chance for me to play around with Oracle and perl. Now you might have what the heck is perl is doing here. Whatz the use of perl in this story.
perllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll MMMMMMMMmmmmmmmmmmmm
I always use perl as our AGI (Asterisk Gateway Interface) scripting language. AGI is an API provided by asterisk server for programmers to do wonders with asterisk dialplan. We can write simple, smart, complex, long IVR applications using asterisks AGI API.
Ok hope now you got an idea about whatz perl is doing in this story.
Now I'm back on the story ok ?????. First I try to build perls database connector for oracle with following packages. I needed oracle client utility rpms for this. I'm using an CentOS box for this application.
I got these rpms from oracle site after registering with their services.
1. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm
2. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm
3. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm
4. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-odbc-11.1.0.7.0-1.i386.rpm
5. http://download.oracle.com/otn/linux/instantclient/111070/oracle-instantclient11.1-tools-11.1.0.7.0-1.i386.rpm
Then I installed the above rpms and build the Oracle-DBD module for perl.
For this we need to have perls DBI module and the DBD-Oracle module installed. So I got those from here,
1. http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.50.tar.gz
2. http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.16.tar.gz
We can use following line to check whether our Oracle module has been successfully installed.
perl -e 'use DBD::Oracle; print $DBD::Oracle::VERSION,"\n";'
It should give something like follwoing,
1.17
After successfully compiling the two modules. I try to connect their backup database with a simple script as follow,
............................................................................................................................
While I was writing this post last night C.E.B again played with me. They cut down the electricity again.
I started to continue writing today morning.
Ok i'll continue the story,
After I installed the oracle module for perl I use the following code snippet to connect to their oracle server.
#!/usr/bin/perl
use DBI;
$ora_host = "10.76.100.47";
$ora_user = "xxxx";
$ora_passwd = "xxxxx";
$ora_sid = "xxxx";
$dbh = DBI->connect("DBI:Oracle:host=$ora_host;sid=$ora_sid",$ora_user, $ora_passwd)
or &db_error("Error: Cannot connect to $ora_sid schema on $ora_host");
print "Connected to Oracle succeeded !\n";
When I run this script for the first time I was not able to connect to the database. I got an error saying that theres no listeners for the particular database I was trying to connect.
Then I complain about that to my co programmer who was handling the database. But He didn't accept that and keep on saying that Theres nothing wrong with their database server and some of their applications are using it @ that time.
Unfortunately I got access to their database server via a NATed IP. I never thought this could be the reason why my script does n't work.
After struggling about a day I gave up connecting with oracle , coz so many ppl told hell of a lot of assumptions about this and @ the end of the day I got the blame saying my code is nt correct and there must be something else to be done in order to connect oracle.
Next day When I go there (XYZ company). I suggested them to connect my client machine directly to the network that their Oracle server reside, for that we need to carry our (*) box to 1 of their highly secured area.
After we connect our (*) box there I ran the same script I have pasted above.
Here we gooooooooooooooooooooooooooooooooooooooooooooooooooooo
I got the following line in my terminal,
Connected to Oracle succeeded !
I said,
Hooooooooooooooooooooooooooooooooooooooooooooooooooray !!!!!!!!!!!!!
Then I told that I got able to connect with the server and they to realize and understood that there was a problem with their NAT network.
After I was able to connect with the oracle server I went there (XYZ company ) thru out that week and finally able to finish the IVR application that those ppl were struggling to finish.
Ok Thatz the story about Oracle that I had to said, I thought to write it down here coz I feel someday someone can get an idea about the same topic, and will help my post for 'em.
Ok I'm gonna stop for today coz got lot of work to finish @ office.
Thanks
Pasan
Saturday, April 4, 2009
A.D.R.A.I.N.E ...................................................................

What a day !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks to C.E.B I had a loooooooooooooong sleep coz they had cut down the electricity for more than 12 hours.
Ok Today I'm going to tell something about my new desktop. Recently I migrate to knoppix 6 (@ office finally I decided to shift to linux completely due to unavoidable circumstances.)
Knoppix 6 comes with a nice,fancy & sexy ** Desktop Environment. Itz non other, LXDE. Light weight X11 Desktop Environment. A cool very elegant fast non memory sucking (unlike windows) desktop environment.
Itz very fast and give a new dimention to desktop @ low cost. It was bit hard to install knoppix 6 to HD coz of itz new partition table approach.
Ok ok I'd like to show a snapshot of my new desktop ,
Here we gooooooooooooooooooooooooooooooo.......................


I google around about LXDE and figureout whatz the secret behind this beauty. Ohhhh ohh Itz GTK2 huh ???????????????????. GTK2 library was used in LXDE n thatz why It has stable operation. Wowwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww !!!!!!!!!!!
Knoppix 6 comes with a new good package manager. We can easily manage our software pacakages with that.
Actually The new knoppix 6 is a great place for a unix systems programmers.
So ppl your boooooooooooooooooooooooooooooooooooring shells arent there anymore. They a more live than before,
I work with knoppix 6 for a week continuosly and I think Itz the nest place for me to hang around for the moment..
From my next post I'll try to write something about Oracle which I recently involved.
Ok........... I hope, I need to improve my blogging more than I do for the moment. I'll try to be more detailed in upcoming posts.
Thanks for reading...
Subscribe to:
Posts (Atom)
