20 November 2006

Vini Vidi Vici (participating in local Linux Troubleshooting competition)

Thursday, November 16th 2006, another normal day for me. OK, that's wrong :) Like any other IT folks nowadays, I spent some part of my free time to browse the Internet. Guess what I found? What? Attending the conference? No no, that just made me feel sleepy and awful. Think again. Yup, I decided to enter the Linux trouble-shooting competition. First thing that came inside my brain was "what the hell I shall face there? A God damn broken ftp server? Compromised host with some sort of 3133t r00k1ts installed there?Awfully broken root filesystem? Or what?" Yeah, that sounds scary, but anything could be the challenge I shall face, so I must be ready for anything. What will I lose anyway? Nothing... except my 50,000.00 rupiahs will fly away :)) hehehehe.

But shit, the end of the registration was near. F**k! So, I picked up my cell phone and dialled the CP (contact person) number. Pheww, the man on the phone said, anybody was still allowed to register 'til the competition was about to begin (that was November 18th, Saturday...). Yeeha. But oh my... registered as a team? Hm, I couldn't ask somebody to join me, so I simply asked again "ehm, I plan to register as a team composed of only one member, is it OK?". Quite funny part here, since I got confusing answer at first. But eventually I got another positive answer again.. Pheww, so the only thing I need to worry is the competition itself.

Saturday, got up earlier, cleaned up myself, got some food and I went to Surabaya. No traffic jam, thank God for that! Arrived at Hi-Tech Mall (a.k.a THR -- Taman Hiburan Remaja), wait for couple minutes, went to 2nd floor and I registered myself. After me, I saw many people coming and did on site registration. And I thought "...surely lack of publication....", but that was just my guess.

Now the hard part... show time baby! :)

In the schedule, the competition should began at 10 AM, but well, that was the theory :) The fact was, it began close to 11 AM :) Surely pumping up your adrenalin? No, quite the opposite, I began to feel sleepy :)))) bwahahahahha. I used this spare time to look around and try to "profile" the other competitors. Holy cow! I was pretty damn sure I was the oldest competitor :) Gee, time flies so fast isn't it? Once you were 17, and now you're suddenly near 28 and your brain is working slower ... shit on me :D

First round. Me and the other 9 time must solved the boot problem. The sympton was quite simply but could be tricky if you didn't understand the real issue. After an item in GRUB was selected, the kernel was booted (NB: the distro used here was Blank On, a localized and modified version of Fedora Core). After some hardware detection, suddenly it went to run-level 6. Did you notice the quirk here? yeap, certainly something was forcing the init stage to go to runlevel 6. It could be the kernel's boot param, or... /etc/inittab. So, I inspected the related GRUB's entry. Clear, nothing was wrong there. Then how to go to the normal runlevel without interrupted by the inittab? Simply provide your own runlevel number as the kernel boot param, e.g linux 3 root=/dev/hda2 and you're done! But since I must made it permanent, I told the kernel to enter single mode (passing "S" as boot parameter), edit /etc/inittab and made 5 as initial run level. Save the file, reboot and voila, I enter the GDM :)

taking a break for about an hour or so, I entered the 2nd round. In this round, 10 from about total 20 team was selected since they solved the first round and wrote the explanation (problems identification, solution) pretty clearly. Quite good judging style, I did like it. So back to the arena. Now what? Sounds simple, X couldn't be started! All I got was a blank shitty screen when I executed "startx". And thanks to this lame head, I forgot where the hell X saved its log! For once, I thought strace could be the life saver here, but .. great... no strace! So it's kinda back to stone age where the tool was just the rock (got my point?)

My mind quickly concluded it could be some sort of permission problem. So I switch to another user ID. What did I got? A message telling me that I had no permission to start X and big chance it was PAM problem (according to the on screen message). So I tried to follow the hint and inspected the PAM configurations. Coming inside xserver PAM setting, changing here and there, no luck. Bummer! What did I wrong here... ??

