Blob Blame History Raw
From 0df5572c2a7e752efdbb86e854e2d1583e014546 Mon Sep 17 00:00:00 2001
From: Gregory Collins <greg@gregorycollins.net>
Date: Tue, 20 Jan 2015 18:39:42 -0800
Subject: [PATCH] Don't slurp unbounded amounts of data when invoking
 journalctl. Fixes #887.

---
 src/plugins/ccpp_event.conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/plugins/ccpp_event.conf b/src/plugins/ccpp_event.conf
index 9fbe760..223144e 100644
--- a/src/plugins/ccpp_event.conf
+++ b/src/plugins/ccpp_event.conf
@@ -40,9 +40,9 @@ EVENT=post-create analyzer=CCpp
             else
                 uid=`cat uid` &&
                 log="[System Logs]:\n" &&
-                log=$log`journalctl -b --system | grep -F -e "$base_executable" | tail -99` &&
+                log=$log`journalctl -b --since=-3m --system | grep -F -e "$base_executable" | tail -99` &&
                 log=$log"\n[User Logs]:\n" &&
-                log=$log`journalctl _UID="$uid" -b | grep -F -e "$base_executable" | tail -99` &&
+                log=$log`journalctl _UID="$uid" -b --since=-3m | grep -F -e "$base_executable" | tail -99` &&
                 log=`echo -e "$log"`
             fi
             if test -n "$log"; then
-- 
2.1.0