mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-17 16:41:48 +02:00
-BEGIN VERIFY SCRIPT- ren() { sed -i "s|\<$1\>|$2|g" $( git grep -l "$1" :\(exclude\)./src/secp256k1 ) ; } ren build/src/bench build/bin ren build/src/test build/bin ren build/src/qt/test build/bin ren build/src/qt build/bin ren build/src build/bin ren build_fuzz/src/test/fuzz build_fuzz/bin -END VERIFY SCRIPT-
52 lines
1.4 KiB
Plaintext
Executable File
52 lines
1.4 KiB
Plaintext
Executable File
#!/usr/bin/env bpftrace
|
|
|
|
BEGIN
|
|
{
|
|
printf("Logging opened, closed, misbehaving, and evicted P2P connections\n")
|
|
}
|
|
|
|
usdt:./build/bin/bitcoind:net:inbound_connection
|
|
{
|
|
$id = (int64) arg0;
|
|
$addr = str(arg1);
|
|
$conn_type = str(arg2);
|
|
$network = (int32) arg3;
|
|
$existing = (uint64) arg4;
|
|
printf("INBOUND conn from %s: id=%ld, type=%s, network=%d, total=%d\n", $addr, $id, $conn_type, $network, $existing);
|
|
}
|
|
|
|
usdt:./build/bin/bitcoind:net:outbound_connection
|
|
{
|
|
$id = (int64) arg0;
|
|
$addr = str(arg1);
|
|
$conn_type = str(arg2);
|
|
$network = (int32) arg3;
|
|
$existing = (uint64) arg4;
|
|
printf("OUTBOUND conn to %s: id=%ld, type=%s, network=%d, total=%d\n", $addr, $id, $conn_type, $network, $existing);
|
|
}
|
|
|
|
usdt:./build/bin/bitcoind:net:closed_connection
|
|
{
|
|
$id = (int64) arg0;
|
|
$addr = str(arg1);
|
|
$conn_type = str(arg2);
|
|
$network = (int32) arg3;
|
|
printf("CLOSED conn to %s: id=%ld, type=%s, network=%d, established=%ld\n", $addr, $id, $conn_type, $network, arg4);
|
|
}
|
|
|
|
usdt:./build/bin/bitcoind:net:evicted_inbound_connection
|
|
{
|
|
$id = (int64) arg0;
|
|
$addr = str(arg1);
|
|
$conn_type = str(arg2);
|
|
$network = (int32) arg3;
|
|
printf("EVICTED conn to %s: id=%ld, type=%s, network=%d, established=%ld\n", $addr, $id, $conn_type, $network, arg4);
|
|
}
|
|
|
|
usdt:./build/bin/bitcoind:net:misbehaving_connection
|
|
{
|
|
$id = (int64) arg0;
|
|
$message = str(arg1);
|
|
printf("MISBEHAVING conn id=%ld, message='%s'\n", $id, $message);
|
|
}
|