Almost losing hope here, while one team was announced as the first team correctly solve the problem. Hm, quite fast, so it must be something easy. Minutes later, the announcer told a quite useful hint : "the problem is something related to mouse device!" OK, X and mouse, what could be the link here? Of course, Xorg.conf (small x? big X? I forgot..)! Before that, thanks to "find", I finally found the X log...and yep, it was said that core pointer couldn't be initialized. What's the problem? Could it be the mouse wasn't detected? dmesg confirmed that the PS/2 mouse was indeed correctly detected, so that wasn't the problem. Firing up vi to inspect Xorg.conf, I looked up any directives that could lead to mouse settings. OK, I found the device name to be used by X as the pointer..."/dev/input/mouse". Valid entry? Not really, ls confirmed that device name was wrong because of missing the "0" suffix. The correct one was /dev/input/mouse0. Typing that, saved, fired up startx again and I was done! :)

Third round (final one) was started at 4 PM...oh man, I told you, I was so tired and sweating... and I thought to myself (not a song :) ) "this is it, exhausted...can I win?". But giving up isn't my style... the only style I have is "keep moving!". So that's what I did. This time, 5 team entered the final... and they were all looked skillful, so I planned to give my best here. And the game was started again, this time...three troubles...all at once! F**k!

First, unable to find certain file when GRUB tried to load the selected kernel. What was it? Quick inspection in grub entries revealed it was incorrect initrd's filename. Fixing that and I met another problem... "no users exist" (something like that, I don't remember 100%). Why? No ideas.... but I reset my PC and back to inspect the GRUB entries. I noticed that it passed /dev/hda5 as the root filesystem. Wrong one? Once again no idea, but I guessed it could be the problem. So I changed it to point to another valid one and I used /dev/hda8 since this rootfs was also used by another kernel's entry. OK, booting went smoothly this time. X was also fixed quite similar like round #2. Confidently I raised my hand to let the observers knew I did it. The judging comittee checked my solution and one of them said "oh, you can't change the root filesystem, please change it back". Great.... :(

At almost the same time, another time raise their hands and the judges declared that they did it correctly. Oh my, I lost my chance as the #1 winner. But I won't give up so easily. No change to rootfs? OK, I can do that too. Rolling back the boot loader's settings to the original one, this time I got the "no user" problem again. I was almost sure the root ID wasn't there, so I used another kernel entry to boot the Linux system and inspect /dev/hda5. Got it, no root! So what I did was simply creating it. And since I am lazy, I did :
# grep root /etc/passwd | head -1 >> /mnt/test/etc/passwd
/dev/hda5 was mounted in /mnt/test and I was in the healthy /dev/hda8. Once again, reboot. This time, using runlevel 3, I successfully entered the login prompt. Login and I tried startx. Mouse problem again? Nope... "no screens available". Sounds like driver problem? I checked the Xorg.conf and found the bug, wrong driver! It was written "Sis" as the display driver while obviosly this machine was using Radeon graphic card (I didn't confirmed it using lspci, I purely used instinct since the other machine was using radeon and it worked). While I hacked it, the other team was declared as the 2nd successful solver. OK, I must secure 3rd place then. Finished with Xorg.conf, starting X and it worked! Again, I raised my hand......

Clock ticking, the judges inspected my PC once again... typing here and there, they were trying to confirm something (correct partition? not sure..). But I was pleased to hear they concluded I made correct solution.

Waiting another 2-3 minutes, the official winners were announced. And yep, I got the 3rd place. I was still proud to myself, knowing that I was still quite fast solving the final problem. And the bonus was nice too, Rp 500,000.00 ... not a small cash to carry, right? :)

So, boys and gals, there you go...the story of a man competing for a pride and honour. And I must say, I do like this kind of competition. Not only because it offers competitive atmosphere and quite nice prize, but also because the participant must *solve* a real world problem. Yes, I said it was real world because I met all those problems previously. Compared to the hacking competition, I found this troubleshooting competition is far more educative, challenging and promoting Linux usage in general. Kudos for the organizer who did the quite good job. I hope there will be another similar competition like this and I shall enter it once again. hopefully facing far more mind-juggling problems to solve.

17 November 2006

Someone is watching you (or your work?) :)

Just a short post...

Wandering in WWW, like usual, and I found this blog entry . So, at least I am happy that someone found my work is indeed useful for him/her :)

In this paper titled "Distributed Software Platforms for Rehabilitating Obsolete Hardware", my Unix Review's article got cited by some folks from Italy.

Hm, this URL is interesting. It's like two ways promotion :) My article indirectly promoted EPCKPT, while EPCKPT was indirectly inspiring my article.

Oh wow, GLUG-chat mailing list once mentioned my article? Gee, missed a lot of fame I was :)


Wanna add more? I think I will keep this posting updated whenever I find new citation, reference or anything toward my articles....

30 April 2006

"What does this man do on 1:17 AM"?

Interesting subject isn't it? Ever think something like that when you work late and you found yourself asking this kind of question? Is it somekind of joke? Irony? Self consciousness over something that hog your life? Everybody has an answer, I believe that and you too gotta believe that you can answer it.

So, let's assume someone (or probably me) asks something like that to me... I have many different answers that I can freely pick:

1. I just finished watching "Fight Club" in local TV. I found this movie rather interesting at the beginning, pretty amusing in the middle and so confusing in the end. A man punch himself, even shoot himself? He finally realized that he suffers somekind of chronic double personality problem. Holy shit.... And let me ask you something, Edward Norton...has twin brother played by Brad Pitt, what do you think? This isn't double personality anymore, I call this almost perfect split personality.

But anyway, I got the message, that is "...sometimes you just have to let it go AS IS...". This simple rule is somehow abandoned by modern human. We're just so fucked up by fancy clothes, expensive furniture, elite cars and other stuffs, but we ignore our basic needs. Deep beneath us, you are screaming...looking for this "basic needs", but...here is the fun part, you can't. Why? Why? Simple, because you "just don't let it go AS IS". "Shit, tell me the reason right now or I'll blow your mouth!". Don't waste your time, that won't work. Just ask yourself why....


2. Work here and there. Yeah, I got great news for your my dear readers. My article has been published on Dr Dobbs Journal. "Congratulations man", thank you. I also made myself proud to lurk into Linux Forums early this April. "shit man, you never stop, do you?" No, I am not :) Who the hell you think so you can give me orders?

Now, I begin to prepare another two articles, one will be co-authored with a PhD student from China. Now this what I call "international business", you type something, someone from the other side of the globe read it and add something, over and over....and wallaaaa, an article is ready :) No, this isn't a magic. It is called "creative work", a work that truly depends on how good your brain do the work. Your brain is in good shape? Then you will produce an excellent idea. In bad shape? Then you will produce crap. Always creates crap? Then you're doomed. Pack your stuffs and move to the cemetary... there, you don't need to use brain, you just need to confess your sin and hope you don't get burned in hell :)

3. I want to talk with The Devil. No, not with that lowly devil, I shoot for the big one. Yeah, who else, with the great Lucifer itself. In fact, I do have an imaginary chat session with Lucifer

Lucifer: Knock knock, big boy ;)
me: Oh damn, here you are. Welcome...
Lucifer: Still serving Him?
me: Do I have other choice?
Lucifer: Shit man, you have OTHER choice...just follow me...
me: sounds good, what do you offer, anyway?
Lucifer: You ask me what I will offer? Don't you know that I offer this whole world to Jesus when I met Him on the desert?
me: Ah yes, you offer Him this world. Same thing you want to offer now?
Lucifer: Of course, what else do you want?
me: No, thanks. This world is just full with lies. I can't handle a bag of lies, and now...you want to hand me a "globeful" of lies? That ruins my day...
Lucifer: Smart answer, johny boy. OK, I must go now, catch you later...
me: yeah, don't forget to close the door, will you..?
Lucifer: Which door? Oh yeah, that "door", the door between human and its dark side. I'll just leave it open, so I can sneak it anytime..
me: whatever....

4. Thinking about girls. Don't think dirty, ok? I think it is normal, male think about sex in every hour of his life, so it's like a second nature :) An ideal girl is like combination of Jessica Alba + Shakira + Beyonce Knowles + Zhang Zi Yi, put them together inside a body and you won't blink even slight second looking this female :)) Woohoo ....

5. I think I need to plan for another cinema visit. "Ultraviolet" is now playing in cinemas and it is directed by Kurt Wimmer, same guy who directed "Equilibrium", one of my all time favourite movie. I read that Kurt invents another style of fight. That must be good, because he did the same thing and invents Gun Kata. Another interesting thing is, Mila Jovovich is the leading actress. I don't know why Kurt pick her but I heard Kurt wrote the script to suit Mila's character. Either Mila is so charming or Mila is a potential actress, I dunno.. Let's find out once I watch it.

So, that's it my friend, 5 possible answers I might give you when you ask what I do on 1:17 AM. Maybe I give you one answer, two, three or five, nobody knows. It is called randomness, enthrophy, chaos. You can't predict my mine, I can't predict yours, so we are both in a complex random situation...

I must end this before you get heart attack...ciao.....

regards,

Mulyadi.

25 October 2005

Jokes from IRC world..... :)

Dear readers :)

As you know, anything can be found in IRC. Serious talk, jokes, sex, politics, religion, anything you can spell between A and Z, it's all there :)

For me, IRC is like a virtual pub or cafe. I meet new people there, discuss computer stuff, brain storming, or simply just sit and do nothing...hahaha :)

two days, I visited #qemu channel on irc.freenode.net. This channel is the place to talk about Qemu, an open source emulator. I usually visit this channel to hear about latest issues, recent development or helping some folks with installation/runtime problem.

You think this channel is full with geek who can only code? Check this out :) it's a fragment of my qemu channel's log. filip2307 is Filip Navara, my remote friend from Czech republic..and malc...I dunno where he comes from :) The_hydra is /me FYI ( a bit scary nick name, eh?). Both malc and filip are frequent contributor for Qemu project. One word to describe them: GENIUS!

-------------------------------------------------------------------------------------
filip2307: geez ... who have invented the "hugetlbfs" name?! it's almost as readable as random letters...
the_hydra: hehe
the_hydra: =))
*** h7-25 has left #qemu
malc_: filip2307: you are spoiled by win32api with imaginative names like ntqueryprocessinformationtokenmyass..
-------------------------------------------------------------------------------------

I don't know if malc is just trying to put some laugh or he is just frustated with WinAPI naming :) Seems it is the latter one :)))))

Another funny quote:
-------------------------------------------------------------------------------------
filip2307 has quit IRC ("There are three important things in man's life: His birth, his first love and the day when he tastes cheesecake..")
-------------------------------------------------------------------------------------

Too bad it was a bit late to ask Filip, why the hell tasting cheesecake is so important? :)) I agree about first love, but cheesecake? Come on......

And last, I showed Filip my blog and he said (I rewrite this purely from my volatile RAM inside my brain, so surely something is different than the original on)

"Wow, I never saw so many "gw". Indonesian word is funny"

He thought, "gw" here is "gateway". After I told him it means "me", he began to scratch his head :)))

Keep the jokes coming dude....it makes our live colourful :)

regards

Mulyadi

15 October 2005

Experiencing OOM (Out Of Memory) for the first time....

Hello Folks...

WARNING: DON'T TRY THIS TRICK ON YOUR PRODUCTION SERVER OR YOUR LOVELY WORKSTATION, AS THIS COULD LEAD TO DATA CORRUPTION. IF YOU REALLY WANT TO KNOW WITHOUT TAKING RISK, DO IT ON UNUSED PC OR INSIDE VIRTUAL MACHINE (EG: VMWARE)! I DON'T TAKE ANY RESPONSIBILIY FOR ANY DAMAGE THAT MIGHT HAPPEN. YOU'VE BEEN WARNED!

In the middle of writing my next article for CHIP, I am courious of one thing...that is "What will happen if mount an tmpfs based directory which has size way bigger than RAM+Swap and copy a huugeee file there"?. Pushed by courisity, I decide to test it.

First, here is how to create the "tmpfs" directory:
# mount -t tmpfs -o size=3G tmpfs /mytmpfs

You don't need to precisely use "3G". Just use any number that actually bigger than your RAM+swap. If you got trouble on determining your RAM + swap size, simply use "top" and check the related entries.

Confirm it via "df -h" that our new directory is actually mounted and the size is correct. Now, you need a big file, preferrably has same size like your new tmpfs directory. Don't have one? "dd" comes to rescue :)
# dd if=/dev/zero of=./coba.saja bs=1k count=1572864

That will roughly create a 1.5Gigabyte filled with zeros :) For final touch, copy it to "mytmpfs"
# cp ./coba.saja /mytmpfs

Just sit and enjoy the show. To bring more thrill, fire up "top" and watch your RAM and swap are slowly occupied by our giant file. Then, sooner or later, your Linux system will "freeze". It's not actually frozen. What really happens here is a race between kswapd (which tries to clear up RAM so you can put the file there) and "cp" (which tries to put the file there).

Your tasks are practically forced to swap out and this creates "frozen" effect. Why? because, in order to run, your application needs to be paged in..and that means, forcing kswapd to swap in the related pages and possibly swapping out pages which belongs to non active task. So. it's like:
your apps --> go to-> RAM < -- go to < -- your giant file

eventually, RAM and your swap is almost full. I said almost, because Linux kernel always reserve some pages for certain needs and these pages is non allocatable for user space applications. At this time, OOM(Out of Memory) killer kicks in! Sorry, I can't give you the screenshot :) In my PC, it wildly killed my X Session :) Thanks God, I only fired up several xterm and OpenOffice. Funny thing is, mpg123 is still playing (in "rap" mode...you know what I mean? ;) )

"can I choose which task I should kill in thise situation". Quick answer "No you can". Linux OOM killer employs simple algorithm that will kill an application which does the latest memory allocation. As you can see here, this isn't always a correct decision. But memory hogging tends to chew every single pieces of your RAM until last moment, so OOM killer is practically usable here.

Want another slow memory eater? try this
# tail -f /dev/zero

Until next time...until then, try to Google about "VM overcommit" for preventive solution :)

regards

Mulyadi

23 June 2005

Batman Begins (2)

The story: Bruce Wayne, the only son of Thomas Wayne, a multi billionaire man of Gotham city, seek a way to revenge the death of his parents and to bring justice to the criminals. In the end, Batman must face his mentor, Rash Al Gul, who he believed is already dead, but now turned into criminal mastermind. Batman did great job to save Gotham city and "introduce" a new kind of fear to the bad guys. Also the start of cooperation between Comissioner Gordon and Batman.

The Good guys:

- Bruce Wayne (played by Christian Bale). Replacing his father, he is now the owner of Wayne Enterprise. With the intense training by Rash Al Gul, the leader of League of The Shadows on the top of the moutains on Tibet and awesome tools created by Lucius Fox, he is also known as Batman

- Alfred (played by Michael Caine). The loyal servant of Wayne family. We can consider Alfred as bruce's step father, because he is the one who guide and teach Bruce about the meaning of life and takes care of him, even in the bad times. Great job Alfred !

- Commisioner Gordon. You know the sentence "Good cop bad cop"? Well, this is the example of "good cop" sorrounded by "bad cop". Also a friend of Bruce's father, he is the one who in charge on the security of Gotham City.

- Lucius Fox (played by Morgan Freeman). One of ex directors in Wayne Enterprise, he is the one who creates lots of batman's gadget. When Bruce Wayne wants to visit "applied science department", there he met Lucius Fox. Bruce finds out that Lucius is indeed a good man, so he appointed Lucius as the president director of Wayne enterprises.

- Rachel Dawes. Bruce's close girl friend. well, you can say, girl-friend and also girlfriend. She is also the general attourney on Gotham City, replacing his dead boss (the previous general attourney). She thought Bruce was dead after missing without single news for 7 years. So, when Bruce is back...well, the romance is once again started...

The Bad Guys

- Rash Al Gul. Well, this man ...if I am allowed to say...is in gray area. But, since at the end, he becomes batman's enemy, I can say the he is a bad guy. Shame actually, since he is also the one who trained Bruce Wayne, specifically, in martial art and self control. Rash has crazy plan, to wipe out Gotham city with nerve gas which can bring total hallucination

- Dr Crane aka Scare crow. he is a psychologist, but he is also as crazy as his patients on Arkham's mental house. This guy loves to wear a scare crow mask while spraying a nerve gas, so whoever inhale this gas will see him as a scary monster. euff.. bad boy...

