Lennart Poettering
ccc403587c
coredumpctl: initialize global vars
2012-10-26 20:23:28 +02:00
Lennart Poettering
85210bffd8
journal: provide an API that allows client to figure out whether they need to recheck the journal manually for changes in regular intervals
...
Network file systems generally do not offer inotify() that would work
across the network. We hence cannot rely on inotify() exclusiely in
those case. Provide an API to determine these cases, and suggest doing
manual regular rechecks.
Note that this is not complete yet, as we need to rescan journal dirs on
network file systems explicitly to find new/removed files
2012-10-26 20:07:33 +02:00
Lennart Poettering
e9f600f2fb
journal: fix parsing of monotonic kernel timestamps
2012-10-26 14:56:41 +02:00
Lennart Poettering
a4bcff5ba3
journal: introduce entry array chain cache
...
When traversing entry array chains for a bisection or for retrieving an
item by index we previously always started at the beginning of the
chain. Since we tend to look at the same chains repeatedly, let's cache
where we have been the last time, and maybe we can skip ahead with this
the next time.
This turns most bisections and index lookups from O(log(n)*log(n)) into
O(log(n)). More importantly however, we seek around on disk much less,
which is good to reduce buffer cache and seek times on rotational disks.
2012-10-26 03:24:03 +02:00
Lennart Poettering
7fb4d896e1
test: extend test-send to send some weirder data
2012-10-26 01:18:41 +02:00
Lennart Poettering
0f91dd8749
journal: properly determine cutoff max date
2012-10-26 01:18:41 +02:00
Lennart Poettering
d99ae53a73
journal: properly serialize fields with multiple values into JSON
...
This now matches the JSON serialization spec from:
http://www.freedesktop.org/wiki/Software/systemd/json
2012-10-25 01:24:44 +02:00
Lennart Poettering
db87a36e74
journalctl: remove left-over log message
2012-10-24 01:06:31 +02:00
Kay Sievers
3c62146280
shared: move sparse-endian.h from journal
2012-10-22 18:08:48 +02:00
Lennart Poettering
e8c61d7b74
journal: use le64_t instead of uint64_t where this is appropriate
2012-10-21 03:35:54 +02:00
Lennart Poettering
0962e09ec3
journal: link up documentation with the file structure header
2012-10-20 17:01:19 +02:00
Zbigniew Jędrzejewski-Szmek
5de0409e54
journal: add tool to extract coredumps
...
'systemd-coredumpctl' will list available coredumps:
PID UID GID sig exe
32452 500 500 11 /home/zbyszek/systemd/build/journalctl
32666 500 500 11 /usr/lib64/valgrind/memcheck-amd64-linux
...
'systemd-coredumpctl dump PID' will write the coredump
to specified file or stdout.
2012-10-19 15:15:38 +00:00
Lennart Poettering
6d9082172c
journald.conf: remove MinSize= settings
...
There's no point in making this configurable, so let's drop it in order
to simplify configuration a bit.
2012-10-19 00:56:42 +02:00
Lennart Poettering
ed757c0cb0
util: unify line caching and column caching
2012-10-19 00:07:55 +02:00
Lennart Poettering
8481248b9f
util: unify usage of on_tty() in util.c
2012-10-19 00:07:55 +02:00
Lennart Poettering
f89a3b6f5b
journalctl: unify ellipsation handling between journalctl and systemctl
2012-10-18 23:35:44 +02:00
Lennart Poettering
cd4b13e0bf
journalctl: don't ellipsize unless on a tty
2012-10-18 23:35:44 +02:00
Lennart Poettering
fd6e887537
journalctl: honour -n if -F is used
2012-10-18 23:35:44 +02:00
Lennart Poettering
b5cff06b48
journal: fix symbol versioning file
2012-10-18 22:38:56 +02:00
Lennart Poettering
bdc02927f7
journal: typo fix
2012-10-18 22:36:50 +02:00
Lennart Poettering
1cd8a002ff
journal: implement filtering in browse.html
2012-10-18 22:34:42 +02:00
Lennart Poettering
082d0180f9
journal: add high-level match option to filter by current boot id
2012-10-18 22:34:42 +02:00
Lennart Poettering
240a5fe83e
journal: add ability to list unique fields to gatewayd
2012-10-18 22:34:42 +02:00
Lennart Poettering
d5c4ed623b
journal: validate field name in sd_journal_query_unique()
2012-10-18 22:34:42 +02:00
Zbigniew Jędrzejewski-Szmek
115646c789
libsystemd-journal: export sd_journal_restart_unique
2012-10-18 19:18:20 +00:00
Lennart Poettering
0598fd4a95
journal: suggest rotation when fields are not indexed
2012-10-18 04:12:25 +02:00
Lennart Poettering
15804cebfd
journalctl: move access check before the first access to the journal files
2012-10-18 03:35:58 +02:00
Lennart Poettering
15119c1602
journalctl: implement quering field values with new -F switch
...
Example:
journalctl -F _SYSTEMD_UNIT
will list all units that ever logged to the journal.
2012-10-18 03:35:58 +02:00
Lennart Poettering
3c1668da62
journal: add ability to list values a specified field can take in all entries of the journal
...
The new 'unique' API allows listing all unique field values that a field
specified by a field name can take in all entries of the journal. This
allows answering queries such as "What units logged to the journal?",
"What hosts have logged into the journal?", "Which boot IDs have logged
into the journal?".
Ultimately this allows implementation of tools similar to lastlog based
on journal data.
Note that listing these field values will not work for journal files
created with older journald, as the field values are not indexed in
older files.
2012-10-18 03:35:18 +02:00
Lennart Poettering
4fa25d62bd
journal: fix potential integer overflow
2012-10-17 21:25:42 +02:00
Lennart Poettering
5e6870eab5
journalctl: properly track rotated journals in follow mode
2012-10-16 23:00:04 +02:00
Lennart Poettering
44a5fa34d9
sd-journal: fix bad memory access
2012-10-16 22:59:28 +02:00
Lennart Poettering
fb0951b02e
journal: implement time-based rotation/vacuuming
...
This also enables time-based rotation (but not vacuuming) after 1month,
so that not more one month of journal is lost at a time per vacuuming.
2012-10-16 22:58:07 +02:00
Lennart Poettering
1f2da9ec51
journal: sort data items of entries by offset
...
This should slightly optimize disk access patterns on rotating disks for
simple readers.
2012-10-16 21:40:48 +02:00
Colin Guthrie
a2ab7ee612
journal: Set the last_unused pointer correctly when attaching an unused window
...
It seems the previous code was copy/pasted from context_detach_window()
but not updated.
2012-10-16 16:14:46 +02:00
Colin Guthrie
89de694724
journal: Properly track the number of allocated windows.
...
Checks were already in place to make sure that the number of
windows was limited to 64, but the count was never incremented
or decremented.
2012-10-16 16:13:33 +02:00
Lennart Poettering
c3f60ec54d
journalctl: add --unit=/-u to match by unit name
...
This applies unit_name_mangle() to the specified unit names and hence
can handle weird characters nicely and will add unit suffixes as
necessary.
2012-10-16 02:59:27 +02:00
Lennart Poettering
9048b11f8b
journalctl: harmonise in-stream comments
...
From now on, always use ANSI-SQL-style comments in log streams, i.e.
prefix with --. We also suffix things with this, just to be nice...
2012-10-16 01:09:09 +02:00
Zbigniew Jędrzejewski-Szmek
edfb521a21
journalctl: skip informational messages in export/json modes
2012-10-15 18:17:49 +02:00
Zbigniew Jędrzejewski-Szmek
c3eba2ab4e
journalctl: make --follow really work
2012-10-14 15:29:38 +00:00
Zbigniew Jędrzejewski-Szmek
e3ed66c52e
journalctl: make --follow work again
...
Stopped working after cfbc22ab 'journalctl: implement --since= and
--until for filtering by time'.
2012-10-13 21:37:42 +02:00
Zbigniew Jędrzejewski-Szmek
0ab5c3ed87
journal-verify: get rid of an unused variable
...
When compiling without gcrypt, gcc emits an annoying warning.
2012-10-13 21:37:11 +02:00
Zbigniew Jędrzejewski-Szmek
b1bafc00d5
journald: add missing include
...
./src/journal/journald.h:123:114: warning: ‘struct ucred’ declared inside parameter list [enabled by default]
2012-10-13 16:09:09 +00:00
Zbigniew Jędrzejewski-Szmek
6374a73b00
journal-gatewayd: rename variables to avoid -Wshadow warning
2012-10-13 14:54:56 +02:00
Zbigniew Jędrzejewski-Szmek
e88baee88f
journald: properly update message size after stripping the identifier
...
Valgrind says:
==29176== Conditional jump or move depends on uninitialised value(s)
==29176== at 0x412A85: cunescape_length_with_prefix (util.c:1565)
==29176== by 0x40B351: dev_kmsg_record (journald-kmsg.c:301)
==29176== by 0x40B653: server_read_dev_kmsg (journald-kmsg.c:347)
==29176== by 0x40B701: server_flush_dev_kmsg (journald-kmsg.c:365)
==29176== by 0x409DE7: main (journald.c:1535)
2012-10-13 14:40:32 +02:00
Zbigniew Jędrzejewski-Szmek
1b4bb4fdac
journal: fix build in VALGRIND compatibility mode
2012-10-13 14:40:32 +02:00
Zbigniew Jędrzejewski-Szmek
1ca6783f5e
log: introduce a macro to format message id
...
The MESSAGE_ID=... stanza will appear in countless number of places.
It is just too long to write it out in full each time.
Incidentally, this also fixes a typo of MESSSAGE is three places.
2012-10-13 14:26:30 +02:00
Lennart Poettering
cfbc22abd0
journalctl: implement --since= and --until for filtering by time
2012-10-11 16:43:37 +02:00
Lennart Poettering
48383c2511
journal: support epxorting the journal in a format suitable for text/event-stream
2012-10-11 02:37:10 +02:00
Lennart Poettering
33316dbf20
journal: take scroll events in the entire white box in browse.html
2012-10-11 01:57:36 +02:00