Monday Mar 02, 2009

Sun Tech days, Hyderabad 2009

Sun Tech Days Hyderabad, the biggest Sun developer conference in India took place in the Hyderabad International Convention Centre from 18th to 20th February. The event saw over 4500 people during these 3 days, which is the largest audience for any Sun tech days event globally. This year, the percentage of students attending the conference were a bit higher than what we have seen in the past. But, that also meant there was more energy, zest at the event and of course the fight for goodies at the pavilion was much bigger.


The event had sessions running in 6 parallel tracks and like in the past, there was a separate track for OpenSolaris. The highlights of the OpenSolaris track are,

1. Over 1700 people attended sessions in this track with an average attendence of 300 per session.
2. Extended Q&A sessions testified the quality of audience that included corporate delegates, system administrators and ofcourse students.
3. The local team in India presented all the sessions and program managed the track. The team in India was supported by Vijay Tatkar from the global OpenSolaris team and ofcourse Sanjay who also did the OpenSolaris keynote.
4. The Sun Campus ambassadors generated a lot of interest in the audience with their Sun Spot and OHAC project presentations,  another noticable highlight of the track.
5. At the installfest, sun team did a fantastic job of getting OpenSolaris up and running on over 90 laptops. This includes over 25 bare metal installations and the rest using VBox.
6. At the OpenSolaris stall in the pavilion, OpenSolaris, xVM, Crossbow, Amberroad, Dtrace and ZFS were demonstrated. The Sun CAs also had their other projects on display.

I presented 'Porting Open Source Software to OpenSolaris'. The session was attended by around 200 people. I was also managing the OpenSolaris track, which personally was a very enjoyable experience.

Saturday Feb 28, 2009

FSFS.IN/2008 Report


Free Software Free society conference in december 2008 was a very unique experience for me. The conference was attended by over 450 people. It was very encouraging to see the political involvement in this event.

Kerala government has shown tremendous awareness towards adopting free software. The fact that Kerala Chief Minister, V S Achuthanandan inauguarated the conference and the opposition party leader did the closing ceremony is enough of evidence that the conference had significant political weight. The conference also received a lot of media coverage (television as well as newspapers). This attention is not always seen in other parts of India.

The conference consisted of two tracks, one, Policy track where Free software in Education and research, Fisheries, Agriculture was discussed and the second, Technology stack, that covered all the technical Free and Open Source Software sessions.

I presented MySQL and OpenSolaris on second and third day of the conference and it was received very well. Both sessions, in spite being towards the end fetched a lot of audience, in the magnitude of 150 approx.

The policy tracks were very interesting, I thought. The speakers represented various fields like Eductation, Government, Corporates and Legal advisers and discussed on various topics to further adopt free software in government infrastructure and also elsewhere.

The audience was a quality audience. Many of the them represented various GNU projects. There seemed to be a lot of interest around people working on Malayalam localization.

I had a chance to interact with some of the students, whom I was showing OpenSolaris running on my laptop. He showed me the puppy Linux running on his and also mentioned that the Kerala state electricity board has systems running puppy Linux. I was delighted to find that they are not running Windows and very surprised to learn that a final year student knows a lot about what their government is doing with foss. I asked him if he would like to join their IT division and he reacted, 'that would be my pleasure'.

The event turned out to be very special as I had a chance to listen to and shake hands with Sir Richard Stallman. Sir Stallman's inaugural speech had made a good impact on me. He spoke very passionately about Free software and that clarified the real difference between free software and open source software for me. I really salute him for the passion he carries for the free software, but feel open source software is more real and practical.

During the conference I also heard about a very interesting project called gnowledge.org. This project is about building relationship and associate network for the knowledge articles. e.g. Water depends on knowledge of Hydrogen and Oxygen. The most interesting part here is that the dependent articles are based on Debian packaging system. So, when someone is fetching articles for H2O, one would automatically fetch dependent articles for Hydrogen and Oxygen. Smart!

The conference was extremely well organized. There was entertainment arranged for all the attendees after the sessions on all the days. I had a rare chance to see the Koodiyattam and will always cherish that experience. I strongly believe that Kerala is putting up a great example for other states in India for their foss adoption and I would love to participate in this conference again.

