Trick for tailing Chia's rotated logs to watch your proof attempts

So a couple things I learned recently:

If you configure your Chia logs to be INFO level, you can then tail them and grep for “proofs” and get a nice log view of chia trying to find you blocks:

tail -f ~/.chia/mainnet/log/debug.log | grep "proofs"

2021-04-24T08:05:39.613 harvester chia.harvester.harvester: INFO     1 plots were eligible for farming db53002b95... Found 0 proofs. Time: 0.03045 s. Total XXXX plots

One thing I noticed though, was that each time the log rotater started a new debug.log, my tail command would have to be re-ran.

So I looked it up, and apparently tail -f watches a file based on its file descriptor, while tail -F watches a file based on its file name. Better details here:

So, if you want to tail your Chia logs forever, to sanity check your proof checking processes, run this command on linux/mac

tail -F ~/.chia/mainnet/log/debug.log | grep "proofs"

Thanks for sharing this… I had resorted to just occasionally cat+grepping the file because of the rotation issue.


Someone was promoting their Twitch stream on the chia subreddit and it was literally this view of their log :grinning_face_with_smiling_eyes:. They wanted to livestream their first XCH.

1 Like

Thanks for this. I’m using it until I get chiadog setup.

I did add awk onto it so I only see the eligible matches.

tail -F ~/.chia/mainnet/log/debug.log | grep "proofs" | awk '$5 > 0 {print $0;}'

I have WSL installed on my Windows PC, and was not able to tail. Had to add ---disable-inotify

tail -F —disable-inotify debug.log | grep “eligible”