Skip to content
Peace Lee edited this page Aug 14, 2017 · 81 revisions

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

    1. Thread mode
      guider_main This is 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
      Prio: highst 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
      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: total time(ms) that a thread has been reclaiming directly

    +  Interval Info    
        ![guider_interval](https://cloud.githubusercontent.com/assets/15862689/14590631/b91d82de-053a-11e6-811a-898eea9f8669.jpg)    
        This is interval output about resource usage in thread mode.    
        User can analyze resource usage of threads in each specific seconds.    
        [option] -i    
    
    +  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    
    
    1. Function mode
      guider_func_thread
      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    
    
    1. Top mode
      guider_top
      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

      guider_filetop
      This is output about file usage of system profiled in top mode.
      User can analyze file usage of system.
      [option] top -e f

      guider_top_summary
      This is output about summarized resource usage of system profiled in top mode.
      User can analyze summarized resource usage of system.
      [option] top -o

      guider_top_graph
      guider_top_chart
      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

    2. File mode
      guider_file
      This is output about file usage of processes profiled in file mode.
      User can analyze file usage (on-memory) of process.
      [option] -F

    3. System mode
      guider_system
      This is output about system information in system mode.
      [option] -y

Clone this wiki locally