bcb3c1e
From 0df5572c2a7e752efdbb86e854e2d1583e014546 Mon Sep 17 00:00:00 2001
bcb3c1e
From: Gregory Collins <greg@gregorycollins.net>
bcb3c1e
Date: Tue, 20 Jan 2015 18:39:42 -0800
bcb3c1e
Subject: [PATCH] Don't slurp unbounded amounts of data when invoking
bcb3c1e
 journalctl. Fixes #887.
bcb3c1e
bcb3c1e
---
bcb3c1e
 src/plugins/ccpp_event.conf | 4 ++--
bcb3c1e
 1 file changed, 2 insertions(+), 2 deletions(-)
bcb3c1e
bcb3c1e
diff --git a/src/plugins/ccpp_event.conf b/src/plugins/ccpp_event.conf
bcb3c1e
index 9fbe760..223144e 100644
bcb3c1e
--- a/src/plugins/ccpp_event.conf
bcb3c1e
+++ b/src/plugins/ccpp_event.conf
bcb3c1e
@@ -40,9 +40,9 @@ EVENT=post-create analyzer=CCpp
bcb3c1e
             else
bcb3c1e
                 uid=`cat uid` &&
bcb3c1e
                 log="[System Logs]:\n" &&
bcb3c1e
-                log=$log`journalctl -b --system | grep -F -e "$base_executable" | tail -99` &&
bcb3c1e
+                log=$log`journalctl -b --since=-3m --system | grep -F -e "$base_executable" | tail -99` &&
bcb3c1e
                 log=$log"\n[User Logs]:\n" &&
bcb3c1e
-                log=$log`journalctl _UID="$uid" -b | grep -F -e "$base_executable" | tail -99` &&
bcb3c1e
+                log=$log`journalctl _UID="$uid" -b --since=-3m | grep -F -e "$base_executable" | tail -99` &&
bcb3c1e
                 log=`echo -e "$log"`
bcb3c1e
             fi
bcb3c1e
             if test -n "$log"; then
bcb3c1e
-- 
bcb3c1e
2.1.0
bcb3c1e