Has anyone found a way to: journalctl | grep "last 10 minutes"
On 12/31/13 19:24, Frank Murphy wrote:
Has anyone found a way to: journalctl | grep "last 10 minutes"
man journalctl
--since=, --until= Start showing entries on or newer than the specified date, or on or older than the specified date, respectively. Date specifications should be of the format "2012-10-30 18:17:16". If the time part is omitted, 00:00:00 is assumed. If only the seconds component is omitted, :00 is assumed. If the date component is omitted, the current day is assumed. Alternatively the strings yesterday, today, tomorrow are understood, which refer to 00:00:00 of the day before the current day, the current day, or the day after the current day, respectively. now refers to the current time. Finally, relative times may be specified, prefixed with - or +, referring to times before or after the current time, respectively.
???
On Tue, 31 Dec 2013 20:17:42 +0800 Ed Greshko Ed.Greshko@greshko.com wrote:
On 12/31/13 19:24, Frank Murphy wrote:
Has anyone found a way to: journalctl | grep "last 10 minutes"
man journalctl
--since=, --until= Start showing entries on or newer than the specified date,or on or older than the specified date, respectively. Date specifications should be of the format "2012-10-30 18:17:16". If the time part is omitted, 00:00:00 is assumed. If only the seconds component is omitted, :00 is assumed. If the date component is omitted, the current day is assumed. Alternatively the strings yesterday, today, tomorrow are understood, which refer to 00:00:00 of the day before the current day, the current day, or the day after the current day, respectively. now refers to the current time. Finally, relative times may be specified, prefixed with - or +, referring to times before or after the current time, respectively.
???
Been there already culdn'f find a last 10mins
How does that give me 10 mins, and every 10 mins, without enternining specific time crontab -e */10 * * * * * "journalclt -b -10 | mailx "Journalctl for last 10 mins" user" Confused, hence the Q?
On 12/31/13 20:25, Frank Murphy wrote:
On Tue, 31 Dec 2013 20:17:42 +0800 Ed Greshko Ed.Greshko@greshko.com wrote:
On 12/31/13 19:24, Frank Murphy wrote:
Has anyone found a way to: journalctl | grep "last 10 minutes"
man journalctl
--since=, --until= Start showing entries on or newer than the specified date,or on or older than the specified date, respectively. Date specifications should be of the format "2012-10-30 18:17:16". If the time part is omitted, 00:00:00 is assumed. If only the seconds component is omitted, :00 is assumed. If the date component is omitted, the current day is assumed. Alternatively the strings yesterday, today, tomorrow are understood, which refer to 00:00:00 of the day before the current day, the current day, or the day after the current day, respectively. now refers to the current time. Finally, relative times may be specified, prefixed with - or +, referring to times before or after the current time, respectively.
???
Been there already culdn'f find a last 10mins
How does that give me 10 mins, and every 10 mins, without enternining specific time crontab -e */10 * * * * * "journalclt -b -10 | mailx "Journalctl for last 10 mins" user" Confused, hence the Q?
Not thinking straight since it is 3 hrs to New Year's..... But, a "hack" would be.....
1,11,21,31,41,51 * * * * /usr/bin/date +%Y-%m-%d\ %H:%M:%S > /tmp/mydate 0,10,20,30,50,50 * * * * journalctl --since="`cat /tmp/mydate`" | mailx "Journalctl for last 10 mins" user"
There probably is a better way to get a timestamp from 10 minutes ago..... And I can't now wrap my head around the "relative times" part of the man page. Too much vodka.
On Tue, 31 Dec 2013 11:24:28 +0000 Frank Murphy frankly3d@gmail.com wrote:
Has anyone found a way to: journalctl | grep "last 10 minutes"
Still not there :( journalctl -b --since=now (journalctl -b -f) Still haven't worked out 10min segments, maybe time fro an rfe.
On 13-12-31 08:16:01, Frank Murphy wrote:
On Tue, 31 Dec 2013 11:24:28 +0000 Frank Murphy frankly3d@gmail.com wrote:
Has anyone found a way to: journalctl | grep "last 10 minutes"
Still not there :( journalctl -b --since=now (journalctl -b -f) Still haven't worked out 10min segments, maybe time fro an rfe.
If you don´t give units, seconds are assumed.
--since -10m
See `man systemd.time` (and a lot of other systemd.foo, `man systemd.` and press TAB twice).
Also, you probably don´t want to restrict it to the current boot, or you will miss entries across a reboot.
On 12/31/13 21:21, Jonathan Dieter wrote:
On Tue, 2013-12-31 at 11:24 +0000, Frank Murphy wrote:
Has anyone found a way to: journalctl | grep "last 10 minutes"
journalctl --since -600
And a Happy New Year to you too.....
On Tue, 31 Dec 2013 15:21:12 +0200 Jonathan Dieter jdieter@lesbg.com wrote:
On Tue, 2013-12-31 at 11:24 +0000, Frank Murphy wrote:
Has anyone found a way to: journalctl | grep "last 10 minutes"
journalctl --since -600
Jonathan
Thanks Jonathan