Friday Mar 27, 2009

Vim is really Fun ;-)

Off late Im pretty much sitting in front of the computer and learning /re-learning
Solaris from scratch.
Not to mention I've been working really hard in finishing some work as well....
With whatever time I get by the night.. I was trying out various things on the console.

Since I was using VIM as my editor,I started learning how to write the .vimrc file...
Yes folks,how to write it?????

Apparently and Ironically,if your a root user the $HOME dir wont have a .vimrc file....
Not to blame it as its quite evident that you can modify Vim's behaviour so much that writing
a .vimrc file turns out to be extremely subjective...
How about that for customization, aye?

Anyway after seeing my mentors use flashy gree,red,blue and what not in their editors,Its only
obvious that I wished I had something similar too....
And all It takes to get these colourful displays(most of the times) are some very minor tweaks

So getting into the techs of it, This is all you need to do.
# TERM=dtterm; export TERM

Not to forget you will have to include this in you $HOME/.vimrc file as well


syntax enable


and thats it, and no more boring white and black displays on Vim.
Thats just no it.if you dont like the colour,go ahead and edit

There are a few more advantages as well..By setting TERM=dtterm,
you can counter the page refresh that occurs when ':x / :wq ' is hit to save/exit the editor.
The editor will exit but will freeze giving the Entire terminal a nice flow...
Cooool :)If you are a newbie like me ,here is the .vimrc file I work with.


Very basic I must say but will add lot more when the necessity arises..




Tuesday Mar 03, 2009

Can you Wink ?

Lately I have been hooked onto the outside world pretty much sitting inside my room ;-).
Any movie,any music/musical, was just a click away and thats when I stumbled
upon something nice to read.
Wouldn't like to call this a blog but more of a journal :)
I particularly liked the way the columnists describe their
experiences,day in and day out.
Go check it out for yourself!!
Wink!

Friday Jan 23, 2009

CGI programs on Solaris?



So finally am back after a long interval, well cant blame me for that!!!!
Had my exams(or just nothing much to write)
Continuing with my project work on Crossbow, the Libraries were almost completed and its the time to be thinking about a GUI, web based one to be more specific.
After a lot of R&D work(which was basically asking my mentors) I decided to use CGI.

REASON:?
1.I was writing it in Perl, studied it quite well.
2.We intend to use Webrick, a server written in Ruby and it as a built in class for CGI!!!

Although the preludes were cleared, like they say when you get to work is when you get to work,Really!!
As obvious I was using Apache(ok.... ok for the time being thats all)

Since I faced issues setting up Apache2 to run my CGI programs ,I thought it will be a good idea to invest some time blogging about it...

Baby steps include...
First of all start Apache...Quite easy ,

#/usr/ apache2/2.2/bin/apachectl start       (This starts the server,Thats it.)

Resolve localhost.....
This is the tricky part(well actually very trivial unless you dont know what your doing and just go by some config book which is very very subjective to the author).

http://locahost (Ran this in the browser to see that I had a Internal server error,I will cut out the remaining description and get to the point)

First check your /etc/hosts file,you will see an entry like this(mine)


 192.168.1.5 Harivayu Harivayu-nge0 # Added by inetmenu

#man hosts
will give you a complete description about how to interpret this file...
The first entry is the IP addr your using, the next is the Hostname ,finally comes the nick-name,
Comments are denoted by #

Here you can see that localhost is not listed...So either you add an entry for the localhost(If you insist to use localhost) or use the Hostname already defined, in my case its Harivayu


Then "It works"!!!!!!!
Now to tweak apache settings to accept CGI programs..
open up /etc/apache2/2.2/httpd.conf    (The apache config file)
You will find an entry that reads

    ScriptAlias /cgi-bin/ "/var/apache2/2.2/cgi-bin/"
Meaning, "cgi-bin" is Aliased to the actual path "var/apache2/2.2/cgi-bin/"
So according you will have to place all your .cgi programs in the above mentioned dir for it to work...
Or else you can specify your own dir just change the ScriptAlias to desired dir!(Why bother dude?, Sys admins are not allowed to comment here!!

 THE MOST IMPORTANT ONE,
Check the permissions, its very easy to over look this aspect of any CGI program and think about all the other issues,while the answer is very trivial....

ENSURE you have set the permissions for your .cgi file precisely.....

Small pointer,
Its always advisable to use "-w" option while specifying your interpreter,

#!/usr/bin/perl -w
As a check to see if your program is correct, when you run it in command line, "-w" will throw up any syntax warnings or errors ,so it can be resolved easily.
Thats it! your good to go!!!
So place the script in /var/apache2/2.2/cgi-bin



  • Set the permissions right

  • launch the browser, execute [http://yourhostname/cgi-bin/file.cgi

  • Rejoice the Results....(of course the program should be correct) 



Tuesday Oct 07, 2008

The Next Step

I have been working on my next project for quite sometime now .Its called CrossBow and the project is just as interesting as way the name was conceived.                                                                            
Just makes me wonder sometimes whether writing codes is difficult or coining a name of it?
Anyway,
Cossbow actually provides a way to set up all the network devices like Switches, Routers,Hosts but Virutally!!!Think its a disadvantage? think again...
How cool would it be to actually see packets travelling across IPs without having to set up 2 independent systems for it????. Well you can do that now!

The entire Virtual network is created by using the CrossBow technology the overview can be found here,
and the documentation here.
The necessary hosts are created using Zones.

During this project I was introduced to a language called "Ruby"  and it truly is one Gem of a language! The "good" just kept on coming with the onset of YAML (Yaml aint a markup language). (who ever said coding for life was a pain?.Like they say, when it rains it pours!

Anyway currently the Ruby libraries are capable of,
-Creating the Virtual Switches
-Creating Virtual NICs
-Setting up the various properties for each of the Vnics and aggregate them!

Sunay's blog has excellent write up to acclimatize anyone with the working of CrossBow.Take a look at it!
Thats it for now,

Keep you posted on the developments!

Yup, I Won!!!


So we as CAs are taught so many things from Sun folks .Its hard to imagine people can be this friendly and Humble.I am yet to see people more humble than them!! (If they even exist)
.Now that I was (And still am) doing my Internship as a CA I got an opportunity to work with
Moinak Gosh (The architect of Belenix) over the last Summer.

The project aimed at providing a "RAM based boot for Belenix0.7" . The complete details can be found a few posts down.!
But when the "Opensource Community Innovation awards" was announced, it was like a hot cake  thats was too good to let go.And so I sent my works on Belenix .
And what do you ,I WON!!                                                                                                                        The Winning contest entries are announced here . (perhaps it was the best day yet)
A brief Intro of all the Award recipients are here.

PS: Well that day was beyond belief .What followed in the evening and all through the night was perhaps "pure delight of Insanity" (If you know what i mean ;)
A hearty Thanks to everybody who helped me!

SUN Rocks!!!!!

Sunday Sep 07, 2008

Jashan '08


The party was on ,Jashan '08.(The annual IEC meet)
It was one cool party at Grand Ashoka.
Me as a CA was extremely elated to be a part of this amazing event, although I managed to sneak out of participation ;)
Will let the pictures script out the moments!


Our CA community performing a Skit.Was hillarious..Will upload the Video as well(as soon as i can find it)

Laser show.It was stupendous .See the dancing roof!!! :-)
More pictures ,on their way.


Thursday Sep 04, 2008

Sun University day in PESIT


So there comes another day of enjoyment .And so we are here in PESIT for the "Sun University Day".
It was an action packed event (in every sense!).I was totally amazed by the enthusisam that was shown by 300-350 PESITians.
As usual we had problems setting up the projector and being accustomed to it, a quick check reveled that there was a Windows lappy that was using OpenOffice and from there starts the presentation.

The event started with the Introduction to what Open Source is, and why Open Source?.From what I could see, that was enough to spur people on so much that there were disussions poppin up everywhere!.(Handling crowd can get a lot interesting sometimes)
I was extremely happy to see such enthusiastic faces as I got into my stride.We then proceeded with a talk on Solaris basics .From what I could see, they were all pros at it.So it was then that I  decided to give them a taste of technology on Solaris and  see some jaws drop :)
But unluckily there was not a single box with Solaris on it. Just then a couple of folks started shooting issues that they had during installation.

