summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:27:52 +0100
committerRichard W.M. Jones <rjones@redhat.com>2009-05-01 11:27:52 +0100
commit24bee20ce4196d45891925332a47a05aa5e40938 (patch)
tree434b56343dde38ae0c877cab236ada753e2f8549 /perl
parent8c60f5c681b5d7cf90bc798fcaf94cd4e242e27f (diff)
downloadlibguestfs-24bee20ce4196d45891925332a47a05aa5e40938.tar.gz
libguestfs-24bee20ce4196d45891925332a47a05aa5e40938.tar.xz
libguestfs-24bee20ce4196d45891925332a47a05aa5e40938.zip
Generated code for dmesg command.
Diffstat (limited to 'perl')
-rw-r--r--perl/Guestfs.xs14
-rw-r--r--perl/lib/Sys/Guestfs.pm11
2 files changed, 25 insertions, 0 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index 1a45c796..ed8e6700 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -1658,3 +1658,17 @@ PREINIT:
if (r == -1)
croak ("drop_caches: %s", guestfs_last_error (g));
+SV *
+dmesg (g)
+ guestfs_h *g;
+PREINIT:
+ char *kmsgs;
+ CODE:
+ kmsgs = guestfs_dmesg (g);
+ if (kmsgs == NULL)
+ croak ("dmesg: %s", guestfs_last_error (g));
+ RETVAL = newSVpv (kmsgs, 0);
+ free (kmsgs);
+ OUTPUT:
+ RETVAL
+
diff --git a/perl/lib/Sys/Guestfs.pm b/perl/lib/Sys/Guestfs.pm
index 63a49259..01d81a6f 100644
--- a/perl/lib/Sys/Guestfs.pm
+++ b/perl/lib/Sys/Guestfs.pm
@@ -452,6 +452,17 @@ There is no comprehensive help for this command. You have
to look at the file C<daemon/debug.c> in the libguestfs source
to find out what you can do.
+=item $kmsgs = $h->dmesg ();
+
+This returns the kernel messages (C<dmesg> output) from
+the guest kernel. This is sometimes useful for extended
+debugging of problems.
+
+Another way to get the same information is to enable
+verbose messages with C<$h-E<gt>set_verbose> or by setting
+the environment variable C<LIBGUESTFS_DEBUG=1> before
+running the program.
+
=item $h->download ($remotefilename, $filename);
Download file C<remotefilename> and save it as C<filename>