Thursday Dec 04, 2008

presenting at FSFS conference

Free Software, Free Society (FSFS) is hosting their 2nd International conference on Freedom in Computing, Development and Culture on 9-11th, December 2008 at Mascot Convention Center,
Thiruvananthapura, Kerala, India. I am doing couple of sessions at this conference, on MySQL and OpenSolaris. You can find other sessions from Sun on their schedule.

From their website, The Free Software Movement, started about a quarter of a century back, pioneered the various movements for freedom in the digital world – for instance, free knowledge represented by Wikipedia or freedom of creative works from copyright restrictions represented by Creative Commons. We also see a new form of social production where collaboration becomes more important than competition, where people from different parts of the world co-operate to create digital products including documents, music or software. These movements, in their own way, are helping to bring about a reduction in the Digital Divide and increasing access to useful works of knowledge. It is perhaps time to define the contours of this new space and situate interventions therein. Located at the intersection of Free Software, Development and Society, the FSFS Conference will examine the application of the Free Software model for freeing intellectual artefacts from the clutches of restrictive laws (like the Copyright Act), and making them available for human development. The conference will also address, inter alia, issues such as technology access and the digital divide, legal issues, and experiences of using the Free Software model in fields such as music, and literature.

Sir Richard Stallman
is doing the inaugural session and there are many more known FSF faces on the speaker list that excites me about this conference. If you happen to be attending this conference, I would be happy to talk to you!

Tuesday Dec 02, 2008

FOSS.IN/2008 Report

The FOSS.IN/2008 was a very different event than what it has been and I think that is how it was intended to be. This year, it was a contributor's event in its true sense. A bunch of folks representing community 'X', sitting together and hacking/discussing something is the only thing one could see at the event. Although, about 1000 people registered for the event, I did not see more than about 450 people at any given time.

personally, I did not enjoy FOSS as much as I have in the past. Somewhere the energy seemed lacking. The main reason I think was simply the fact that number of people around you were far less than ever. Plus, the people who attended FOSS seemed to have a set agenda w.r.t to their own communities. Of course, the idea of FOSS this year in itself was to meet with fellow community members and discuss things specific to their communities, but the whole idea of having far less people around you was not too encouraging.

hacking KDE at FOSS.IN/2008 I attended most of the sessions I planned to attend, but for the Belenix workout. It was on Saturday and I had something else to take care of. The one thing that I am taking back with me from the this conference is my improved understanding of adding SDT Dtrace probes to C/C++ applications. This happened thorough the Gnome/KDE dtrace workouts that I attended. My next goal is to play around with Dtrace and wxWidgets libraries (something that I am maintaining for OpenSolaris recently) and see what probes could help diagnose GUI applications based on wxWidgets.

The rest of the time, I spent at Sun booth, talking to people about OpenSolaris, dtrace, zfs and MySQL. At the booth, we were running a couple of contests/exercises. One, to get people to install VirtualBox and have OpenSolaris as a guest and secondly, we had dtrace one liners printed out for people which can be tried on their OpenSolaris guests. Given the number of people at the event, the turn out at the booth was not overwhelming. I could connect with hardly couple of hundreds of people, which is far less than the previous year. I loved the complete new look of Sun brochures this time and of course, the Sun/Fossin jackets!

Thursday Nov 20, 2008

Get set for FOSS.IN/2008


It seems as if it was not too long ago, when a bunch of us, OpenSolaris enthusiasts, were hacking on OpenSolaris and fixing some byte size bugs at the HackCenter @ FOSS.IN/2007. The great degree of enthusiam and energy at the event makes it the Best FOSS event in India in my opinion.

Its that time of the year again and the format of the event has changed, yet again. The big list of talks is out and workouts are in. This year, the event features only a handful of talks and more workouts/hackathons. The message, "Talk is cheap, Show me the code", is crystal clear with an open invitation to all the contributors and only the contributors. Well, so far, there are hardly 1000 people registered for the event, but it seems like they all have a clear plan as to what they will 'code' at the event, rather than a huge number of lurkers who just come to listen.

