digoal / blog

Opensource,Database,AI,Business,Minds. git clone --depth 1 https://github.com/digoal/blog
https://github.com/digoal/blog/blob/master/README.md
GNU General Public License v2.0
8.01k stars 1.89k forks source link

wsl2 run docker 跑 PG DB 並 使用 stap #104

Closed isdaniel closed 2 years ago

isdaniel commented 2 years ago

請問一下 有人使用 wsl2 run docker 跑 PG DB 並 使用 stap 嗎?

我目前在 wsl2 run docker 跑 PG DB 要使用 stap 遇到一些問題 錯誤訊息如下

root@55bcf7516fbb:/# stap -ve 'probe begin { log("hello systemtap!") exit() }'
Checking "/lib/modules/5.10.16.3-microsoft-standard-WSL2/build/.config" failed with error: No such file or directory

我看我的 uname -r 我在網路上搜索不到 相對應的 stap 版號...

root@55bcf7516fbb:/# uname -r
5.10.16.3-microsoft-standard-WSL2

因為我想要練習 調教 成本因子 但在安裝設定 stap 時遇到上面問題

我這邊有兩個問題想請教

  1. 如果要使用 wsl2 上跑 linux 要如何使用 stap
  2. windows postgresql 如果要調教 成本因子 有相關文章可以參考嗎 (我看網路上的文章大多都是說 linux 調教)
isdaniel commented 2 years ago

後面我使用 AWS ubuntu 就可以正常使用 stap 調教 成本因子了

我查了一下 貌似 windows 沒有針對 wsl2 提供 debug kernel 的 package 如果有再麻煩其他人提供連結 謝謝

digoal commented 2 years ago

是的, stap是linux下的工具