

One small question: are odesk.com online tests credible enough to show whether somebody is competent or not in his/her field?
A place where I share my daily experience in both technical and non technical issues. Expect to read Linux kernel related posts too.
As confirmed by laptop mode tools' changelog, my patch is finally merged into their core code. I simply contribute few line to show statistics regarding write and read frequency of every programs recorded during lm-profiler's runtime.
So, how the code looks like?
—- lm-profiler.old2009-06-03 21:12:52.000000000 +0700
+++ lm-profiler2009-06-26 21:08:54.000000000 +0700
@ -209,6 +209,11
@
done
printf ’\r \r’
stop_profiling
+
+echo “Write frequency : ”; cat $WORKDIR/write_accesses_* | sed -e ’s/[ \t]*//;s/[ \t]*$//’ -e ’/$/ d’ | sort | uniq -c | sort -n
+echo “Read frequency : ”; cat $WORKDIR/read_accesses_* | sed -e ’s/[ \t]*//;s/[ \t]*$//’ -e ’/$/ d’ | sort | uniq -c | sort -n
+echo;
+
NETPROFILE=`profilenet`
echo “Profiling run completed.”
Looks awful? I admit it. In short, it grabs files created by lm-profiler during its run time, trims out the blanks and then sort them, while at the same time showing their frequencies ascendingly.NB: Actually it's for my own reminder, but to share with you all. To easily convert text to HTML (and dealing with all those escape characters etc), you could use http://www.textism.com/tools/textile/index.php. Simply paste your text there and click the button, voila..you get the HTML-ized text!
regards,
Mulyadi
Got this quote from kernelnewbies mailing list....hehehehheheheh :D
"What happens when you read some doc and either it doesn't answer your question or is demonstrably wrong? In Linux, you say "Linux sucks" and go read the code. In Windows/Oracle/etc you say "Windows sucks" and start banging your head against the wall."
-Denis Vlasenko on lkml
PS: s/banging your head*wall/take it for granted/g is better I guess :D I believe many Linux users also bang his/her head when learning Linux for the first time. :))
Moral: just don't bang your head too hard, it hurts, you know? :D
My definition: White space characters are anything that appears as "blank" a.k.a nothing in screen. They include tab, space, carriage return and so on.
As you know, grep provides a way to catch certain characters class or range. Specifically for white spaces, you can use [[:space:]] or [[:blank:]]. Notice the double [[ and ]] !!!
So, suppose you have text file named test.txt that contains:
hehe /var/www/
hehe /var/www2/
ttt hehe /var/www3/
heho /var/www/
Executing:
$ grep ^hehe test.txt
will yield:
hehe /var/www2/
but this:
$ grep -E '^[[:blank:]]*hehe' test.txt
yields:
hehe /var/www/
hehe /var/www2/
In human words, '[[:blank:]]*' will catch zero or more appearance of space or tab before the word "hehe". If you want to catch at least single appearance of any of them, use "+" instead. Oh and let me remind you again, use -E so that "+" doesn't lose its special meaning.
Note: initially, i thought i simply use [:space:] or [:blank:] and end up in something-is-wrong-but-I-dont-know-what land. Turns out, I didn't read the man page carefully (poor me). Since they are built-in classes, I still need to enclose them with another "[" and "]". Valuable experience.....
regards,
Mulyadi.
# iptables -L -n -v | head
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 RETURN icmp -- * * 0.0.0.0/0 0.0.0.0/0
limit: avg 1/min burst 5 icmp type 8
Commit-ID: 1ad0560e8cdb6d5b381220dc2da187691b5ce124
Gitweb: http://git.kernel.org/tip/1ad0560e8cdb6d5b381220dc2da187691b5ce124
Author: Mulyadi Santosa <mulyadi.santosa@gmail.com>
AuthorDate: Sat, 26 Sep 2009 02:01:41 +0700
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 1 Oct 2009 10:12:03 +0200
perf tools: Run generate-cmdlist.sh properly
Right now generate-cmdlist.sh is not executable, so we
should call it as an argument ".".
This fixes cases where due to different umask defaults
the generate-cmdlist.sh script is not executable in
a kernel tree checkout.
Signed-off-by: Mulyadi Santosa <mulyadi.santosa@gmail.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <f284c33d0909251201w422e9687x8cd3a784e85adf7d@mail.gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
tools/perf/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index b5f1953..5881943 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -728,7 +728,7 @@ $(BUILT_INS): perf$X
common-cmds.h: util/generate-cmdlist.sh command-list.txt
common-cmds.h: $(wildcard Documentation/perf-*.txt)
- $(QUIET_GEN)util/generate-cmdlist.sh > $@+ && mv $@+ $@
+ $(QUIET_GEN). util/generate-cmdlist.sh > $@+ && mv $@+ $@
$(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
$(QUIET_GEN)$(RM) $@ $@+ && \
pagi ini buka web detik.com, ternyata ada pengumuman lomba nge-blog. So, kenapa tidak saya coba? Itung-itung berbagi pengalaman dengan sesama netters.
Pertama kali ngenet sekitar tahun 1996. Waktu itu yang namanya internet bagai barang mewah bagi masyarakat biasa seperti saya. Jumlah ISP (Internet service provider) juga masih bisa dihitung dengan jari, itupun terpusat di Jakarta atau Surabaya. Kecepatan koneksi? Hehehehe, seingat saya waktu itu modem kebanyakan masih 9600 atau 14400 bps :D Bayangkan saja seberapa lambatnya jika koneksi seperti itu sekarang digunakan untuk ngebrowse web dengan content canggih semacam flash dan berisi beberapa banner plus teknologi AJAX. Bisa-bisa kelenger :)
Jadi kesan pertama waktu itu, berinternet itu menyenangkan tapi juga butuh kesabaran. Ya sabar karena koneksinya sendiri lambat, juga kalau line teleponnya putus. Whahahha, ini yang kadang bikin dongkol. Enak-enak download, telepon masuk, putuslah sudah koneksi. Waktu itu program semacam GetRight belum saya ketahui, jadi ya udah....ulang lagi.
Oh iya lupa, sebenernya saya ini sedikit "teracuni" kakak sepupu saya. Seingat saya dulu punya bisnis BBS (Bulletin Board System) di awal tahun 1990-an. Jangan tanya saya apa itu BBS, yang saya tahu, waktu itu saya diperkenalkan ama semacam layar chatting. Saya sendiri waktu itu coba-coba chat dengan kenalan kakak sepupu. Dari situ saya mikir "wah, hebat juga BBS. mungkin suatu saat gak cuma tulisan, tapi juga suara dan video bisa lewat koneksi semacam ini". Sekarang kita lihat ini sudah jadi kenyataan. VoIP sudah mulai merakyat, video conference berbasis Internet juga banyak dipakai baik oleh perusahaan, pemerintah dan personal.
Begitu lihat layar browser, apa yang dicari? Untungnya search engine seperti Yahoo sudah exist, jadi yang dicari website soal game. Loh? Maklum pecandu game (bahkan sampai sekarang). Nyari move list karakter Mortal Kombat contohnya :)) Ya gimana lagi, waktu itu informasi semacam ini adanya di majalah game luar negeri, tapi gak kebeli. Jadi yang rada murah, ngenet dompleng fasilitas kampus. Tapi yang namanya fasilitas umum, antre nya luar biasa, hehehheheh. Jangan heran kalau kadang yang keluar cuma title halaman terus time out. Jadi ya retry lagi retry lagi.
Kalau soal chat, so pasti dicoba. Seingat saya waktu itu yang populer duluan IRC, baru Yahoo messenger. Apa hayo yang terkenal di IRC? Yup, channel #bawel di DALnet!!! :) Byeuhhhh, tuh channel bener-bener isinya orang yang kayaknya calon MC. Ada aja yang "diomelin". Belum lagi iklan dan quiz yang hilir mudik. Yang mojok? Jangan tanya :)))) Pasti ada, tapi soal ketemunya beda lawan jenis atau ternyata kena yang aspal (asli tapi palsu) ya mana tahu, wong namanya juga dunia maya
OK guys, that's my personal share today. Wanna share yours?
Ever saw something like below messages inside your KVM (Kernel Virtual Machine) guest's console?
" BUG: soft lockup - CPU#0 stuck for 10s! [swapper:0] "
I did and I find it a bit annoying. If you're inside graphical desktop like environment like KDE or GNOME, you probably won't notice it directly. But you will likely suffer the same condition, the guest OS somehow become unresponsive for a few moment. In my case, it manifest into stalled CD/DVD access and "ruins" the console display. I had to press Enter few times before I could get back to normal shell prompt. Before I go further, FYI I use Fedora 9, kernel version 2.6.27.23-xx.x.xx.fc9.i686 on a Core Duo powered laptop.
First, why the kernel shows such message? I use the default CentOS 5.3 kernel, so I check the related kernel config inside /boot directory and here is the related configuration item:
CONFIG_DETECT_SOFTLOCKUP=y
What does it do? Ingo Molnar, the writer of this lockup detection patch describe it as:
"From: Ingo Molnar
This patch adds a new kernel debug feature: CONFIG_DETECT_SOFTLOCKUP.
When enabled then per-CPU watchdog threads are started, which try to run once per second. If they get delayed for more than 10 seconds then a callback from the timer interrupt detects this condition and prints out a warning message and a stack dump (once per lockup incident). The feature is otherwise non-intrusive, it doesnt try to unlock the box in any way, it only gets the debug info out, automatically, and on all CPUs affected by the lockup.
Tested this on x86, both with the feature enabled (in which case a provoked lockup was correctly detected) and with the feature disabled. It is CPU-hotplug aware. Should work on every architecture. "
Pay attention here that the watchdog mentioned in the above description has nothing to do with NMI (Non Maskable Interrupt) watchdog. NMI watchdog deal with hard CPU lockup, while the above mentioned lockup watchdog can't. It's just a kernel thread that will stuck if CPU hangs.
I suspect it might be a bug in KVM driver (or specificly, KVM for Intel VT in my case). I came to this hypothesis because the help section of soft lockup patch says:
"Say Y here to enable the kernel to detect "soft lockups", which are bugs that cause the kernel to loop in kernel mode for more than 10 seconds, without giving other tasks a chance to run."
Great...so IMO KVM is too busy on something, or.... something is delaying KVM guest to run. I almost rush to compile my own kernel image using full preemption, hoping that it could squash the problem. But I was tempted to Google a bit more. Interesting result, a post in a mailing list (I forgot which one) suggest to set the CPU frequency into static. Let's try, I edited /etc/sysconfig/cpuspeed so the related lines become:
MAX_SPEED=1333000
MIN_SPEED=1333000
I pick that frequency because it's the middle number between the three available frequencies: 1833000, 1333000 and 1000000 Hz. So theoritically I still get adequate computing power to most job without draining the battery too soon.
Execute:
# service cpuspeed restart
Make sure it's applied correctly:
# grep '1333000' -r /sys/devices/system/cpu/
/sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq:1333000
/sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq:1333000
...
/sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq:1333000
/sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq:1333000
...
Then I ran my KVM guest again. I did few tasks in it, let it went idle, repeat and so on. During my test for about an hour, the result was promising! It became stable. Well, few lock up happened though, but it was far reduced. Thing that I notice is lockup also happens when I switch into another virtual desktop or if fairly heavy swapping in/out is on the way. So, to further reduce lock-ups, I avoid switching to another virtual desktop (ok, that sucks, but I could live with that) and close any unneccesary applications to conserve virtual memory as much as I can.
Why it works? All I can say is by making the frequency static, you also avoid timer interrupt delivery frequency being changed too. It stabilize the kernel timing and also indirectly stabilize the KVM guest timing. Previously, I was using ondemand power governor and as you might be aware of, it adapts the CPU frequency according to the load quite aggresively. So, frequency was juggling between all three available frequencies. Conservative governor didn't lend a help here. Pity, I assume KVM still force conservative governor to switch to highest frequency then drop most of the time because most of the codes could be run natively instead of being translated.
regards,
Mulyadi.
Ok, don't worry, we'll read it ASAP :) It was a post in detik.com on May 5th 2009, discussing about police investigation on a murder of a national company's director. It drew so much people's attention during mid April-May, since police has indications that Antasari Azhar, the head of Corruption Eradication Commission, is the mastermind.
Let's see what will the police's conclusion be ....
Notice the first sentence? It is written "Presidential candidate Wiranto" and so on. Hehehe, so he swaps position with Jusuf Kalla? :) The complete post is here for clarification.
http://ezine.echo.or.id/ezine20/e20_0x05.txt
I welcome your feedback and comments...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...