So, Whats my plan?? I am really excited to see a good number of workouts around OpenSolaris and a bit disappointed that there is no Open Source Database (MySQL, PostgreSQL and Derby) presence. I am planning to attend all the OpenSolaris related workouts. For those who are interested in OpenSolaris, please note the following events and lets Dtrace together.


\* Workouts-

- Profile Gnome using Dtrace, Thursday, 27th Nov, 10:00 am, C/60

- Adding Dtrace probes to KDE, Friday, 28th Nov, 02:00 pm, C/60

- Alternate OS probe module for Belenix Installer, 29th Nov, 02:00 pm, C/60


\* Talks-

- KDE on Solaris, Wednesday, 26th Nov, 03:30 pm, JNTata


The other talks that I plan to attend include,

- How to do embedded Linux right, Tuesday, 25th Nov, 10:00 am, JNTata

- Lustre: A scalable clustered FileSystem, Thursday, 27th Nov, 05:00 pm, JNTata


The detailed schedule is here. Like in the past, FOSS.IN this year, is focused on Open Source systems technologies, there is hardly any presence of open source web technologies like Glassfish, OpenSocial, OpenJDK etc. It will be good to see these technologies at FOSS.IN.

Anyhow, I am really looking forward to the workout sessions at FOSS.IN this year, see you there!

Thursday Nov 13, 2008

Debugging PAM in Solaris

Pluggable Authentication Module (PAM), as defined here, allows integration of various authentication technologies such as UNIX®, Kerberos, RSA, smart cards and DCE into system entry services such as login, passwd, rlogin, telnet, ftp, and su without changing any of these services.

To see all the debug messages generated during PAM authentication, one needs to follow 2 simple rules,

[1] Configure the syslog daemon (system-log service), to print the debug messages to a specified file/device. You could do this by editing /etc/syslog.conf as given below,

\*.debug        /var/log/pam_log

Restart the system-log service.

[2] touch /etc/pam_debug.

PAM implementation uses /etc/pam_debug file as a debug flag and if found, starts printing the debug messages to the file configured in syslog.conf file.

This is the debug output I see when I login to my desktop from the locked Xscreen,


Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 910332 auth.debug] PAM[726]: pam_start(xscreensaver,blood,8047860:80eec18) - debug = 1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:service)
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:user)
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:conv)
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_authtok_get.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_authenticate
Nov 13 17:16:20 dancefloor xscreensaver[726]: [ID 947272 auth.debug] PAM[726]: pam_get_user(80eec18, fef86970, NULL)
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 874416 auth.debug] PAM[726]: pam_set_item(80eec18:authtok)
Nov 13 17:16:23 dancefloor last message repeated 1 time
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_authenticate)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_acct_mgmt)=/usr/lib/security//pam_roles.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_acct_mgmt
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_acct_mgmt)=/usr/lib/security//pam_unix_account.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_acct_mgmt
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_acct_mgmt)=/usr/lib/security//pam_unix_account.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_authtok_get.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 186051 auth.debug] PAM[726]: load_function: successful load of pam_sm_setcred
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_dhkeys.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_cred.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 536501 auth.debug] PAM[726]: while load_modules[0:/etc/pam.conf](80eec18, pam_sm_setcred)=/usr/lib/security//pam_unix_auth.so.1
Nov 13 17:16:23 dancefloor xscreensaver[726]: [ID 707315 auth.debug] PAM[726]: pam_end(80eec18): status = Success

Wednesday Oct 15, 2008

wxWidgets in OpenSolaris

wxWidgets has been integrated into OpenSolaris (build 100) as a shared library now. This will certainly help a lot of wxWidgets GUI applications which can now link to the integrated wxWidgets in seamless manner. According to wxWidgets' homepage, wxWidgets gives you a single, easy-to-use API for writing GUI applications on multiple platforms that still utilize the native platform's controls and utilities. On top of great GUI functionality, wxWidgets gives you: online help, network programming, streams, clipboard and drag and drop, multithreading, image loading and saving in a variety of popular formats, database support, HTML viewing and printing, and much much more.