- Chill. A low level bastards who killed Bruce's parents. Eventually, he was shot after a trial by Falcone's man.

- Falcone. A high level criminal of Gotham City. Pity, he is also a victim of Dr Crane.... he is the first target of Batman in the early days.


The gadget

- Batmobile. A-W-E-S-O-M-E. This 7 letters word is the right word to describe Batman's ride. Designed as all terrained vehicle, previously prototyped by Lucius Fox as military vehicle. re-painted with black paint, equipped with many weapons (I only saw missiles, but I am not 100% sure), GPS control, after-burner. truly strong body, it can easily crush concrete walls, smash ordinary cars...and hey, it jumps too!

- batarang. A throwing weapon, crafted like a bat.

- Gun-robe (this is just how I name it). Shoot it, a long robe with spear head burst out. Batman use it to hook on ceilings, building walls, pilars etc to "fly". In the final scene, gun-robe is used to hook on the monorail used by Rash.

- Super camera. I don't know the exact name :) With this camera, batman can see through the wall. I believe this camera is also an infra red camera, so batman can see clearly in the dark.

The fight

I didn't see such a genius martial art choreography here....but perhaps a duel scene between Bruce and Rash sorrounded by black ninjas for the "graduation test" could be considered "nice". Sword play, hand to hand combat...not bad. Christian Bale seems already grab sufficient training during the making of Equillibrium, his previous movie. There, he did gun kata....


The visual effect

I can say, Batman Begins is minimalist about f/x. Everything is done with "real shot". However, the air view of Gotham City...i believe this is a CGI. And the bats? Not sure, maybe it is f/x too. Batmobile? it is real dude ! :) but of course, you won't find it armed with missile on the reality

22 June 2005

"Batman Begins"...I always love the way it's started.....

Hello guys, long time no see...

Yeah, as you might guess, this is a quick recap about the latest movie I watched this afternoon, Batman Begins. First impression, great ! The producer and director did a brilliant job to give a new style to tell the story about this midnight warrior with dark suit. Previously, I thought that only Joel Schumacher who can do such a job, but I was wrong...as it is proven by this movie. Anyway, the distributor (and the capital funder) is still Warner Brothers.... the big company behind block buster movies such as matrix (1,2,3), previous series of Batman. Sorry, i forgot the other titles :)

So, why I said "i love the way it's started?" Every super hero in comics has a beginning. This beginning, should we say in other word, background, motivation, reasons, every word you can imagine with more or less similar meaning, tells us how an ordinary man turns into a hero. In this case, Batman is exceptional. Not because his suit nor his tools, but if we look closely, he is hero with no superpower. And also, Bruce Wayne, start his double life as Batman to revenge the death of his parents. This transformation journey, from a man turns into "the fear for criminals", is truly a long, exhausted, thrilling, scary adventure (should I add another pathethic adjective?). personally, I would call Bruce Wayne a soft "psycho". But in the other hand, he can drive this mad aspect for good intention.

Everyone in his/her life, sometimes triggered by an event or occassion, turns into "something else". Not physically of course, but mentally. This could be a good news, but sometimes it becomes a bad news ( very bad sometimes, as you can see in nut house). The way I see it, it is somekind of the challenge of life. The difficulty level...well, entirely depends on your perceptions. For example, as we see on Bruce Wayne, he turns his deep anger into a motivation to uphold the justice. You, of course, possibly take another solution if you are at the same position like Bruce.

The conclusion is, fancy tools of Batman attract me too, but looking at transformation phase from Bruce Wayne into Batman brought the biggest interest of mine. I tried to take several important points from this kind of movie, hopefully to make me into a better person. And I hope, you too could learn something from this capped crusader-bat suited hero named "Batman".

PS: I love this quote "You must first defeat your own fear....." and this "I choose bat as symbol, because I want to share my fear with my enemies".

NB: "Didn't you get my memo?" :) Damn you Morgan, this is the funniest word I ever heard through out your film history :)

regards

Mulyadi

How to execute multiple commands directly as ssh argument?

 Perhaps sometimes you need to do this: ssh user@10.1.2.3 ls It is easy understand the above: run ls after getting into 10.1.2.3 via ssh. Pi...