monitor: Add support for -K/--kernel
Luiz Augusto von Dentz
maintainerPATCH v2 1/1 monitor: Add support for -K/--kernel
From: Luiz Augusto von Dentz <[email protected]>
This adds support for -K/--kernel that open /proc/kmsg and attempts to print messages starting with 'Kernel:':
Quoted 1 line
monitor/btmon -K
= Note: Kernel: BNEP (Ethernet Emulation) ver 1.3
= Note: Kernel: BNEP filters: protocol multicast
= Note: Kernel: BNEP socket layer initialized
= Note: Kernel: MGMT ver 1.23
= Note: Kernel: RFCOMM TTY layer initialized
= Note: Kernel: RFCOMM socket layer initialized
= Note: Kernel: RFCOMM ver 1.11
--- monitor/btmon.rst | 2 ++ monitor/control.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++ monitor/main.c | 7 +++++- monitor/packet.h | 1 + 4 files changed, 68 insertions(+), 1 deletion(-)
monitor/btmon.rst +2 -0
@@ -77,6 +77,8 @@ OPTIONS -M, --mgmt Open channel for mgmt events. +-K, --kernel Open kmsg for kernel messages. + -t, --time Show a time instead of time offset. -T, --date Show a time and date information instead of
monitor/control.c +59 -0
71 lines not on this page · raw message
monitor/main.c +6 -1
@@ -61,6 +61,7 @@ static void usage(void)"\t-B, --tty-speed <rate> Set TTY speed (default 115200)\n" "\t-V, --vendor <compid> Set default company identifier\n" "\t-M, --mgmt Open channel for mgmt events\n" +"\t-K, --kernel Open kmsg for kernel messages\n" "\t-t, --time Show time instead of time offset\n" "\t-T, --date Show time and date information\n" "\t-S, --sco Dump SCO traffic\n"
@@ -88,6 +89,7 @@ static const struct option main_options[] = { { "tty-speed", required_argument, NULL, 'B' }, { "vendor", required_argument, NULL, 'V' }, { "mgmt", no_argument, NULL, 'M' }, + { "kernel", no_argument, NULL, 'K' }, { "no-time", no_argument, NULL, 'N' }, { "time", no_argument, NULL, 't' }, { "date", no_argument, NULL, 'T' },
@@ -131,7 +133,7 @@ int main(int argc, char *argv[])struct sockaddr_un addr; opt =getopt_long (argc, argv, -"r:w:a:s:p:i:d:B:V:MNtTSAIE:PJ:R:C:c:vh" , +"r:w:a:s:p:i:d:B:V:MKNtTSAIE:PJ:R:C:c:vh" , main_options,NULL );if (opt <0 )break ;
@@ -184,6 +186,9 @@ int main(int argc, char *argv[])case 'M' : filter_mask |=PACKET_FILTER_SHOW_MGMT_SOCKET ;break ; +case 'K' : + filter_mask |=PACKET_FILTER_SHOW_KMSG ; +break ;case 'N' : filter_mask &= ~PACKET_FILTER_SHOW_TIME_OFFSET ;break ;
monitor/packet.h +1 -0
@@ -23,6 +23,7 @@#define PACKET_FILTER_SHOW_A2DP_STREAM (1 << 6)#define PACKET_FILTER_SHOW_MGMT_SOCKET (1 << 7)#define PACKET_FILTER_SHOW_ISO_DATA (1 << 8) +#define PACKET_FILTER_SHOW_KMSG (1 << 9)#define TV_MSEC (_tv) (long long)((_tv).tv_sec * 1000 + (_tv).tv_usec / 1000)struct packet_latency {
Signature · 1 line
2.50.1
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=994059
---Test result---
Test Summary:
CheckPatch PENDING 0.28 seconds GitLint PENDING 0.31 seconds BuildEll PASS 19.94 seconds BluezMake PASS 2593.48 seconds MakeCheck PASS 20.22 seconds MakeDistcheck PASS 184.32 seconds CheckValgrind PASS 235.72 seconds CheckSmatch PASS 305.53 seconds bluezmakeextell PASS 128.02 seconds IncrementalBuild PENDING 0.23 seconds ScanBuild PASS 905.89 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 14 lines · On Thu, 21 Aug 2025 09:50:31 -0400 you wrote:
From: Luiz Augusto von Dentz <[email protected]>
This adds support for -K/--kernel that open
/proc/kmsgand attempts to print messages starting with 'Kernel:':Quoted 1 line
monitor/btmon -K
= Note: Kernel: BNEP (Ethernet Emulation) ver 1.3
= Note: Kernel: BNEP filters: protocol multicast
= Note: Kernel: BNEP socket layer initialized
= Note: Kernel: MGMT ver 1.23
= Note: Kernel: RFCOMM TTY layer initialized
= Note: Kernel: RFCOMM socket layer initialized
= Note: Kernel: RFCOMM ver 1.11
Quoted 1 line
[...]
Here is the summary with links:
- [BlueZ,v2] monitor: Add support for -K/--kernel
https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=90a490569cb8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html