So there it struck, as unprepared as I was with that, I popped in a disc and showed them the Installation demo as well. The event turned out to be a Installation experience that they will remember!( all their doubts were resolved as well).
Lucky for me , the question was so aptly timed that we were breaking for lunch and just before it, I was able to salvage some time and take the system up to the installation screen at least :).
Post lunch was the perhaps the best time yet for the inflow increased a lot,which is generally not the case. PESIT rocks!!!!!
Settling down after lunch, there was still about 15-20mins of install time remaining so thought we could have a quiz and with lots of good stash up for grabs and 300odd people fighting for it, It was some experience!!!


After the Installation was over,students had their time to play around with it for a while before I took over for an exhaustive session of Dtrace, and am not feeling bad that I did it.
Dtrace was run on the onboard calculator and I could just see jaws drop one by one!This should probably sum it all up as to how they felt! :-)
By now it was almost 4:30pm and I had to wind it up.This was my first University day apart from my college so it goes down to be a special one, and indeed it was!
Then began my second favorite part, the photo session , will let these speak for themselves!





Without whom it would'nt have been possible.
From left(Sushma, your truly, Rupayan).

Sunday Aug 10, 2008

Go Invisible

For all those Pidgin users, have you ever felt the need to go invisible over gmail accounts, to avoid some obvious people and really not done a good job at finding answers to it  ;-)
Well behold the magic script..
{{{
 <presence>
 <priority>5</priority>
 </presence>
 <presence type="unavailable">
 <priority>5</priority>
 </presence>
 }}}
Just paste this in your xmmp console and your done! Invisible instantaneously across all your gmail accounts!!!!
So how to get to xmmp console?
tools > plugins
By the end of the list you should see something that says "xmpp console<some version>" , Select it.
Once done you should see "xmpp console" pop up in the "tools" menu bar.Navigate to it and in the subsequent console that opens up, paste the above mentioned code ....
Enjoy!
PS: I am not sure if the xmpp console option is provided under the windows version of pidgin..Anybody willing to fill me in on this, is most welcome!

Tuesday May 06, 2008

Belenix 0.7 can boot from RAM!!

I had started learning Unix (a couple of months ago),so there was this zest to improve  and try doing something worthwhile ,rather than just screw up my system twice a day trying to install may OSs.

Something caught my eyes while surfing belenix.org and it was a project listed there,for it said "Ram based boot for Belenix".This stood out for me and i took it up.Well no sooner did i take this up than it was time for me to head to college :(


However as soon as I started working on this,i ran into issues.I was helped in getting an understanding of the processes and how I need to proceed by Moinak Gosh from SUN.


So once the tutions were over. It was back to studies;)As i started out the primary focus was on 2 important files, Namely,
solairs.zlib
solarismisc.zlib


Before we start off ,click here to have sneak peek into how a livecd works!!
Currently these files were being mounted directly from the cdrom and evidently these folks needed to be in the RAM for the project to succeed


This was the catch.The reason being at the point in time when this script runs(live-fs-root) the mounting of swap is not initiated yet.So for all reasons I have no RAM suiting my requirements.Like they say,every question has an answer,and so was the case here as well!!!


The option now was to mount swap on /tmp explicitly (in live-fs-root script) and override the default script that does this mounting.As usual there was another issue here,lack of binaries..


Generally the format for mounting is


mount -F tmpfs swap /tmp.


This was not working because there were no binaries in the ramdisk at that moment in time :(


The surprising thing here was that when i tried booting into the working copy of belenix and made my way to the binaries they were present in the path :/usr/lib/fs/tmpfs, But when i came back to the ramdisk and checked out the same path ,it only extended upto /usr/lib/fs/


No tmpfs directory at all:(.This ghostly behavior kept me thinking and later I figured out that this specific binary was not omitted but was intentionally kept out,as there was no need for it until now(save every amount of space we can in a livecd).


So I actually, mkdir tmpfs then copied the binaries.Yet no luck.Now it started to get to me,and a few more reboots into the working copy i figured another way out..


There are mount binaries, also present in the /sbin dir, i thought why not give it a shot?;)so i just executed the binaries itself and hurray!! :)


code: /sbin/mount -F tmpfs swap /tmp


Now the first stage was done..I have complete control over the swap.


Next was to copy the 2 files onto RAM.As one might think a regular cp <files> </tmp> should have done the job...Well this was far from regular !!!!!


Nevertheless I got an error stating "cp: command not found"


