Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support receiving extended console logs from linux kernel #3120

Open
bdrung opened this issue Oct 11, 2018 · 1 comment
Open

Please support receiving extended console logs from linux kernel #3120

bdrung opened this issue Oct 11, 2018 · 1 comment

Comments

@bdrung
Copy link

bdrung commented Oct 11, 2018

The Linux kernel supports a extended netconsole log format. https://www.kernel.org/doc/Documentation/networking/netconsole.txt says:

Extended console:
=================

If '+' is prefixed to the configuration line or "extended" config file
is set to 1, extended console support is enabled. An example boot
param follows.

 linux netconsole=+4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc

Log messages are transmitted with extended metadata header in the
following format which is the same as /dev/kmsg.

 <level>,<sequnum>,<timestamp>,<contflag>;<message text>

Non printable characters in <message text> are escaped using "\xff"
notation. If the message contains optional dictionary, verbatim
newline is used as the delimeter.

If a message doesn't fit in certain number of bytes (currently 1000),
the message is split into multiple fragments by netconsole. These
fragments are transmitted with "ncfrag" header field added.

 ncfrag=<byte-offset>/<total-bytes>

For example, assuming a lot smaller chunk size, a message "the first
chunk, the 2nd chunk." may be split as follows.

 6,416,1758426,-,ncfrag=0/31;the first chunk,
 6,416,1758426,-,ncfrag=16/31; the 2nd chunk.

Please add support for receiving extended console logs from linux kernel and combine fragmented logs again.

Currently we use the imudp input module to receive the normal console logs, but this might fragment one log line into multiple log entries.

@bdrung
Copy link
Author

bdrung commented Oct 11, 2018

https://github.com/facebook/fbkutils contains a library for processing extended netconsole messages from the Linux kernel that is called ncrx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants