ememos / GiantVM

9 stars 9 forks source link

Simple traffic monitor(WIP) #34

Closed YWHyuk closed 2 years ago

YWHyuk commented 2 years ago

This is simple version of EPT monitoring tool. It handle a part of issue #7. This patch make kernel expose some metrics

Also, attached simple python script monitor.py. It parses metrics and report

I'll attach a example below.

$ python monitor.py
RIP:ffffffff811c409e Miss: 5388
RIP:ffffffff81440c39 Miss: 9423
RIP:ffffffff810ec4e8 Miss: 9896
RIP:ffffffff810b88c3 Miss: 128777 <down_read_trylock>
RIP:ffffffff810b8da7 Miss: 152979 <up_read>
RIP:ffffffff8144c717 Miss: 181586 <clear_page_erms>
Total 520949
YWHyuk commented 2 years ago

I think it should be another branch or introduce a new macro ex) #define MONITOR.