- Define the program to monitor:
sudo su
echo -n wget > /sys/kernel/debug/pt_monitor
wget www.google.com
- Collect PT trace
cp /var/log/pt.log pt.log
- Stop PT tracing
echo -e "\x00" | tee /sys/kernel/debug/pt_monitor
Our PT tracing is built atop ARCUS.
Also, note that the following commands need the sudo
privilege, in which case python is the root user's python3 environment.
- Start PT tracing
cd runtime-monitoring/trace
sudo python tracer.py trace_output wget www.google.com
- Stop PT tracing and collect PT traces
cd runtime-monitoring/trace
sudo python tracer.py --collect trace_output wget www.google.com