* [PATCH 1/1] dmesg: adds the ability to "follow" the klog ring buffer @ 2011-04-29 16:42 Austen Dicken 2011-05-03 12:53 ` Karel Zak 0 siblings, 1 reply; 5+ messages in thread From: Austen Dicken @ 2011-04-29 16:42 UTC (permalink / raw) To: util-linux adds the "-f" option to dmesg, which allows an underpriviledged user to "follow" the kernel ring buffer, outputting new messages as they appear. this is done non-destructively so that the current buffer remains after execution. this also changes the log output to be by-line instead of by-character, and saves the last line printed on each read of the buffer. if looping, it will then read the buffer again, but not output until it finds the last line that it printed. --- sys-utils/dmesg.1 | 4 ++ sys-utils/dmesg.c | 147 ++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 117 insertions(+), 34 deletions(-) diff --git a/sys-utils/dmesg.1 b/sys-utils/dmesg.1 index d7af1da..bbdd462 100644 --- a/sys-utils/dmesg.1 +++ b/sys-utils/dmesg.1 @@ -6,6 +6,7 @@ dmesg \- print or control the kernel ring buffer .SH SYNOPSIS .B dmesg .RB [ \-c ] +.RB [ \-f ] .RB [ \-r ] .RB [ \-n .IR level ] @@ -28,6 +29,9 @@ file to whoever can debug their problem. .B \-c Clear the ring buffer contents after printing. .TP +.B \-f +Output ring buffer contents as they are added. +.TP .B \-r Print the raw message buffer, i.e., don't strip the log level prefixes. .TP diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index c3e5659..3342b80 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -35,6 +35,8 @@ #include <stdlib.h> #include <sys/klog.h> #include <ctype.h> +#include <signal.h> +#include <unistd.h> #include "c.h" #include "nls.h" @@ -44,34 +46,55 @@ static void __attribute__ ((noreturn)) usage(void) { fprintf(stderr, - _("Usage: %s [-c] [-n level] [-r] [-s bufsize]\n"), + _("Usage: %s [-c] [-f] [-n level] [-r] [-s bufsize]\n"), program_invocation_short_name); exit(EXIT_FAILURE); } +typedef void (*sighandler_t)(int); +static int follow_loop = 0; +static void follow_sighandler(int signum) { + switch (signum) { + case SIGINT: + if(follow_loop) { + printf("\n"); + follow_loop = 0; + } + break; + default: + break; + } +} + int main(int argc, char *argv[]) { char *buf = NULL; int sz; int bufsize = 0; - int i; + int i, j; int n; int c; int level = 0; - int lastc; int cmd = 3; /* Read all messages in the ring buffer */ int raw = 0; + int follow = 0; + char* last_line = NULL; + char* this_line = NULL; + sighandler_t prev_sighandler; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - while ((c = getopt(argc, argv, "crn:s:")) != -1) { + while ((c = getopt(argc, argv, "cfrn:s:")) != -1) { switch (c) { case 'c': cmd = 4; /* Read and clear all messages */ break; + case 'f': + follow = 1; + break; case 'n': cmd = 8; /* Set level of messages */ level = strtol_or_err(optarg, _("failed to parse level")); @@ -103,49 +126,105 @@ int main(int argc, char *argv[]) return EXIT_SUCCESS; } + if (follow) { + cmd = 3; // override command to just print the buffer + follow_loop = 1; + prev_sighandler = signal(SIGINT, follow_sighandler); + } + if (!bufsize) { n = klogctl(10, NULL, 0); /* read ringbuffer size */ if (n > 0) bufsize = n; } - if (bufsize) { - sz = bufsize + 8; - buf = xmalloc(sz * sizeof(char)); - n = klogctl(cmd, buf, sz); - } else { - sz = 16392; - while (1) { + do { + if (bufsize) { + sz = bufsize + 8; buf = xmalloc(sz * sizeof(char)); - n = klogctl(3, buf, sz); /* read only */ - if (n != sz || sz > (1 << 28)) - break; - free(buf); - sz *= 4; + n = klogctl(cmd, buf, sz); + } else { + sz = 16392; + while (1) { + buf = xmalloc(sz * sizeof(char)); + n = klogctl(3, buf, sz); /* read only */ + if (n != sz || sz > (1 << 28)) + break; + free(buf); + sz *= 4; + } + + if (n > 0 && cmd == 4) + n = klogctl(cmd, buf, sz); /* read and clear */ } - if (n > 0 && cmd == 4) - n = klogctl(cmd, buf, sz); /* read and clear */ - } - - if (n < 0) - err(EXIT_FAILURE, _("klogctl failed")); + if (n < 0) + err(EXIT_FAILURE, _("klogctl failed")); - lastc = '\n'; - for (i = 0; i < n; i++) { - if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { - i++; - while (isdigit(buf[i])) - i++; - if (buf[i] == '>') + this_line = xmalloc(n * sizeof(char)); + for (i = 0, j = 0; i < n; i++) { + if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { i++; + while (isdigit(buf[i])) + i++; + if (buf[i] == '>') + i++; + } + this_line[j] = buf[i]; + + if (this_line[j] == '\n') { + this_line[j] = '\0'; + if (last_line) { + if (!strcmp(last_line, this_line)) { + free(last_line); + last_line = NULL; + } + } else + printf("%s\n", this_line); + + j = 0; + } else + j++; + } + + // if we have stale data to print, then print it! + if (j && !last_line) { + this_line[j] = '\0'; + printf("%s\n", this_line); + } + + free(buf); + + if (last_line) { + /* we traversed the whole log and never found + * the last line, so we didn't output anything. + * we clear last_line now so that next time we + * print the whole log */ + free(last_line); + last_line = NULL; + + /* free this_line as well */ + free(this_line); + this_line = NULL; + } else { + last_line = this_line; + this_line = NULL; } - lastc = buf[i]; - putchar(lastc); + usleep(200); + + } while (follow_loop); + + if (follow) { + if (last_line) { + free(last_line); + last_line = NULL; + } + + if (prev_sighandler) + signal(SIGINT, prev_sighandler); + else + signal(SIGINT, SIG_DFL); } - if (lastc != '\n') - putchar('\n'); - free(buf); return EXIT_SUCCESS; } ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] dmesg: adds the ability to "follow" the klog ring buffer 2011-04-29 16:42 [PATCH 1/1] dmesg: adds the ability to "follow" the klog ring buffer Austen Dicken @ 2011-05-03 12:53 ` Karel Zak 2011-05-03 14:14 ` Austen Dicken 0 siblings, 1 reply; 5+ messages in thread From: Karel Zak @ 2011-05-03 12:53 UTC (permalink / raw) To: Austen Dicken; +Cc: util-linux On Fri, Apr 29, 2011 at 11:42:00AM -0500, Austen Dicken wrote: > adds the "-f" option to dmesg, which allows an underpriviledged > user to "follow" the kernel ring buffer, outputting new messages as they I like the "follow the kernel ring buffer" idea, but ... > appear. this is done non-destructively so that the current buffer remains > after execution. > > this also changes the log output to be by-line instead of by-character, > and saves the last line printed on each read of the buffer. if looping, > it will then read the buffer again, but not output until it finds the last > line that it printed. ... this seems like a problem to me. [...] > - for (i = 0; i < n; i++) { > - if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { > - i++; > - while (isdigit(buf[i])) > - i++; > - if (buf[i] == '>') > + this_line = xmalloc(n * sizeof(char)); > + for (i = 0, j = 0; i < n; i++) { > + if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { > i++; > + while (isdigit(buf[i])) > + i++; > + if (buf[i] == '>') > + i++; > + } > + this_line[j] = buf[i]; > + > + if (this_line[j] == '\n') { > + this_line[j] = '\0'; > + if (last_line) { > + if (!strcmp(last_line, this_line)) { > + free(last_line); > + last_line = NULL; > + } > + } else > + printf("%s\n", this_line); It expects that the kernel log does not contain duplicate messages. Is it correct? I don't think so, I see: ata1.00: configured for UDMA/100 ata1.00: configured for UDMA/100 You have to compile kernel with CONFIG_PRINTK_TIME, otherwise your heuristic will not work properly. > + usleep(200); > + > + } while (follow_loop); Hmm... sleep() in code usually means a poor design or API. What about to support -f (follow) for privileged users only? Then you can use klogctl(2, ...). It waits until the kernel log buffer is non-empty, so the last_line and usleep() will be unnecessary, and the implementation will be pretty simple. > + if (prev_sighandler) > + signal(SIGINT, prev_sighandler); > + else > + signal(SIGINT, SIG_DFL); Why do you need to restore the handler before return (exit)? It seems unnecessary. Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] dmesg: adds the ability to "follow" the klog ring buffer 2011-05-03 12:53 ` Karel Zak @ 2011-05-03 14:14 ` Austen Dicken 2011-05-04 12:43 ` Karel Zak 0 siblings, 1 reply; 5+ messages in thread From: Austen Dicken @ 2011-05-03 14:14 UTC (permalink / raw) To: Karel Zak; +Cc: util-linux On Tue, May 3, 2011 at 07:53, Karel Zak <kzak@redhat.com> wrote: > On Fri, Apr 29, 2011 at 11:42:00AM -0500, Austen Dicken wrote: >> adds the "-f" option to dmesg, which allows an underpriviledged >> user to "follow" the kernel ring buffer, outputting new messages as they > > I like the "follow the kernel ring buffer" idea, but ... > >> appear. this is done non-destructively so that the current buffer remains >> after execution. >> >> this also changes the log output to be by-line instead of by-character, >> and saves the last line printed on each read of the buffer. if looping, >> it will then read the buffer again, but not output until it finds the last >> line that it printed. > > ... this seems like a problem to me. > > [...] > >> - for (i = 0; i < n; i++) { >> - if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { >> - i++; >> - while (isdigit(buf[i])) >> - i++; >> - if (buf[i] == '>') >> + this_line = xmalloc(n * sizeof(char)); >> + for (i = 0, j = 0; i < n; i++) { >> + if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { >> i++; >> + while (isdigit(buf[i])) >> + i++; >> + if (buf[i] == '>') >> + i++; >> + } >> + this_line[j] = buf[i]; >> + >> + if (this_line[j] == '\n') { >> + this_line[j] = '\0'; >> + if (last_line) { >> + if (!strcmp(last_line, this_line)) { >> + free(last_line); >> + last_line = NULL; >> + } >> + } else >> + printf("%s\n", this_line); > > It expects that the kernel log does not contain duplicate messages. > Is it correct? I don't think so, I see: > > ata1.00: configured for UDMA/100 > ata1.00: configured for UDMA/100 > > You have to compile kernel with CONFIG_PRINTK_TIME, otherwise your > heuristic will not work properly. I see what you mean. Yes my heuristic would not be able to function properly in that way, so there's no reason to complicate things by going to line-by-line output. > >> + usleep(200); >> + >> + } while (follow_loop); > > Hmm... sleep() in code usually means a poor design or API. I was using sleep at the time since klogctl(3,...) doesn't block so when no new data was available the code was essentially busy-looping, but I agree it is quite messy. > > What about to support -f (follow) for privileged users only? > > Then you can use klogctl(2, ...). It waits until the kernel log buffer > is non-empty, so the last_line and usleep() will be unnecessary, and > the implementation will be pretty simple. Agreed. I have decided to change the patch to function this way, which simplifies things immensely. > >> + if (prev_sighandler) >> + signal(SIGINT, prev_sighandler); >> + else >> + signal(SIGINT, SIG_DFL); > > Why do you need to restore the handler before return (exit)? It seems > unnecessary. I was restoring the old signal handler just for completeness, in the same way that someone might free() memory even though they are about to exit. The main reason for that is mostly so that in the future if more were to be added to this program then there wouldn't be bugs caused by incomplete closure of such things. Regardless, the use of signal handlers is obsolete in my latest patch, shown below. > > Karel > > -- > Karel Zak <kzak@redhat.com> > http://karelzak.blogspot.com > So I have changed the implementation to use klogctl(2, ...) and remove the signal handlers, so one simply interrupts the program for the sake of interrupting the program, no cleanup should be required, so the signal handling is just extra. "dmesg -f" now essentially would do the same as "cat /proc/kmsg" but with the addition of some of the nice formatting options that dmesg already provides (removal of log levels for instance). I was playing with the idea of having follow run klogctl(3, ...) first to dump the current buffer, then call klogctl(2, ...) after that to append new information (essentially producing the originally intended output), but decided against it as if an underprivileged user attempts to use the option that would result in the log dumping and then failing when switching to klogctl(2, ...), which seemed confusing and messy. It could have been modified to run a privileged command first, but that seemed messy as well, so I'll leave it at this for now. ~ Austen -- sys-utils/dmesg.1 | 4 +++ sys-utils/dmesg.c | 73 +++++++++++++++++++++++++++++------------------------ 2 files changed, 44 insertions(+), 33 deletions(-) diff --git a/sys-utils/dmesg.1 b/sys-utils/dmesg.1 index d7af1da..bbdd462 100644 --- a/sys-utils/dmesg.1 +++ b/sys-utils/dmesg.1 @@ -6,6 +6,7 @@ dmesg \- print or control the kernel ring buffer .SH SYNOPSIS .B dmesg .RB [ \-c ] +.RB [ \-f ] .RB [ \-r ] .RB [ \-n .IR level ] @@ -28,6 +29,9 @@ file to whoever can debug their problem. .B \-c Clear the ring buffer contents after printing. .TP +.B \-f +Output ring buffer contents as they are added. +.TP .B \-r Print the raw message buffer, i.e., don't strip the log level prefixes. .TP diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index c3e5659..e2f5933 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -44,7 +44,7 @@ static void __attribute__ ((noreturn)) usage(void) { fprintf(stderr, - _("Usage: %s [-c] [-n level] [-r] [-s bufsize]\n"), + _("Usage: %s [-c] [-f] [-n level] [-r] [-s bufsize]\n"), program_invocation_short_name); exit(EXIT_FAILURE); @@ -62,16 +62,21 @@ int main(int argc, char *argv[]) int lastc; int cmd = 3; /* Read all messages in the ring buffer */ int raw = 0; + int follow = 0; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - while ((c = getopt(argc, argv, "crn:s:")) != -1) { + while ((c = getopt(argc, argv, "cfrn:s:")) != -1) { switch (c) { case 'c': cmd = 4; /* Read and clear all messages */ break; + case 'f': + cmd = 2; + follow = 1; + break; case 'n': cmd = 8; /* Set level of messages */ level = strtol_or_err(optarg, _("failed to parse level")); @@ -109,43 +114,45 @@ int main(int argc, char *argv[]) bufsize = n; } - if (bufsize) { - sz = bufsize + 8; - buf = xmalloc(sz * sizeof(char)); - n = klogctl(cmd, buf, sz); - } else { - sz = 16392; - while (1) { + do { + if (bufsize) { + sz = bufsize + 8; buf = xmalloc(sz * sizeof(char)); - n = klogctl(3, buf, sz); /* read only */ - if (n != sz || sz > (1 << 28)) - break; - free(buf); - sz *= 4; + n = klogctl(cmd, buf, sz); + } else { + sz = 16392; + while (1) { + buf = xmalloc(sz * sizeof(char)); + n = klogctl(3, buf, sz); /* read only */ + if (n != sz || sz > (1 << 28)) + break; + free(buf); + sz *= 4; + } + + if (n > 0 && cmd == 4) + n = klogctl(cmd, buf, sz); /* read and clear */ } - if (n > 0 && cmd == 4) - n = klogctl(cmd, buf, sz); /* read and clear */ - } - - if (n < 0) - err(EXIT_FAILURE, _("klogctl failed")); + if (n < 0) + err(EXIT_FAILURE, _("klogctl failed")); - lastc = '\n'; - for (i = 0; i < n; i++) { - if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { - i++; - while (isdigit(buf[i])) - i++; - if (buf[i] == '>') + lastc = '\n'; + for (i = 0; i < n; i++) { + if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { i++; + while (isdigit(buf[i])) + i++; + if (buf[i] == '>') + i++; + } + lastc = buf[i]; + putchar(lastc); } - lastc = buf[i]; - putchar(lastc); - } - if (lastc != '\n') - putchar('\n'); - free(buf); + if (lastc != '\n') + putchar('\n'); + free(buf); + } while (follow); return EXIT_SUCCESS; } ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] dmesg: adds the ability to "follow" the klog ring buffer 2011-05-03 14:14 ` Austen Dicken @ 2011-05-04 12:43 ` Karel Zak 2011-05-20 14:20 ` Austen Dicken 0 siblings, 1 reply; 5+ messages in thread From: Karel Zak @ 2011-05-04 12:43 UTC (permalink / raw) To: Austen Dicken; +Cc: util-linux On Tue, May 03, 2011 at 09:14:41AM -0500, Austen Dicken wrote: > > Then you can use klogctl(2, ...). It waits until the kernel log buffer > > is non-empty, so the last_line and usleep() will be unnecessary, and > > the implementation will be pretty simple. > > Agreed. I have decided to change the patch to function this way, > which simplifies things > immensely. Unfortunately, it seems that SYSLOG_ACTION_READ (aka klogctl(2, ...)) is not ideal solution too. Sorry. The output is incomplete if another process(e.g. syslog daemon) is reading the buffer. The buffer (and index into the buffer) is shared for all processes, so it's possible to read the information only once. For more details see kernel/printk.c (log_start index) in kernel sources. Anyway for debugging or on some non-standard boxes the '-f' option could be still usable. I'd like to add --level= and --facility= options, so dmesg(1) should be definitely better than the "cat /proc/kmsg" command. I did some changes to the patch to minimize overhead, see below. Maybe it would be better to use open(/proc/kmsg) + read() instead of klogctl(2, ...) for the -f option to minimize overhead in glibc. Comments? Karel >From 8e2ae5130c8f03e8ab6e28f194e409f8c322daf8 Mon Sep 17 00:00:00 2001 From: Austen Dicken <cvpcsm@gmail.com> Date: Tue, 3 May 2011 09:14:41 -0500 Subject: [PATCH] dmesg: adds the ability to "follow" (-f) the klog ring buffer Co-Author: Karel Zak <kzak@redhat.com> Signed-off-by: Austen Dicken <cvpcsm@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com> --- sys-utils/dmesg.1 | 5 +++ sys-utils/dmesg.c | 88 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 55 insertions(+), 38 deletions(-) diff --git a/sys-utils/dmesg.1 b/sys-utils/dmesg.1 index d7af1da..9b4471d 100644 --- a/sys-utils/dmesg.1 +++ b/sys-utils/dmesg.1 @@ -6,6 +6,7 @@ dmesg \- print or control the kernel ring buffer .SH SYNOPSIS .B dmesg .RB [ \-c ] +.RB [ \-f ] .RB [ \-r ] .RB [ \-n .IR level ] @@ -28,6 +29,10 @@ file to whoever can debug their problem. .B \-c Clear the ring buffer contents after printing. .TP +.B \-f +Output ring buffer contents as they are added. The output could be incomplete +if another process (e.g. syslog daemon) is reading the kernel log buffer. +.TP .B \-r Print the raw message buffer, i.e., don't strip the log level prefixes. .TP diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c index c3e5659..2f6b30e 100644 --- a/sys-utils/dmesg.c +++ b/sys-utils/dmesg.c @@ -40,38 +40,41 @@ #include "nls.h" #include "strutils.h" #include "xalloc.h" +#include "writeall.h" static void __attribute__ ((noreturn)) usage(void) { fprintf(stderr, - _("Usage: %s [-c] [-n level] [-r] [-s bufsize]\n"), + _("Usage: %s [-c] [-f] [-n level] [-r] [-s bufsize]\n"), program_invocation_short_name); exit(EXIT_FAILURE); - } int main(int argc, char *argv[]) { char *buf = NULL; - int sz; + int sz = 0; int bufsize = 0; - int i; int n; int c; int level = 0; - int lastc; int cmd = 3; /* Read all messages in the ring buffer */ int raw = 0; + int follow = 0; setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); - while ((c = getopt(argc, argv, "crn:s:")) != -1) { + while ((c = getopt(argc, argv, "cfrn:s:")) != -1) { switch (c) { case 'c': cmd = 4; /* Read and clear all messages */ break; + case 'f': + cmd = 2; + follow = 1; + break; case 'n': cmd = 8; /* Set level of messages */ level = strtol_or_err(optarg, _("failed to parse level")); @@ -105,46 +108,55 @@ int main(int argc, char *argv[]) if (!bufsize) { n = klogctl(10, NULL, 0); /* read ringbuffer size */ - if (n > 0) + if (n > 0) { bufsize = n; + sz = bufsize + 8; + buf = xmalloc(sz * sizeof(char)); + } } - if (bufsize) { - sz = bufsize + 8; - buf = xmalloc(sz * sizeof(char)); - n = klogctl(cmd, buf, sz); - } else { - sz = 16392; - while (1) { - buf = xmalloc(sz * sizeof(char)); - n = klogctl(3, buf, sz); /* read only */ - if (n != sz || sz > (1 << 28)) - break; + do { + if (bufsize && sz) + n = klogctl(cmd, buf, sz); + else { free(buf); - sz *= 4; + sz = 16392; + while (1) { + buf = xmalloc(sz * sizeof(char)); + n = klogctl(3, buf, sz); /* read only */ + if (n != sz || sz > (1 << 28)) + break; + free(buf); + sz *= 4; + } + if (n > 0 && cmd == 4) + n = klogctl(cmd, buf, sz); /* read and clear */ } - if (n > 0 && cmd == 4) - n = klogctl(cmd, buf, sz); /* read and clear */ - } - - if (n < 0) - err(EXIT_FAILURE, _("klogctl failed")); - - lastc = '\n'; - for (i = 0; i < n; i++) { - if (!raw && (i == 0 || buf[i - 1] == '\n') && buf[i] == '<') { - i++; - while (isdigit(buf[i])) - i++; - if (buf[i] == '>') - i++; + if (n < 0) + err(EXIT_FAILURE, _("klogctl failed")); + if (raw) + write_all(STDIN_FILENO, buf, n); + else { + int i; + + for (i = 0; i < n; i++) { + if ((i == 0 || buf[i - 1] == '\n') && + buf[i] == '<') { + i++; + while (isdigit(buf[i])) + i++; + if (buf[i] == '>') + i++; + } + putchar(buf[i]); + } } - lastc = buf[i]; - putchar(lastc); - } - if (lastc != '\n') + } while (follow); + + if (sz && n > 0 && buf && buf[n - 1] != '\n') putchar('\n'); + free(buf); return EXIT_SUCCESS; -- 1.7.3.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] dmesg: adds the ability to "follow" the klog ring buffer 2011-05-04 12:43 ` Karel Zak @ 2011-05-20 14:20 ` Austen Dicken 0 siblings, 0 replies; 5+ messages in thread From: Austen Dicken @ 2011-05-20 14:20 UTC (permalink / raw) To: Karel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Cj4gKyDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCB9Cj4gKyDCoCDCoCDCoCDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCDCoCBwdXRjaGFyKGJ1ZltpXSk7Cj4gKyDCoCDCoCDCoCDCoCDCoCDC oCDCoCDCoCDCoCDCoCDCoCB9Cj4gwqAgwqAgwqAgwqAgwqAgwqAgwqAgwqB9Cj4gLSDCoCDCoCDC oCDCoCDCoCDCoCDCoCBsYXN0YyA9IGJ1ZltpXTsKPiAtIMKgIMKgIMKgIMKgIMKgIMKgIMKgIHB1 dGNoYXIobGFzdGMpOwo+IC0gwqAgwqAgwqAgfQo+IC0gwqAgwqAgwqAgaWYgKGxhc3RjICE9ICdc bicpCj4gKyDCoCDCoCDCoCB9IHdoaWxlIChmb2xsb3cpOwo+ICsKPiArIMKgIMKgIMKgIGlmIChz eiAmJiBuID4gMCAmJiBidWYgJiYgYnVmW24gLSAxXSAhPSAnXG4nKQo+IMKgIMKgIMKgIMKgIMKg IMKgIMKgIMKgcHV0Y2hhcignXG4nKTsKPiArCj4gwqAgwqAgwqAgwqBmcmVlKGJ1Zik7Cj4KPiDC oCDCoCDCoCDCoHJldHVybiBFWElUX1NVQ0NFU1M7Cj4gLS0KPiAxLjcuMy40Cj4KPgo= ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-05-20 14:20 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-29 16:42 [PATCH 1/1] dmesg: adds the ability to "follow" the klog ring buffer Austen Dicken 2011-05-03 12:53 ` Karel Zak 2011-05-03 14:14 ` Austen Dicken 2011-05-04 12:43 ` Karel Zak 2011-05-20 14:20 ` Austen Dicken
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox