How to view blocklist logs
How to view blocklist logs
I have installed 2.42 from source on my TonidoPlug (debian-based). I connect to it with Transmission Remote on Windows. I believe I have a blocklist working, but am not sure how to verify. Is there any way to log the blocks?
Re: How to view blocklist logs
No.
All you'll ever see in the log (/var/log/messages usually) is when the daemon starts there's a message about how many 'rules' the loaded blocklist contains.
But Transmission-Qt shows the same thing in the Preferences->Privacy (when running with a remote session), doesn't Transmission-Remote do the same?
All you'll ever see in the log (/var/log/messages usually) is when the daemon starts there's a message about how many 'rules' the loaded blocklist contains.
But Transmission-Qt shows the same thing in the Preferences->Privacy (when running with a remote session), doesn't Transmission-Remote do the same?
Re: How to view blocklist logs
set message level to 3
/var/log/messages
then you'll see things like:
<31>Jan 30 09:23:49 transmission-daemon[2586]: Found 2 blocklists in "/root/.config/transmission-daemon/blocklists" (session.c:2238)
<30>Jan 30 09:23:49 transmission-daemon[2586]: Blocklist "blocklist.bin" contains 223890 entries (blocklist.c:115)
<30>Jan 30 09:23:49 transmission-daemon[2586]: Blocklist "blocklist-2.bin" contains 305852 entries (blocklist.c:115)
Feb 4 16:50:31 (none) daemon.debug transmission-daemon[7984]: Banned IP address "85.17.27.93" tried to connect to us (peer-mgr.c:2077)
<31>Jan 30 09:25:41 transmission-daemon[2586]: Banned IP address "85.17.74.156" tried to connect to us (peer-mgr.c:2077)
/var/log/messages
then you'll see things like:
<31>Jan 30 09:23:49 transmission-daemon[2586]: Found 2 blocklists in "/root/.config/transmission-daemon/blocklists" (session.c:2238)
<30>Jan 30 09:23:49 transmission-daemon[2586]: Blocklist "blocklist.bin" contains 223890 entries (blocklist.c:115)
<30>Jan 30 09:23:49 transmission-daemon[2586]: Blocklist "blocklist-2.bin" contains 305852 entries (blocklist.c:115)
Feb 4 16:50:31 (none) daemon.debug transmission-daemon[7984]: Banned IP address "85.17.27.93" tried to connect to us (peer-mgr.c:2077)
<31>Jan 30 09:25:41 transmission-daemon[2586]: Banned IP address "85.17.74.156" tried to connect to us (peer-mgr.c:2077)
Re: How to view blocklist logs
x190
Thanks for the leads on blocklist messages! When I looked at handshake bug a few weeks ago I didn't bother to look at the blocklist message output. But anyway, attached is patch against r13203 that logs the: torrent, all blockslist blocks, whether they are incoming or outgoing, and all bad piece blocks. If you think I missed any type of the blocks let me know.
patch for advanced Blocklist logging attached.
??? can't seem upload attachment so get it here:
http://computerfixpro.com/BlkLstMsgs.zip
also x190, I don't use tr_dbg for daemon, I use tr_ndbg
here is an example that I have in use for help with my watch directory.
daemon.c.r13203
@@ -258,8 +258,10 @@
else
{
char * new_filename = tr_strdup_printf( "%s.added", filename );
+ tr_ndbg( NULL, "torrent -original filename- was \"%s\"", filename );
rename( filename, new_filename );
tr_free( new_filename );
+ tr_ndbg( NULL, "torrent -NEW filename- is \"%s.added\"", filename );
}
}
}
ps. read the book "thinking in pictures", it's a great read...
Thanks for the leads on blocklist messages! When I looked at handshake bug a few weeks ago I didn't bother to look at the blocklist message output. But anyway, attached is patch against r13203 that logs the: torrent, all blockslist blocks, whether they are incoming or outgoing, and all bad piece blocks. If you think I missed any type of the blocks let me know.
patch for advanced Blocklist logging attached.
??? can't seem upload attachment so get it here:
http://computerfixpro.com/BlkLstMsgs.zip
also x190, I don't use tr_dbg for daemon, I use tr_ndbg
here is an example that I have in use for help with my watch directory.
daemon.c.r13203
@@ -258,8 +258,10 @@
else
{
char * new_filename = tr_strdup_printf( "%s.added", filename );
+ tr_ndbg( NULL, "torrent -original filename- was \"%s\"", filename );
rename( filename, new_filename );
tr_free( new_filename );
+ tr_ndbg( NULL, "torrent -NEW filename- is \"%s.added\"", filename );
}
}
}
ps. read the book "thinking in pictures", it's a great read...
Re: How to view blocklist logs
Is there any way to get this information without actually changing source and recompiling? I'm new to Linux, and am surprised I even got the code compiled and working on my TonidoPlug. I get the feeling that I would break something if I tried to re-compile.
Re: How to view blocklist logs
Read again viewtopic.php?f=2&t=12802&p=58770#p58667
The meaning of "set message level to 3" is change settings.json (following the recommended procedure in the Wiki), the key is very similar: "message-level"
The meaning of "set message level to 3" is change settings.json (following the recommended procedure in the Wiki), the key is very similar: "message-level"
Re: How to view blocklist logs
Okay. I found and changed the setting to 3. I don't see anything regarding a blocklist or banned IPs in the messages file yet though, even after running "pkill -HUP transmission-da", and "/etc/init.d/transmission-daemon stop" and "/etc/init.d/transmission-daemon start". I do see other things getting logged though. I'll keep an eye on it. Thanks.rb07 wrote:Read again viewtopic.php?f=2&t=12802&p=58770#p58667
The meaning of "set message level to 3" is change settings.json (following the recommended procedure in the Wiki), the key is very similar: "message-level"
Re: How to view blocklist logs
I did stop and restart the daemon before editing the settings.json file. I am now getting lots of details in the "messages" file, but the word 'banned' or 'blocklist' is not in the 500kb of the file. I guess it's possible that there were no incoming blocks, but I really wish I could see some so I feel safer! In Transmission Remote, I do see the option saying "Blocklist enabled" is checked, and there is an "update" button. This grays out for a moment, but then comes back with no status update.x190 wrote:You have to stop the daemon before editing settings.json or your changes will be overwritten. You should see your blocklist entries (number of ranges) in the log, but only occasionally an Incoming or banned (bad pieces) block. Outgoing blocks (the vast majority) are not logged, hence the do-it-yourself code above if you want that information.
Re: How to view blocklist logs
Still no luck seeing anything in the log file about the blocklist being loaded or anything getting blocked. This is one of those things that make me want to run back to Windows! 

Re: How to view blocklist logs
MartyTng: Did you update the blocklist after you got the URL into the settings? Using the web client you just do:
(the little wrench icon) edit preferences --> peers tab --> [x] enable blocklist then
[_______UPDATE_______]
wait a few minutes and you should see 'Blocklist has xxxxxx rules' on this dialog.
(the little wrench icon) edit preferences --> peers tab --> [x] enable blocklist then
[_______UPDATE_______]
wait a few minutes and you should see 'Blocklist has xxxxxx rules' on this dialog.
Re: How to view blocklist logs
cfpp2p wrote:MartyTng: Did you update the blocklist after you got the URL into the settings? Using the web client you just do:
(the little wrench icon) edit preferences --> peers tab --> [x] enable blocklist then
[_______UPDATE_______]
wait a few minutes and you should see 'Blocklist has xxxxxx rules' on this dialog.
Yes, I am able to do that, but I am not certain that this is actually blocking anything.
Re: How to view blocklist logs
x190 wrote:Blocklist has xxxxxx rules
And in your log:If you see these entries, then you can be sure that those address ranges are being blocked for peer connections.2012-03-04 15:31:38 -0700 blocklist.c:114 [Info] Transmission: Blocklist "blocklist.bin" contains xxxxxx entries
I have the "blocklist has 'xxxx' rules" on the screen, but still nothing about a blocklist in /var/log/messages.
Is there somewhere else that my log file(s) could be? I do also see the following files in "/var/log", but the dates are older.
"messages.1"
"messages2.gz"
"messages3.gz"
"messages4.gz"