v0.92
[apc.git] / README
blob92f191ff6e1d143cf85d2866cc4c778448d0b96a
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
24 tunable parameters.
26 Tested on[1]:
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[2]  does something similar(load  measuring
33 wise) on Microsoft Windows.
35 [1] SMP not tested on 2.4 kernels (nor QUIRK mode)
36 [2] http://cpu.rightmark.org/products/rmclock.shtml
39 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40 To build you will need:
42 OCaml  - http://caml.inria.fr/ocaml/
43 LablGL - http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgl.html
44          (and by extension some OpenGL implementation)
45 GCC    - http://gcc.gnu.org/
47 Plus all what is required to build a kernel module.
49 Process:
51 <untar and go to directory with sources>
52 $ sh build.sh
53 $ cd mod
54 $ su -c 'insmod ./its.ko' - 2.6 Kernels
55 $ su -c 'insmod ./its.o'  - 2.4 Kernels
57 If the module fails to load consult dmesg(8). Most likely cause is the
58 lack  of  exported `default_idle'    function  and no   specific power
59 management idle function is specified. Few workarounds follow:
61 Variant 1
62     Add `idle=halt' to the kernel command  line (method depends on the
63     boot-loader) and reboot.
65 Variant 2 (DANGEROUS)
66     ------------------------------------------------------------------
67     Kernel 2.6 
68     $ func=$(awk '/default_idle$/ {print "0x" $1}' /proc/kallsyms)
69     $ su -c "insmod ./itc.ko idle_func=$func"
71     ------------------------------------------------------------------
72     Kernel 2.4
73     $ func=$(awk '/default_idle$/ {print "0x" $1}' /proc/ksyms)
74     $ su -c "insmod ./itc.o idle_func=$func"
76 ======================================================================
77 $ cd ..
78 $ major=$(awk '/ itc$/ {print $1}' /proc/devices)
79 $ su -c "mknod -m 0444 itc c $major 0"
81 [make sure you are in X]
82 $ ./apc