-
Notifications
You must be signed in to change notification settings - Fork 92
Home
Welcome to guider wiki!
- What is guider?
Do you struggle to improve system performance or to find root cause that makes system abnormal?
Guider is made to measure amount of system resource usage and to trace system behavior.
You can analyze your performance issues effectively with this tool.
Guider pursues three characteristics as bellow.
1. easy to use: just run without installation or setting
2. measure correctly: time in ms, size in MB
3. integrate features: show as much information as possible
Document are available.
- Introducing guider (https://github.com/iipeace/guider/files/1149974/guider_20170715.pdf)
- Introducing guider (http://events.linuxfoundation.org/sites/events/files/slides/guider_20170715.pdf)
- How to use
Input command as bellow to start accurate profiling in thread mode
# guider.py record
Input command as bellow to start realtime profiling in top mode
$ guider.py top
Input "Ctrl + c" key to finish profiling
Input command as bellow to see more examples
$ guider.py -h -a
- Options
[record mode]
top [top]
record [thread]
record -y [system]
record -f [function]
record -F [file]
view [page]
[control mode]
list
start|stop|send [pid]
[record options]
-e [enable_optionsPerMode:bellowCharacters]
[function] {m(em)|b(lock)|h(eap)|p(ipe)|g(raph)}
[thread] {m(em)|b(lock)|i(rq)|l(og)|n(et)|p(ipe)|r(eset)|g(raph)|f(utex)}
[top] {t(hread)|d(isk)|w(fc)|W(chan)|s(tack)|m(em)|I(mage)|g(raph)|r(eport)|f(ile)}
-d [disable_optionsPerMode:bellowCharacters]
[thread] {c(pu)}
[function] {c(pu)|u(ser)}
[top] {r(ss)|v(ss)}
-s [save_traceData:dir/file]
-S [sort_output:c(pu)/m(em)/b(lock)/w(fc)/p(id)/n(ew)/r(untime)]
-u [run_inBackground]
-W [wait_forSignal]
-R [record_repeatedly:interval,count]
-b [set_bufferSize:kb]
-D [trace_threadDependency]
-t [trace_syscall:syscalls]
-T [set_fontPath]
-H [set_functionDepth]
-j [set_reportPath:dir]
-U [set_userEvent:name:func|addr:file]
-K [set_kernelEvent:name:func|addr{:%reg/argtype:rettype}]
-C [set_commandScriptPath:file]
-w [set_customRecordCommand:BEFORE|AFTER|STOP:file:value]
-x [set_addressForLocalServer:{ip:}port]
-X [set_requestToRemoteServer:{req@ip:port}]
-N [set_addressForReport:req@ip:port]
-n [set_addressForPrint:ip:port]
-m [set_objdumpPath:file]
[analysis options]
-o [save_outputData:dir]
-P [group_perProcessBasis]
-p [show_preemptInfo:tids]
-l [set_addr2linePath:files]
-r [set_targetRootPath:dir]
-I [set_inputValue:file|addr]
-q [configure_taskList]
-L [convert_textToImage]
[common options]
-a [show_allInfo]
-Q [print_allRows]
-i [set_interval:sec]
-g [set_filter:comms|tids{:file}]
-A [set_arch:arm|x86|x64]
-c [set_customEvent:event:filter]
-E [set_errorLogPath:file]
-v [verbose]
-
Mode
-
Thread mode
[Thread Info] [ Elapsed: 2.050 ] [ Start: 2849868.198 ] [ Running: 112 ] [ CtxSwc: 3357 ] [ LogSize: 4054 KB ] [ Unit: Sec/MB/NR ] ========================================================================================================================================================== __________Thread Info___________|_____________CPU Info______________|______SCHED Info______|________BLOCK Info________|_____________MEM Info_____________| | | | | | Name( Tid/ Pid)|LF|Usage( %)|Delay( Max)|Pri| IRQ | Yld| Lose|Steal| Mig| Read( MB/ Cnt)|WCnt( MB)| Sum(Usr/Buf/Ker)|Rcl|Wst|DRcl(Nr)| ========================================================================================================================================================== # CPU: 12 CORE/0(-----/-----)|--| 0.00( 0.1)| 0.00( 0.00)| 0| 0.00| 7| -| -| -| 0.00( 0/ 1)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/1(-----/-----)|--| 0.00( 0.1)| 0.10( 0.00)| 0| 0.00| 147| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/2(-----/-----)|--| 0.00( 0.1)| 0.16( 0.00)| 0| 0.00| 211| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/3(-----/-----)|--| 0.00( 0.1)| 0.11( 0.00)| 0| 0.00| 181| -| -| -| 0.00( 0/ 0)| 32( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/4(-----/-----)|--| 0.00( 0.1)| 0.11( 0.00)| 0| 0.00| 232| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/5(-----/-----)|--| 0.30( 14.8)| 0.18( 0.00)| 0| 0.00| 179| -| -| -| 1.26( 6/ 495)| 19( 0)| 61( 57/ 0/ 3)| 0| 0|0.00( 0)| CORE/6(-----/-----)|--| 0.00( 0.0)| 0.35( 0.00)| 0| 0.00| 57| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/7(-----/-----)|--| 0.00( 0.0)| 0.60( 0.00)| 0| 0.00| 100| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/8(-----/-----)|--| 0.00( 0.0)| 0.44( 0.00)| 0| 0.00| 59| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/9(-----/-----)|--| 0.00( 0.0)| 1.94( 0.00)| 0| 0.00| 37| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/10(-----/-----)|--| 0.07( 3.4)| 0.00( 0.00)| 0| 0.00| 2| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| CORE/11(-----/-----)|--| 0.00( 0.0)| 2.05( 0.00)| 0| 0.00| 39| -| -| -| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| ---------------------------------------------------------------------------------------------------------------------------------------------------------- # Hot: 4 synergyc( 3604/ 3602)| | 0.17( 8.5)| 0.00( 0.00)| 0| 0.00| 3| 14| 3| 0| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| arm-starfish-li(16087/16087)| | 0.13( 6.3)| 0.00( 0.00)| 0| 0.00| 0| 20| 157| 4| 1.26( 6/ 496)| 0( 0)| 61( 57/ 0/ 3)| 0| 0|0.00( 0)| guider(16088/16088)| | 0.07( 3.4)| 0.00( 0.00)|R90| 0.00| 2| 0| 2| 0| 0.00( 0/ 0)| 0( 0)| 0( 0/ 0/ 0)| 0| 0|0.00( 0)| ----------------------------------------------------------------------------------------------------------------------------------------------------------
This is a main output in thread mode.
User can analyze resource usage of threads accurately.[CPU Info] section includes bellow information.
Usage: cpu time(ms) that a thread has been running
Delay: total time(ms) that a thread has been being preempted
Pri: highest priority that a thread has been running at
IRQ: cpu time(ms) that a thread has been running in interupt context[SCHED Info] section includes bellow information.
Yld: yield number
Lose: preempted number
Steal: preemption number
Mig: migration number[BLOCK Info] section includes bellow information.
Read: total time(ms) that a thread has been being blocked for disk read
MB: total size(MB) that a thread has been reading from disk
Cnt: total number that a thread has been reading from disk
WCnt: total number that a thread has been writing to disk
MB: total size(MB) that a thread has been writing to disk[MEM Info] section includes bellow information.
Sum: total size(MB) that a thread has been allocating to memory(PAGE)
Usr: user-space size(MB) that a thread has been allocating to memory(PAGE)
Buf: page cache size(MB) that a thread has been allocating to memory(PAGE)
Ker: kernel-space size(MB) that a thread has been allocating to memory(PAGE)
Rcl: total size(MB) that a thread has been being reclaimed by other threads
Wst: wasting size(MB) that a thread has been allocating to memory(PAGE) in kernel space
Drcl(Nr): total time(ms) and number that a thread has been reclaiming directly
+ Interval Info [-i option] `````````````````````````````````````````` [Thread Interval Info] [ Unit: 1 Sec ] ========================================================================================================================================================== Name( Tid/ Pid): 1 2 2.05 ========================================================================================================================================================== # Total(%/MB/Cnt) CORE/0( 0/-----): 0 0 0 CORE/1( 0/-----): 0 0 0 CORE/2( 0/-----): 0 0 0 CORE/3( 0/-----): 0 0 0 CORE/4( 0/-----): 0 0 0 CORE/5( 0/-----): 20 8 5 CORE/6( 0/-----): 0 0 0 CORE/7( 0/-----): 0 0 0 CORE/8( 0/-----): 0 0 0 CORE/9( 0/-----): 0 0 0 CORE/10( 0/-----): 6 0 0 CORE/11( 0/-----): 0 0 0 MEM( 0/-----): 15 44 1 BLK_RD( 0/-----): 3 3 0 BLK_WR( 0/-----): 0 0 0 ---------------------------------------------------------------------------------------------------------------------------------------------------------- # CPU(%) synergyc( 3604/ 3602): 17 0 0 arm-starfish-li(16087/16087): 4 8 5 guider(16088/16088): 6 0 0 KnottyUI(15896/15896): 0 0 0 ---------------------------------------------------------------------------------------------------------------------------------------------------------- # Delay(%) arm-starfish-li(16087/16087): 0 0 0 ---------------------------------------------------------------------------------------------------------------------------------------------------------- # MEM(MB) arm-starfish-li(16087/16087): 15 44 1 guider(16088/16088): 0 0 0 ---------------------------------------------------------------------------------------------------------------------------------------------------------- # BLK_RD(MB) arm-starfish-li(16087/16087): 3 3 0 Plex Media Serv( 2965/ 2956): 0 0 0 ---------------------------------------------------------------------------------------------------------------------------------------------------------- # BLK_WR(MB) Plex Media Serv( 2965/ 2956): 0 0 0 ---------------------------------------------------------------------------------------------------------------------------------------------------------- `````````````````````````````````````````` This is interval output about resource usage in thread mode. User can analyze resource usage of threads in each specific seconds. + Graph Info ![guider_interval](https://cloud.githubusercontent.com/assets/15862689/23349234/a6894a6a-fcf4-11e6-911f-7d2df9e1d571.png) This is graphical output about resource usage in thread mode. User can analyze resource usage of threads in graphical image. [option] -i -e g + IRQ Info ![guider_irq](https://cloud.githubusercontent.com/assets/15862689/20255747/77924e1a-aa82-11e6-8c04-75f5c9aac883.jpg) This is output about interrupt details in thread mode. [option] -e i + Syscall Info ![guider_syscall](https://cloud.githubusercontent.com/assets/15862689/20255853/3f2bc7bc-aa83-11e6-9797-bf2c97b9296c.jpg) This is output about system call details in thread mode. [option] -t + Module Info ![guider_module](https://cloud.githubusercontent.com/assets/15862689/20256663/487f34a2-aa88-11e6-97fe-3afeac89757c.jpg) This is output about kernel module details in thread mode. + Creation Info ![guider_creation](https://cloud.githubusercontent.com/assets/15862689/20255890/889ea4aa-aa83-11e6-84d5-de2561503be5.jpg) This is output about thread creation details in thread mode. User can analyze thread tree and wait time that a parent thread waits its child threads. [option] -a + Preemption Info ![guider_preempt](https://cloud.githubusercontent.com/assets/15862689/20256349/443d0754-aa86-11e6-8a89-2c51080e6f14.jpg) This is output about preemption details in thread mode. User can analyze which threads had preempted a specific thread. [option] -p + Signal Info ![guider_signal](https://cloud.githubusercontent.com/assets/15862689/20256281/c6cd2790-aa85-11e6-82cf-9045e4147b32.jpg) This is output about signal traffic in thread mode. [option] -a + Dependency Info ![guider_dependency](https://cloud.githubusercontent.com/assets/15862689/20256536/94d1c154-aa87-11e6-9460-8c75cdc32336.jpg) This is output about dependency of each threads in thread mode. [option] -D
- Function mode
This is output about thread list profiled in function mode.
User can select specific threads (with -g option) and analyze its resource usage by function.
But symbol of die threads will not shown.
[option] -f
+ CPU Info ![guider_func_cpu](https://cloud.githubusercontent.com/assets/15862689/20332586/2d5cd990-abf0-11e6-979c-cd172a9a63bc.jpg) This is output about cpu usage of specific threads by function in function mode. + Mem Info ![guider_func_mem](https://cloud.githubusercontent.com/assets/15862689/20332585/2d5939b6-abf0-11e6-9c6e-e785f8265667.jpg) This is output about memory usage of specific threads by function in function mode. [option] -e m + Heap Info ![guider_func_heap](https://cloud.githubusercontent.com/assets/15862689/20266080/c317323a-aab7-11e6-95a8-3b7391cf847d.jpg) This is output about heap usage of specific threads by function in function mode. [option] -e h + Block Info ![guider_func_block](https://cloud.githubusercontent.com/assets/15862689/20256056/7bf12696-aa84-11e6-9ee5-6bed7244f030.jpg) This is output about disk(block) usage of specific threads by function in function mode. [option] -e b
-
Top mode
This is output about resource usage of processes profiled in top mode.
User can analyze resource usage of process / thread(with -e t) in real-time.
[option] top
This is output about file usage of system profiled in top mode.
User can analyze file usage of system.
[option] top -e f
This is output about summarized resource usage of system profiled in top mode.
User can analyze summarized resource usage of system.
[option] top -o
This is a graph about resource usage of system profiled in top mode.
User can analyze resource usage of process / thread(with -e t) by graph.
[option] top -I [output file] -e g -
File mode
This is output about file usage of processes profiled in file mode.
User can analyze file usage (on-memory) of process.
[option] -F -
System mode
This is output about system information in system mode.
[option] -y
-