Actually, wxWidgets existed in Solaris before build 100 but only in a statically linked form with pgAdmin, a PostgreSQL administration/monitoring tool. But, starting with build 100, it can be used as a shared library and dynamically linked to various GUI applications. The current version is wxGTK-2.8.8.

With this integration, you will see 2 new packages being added, as SUNWwxwidgets and SUNWwxwidgets-devel. SUNWwxwidgets includes all the wxGTK related libraries (including the 64bit version) and SUNWwxwidgets-devel include all the headers files that you would need to compile any application that depends upon wxGTK. So, If you are just going to run some GUI based application that depends on wxGTK, you only need to install the SUNWwxwidgets package (which is expected to be installed as a dependency by the package management system anyway). Please note that the OpenSolaris IPS repository contains only one package, SUNWwxwidgets and here SUNWwxwidgets-devel package is combined into the SUNWwxwidgets package.

wxWidgets libraries are currently being built with support for xrc, expat, sdl and opengl. You can look at the ARC materials here.

Application developers can get more information about the installed wxWidgets by doing following,


rangabhoomi % wx-config --version
2.8.8

rangabhoomi % wx-config --libs
-mt -L/usr/lib -R/usr/lib  -L/usr/X11R6/lib 
-L/usr/openwin/lib  -lwx_gtk2u_richtext-2.8
-lwx_gtk2u_aui-2.8 -lwx_gtk2u_xrc-2.8 -lwx_gtk2u_qa-2.8
-lwx_gtk2u_html-2.8 -lwx_gtk2u_adv-2.8 -lwx_gtk2u_core-2.8
-lwx_baseu_xml-2.8 -lwx_baseu_net-2.8 -lwx_baseu-2.8

So, feel free to try this out and if you find bugs, please log them in the category, solaris/library/wxwidgets.

Friday Sep 26, 2008

Software Freedom Day, 2008

Software Freedom day, Sept 20th, really went unnoticed last year. I dont even remember anybody talking about doing anything specific. But, this year, it was just impossible to ignore all kinds of event notifications coming from all over the world. There were about 100 events planned by the Sun campus ambassador network only in India. In that list of events, I saw some requests for delivering a couple of sessions in pune and could not resist to get involved in this worldwide festival.

Pune Institute of Computer technology (PICT) had organized a two day event on Sept 19th and 20th and I signed up to do a session on OpenSolaris on 20th. PICT was also celebrating 25 years of its existence. Being an alumni it was a perfect setup for me and my involvement also gave me a sense of giving back to my college.

My OpenSolaris talk was well attended by around 60 odd students from both 2nd and 3rd year engineering. I covered Solaris-in-general and OpenSolaris including some key features like DTrace, ZFS, SMF etc. I also demonstrated OpenSolaris installation on VirtualBox. I think this demo was important, as it provides a very convenient way to try out various operating systems and makes a lot of sense for the student community. It was good to know that some folks from the industry as well were attending the event and here is what one of them have to write about OpenSolaris and the event.

I set out some goals for myself from this preso.
    (i) Awareness of Solaris/OpenSolaris.
    (ii) The Magic of VirtualBox.
    (iii) most importantly, Focus on open source.

One thing that I realized after talking to some 3rd year students is that, there are still a lot of students who run behind sponsorships for their final year projects. Self sponsored projects with open-source technologies does not carry a 'wow' factor according to them. I think this should change, students should focus more on joining various open source communities for their projects, that will not only give them  better exposure, but will also add great value to their resume, certainly more than what a certification can do. 


The Sunday morning I presented a couple of sessions at Army Institute of Technology (AIT). There were no additional sessions planned here; so it was a smaller event in comparison. The first session I presented was on basic java programming, that included the java virtual machine, life cycle of a java program and simple how-tos. Given that the audience was just learning programming languages in general (with limited exposure to C and C++), I chose not to go further in detail but to outline major differences between C/C++ and Java.

The second session was again OpenSolaris. It was the same session that I delivered at PICT a day before. The attendance was again around 50 students. After the talk, the sun campus ambassador hosted a quiz around open source technologies and goodies (OpenSolaris CD kits etc) were given away. The talk went way over its scheduled time and we finished the event at about 2:30 pm. I had a big list of questions to answer from the students, which gives me a feeling that it was a success.