So i went back to the ramdisk and checked to see if the binaries were present,as usual it was not there(PATH:/usr/bin/cp).


Again i copied the binaries(by now i was very familiar in looking for binaries <img src=)" title=":))" /> to the required path and executed the binaries ...Worked flawlessly


The next stage was the "lofiadm" stage.The command is used to associate a file with a block devices,once the association was created , it was only a matter of mounting these 2 files into respectively places...


(Perhaps the easiest of the lot!!!)


It was now time to give it a try (figures crossed)..And it worked magnificently :) :)


Some interesting facts!!!!
Since its now running from RAM, the boot time is reduced,which is perhaps the main concern in Livecds


Secondly since belenix 0.7 is now installable and that the processing begins at RAM,the install time is reduced to an staggering 10mins.(No cheeky stuff here ,i've tried it out),Amazing isnt it?


Also there is one more Magic that this can do ,Have a look at the picture



That's right,you can actually eject the cdrom drive which was never before possible...


Advantage:You can watch a movie from an operating system that is not on your HD ,and definitely not on your cdrom



This one shows the actual copy and that the files rest in RAM... :)The lofiadm command output earlier read


/dev/lofi/1                                 /.cdrom/solairs.zlib                                 compressed(gzip-9)


/dev/lofi/2                                 /.cdrom/solairsmisc.zlib                           compressed(gzip -9)


Plans for the future:


I am currently working on providing a boot time option ,so that the user can select if he want to boot it off ram.


Also to make life more easy,an auto ejection mechanism once the GUI is up and running


Stay tuned!! :) 

Saturday Mar 15, 2008

KDE on my desktop!! Magnificiant

Hi all,

 I just laid my hands on KDE 3.5.8 and began to play around with it for a while, and damn is it good!!!!
Perhaps the best desktop environment i have ever seen ....
It just makes me wonder how KDE 4.0 is going to be...

I guess my desktop just got revived ..Am off to explore more while you guys feast on these :-)


 

 


 

 

 


 

 

 

 Thats konqueror, the latest web browser,file manager,file viewer from the KDE stable...I could have checked out a few websites for you, but  without a network connection on soalris this is all you guys will get to see of konqueror,in fact this is all i get to see too!! :(  

 

Guess who??
Its the eye candy part of ,arguably one of the most powerful aspect of soalris , the terminal!!Fiddling around is fun.In fact this is nothing, there are transperency ratios that can be set and real time behaviour of the terminal with respect to the desktop backgroud can be seen, coool :)


Didnt believe me so far?? have a look at that , its the same terminal under another setting ..
Oh yeah its sharing the desktop with Mplayer ,now thats one amazing piece of software!! :-)

PS: Its almost 3 AM on a satrurday night, or sunday morning to be more precise :)
If am blogging away to glory that can only mean one thing!! 


Friday Feb 15, 2008

NIC drivers for Solaris

Hi Guys ,

There have been many people complaining about not being able to set up network on solaris owing to the lack of drivers...

Firstly i would like to say "welcome to the club"...
However this is where the world wide web comes in!!!

I found this page containing drivers for may chipsets..Try your luck here.
Unfortunate as it may be, my Ethernet chipset belongs to a special family for which i was unable to find drivers..
Its a D-link DFE-520TX fast ethernet PCI adapter , so if anyone knows of any drivers for it,pitch in with the link .

PS:Fingers crossed :)
 


Friday Jan 18, 2008

Disks, partitons, slices under solaris

I have seen a lot of people struggling to understand the solaris way of interpreting the disk, with all those c t d s ,coupled with number that make the users literally pull their hair out!!!!!

New users definitely feel oblivious to these aspects but Guys it is really very easy to understand and once you do so ,will appreciate the details you never thought existed on our disks..
Surfing through the net brought me to this impressive page that gives a detailed picture on all those c d t s.

To understand how it works click here.

Enjoy.
 

 

 

Thursday Nov 15, 2007

A Seminar like none!!

Day before yesterday was historic day, for I hosted 2 sesions back to back .
I started off with the "Introduction to Opensource" and "Introduction to
Solaris".I was using an Acer backed laptop which was running on Solaris
itself and one of my friend attending was quick to figure out that it
was NOT XP, this made the folks more curious and inquisitive. The
ambience suddenly changed and I could not help but stop the session  and
show them around a bit


