summaryrefslogtreecommitdiff
path: root/tools/ck-history.c
AgeCommit message (Collapse)AuthorFilesLines
2017-05-21fix: remove the rest of the gcc warningsEric Koegel1-3/+3
2014-10-13Fix event->type = CK_LOG_EVENT_SYSTEM_START in historyEric Koegel1-4/+3
When the type = CK_LOG_EVENT_SYSTEM_START we can't cast the event to CkLogSeatSessionAddedEvent. Also find_first_matching_system_stop_event doesn't care about the 2nd argument so just make it NULL to make it clear we aren't expecting to pass something of value in.
2014-10-13Use 64-bit time_tajacoutot1-4/+11
GLib's struct GTimeVal declares tv_sec as glong (will break around 2038). Our struct timeval declares tv_sec as time_t... warning: passing argument 1 of 'ctime' from incompatible pointer type Taken from: http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-ports/tree/sysutils/consolekit/patches/patch-tools_ck-history_c
2014-10-12Limit max username length to 24Eric Koegel1-1/+1
64 makes really long lines using ck-history on the cli, change it down to 24. If this becomes a problem we can add an option to display more characters.
2014-10-12Add i18n supportEric Koegel1-0/+9
Sets up ConsoleKit2 for translations via GNU gettext. There might still be a couple strings that need to be marked for translation, but this sets up the project to use gettext. Fixes bug: https://bugs.freedesktop.org/show_bug.cgi?id=23482
2014-10-08Fix ck-history truncating login namesEric Koegel1-11/+13
When not in compat-mode the max login name length is 64 which should cover most sane uses. Additionally this patch makes the command line options show up in --help. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=36364
2014-09-30Fix uninitialized variable: eEric Koegel1-1/+2
In the else branch, e is used uninitialized. Move the cast outside of the if/else block to prevent this.
2014-09-30Use correct type in tools/ck-history.c (Bug 51120)Eric Koegel1-2/+2
Patch written by Rafal Muzylo. Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
2011-05-24ck-history: don't truncate --frequent output to 8 charsRay Strode1-1/+1
GDM screenscrapes the output and so we need the full username. https://bugzilla.gnome.org/show_bug.cgi?id=650330
2010-06-11Add a --since option to show entries in a time windowWilliam Jon McCann1-22/+74
Doesn't load any history files it doesn't need to which should help performance on systems with long histories. https://bugs.freedesktop.org/show_bug.cgi?id=25660
2009-09-14log the kernel release and boot arguments at start timeWilliam Jon McCann1-3/+2
Someone needs to add support for non-Linux platforms. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23948
2009-09-14show display in host field if the host isn't setWilliam Jon McCann1-7/+15
This is consistent with how we write the wtmp records in GDM. https://bugs.freedesktop.org/show_bug.cgi?id=23944
2009-09-14print the uptime for the reboot items in the reportWilliam Jon McCann1-2/+39
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23279
2009-09-14fix logic for finding session remove eventsWilliam Jon McCann1-4/+4
The logic is supposed to find any type of removal event. This can be one of CK_LOG_EVENT_SEAT_SESSION_REMOVED, CK_LOG_EVENT_SYSTEM_START, CK_LOG_EVENT_SYSTEM_STOP, or CK_LOG_EVENT_SYSTEM_RESTART. This is used to determine if the removal was normal or RECORD_STATUS_CRASH, or RECORD_STATUS_DOWN. And indicated in the report log as something like: "Thu Sep 3 21:28 - down (20:20)"
2008-02-01when a parsing error occurs don't return an empty eventWilliam Jon McCann1-6/+6
2008-01-29add support for logging start/stop/restartWilliam Jon McCann1-156/+288
Also enable reporting this information with ck-history.
2008-01-28allow session type filtering for all report formatsWilliam Jon McCann1-9/+22
2008-01-28add session-type filtering to ck-historyWilliam Jon McCann1-8/+14
2008-01-23history should log to /var/log not /var/runWilliam Jon McCann1-1/+1
2007-10-22add support for reporting from logrotated filesWilliam Jon McCann1-10/+118
2007-10-22add a basic --frequent reportWilliam Jon McCann1-0/+109
2007-10-21add last mode, filtering by user/seat; shorten logged idsWilliam Jon McCann1-11/+166
2007-10-19check for oldest being nullWilliam Jon McCann1-2/+4
2007-10-19rename --last to --last-compatWilliam Jon McCann1-3/+3
2007-10-19a few fixes for last patchWilliam Jon McCann1-4/+25
2007-10-19add a last compatible outout format to ck-historyWilliam Jon McCann1-6/+169
2007-10-17add a basic ck-history commandWilliam Jon McCann1-0/+157
Refactor some event logging code to share with ck-history. At the moment the command only prints the events.