Commit Graph

1025 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 248fc619b5 journalctl: augment short mode with a cursor at the end
Two options are added: --show-cursor to print the cursor at the end,
and --after-cursor to resume logs on the next line after the previous one.
2013-07-16 22:41:47 -04:00
Lennart Poettering c5757cc8db update TODO 2013-07-17 02:29:19 +02:00
Lennart Poettering e7256c5c13 update 2013-07-16 18:54:03 +02:00
Lennart Poettering 042e33ae3a rpm: add RPM macro for creating tmpfiles entries after package installation 2013-07-16 18:54:03 +02:00
Zbigniew Jędrzejewski-Szmek a65f06bb27 journal: return -ECHILD after a fork
A few asserts are replaced with 'return -EINVAL'. I think that
assert should not be used to check argument in public functions.

Fields in struct sd_journal are rearranged to make it less
swiss-cheesy.
2013-07-16 12:09:48 -04:00
Jan Janssen a331b5e6d4 journalctl: Add support for showing messages from a previous boot
Hi,

I redid the boot ID look up to use enumerate_unique.

This is quite fast if the cache is warm but painfully slow if
it isn't. It has a slight chance of returning the wrong order if
realtime clock jumps around.

This one has to do n searches for every boot ID there is plus
a sort, so it depends heavily on cache hotness. This is in contrast
to the other way of look-up through filtering by a MESSAGE_ID,
which only needs about 1 seek + whatever amount of relative IDs
you want to walk.

I also have a linked-list + (in-place) mergesort version of this
patch, which has pretty much the same runtime. But since this one
is using libc sorting and armortized allocation, I prefer this
one.

To summarize: The MESSAGE_ID way is a *lot* faster but can be
incomplete due to rotation, while the enumerate+sort will find
every boot ID out there but will be painfully slow for large
journals and cold caches.

You choose :P

Jan
2013-07-16 17:38:12 +02:00
Lennart Poettering 18d4e7c26e update TODO 2013-07-16 17:37:49 +02:00
Lennart Poettering 36c0868b67 Update TODO 2013-07-16 14:27:32 +02:00
Shawn Landden 3a83211689 journal: add logging of effective capabilities _CAP_EFFECTIVE
I think this is the most important of the capabilities bitmasks to log.
2013-07-16 04:27:04 +02:00
Lennart Poettering fa7deadb07 update TODO 2013-07-16 04:27:04 +02:00
Zbigniew Jędrzejewski-Szmek 77a9e8de65 man: add note about paging and colors to journalctl(1) 2013-07-15 21:34:57 -04:00
Lennart Poettering d907c20867 update TODO 2013-07-15 23:55:27 +02:00
Lennart Poettering 248aa28ff2 update TODO 2013-07-15 23:55:27 +02:00
Lennart Poettering 47a1454f70 update TODO 2013-07-12 01:18:09 +02:00
Lennart Poettering 1e1ddecf40 update TODO 2013-07-11 21:30:19 +02:00
Lennart Poettering c14901bdeb update TODO 2013-07-11 19:16:11 +02:00
Lennart Poettering 05b23cae8e update TODO 2013-07-11 18:49:53 +02:00
Lennart Poettering 049b4474b3 update TODO 2013-07-11 01:56:45 +02:00
Lennart Poettering bafb15bab9 update TODO 2013-07-11 00:32:32 +02:00
Lennart Poettering 49998ede04 update TODO 2013-07-10 23:46:30 +02:00
Lennart Poettering bdeeb6b543 update TODO 2013-07-10 23:41:03 +02:00
Tom Gundersen edeb68c53f static-nodes: move creation of static nodes from udevd to tmpfiles
As of kmod v14, it is possible to export the static node information from
/lib/modules/`uname -r`/modules.devname in tmpfiles.d(5) format.

Use this functionality to let systemd-tmpfilesd create the static device nodes
at boot, and drop the functionality from systemd-udevd.