Alas!! that system did not have compiz
installed on it , else we could have had more fun and given Vista a run
for its money!!!!!!


Anyway resuming the session there was another
stop, where I explained about Zones to the best of my understanding ,
from what I could see they were really interested in understanding how
it worked (especially when we were learning about virtualization in
one of the subjects).


I took this session for about an hr and once done told them that I had planned a demo and sure enough it had to be on Dtrace.


The
folks took a 15 min time out during which they started using the system
to execute unix commands that we were learning as a part of our
syllabus.(Thanks to our syllabus we have only UNIX theory this time and
practicals the next sem).


Then on everyone settled down for the
demo.I explained about the use of this debugging application as I
started the calculator application and ran Dtrace on that.


Initially
I coded to find out the total number of times each function executed
for the application to run and to perform simple calculation and for
the ctrl+alt+del folks this was something that they had never seen
before and couldnt help but look at it with awe!!!!!


In fact for the first time even I felt very very proud to be showcasing such stuff to the people.


Now
for the highlight.....Once again I wrote a few lines of code to find
out the time that each functions took to make the application
run!!!!!(and here is the surprise).


The output gave me some
erroneous time results that were definitely not right .I was delighted
to have found my first couple of bugs(or so I thought!!!!) then on I
fiddled around showing just how deep into the debugging aspect one can
go using Dtrace and finally finished it up after some hr and a half or
so!!


Later on I packed my bag and went back home and no sooner did I
reach than I filed a report of my findings to the BOSUG community
hoping to get the reply I was waiting for!!!


Alas... there came a
reply stating that such things happen and it has got nothing to do with
a bug and that everything was perfect.!!Turns out there are far more
intricate details that I was not aware of.!!!!Guess my happiness of
finding a bug need to wait a little longer :-(


So there was the day I had and it was just amazing ,,huh!!!!!


I am keeping the post short , so that's it for now :-)

cya

Friday Nov 02, 2007

Open Solaris Developer preview

  
Indiana is a project name to create an OpenSolaris based binary distribution ,the prototype release is being called OpenSolaris developer preview and is available for download  here.

This may result in instabilities causing data corruption.

The highlights of this release are:

  • Single CD download, try before you install option.
  • Caimen installer, that significantly increases the ease of installation.
  • ZFS as the default file system.
  • Image packaging system, to pull packages directly from network repositories.
  • Bash as the default shell.
  • Gnome 2.20 as the desktop environment.

For more details on system requirements and other documentation go here

The feedback about this release is most welcome.Especially if you have any hardware related issues.

Download ,use and report bugs (if any) here. 

 



 

 


Wednesday Oct 24, 2007

Code For Freedom

Our country boasts of being Independent for 60 years now, and to celebrate it Sun has launched The Code for freedom contest on Aug 15. The contest runs for 6 months (upto Feb '08) and there are no deadlines for entries.(Earlier the better!!).

Goodies to be won:

  • GRAND PRIZE- "Sun workstations/Laptops"
  • I-pod shuffle for significant contributors
  • USB sticks as early bird prizes
  • T-shirts for valid submission
Projects Description Interests
 Opensolaris Select a bug, or an RFE(request for enhancement).Select an easy bug then move up the complexity ladder!!
 C/C++ ,Operating system,Unix
 Project Glassfish

 Its a free open source application server,implementing features of JAVA EE 5.

Submit bug reports,,bug fixes, enhancement requests, documentation

 Java ,servlets,client server model.
 Netbeans

 Free ,open source, mulitplatform IDE(Integrated development environment).work on bug fixes,documentation(Non -techies ,have a closer look!!)

 Java,IDE
 Open portal
 Open source portal server project.Post bug fixes,RFEs,great  portlets .
 Java, remote acces

Apache derby

Its an Database subproject.Its an open source relational Database Implemented entirely in Java.
Java,DBMS

 

Guys ,It doesnt matter if your not proficient in any of the filelds, you will get help on the various mailing lists.Just click your field of interest and join the relavent mailing lists, take your time in understanding the projects and the flow of codes.Once you comfortable take the code fix up the bugs post your achievements,sit back and enjoy the prizes!!.

 All the best!!





About

Shampavman C G

Search

Categories
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