1
by Colin King
Import upstream version 0.3 |
1 |
Introduction
|
2 |
------------
|
|
3 |
||
4 |
The purpose of idlestat is to measure how long we have been in the different |
|
5 |
idle and operating states. |
|
6 |
||
7 |
Idlestat uses kernel's FTRACE function to monitor and capture C-state and |
|
8 |
P-state transitions of CPUs over a time interval. It extracts the following |
|
9 |
information from trace file: |
|
10 |
- Times when CPUs entered and exited a certain C-state
|
|
11 |
- Times when CPUs entered and exited a certain P-state
|
|
12 |
- Raised IRQs
|
|
13 |
||
14 |
Following a successful run, idlestat calculates and reports the following |
|
15 |
information: |
|
16 |
- Total, average, minimum and maximum time spent in each C-state,
|
|
17 |
per-CPU. |
|
18 |
- Total, average, minimum and maximum time spent in each P-state,
|
|
19 |
per-CPU. |
|
20 |
- Total, average, minimum and maximum time during which all CPUs in
|
|
21 |
a cluster were in the same C-state, per-cluster. |
|
22 |
- Number of times a certain IRQ caused a CPU to exit idle state,
|
|
23 |
per-CPU and per-IRQ |
|
24 |
||
25 |
Requirements
|
|
26 |
------------
|
|
27 |
||
28 |
1. It must be run as root in order to access /sys/kernel/debug.
|
|
29 |
2. It requires tracing to be enabled in the kernel
|
|
30 |
||
31 |
Help
|
|
32 |
----
|
|
33 |
./idlestat -h will show all the options |
|
34 |
||
35 |
Example Usage
|
|
36 |
-------------
|
|
37 |
||
38 |
Trace mode: |
|
39 |
sudo ./idlestat --trace -f /tmp/myoutput -t 10 |
|
40 |
||
41 |
Reporing mode (/tmp/mytrace already contains traces): |
|
42 |
sudo ./idlestat --import -f /tmp/mytrace |