output.
.IP "\fB\-h, \-\-help\fP"
Print a help text and exit.
+.IP "\fB\-k, \-\-kernel\fP"
+Print kernel messages.
.IP "\fB\-l, \-\-level \fIlist\fP"
Restrict output to defined (comma separated) list of levels. For example
.sp
at first, 8192 since 1.3.54, 16384 since 2.1.113.)
If you have set the kernel buffer to be larger than the default
then this option can be used to view the entire buffer.
+.IP "\fB\-u, \-\-userspace\fP"
+Print userspace messages.
.IP "\fB\-V, \-\-version\fP"
Output version information and exit.
.IP "\fB\-x, \-\-decode\fP"
" -e, --console-on enable printing messages to console\n"
" -f, --facility=LIST restrict output to defined facilities\n"
" -h, --help display this help and exit\n"
+ " -k, --kernel display kernel messages\n"
" -l, --level=LIST restrict output to defined levels\n"
" -n, --console-level=LEVEL set level of messages printed to console\n"
" -r, --raw print the raw message buffer\n"
" -s, --buffer-size=SIZE buffer size to query the kernel ring buffer\n"
+ " -u, --userspace display userspace messages\n"
" -V, --version output version information and exit\n"
" -x, --decode decode facility and level to readable string\n\n"));
{ "decode", no_argument, NULL, 'x' },
{ "facility", required_argument, NULL, 'f' },
{ "help", no_argument, NULL, 'h' },
+ { "kernel", no_argument, NULL, 'k' },
{ "level", required_argument, NULL, 'l' },
{ "raw", no_argument, NULL, 'r' },
{ "read-clear", no_argument, NULL, 'c' },
+ { "userspace", no_argument, NULL, 'u' },
{ "version", no_argument, NULL, 'V' },
{ NULL, 0, NULL, 0 }
};
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- while ((c = getopt_long(argc, argv, "Ccdef:hl:n:rs:Vx", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "Ccdef:hkl:n:rs:uVx", longopts, NULL)) != -1) {
if (cmd != -1 && strchr("Ccnde", c))
errx(EXIT_FAILURE, "%s %s",
case 'h':
usage(stdout);
break;
+ case 'k':
+ flags |= DMESG_FL_FACILITY;
+ setbit(facilities, FAC_BASE(LOG_KERN));
+ break;
case 'l':
flags |= DMESG_FL_LEVEL;
list_to_bitarray(optarg, parse_level, levels);
if (bufsize < 4096)
bufsize = 4096;
break;
+ case 'u':
+ flags |= DMESG_FL_FACILITY;
+ for (n = 1; n < ARRAY_SIZE(facility_names); n++)
+ setbit(facilities, n);
+ break;
case 'V':
printf(_("%s from %s\n"), program_invocation_short_name,
PACKAGE_STRING);
}
argc -= optind;
argv += optind;
+ n = 0;
if (argc > 1)
usage(stderr);