Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
2 years ago | |
|---|---|---|
| .github | 2 years ago | |
| doc | 2 years ago | |
| prompts | 2 years ago | |
| .gitignore | 2 years ago | |
| GPTtrace.py | 2 years ago | |
| LICENSE | 2 years ago | |
| README.md | 2 years ago | |
| install.sh | 2 years ago | |
| requirements.txt | 2 years ago | |
Generate eBPF programs and tracing with ChatGPT and natural language
BCC, libbpf styles.For detail documents and tutorials about how we train ChatGPT to write eBPF programs, please refer to: https://github.com/eunomia-bpf/bpf-developer-tutorial (基于 CO-RE (一次编写,到处运行) libbpf 的 eBPF 开发者教程:通过 20 个小工具一步步学习 eBPF(尝试教会 ChatGPT 编写 eBPF 程序)
$ ./GPTtrace.py
usage: GPTtrace [-h] [-i | -v | -e TEXT | -g TEXT] [-u UUID] [-t ACCESS_TOKEN]
Use ChatGPT to write eBPF programs (bpftrace, etc.)
optional arguments:
-h, --help show this help message and exit
-i, --info Let ChatGPT explain what's eBPF
-v, --verbose Print the prompt and receive message
-e TEXT, --execute TEXT
Generate commands using your input with ChatGPT, and run it
-g TEXT, --generate TEXT
Generate eBPF programs using your input with ChatGPT
-u UUID, --uuid UUID Conversion UUID to use, or passed through environment variable `GPTTRACE_CONV_UUID`
-t ACCESS_TOKEN, --access-token ACCESS_TOKEN
ChatGPT access token, see `https://chat.openai.com/api/auth/session` or passed through
`GPTTRACE_ACCESS_TOKEN`
Conversion ID from ChatGPT, and then set it to the environment variable GPTTRACE_CONV_UUID or use the -u option. The Conversion ID is the last part of the URL of the conversation, for example, the Conversion ID of https://chat.openai.com/conv/1a2b3c4d-0000-0000-0000-1k2l3m4n5o6p is 1a2b3c4d-0000-0000-0000-1k2l3m4n5o6p(example, not usable).access token from ChatGPT, and then set it to the environment variable GPTTRACE_ACCESS_TOKEN or use the -t option. see https://chat.openai.com/api/auth/session for the access token.TODO
./GPTtrace -e "Count page faults by process"
./install.sh
MIT
Generate eBPF programs and tracing with ChatGPT and natural language
Markdown Python Text Shell