mirror of
https://github.com/pi-hole/docs.git
synced 2024-12-06 19:27:12 +01:00
Merge pull request #847 from pi-hole/tweak/valgrind
Tweaks for the valgrind guide
This commit is contained in:
+16
-2
@@ -44,13 +44,27 @@ They'll automatically be re-added when using `sudo service pihole-FTL start` nex
|
||||
We suggest the following one-liner to run `pihole-FTL` in `memcheck`:
|
||||
|
||||
```
|
||||
sudo rm /dev/shm/FTL-*; sudo valgrind --trace-children=yes --leak-check=full --track-origins=yes -s /usr/bin/pihole-FTL &> valgrind.log
|
||||
sudo service pihole-FTL stop && sudo setcap -r /usr/bin/pihole-FTL
|
||||
sudo valgrind --trace-children=yes --leak-check=full --track-origins=yes --log-file=valgrind.log -s /usr/bin/pihole-FTL
|
||||
```
|
||||
|
||||
If you compile FTL from source, use
|
||||
|
||||
```
|
||||
sudo rm /dev/shm/FTL-*; ./build.sh && sudo valgrind --trace-children=yes --leak-check=full --track-origins=yes -s ./pihole-FTL &> valgrind.log
|
||||
sudo service pihole-FTL stop && sudo setcap -r /usr/bin/pihole-FTL
|
||||
./build.sh && sudo valgrind --trace-children=yes --leak-check=full --track-origins=yes --log-file=valgrind.log -s ./pihole-FTL
|
||||
```
|
||||
|
||||
The most useful information (about which memory is *possibly* and which is *definitely* lost) is written to `valgrind.log` at the end of the analysis. Terminate FTL by running:
|
||||
|
||||
```bash
|
||||
sudo kill -TERM $(cat /var/run/pihole-FTL.pid)
|
||||
```
|
||||
|
||||
and immediately restart it (and fix permissions) using
|
||||
|
||||
```bash
|
||||
sudo service pihole-FTL start
|
||||
```
|
||||
|
||||
The used options are:
|
||||
|
||||
Reference in New Issue
Block a user