1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 This is APC - graphical CPU load meter.
4 It is more suitable/accurate in situations where applications generate
5 "short" bursts of activity and the frequency of said bursts divides
6 kernel HZ value evenly.
8 Kernel can use variety of values for HZ (most frequent: 100 250 1000)
10 PAL/SECAM video frame grabbers do so with 25/50 FPS frequency, if the
11 pulse leads to some application deciding to burn CPU (putting the
12 frame on the screen, encoding it, etc) chances are good that the load
13 you will see in top(1) (or anything `/proc/stat' based) would not
14 represent reality accurately. Ditto for plain video clips.
16 If you depend on sorta-kinda semi-correct load meter in those
17 conditions APC might present a better choice.
19 The kernel module part of APC measures how much time is spent
20 executing idle kernel function - this information is represented by
21 yellow color, values obtained via `/proc/stat' are represented by red.
23 You can use `-help' command line option to get a brief overview of
28 Linux 2.4.30 - AMD Athlon(tm) Processor (1.4 Ghz)
29 Linux 2.6.17.6 - AMD Athlon(tm)64 X2 Dual Core Processor 3800+
30 Linux 2.6.28 - AMD Athlon(tm)64 3800+
32 It's possible that RMClock[1] does something similar(load measuring
33 wise) on Microsoft Windows.
35 [1] http://cpu.rightmark.org/products/rmclock.shtml
37 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38 To build you will need:
40 OCaml - http://caml.inria.fr/ocaml/
41 LablGL - http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html
42 (and by extension some OpenGL implementation)
43 GCC - http://gcc.gnu.org/
45 Plus all what is required to build a kernel module.
49 <untar and go to directory with sources>
52 $ su -c 'insmod ./its.ko' - 2.6 Kernels
53 $ su -c 'insmod ./its.o' - 2.4 Kernels
55 If the module fails to load consult dmesg(8). Most likely cause is the
56 lack of exported `default_idle' function and no specific power
57 management idle function is specified. Few workarounds follow:
60 Add `idle=halt' to the kernel command line (method depends on the
61 boot-loader) and reboot.
64 ------------------------------------------------------------------
66 $ func=$(awk '/default_idle$/ {print "0x" $1}' /proc/kallsyms)
67 $ su -c "insmod ./itc.ko idle_func=$func"
69 ------------------------------------------------------------------
71 $ func=$(awk '/default_idle$/ {print "0x" $1}' /proc/ksyms)
72 $ su -c "insmod ./itc.o idle_func=$func"
74 ======================================================================
76 $ major=$(awk '/ itc$/ {print $1}' /proc/devices)
77 $ su -c "mknod -m 0444 itc c $major 0"
79 [make sure you are in X]