Later the same evening we had a POSUG (Pune OpenSolaris User Group) meeting at Fergusson College and I had to do some more opensolaris for them. This meet was basically an ice-braker to students from various colleges in puNe. POSUG has been doing a lot of work lately and certainly carries the potential to contribute more.
It was a really busy weekend doing this social-technical work. and It is always good to go back to colleges, the zest in the students is so refreshing.

Friday Aug 29, 2008

D4X for OpenSolaris (UnSupported)

Downloader4X (a.k.a D4X), a multithreaded download manager, is pretty well known GUI application in the UNIX community. The product has lots of comparable features including support for recursive downloading through both FTP and HTTP protocol. It scores well on the usability aspect as well. These are the reasons, I decided to port it to OpenSolaris and integrate the packages into the JDS repository.

I did an initial port (v2.5.7.1) using the CBE infrastructue and with gcc compiler, and it seems to be working fairly well on OpenSolaris. You can download the SVR4 packages from here.

Though d4x project has a good user base, it seems that the project has stalled now. There has been no release since April 2006 and since recently even their web-site is down. This means that there is probably no hope for new features and there are almost no chances of getting source code level support. These reasons have made it extremely difficult for me to help get this integrated into OpenSolaris package repository. But anyhow, I have the port ready, and I thought I will just put it up on my blog for people who want to play with it.

So, feel free to download and use it, but bear in mind that it is not officially supported.

Wednesday Aug 13, 2008

Backup-Restore using pgAdmin on OpenSolaris

If you really like using pgAdmin to administer you Postgresql server instance, then this tip is important for you.

Solaris/OpenSolaris supports many versions of Postgres. Currently, OpenSolaris supports postgresql version 8.1, 8.2 and 8.3; which means you can install any of these versions from the repository and it will work just out of the box. pgAdmin, a postgresql database administration/monitoring tool (also available in the repository) is not tied to any specific version of the postgres server. So, You can install pgAdmin from the repository and simply connect to the postgres server that you are using.

Now, there is small glitch here. If you are trying to run programs like pg_backup, pg_restore from pgAdmin (Option Backup, Restore on database), then you need to be careful. pgAdmin expects these binaries to be present in the same directory as itself. i.e. /usr/bin. However, different postgresql server binary versions are installed in different locations, such as,


Postgres 8.1 : /usr/bin

Postgres 8.2 : /usr/postgres/8.2/bin

Postgres 8.3 : /usr/postgres/8.3/bin

Now, Lets say, you are using pgAdmin to restore a database of version 8.1, then you are fine. But, if you do not have 8.1 installed, pgAdmin will simply disable these options from the menu, as it would not be able to see the binaries at all. Also, If you have both 8.1  & 8.2 installed, but you are using 8.2 server then pgAdmin will use backup & restore binaries from the 8.1 bin directory, simply because they exist in the same directory as pgadmin. This will result in inconsistent behavior.

The best way to resolve all such issues is to create a symlink to /usr/bin/pgadmin3 from the bin directory of the server you are using. So, e.g., If you are using 8.2, then you could do following,


bash# ln -s /usr/bin/pgadmin3 /usr/postgres/8.2/bin/pgadmin3

and the same for 8.3 as well. Obvious that, this is not required if you are using 8.1 server.

then just include the 'bin' directory  of your server at the begining of your  PATH and you will always use  pgAdmin and the correct backup/restore binaries.

Friday Aug 08, 2008

The OpenSolaris mad-ad Video

The Open Source Mela (Fair), at Sun's India Engineering Center, happened in March, 2008 saw a lot of technical sessions around FOSS technologies. The idea behind this internal event was to foster the culture of open source projects internally. Along with the technical sessions, some fun-filled events were also hosted. One of them was a mad-ad contest.



The above poster was quiet encouraging and some of us (from the Solaris team) decided to participate. We could not come up with anything until just one hour before the contest when we finally got together to brainstorm on what we could present. The following video is what we came up with and it turned out to be a winner.