As an effect of this we can move from systemd-udevd to systemd-tmpfiles-setup-dev:

 * the conditional CAP_MKNOD (replaced by checking if /sys is mounted rw)
 * ordering before local-fs-pre.target (see 89d09e1b5c)
2013-07-08 21:26:24 +02:00
Kay Sievers 26306aed13 update TODO 2013-07-05 14:59:52 +02:00
Lennart Poettering b0adb5468c update TODO 2013-07-04 01:09:04 +02:00
Lennart Poettering 174da5c5ca update TODO 2013-07-03 17:43:13 +02:00
Lennart Poettering 51da82a781 machined: fix bus path unescaping 2013-07-02 03:58:28 +02:00
Lennart Poettering 374ec6abf3 libsystemd-logind: fix detection of session/user/machine of a PID 2013-07-02 02:34:15 +02:00
Lennart Poettering fb6becb443 logind: port over to use scopes+slices for all cgroup stuff
In order to prepare things for the single-writer cgroup scheme, let's
make logind use systemd's own primitives for cgroup management.

Every login user now gets his own private slice unit, in which his sessions
live in a scope unit each. Also, add user@$UID.service to the same
slice, and implicitly start it on first login.
2013-07-02 01:48:55 +02:00
Lennart Poettering d28e9236e7 core: parse Slice= from the unit type specific unit file section
Since not all unit types know Slice= it belongs in the unit type
specific unit file section.
2013-07-01 02:52:17 +02:00
Lennart Poettering 6c12b52e19 core: add new "scope" unit type for making a unit of pre-existing processes
"Scope" units are very much like service units, however with the
difference that they are created from pre-existing processes, rather
than processes that systemd itself forks off. This means they are
generated programmatically via the bus API as transient units rather
than from static configuration read from disk. Also, they do not provide
execution-time parameters, as at the time systemd adds the processes to
the scope unit they already exist and the parameters cannot be applied
anymore.

The primary benefit of this new unit type is to create arbitrary cgroups
for worker-processes forked off an existing service.

This commit also adds a a new mode to "systemd-run" to run the specified
processes in a scope rather then a transient service.
2013-07-01 00:18:00 +02:00
Lennart Poettering 11ddb6f48e main: fix loading of default target 2013-06-28 18:37:15 +02:00
Lennart Poettering c2756a6840 core: add transient units
Transient units can be created via the bus API. They are configured via
the method call parameters rather than on-disk files. They are subject
to normal GC. Transient units currently may only be created for
services (however, we will extend this), and currently only ExecStart=
and the cgroup parameters can be configured (also to be extended).

Transient units require a unique name, that previously had no
configuration file on disk.

A tool systemd-run is added that makes use of this functionality to run
arbitrary command lines as transient services:

$ systemd-run /bin/ping www.heise.de

Will cause systemd to create a new transient service and run ping in it.
2013-06-28 04:12:58 +02:00
Lennart Poettering 241da3287d unit: make sure the dropins we write are high-priority 2013-06-28 00:41:24 +02:00
Lennart Poettering 7041efe960 dbus: make DeviceAllow=/DevicePolicy= writable 2013-06-27 23:13:17 +02:00
Lennart Poettering b42defe3b8 dbus: make more cgroup attributes runtime settable 2013-06-27 21:50:35 +02:00
Lennart Poettering 8e2af47840 dbus: add infrastructure for changing multiple properties at once on units and hook some cgroup attributes up to it
This introduces two bus calls to make runtime changes to selected bus
properties, optionally with persistence.

This currently hooks this up only for three cgroup atributes, but this
brings the infrastructure to add more changable attributes.

