[pve-devel] [PATCH common] allow to dump journal from specific boot
Thomas Lamprecht
t.lamprecht at proxmox.com
Tue Feb 16 15:15:03 CET 2016
Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
src/PVE/Tools.pm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
index 6303d20..f597b8d 100644
--- a/src/PVE/Tools.pm
+++ b/src/PVE/Tools.pm
@@ -1061,7 +1061,7 @@ sub dump_logfile {
}
sub dump_journal {
- my ($start, $limit, $filter) = @_;
+ my ($start, $limit, $boot_offset) = @_;
my $lines = [];
my $count = 0;
@@ -1079,6 +1079,9 @@ sub dump_journal {
};
my $cmd = ['journalctl', '-o', 'short', '--no-pager'];
+
+ push @$cmd, '-b', "$boot_offset" if defined($boot_offset);
+
run_command($cmd, outfunc => $parser);
# HACK: ExtJS store.guaranteeRange() does not like empty array
--
2.1.4
More information about the pve-devel
mailing list