The song is based on a famous commercial in India. This mad-ad (or rather a jingle?) is in Hinglish (a mix of Hindi and English :) ). Many thanks to Kini for helping us make this video and we hope you will enjoy it.


Saturday Jun 14, 2008

SMF import for IPS packages in opensolaris


Installing postgresql/mysql packages from IPS repository on OpenSolaris 2008.05 is very simple n easy and Jignesh has described the command line steps in his post in detail. I tried the same thing on a fresh install of OpenSolaris, but using the Package Manager GUI and It is as easy as it should get with GUI tools.

The idea behind this blog, is to simply clarify to users/developers that as soon as you install any PostgreSQL/MySQL version, the SMF registry is not going to be updated. This might look obvious to many of you, but I see on some reviews that people are expecting that the SMF service will be installed in the registry.

A subsequent reboot will automatically import necessary entries in the registry or it can be manually added before reboot if desired, as below,

# svccfg import /var/svc/manifest/application/database/postgresql.xml
(for Postgresql version 8.2)

This needs to be done only once and the registry is updated permanently.

Also, Note that registry entries are not cleaned up once you uninstall these packages. You can manually delete them as given below. There is no harm in keeping them in the registry, but they are not going to be useful for obvious reasons.

# svccfg delete svc:/application/database/postgresql

Wednesday Feb 06, 2008

Perl DBI & DBD::pg inside the latest SXDE 01/08

The new released SXDE (01/08) bundles Perl DBI and Perl DBD::Pg along with many other web-stack components. This piece of integration I volunteered to do with a selfish personal goal of contributing more to the OpenSolaris codebase. It has been a great experience of following the entire Solaris integration process for the first time. With SXDE 01/08, the 2 components are out there for people to use.

DBI is a generic database Interface for Perl applications and DBD::Pg is the PostgreSQL specific database driver  which implements the DBI interface. Both these perl modules are integrated into latest Solaris. These components are ready to use once the OS is installed and no other configuration is required.

A simple usecase is as below,

 
First, Make sure that PG8.2 Service is running, else you need to enable the postgresql:version_82 service to start the PG postmaster.

bash-3.2$ svcs -a | grep postgres
disabled        6:03:01 svc:/application/database/postgresql:version_81
online          6:03:16 svc:/application/database/postgresql:version_82

Create a small database that we will try to access through a perl application using DBD::Pg.

bash-3.2$ /usr/postgres/8.2/bin/createdb testdb
CREATE DATABASE
bash-3.2$ /usr/postgres/8.2/bin/psql testdb
Welcome to psql 8.2.5, the PostgreSQL interactive terminal.

Type:  \\copyright for distribution terms
       \\h for help with SQL commands
       \\? for help with psql commands
       \\g or terminate with semicolon to execute query
       \\q to quit

testdb=# create table t (id int);
CREATE TABLE
testdb=# insert into t values (1);
INSERT 0 1
testdb=# insert into t values (2);
INSERT 0 1
testdb=# select \* from t;
 id
----
  1
  2
(2 rows)

testdb=# \\q

Write the perl app that will talk to this database. Here, we simply do a select on the table created above.

bash-3.2$ cat test.pm
use DBI;

$dbh = DBI->connect ( "dbi:Pg:dbname=testdb","","" ) ;
if ( !defined $dbh ) {
        die "Cannot connect to database!\\n";
}

print "Success connecting!\\n";

$sth = $dbh->prepare ( " SELECT t.id from t" ) ;
if ( !defined $sth ) {
        die "Could not prepare statement\\n";
}
$sth->execute;
while ( @row = $sth->fetchrow() ) {
        print @row,"\\n";
}

$sth->finish;
$dbh->disconnect;

Now, run the perl module to see the result. 

bash-3.2$ which perl
/usr/bin/perl
bash-3.2$ perl test.pm
Success connecting!
1
2
bash-3.2$

With DBI already in Solaris now, other drivers will also follow soon.

So, Go ahead and use them and Do not forget to file bugs if any, here.

About

user13377336

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
Blogroll

No bookmarks in folder