This allows setting multiple attributes at once, and takes an array
rather than a dictionary of properties, in order to implement simple
resetting of lists using the same approach as when they are sourced from
unit files. This means, that list properties are appended to by this
call, unless they are first reset via assigning the empty list.
2013-06-27 21:14:56 +02:00
Lennart Poettering 4ad490007b core: general cgroup rework
Replace the very generic cgroup hookup with a much simpler one. With
this change only the high-level cgroup settings remain, the ability to
set arbitrary cgroup attributes is removed, so is support for adding
units to arbitrary cgroup controllers or setting arbitrary paths for
them (especially paths that are different for the various controllers).

This also introduces a new -.slice root slice, that is the parent of
system.slice and friends. This enables easy admin configuration of
root-level cgrouo properties.

This replaces DeviceDeny= by DevicePolicy=, and implicitly adds in
/dev/null, /dev/zero and friends if DeviceAllow= is used (unless this is
turned off by DevicePolicy=).
2013-06-27 04:17:34 +02:00
Lennart Poettering f123dba8b1 update TODO 2013-06-21 15:57:57 +02:00
Lennart Poettering 3d3ee759e6 update TODO 2013-06-20 23:32:13 +02:00
Lennart Poettering ba73ed858f sd-login: update machine enumeration/notifications APIs for new /run/systemd/machines/ 2013-06-20 04:03:38 +02:00
Lennart Poettering 9444b1f20e logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
  than fixed croup locations.

- logind can now collect minimal information about running
  VMs/containers. As fixed cgroup locations can no longer be used we
  need an entity that keeps track of machine cgroups in whatever slice
  they might be located. Since logind already keeps track of users,
  sessions and seats this is a trivial addition.

- nspawn will now register with logind and pass various bits of metadata
  along. A new option "--slice=" has been added to place the container
  in a specific slice.

- loginctl gained commands to list, introspect and terminate machines.

- user.slice and machine.slice will now be pulled in by logind.service,
  since only logind.service requires this slice.
2013-06-20 03:49:59 +02:00
Lennart Poettering 55d32caf94 update TODO 2013-06-18 16:06:36 +02:00
Zbigniew Jędrzejewski-Szmek 718fe4b1d5 journalctl: properly print headers of empty journals 2013-06-18 08:50:08 -04:00
Lennart Poettering a016b9228f core: add new .slice unit type for partitioning systems
In order to prepare for the kernel cgroup rework, let's introduce a new
unit type to systemd, the "slice". Slices can be arranged in a tree and
are useful to partition resources freely and hierarchally by the user.

Each service unit can now be assigned to one of these slices, and later
on login users and machines may too.

Slices translate pretty directly to the cgroup hierarchy, and the
various objects can be assigned to any of the slices in the tree.
2013-06-17 21:36:51 +02:00
Lennart Poettering 1f263d4dc2 update TODO 2013-06-11 08:55:42 +02:00
Zbigniew Jędrzejewski-Szmek 87011c25d9 journal: remember last direction of search and keep offset cache
The fields in JournalFile are moved around to avoid wasting
7 bytes because of alignment.
2013-06-10 10:10:07 -04:00
Zbigniew Jędrzejewski-Szmek 6eb7a9a001 tests: add test for empty journal files
The headers are currently not printed properly: some "(null)"s appear.
2013-06-10 10:10:07 -04:00
Lennart Poettering 4e09014daf update TODO 2013-06-06 16:25:58 +02:00
Zbigniew Jędrzejewski-Szmek 5ec7641776 systemctl: limit logs in status to current boot
Also reworded a few debug messages for brevity, and added a log
statement which prints out the filter at debug level:

Journal filter: (((UNIT=sys-module-configfs.device AND _PID=1) OR (COREDUMP_UNIT=sys-module-configfs.device AND MESSAGE_ID=fc2e22bc6ee647b6b90729ab34a250b1) OR _SYSTEMD_UNIT=sys-module-configfs.device) AND _BOOT_ID=4e3c518ab0474c12ac8de7896fe6b154)
2013-06-04 09:59:06 -04:00
Václav Pavlín 76d5a71de9 systemctl: add command set-log-level
Command changes current log level
2013-05-30 20:44:41 -04:00