1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
Commit Graph

712 Commits

Author SHA1 Message Date
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
df688b23da man: minor updates 2012-10-26 01:18:41 +02:00
Lennart Poettering
0bc6235280 man: fix example 2012-10-26 01:18:40 +02:00
Thomas Hindoe Paaboel Andersen
bb31a4ac19 man: typo fixes
https://bugs.freedesktop.org/show_bug.cgi?id=55890

Fixed typos, serial comma, and removed "either" as there were more
than two options. Also did an extra rename of "system-shutdown"
to "systemd-shutdown" that was forgotten in commit
8bd3b8620c
2012-10-26 00:16:47 +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
Kay Sievers
1ada30ac51 man: udev - add 'udevadm hwdb --update' 2012-10-24 02:10:42 +02:00
Tom Gundersen
ef44ed4e2d man: fix typo in tmpfiles.d
Reported-by: Jason St. John <jstjohn@purdue.edu>
2012-10-23 22:15:05 +02:00
Tom Gundersen
a2558205f7 tmpfiles: allow Age to be set to 0
Mostly useful for testing purposes. Setting Age to 1s works just as
well, but it is surprising that using 0s (or just 0) does not work.

Also clarify this in the documentation.
2012-10-23 21:53:20 +02:00
Zbigniew Jędrzejewski-Szmek
2eb8e90ff9 man: reword journalctl -n description 2012-10-23 11:21:48 +02:00
Michael Biebl
eac223e134 man: the corresponding LSB facility to rpcbind.target is $portmap 2012-10-23 02:34:02 +02:00
Lennart Poettering
7cd28a8a2f man: add man page for localectl 2012-10-21 03:35:54 +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
aae9a96d4b systemctl: remove --follow option
Given that "journalctl -u" exists now there's no need to duplicate this
functionality in systemctl, so let's drop this, especially given that it
always felt a bit awkward to overload "-f" to both --force and --follow,
and to have continues output with a status header for this.

        systemctl status -f avahi-daemon

now becomes:

        journalctl -fu avahi-daemon

Which is shorter and a lot less redundant.
2012-10-19 00:12:46 +02:00
Zbigniew Jędrzejewski-Szmek
774471b68a man: fix compilation warning in sd_journal_query_unique example 2012-10-18 23:45:30 +02:00
Lennart Poettering
0902aa1838 man: ensure example of sd_journal_query_unique() compiles cleanly 2012-10-18 23:35:44 +02:00
Dave Reisner
9536e0e109 journalctl.xml: fix shortopt for --field 2012-10-18 16:56:03 -04:00
Lennart Poettering
1a2be33aa5 man: add missing man page 2012-10-18 18:48:45 +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
600b704eb0 manager: connect SIGRTMIN+24 to terminating --user instances 2012-10-18 01:19:35 +02:00
Lennart Poettering
97ae63e2a9 service: when invoking service processes in --user mode set MANAGERPID to PID of systemd 2012-10-18 01:18:50 +02:00
Lennart Poettering
c978343015 timedatectl: rename --fix-system to --adjust-system-clock
Quite long to read but hopefully less misleading.
2012-10-17 22:52:21 +02:00
Lennart Poettering
dbc4fbae58 hostname: add new hostnamectl tool as text client for hostnamed 2012-10-17 21:25:42 +02:00
Lennart Poettering
6d0274f115 timedatectl: introduce new command line client for timedated
Much like logind has a client in loginctl, and journald in journalctl
introduce timedatectl, to change the system time (incl. RTC), timezones
and related settings.
2012-10-17 21:25:42 +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
183de6d7d9 id128: introduce new SD_ID128_CONST_STR() macro 2012-10-16 17:02:51 +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
Ferenc Wágner
7e505069d2 man: Fix typo in udevadm documentation 2012-10-16 01:11:42 +02:00
Andrew Eikum
16dad32e43 Reword sentences that contain psuedo-English "resp."
As you likely know, Arch Linux is in the process of moving to systemd.
So I was reading through the various systemd docs and quickly became
baffled by this new abbreviation "resp.", which I've never seen before
in my English-mother-tongue life.

Some quick Googling turned up a reference:
<http://www.transblawg.eu/index.php?/archives/870-Resp.-and-other-non-existent-English-wordsNicht-existente-englische-Woerter.html>

I guess it's a literal translation of the German "Beziehungsweise", but
English doesn't work the same way. The word "respectively" is used
exclusively to provide an ordering connection between two lists. E.g.
"the prefixes k, M, and G refer to kilo-, mega-, and giga-,
respectively." It is also never abbreviated to "resp." So the sentence
"Sets the default output resp. error output for all services and
sockets" makes no sense to a natural English speaker.

This patch removes all instances of "resp." in the man pages and
replaces them with sentences which are much more clear and, hopefully,
grammatically valid. In almost all instances, it was simply replacing
"resp." with "or," which the original author (Lennart?) could probably
just do in the future.

The only other instances of "resp." are in the src/ subtree, which I
don't feel privileged to correct.

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
2012-10-16 01:03:01 +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
c6511e859c journal: when browsing the journal via browse.html allow clicking on entries to show their details 2012-10-10 22:41:03 +02:00
Dave Reisner
8bd3b8620c man/systemd-halt.service: fix typo
Fix reference to "system-shutdown" as being a binary.
2012-10-04 15:09:15 -04:00
Сковорода Никита Андреевич
2f1bb51336 man: handle-sleep-key is invalid, replace it with handle-suspend-key and handle-hibernate-key in systemd-inhibit help and man. 2012-10-03 19:15:02 -04:00
Lennart Poettering
5198dabcce man: document behaviour of ListenStream= with only a port number in regards to IPv4/IPv6 2012-10-03 14:18:55 -04:00
Tom Gundersen
f51356b462 vconsole: default to the kernel compiled-in font
No longer override the default kernel font if nothing is specified in
vconsole.conf.

The default kernel font[0] provides ISO-8859-1 and box characters. Users
of Arabic, Cyrilic or Hebrew must set a different font manually as these
character sets were provided by the old default font [1], but are not
any longer.

Rationale:

 * it is counter-intuitive that an empty vconsole.conf file is different
   from adding FONT="";
 * the version of the default font shipped with Arch (which is the
   upstream one) behaves very badly during early boot[2] (which should
   admittedly be fixed in the font itself);
 * the kernel already supplies a default font, it seems reasonable to
   use that unless anything else is specified;
 * This also avoids a needless slow call to setfont; and
 * We don't want to work around problems in the kernel (in case the
   compiled-in font is not acceptable for whatever reason).

[0]: <https://dev.archlinux.org/~tomegun/kernel.bdf>
[1]: <https://dev.archlinux.org/~tomegun/latarcyrheb.bdf>
[2]: <http://i.imgur.com/J2tM4.jpg>
2012-10-03 15:42:19 +02:00
Dave Reisner
8fd1952fbe man: fix invalid links to generator wiki pages
s/Generator/Generators/
2012-10-02 11:52:29 -04:00
Zbigniew Jędrzejewski-Szmek
27407a01c6 nspawn: use automatic cleanup and provide debug info
The documentation for --link-journal is also reworded.
2012-10-02 14:56:26 +02:00
Zbigniew Jędrzejewski-Szmek
b2e6df73aa trivial: fix typo 2012-10-02 14:56:18 +02:00
Lennart Poettering
c651162ca8 man: correct the default logging rate limit to actually say what the code implements 2012-09-28 02:18:55 +02:00
Lennart Poettering
8f14c8327b journalctl: add --cursor switch 2012-09-28 00:55:24 +02:00
Lennart Poettering
1705594f59 journalctl: make the argument to -n optional 2012-09-21 22:33:02 +02:00
Lennart Poettering
8e7fd6ade4 logind: split up HandleSleepKey= into HandleSuspendKey= and HandleHibernateKey=
The kernel and X11 distuingish these two, and Thinkpad keys have both,
hence we really should distinguish them too.
2012-09-21 15:44:14 +02:00
Lennart Poettering
12a1309e11 man: document new inhibitor types 2012-09-19 15:28:55 +02:00
Lennart Poettering
beaafb2ea6 logind: rework power key/suspend key/lid switch handling
http://lists.freedesktop.org/archives/systemd-devel/2012-September/006604.html
https://bugzilla.gnome.org/show_bug.cgi?id=680689

This changes the meaning of the
HandlePowerKey=/HandleSleepKey=/HandleLidSwitch= setting of logind.conf
2012-09-19 13:10:10 +02:00
Lennart Poettering
6569cae18e unit-printf: add specifiers for the host name, machine id, boot id 2012-09-18 11:53:47 +02:00
Thomas Hindoe Paaboel Andersen
57ccf90735 docs: typos in loginctl.xml 2012-09-18 11:05:08 +02:00
Lennart Poettering
84b98e6f5e git: update .gitignore 2012-09-17 17:48:19 +02:00
Zbigniew Jędrzejewski-Szmek
f6c2e28b07 directive-index: journal directives 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek
ffafe91b5a directive-index: system manager directives 2012-09-17 12:42:22 +02:00
Zbigniew Jędrzejewski-Szmek
e1abd3efab directive-index: add UDEV fields 2012-09-17 12:42:22 +02:00
Lennart Poettering
98a77df5fe logind: make sure there's always a getty available on TTY6
Previously, if X allocated all 6 TTYs (for multi-session for example) no
getty would be available anymore to guarantee console-based logins.

With the new ReserveVT= switch in logind.conf we can now choose one VT
(6 by default) that will always be subject to autovt-style activation,
i.e. we'll always have a getty on TTY6, and X will never take possession
of it.
2012-09-17 12:39:16 +02:00
Dave Reisner
54693d9bfa tmpfiles: use write(2) for the 'w' action
This resolves problems with filesystems which do not implement the
aio_write file operation. In this case, the kernel will fall back using
a loop writing technique for each pointer in a received iovec. The
result is strange errors in dmesg such as:

[   31.855871] elevator: type  not found
[   31.856262] elevator: switch to
[   31.856262]  failed

It does not make sense to implement a synchronous aio_write method for
sysfs as this isn't a real filesystem where a reasonable use case for
using writev exists, nor is there an expectation that tmpfiles will be
used to write more data than can be reasonably written in a single write
syscall.

In addition, some sysfs attrs are currently buggy and will NOT reject
the second write with the newline, causing the sysfs value to be zeroed
out. This of course should be fixed in the kernel regardless of any
wrongdoing in userspace, but this simple change makes us immune to such
a bug.

This change means that we do not write a trailing newline by default, as
the expected use case of 'w' is for sysfs and procfs. In exchange, honor
C-style backslash escapes so that if the newline is really needed, the
user can add it.
2012-09-16 17:18:04 +02:00
Lennart Poettering
050a99bd7b man: update localtime(5) a bit 2012-09-14 20:45:37 +02:00
Lennart Poettering
1638bd34e4 man: mention journalctl in the systemd man page 2012-09-14 20:27:05 +02:00
Shawn Landden
608da9e9b5 man: remove timezone(5) and add localtime(5) 2012-09-14 19:27:59 +02:00
Pierre Schmitz
0cd1fd4369 nspawn: Fix minor typo in man page 2012-09-14 17:42:12 +02:00
Eelco Dolstra
0675cc4a02 daemon: Fix broken links to sd-daemon.c 2012-09-13 20:08:54 +02:00
Lennart Poettering
64e441d0cf man: reword logind.conf.xml a bit 2012-09-13 19:40:19 +02:00
Thomas Hindoe Paaboel Andersen
071d73c1aa docs: typo fixes in pam_systemd.xml
https://bugs.freedesktop.org/show_bug.cgi?id=54501
2012-09-13 19:37:04 +02:00
Thomas Hindoe Paaboel Andersen
08307930b2 docs: typo fixes in logind.conf.xml and os-release.xml
https://bugs.freedesktop.org/show_bug.cgi?id=54501
2012-09-13 19:36:22 +02:00
Thomas Hindoe Paaboel Andersen
a0b78ede25 man: fix typos in halt.xml and journalctl.xml
https://bugs.freedesktop.org/show_bug.cgi?id=54501
2012-09-13 19:35:18 +02:00
Thomas Hindoe Paaboel Andersen
c53158818d man: fix a bunch of typos in docs
https://bugs.freedesktop.org/show_bug.cgi?id=54501
2012-09-13 19:34:24 +02:00
Dave Reisner
d4e9eb91ea tmpfiles: support globbing for w option
Break out the write logic into a separate function and simply use it as
a callback to glob_item.

This allows users to consolidate writes to sysfs with multiple similar
pathnames, e.g.

  w /sys/class/block/sd[a-z]/queue/read_ahead_kb - - - - 1024
2012-09-12 08:46:03 +02:00
Lennart Poettering
d18dff430b login: reshuffle meaning of require_active parameter 2012-09-12 08:30:35 +02:00
Lennart Poettering
742a862bb8 condition: add ConditionFileNotEmpty=
https://bugs.freedesktop.org/show_bug.cgi?id=54448
2012-09-11 01:29:46 +02:00
Lennart Poettering
490d99e9bf man: document that assignemnts of devices to seats are persistent 2012-09-10 13:20:45 +02:00
Lennart Poettering
182b858fc2 journald: make splitting up of journal files per-user configurable 2012-09-07 23:40:00 +02:00
Lennart Poettering
a1a03e3075 journal: add call to determine current journal file disk usage 2012-09-07 23:20:28 +02:00
Lennart Poettering
a29271926a man: document that ExecStart= doesn't understand shell command lines 2012-09-05 23:51:19 -07:00
Lennart Poettering
9e8a535faa journalctl: replace --local by --merge, i.e. don't interleave remote journals by default 2012-09-05 16:49:00 -07:00
Lennart Poettering
d87be9b0af nspawn: handle poweroff/reboot nicely in containers 2012-09-05 16:23:41 -07:00
Lennart Poettering
57371e5829 shutdown: remove explicit sync() invocations
The kernel implicitly does sync() anyway, hence there is no need to do
that in userspace explicitly. This makes the "-n" switch to halt(8) a
noop.
2012-09-05 15:32:57 -07:00
Lennart Poettering
a6e87e90ed journalctl: rework JSON output mode
This splits the JSON output mode into different modes: json and
json-pretty. The former printing one entry per line, the latter showing
JSON objects nicely indented and in multiple lines to make it easier to
read for humans.
2012-09-05 15:25:32 -07:00
Lennart Poettering
be5412d854 main: jointly mount more controllers
After talking to the cgroup kernel folks at LPC we came to the
conclusion that it is probably a good idea to mount all CPU related
resp. all network related cgroup controllers together, both because they
are good defaults for admins and because this might prepare
for eventual kernel cleanups where the ability to mount them separately
is removed.
2012-09-03 18:59:05 -07:00
Lennart Poettering
bdfb9e7f7c journald: augment journal entries from the kernel with data from udev 2012-08-22 02:49:17 +02:00
Lennart Poettering
c0d6e764d1 unit: add new ConditionHost= condition type 2012-08-22 01:51:53 +02:00
Lennart Poettering
eb53b74f7e journald: add new Seal= configuration option 2012-08-20 22:13:22 +02:00
Lennart Poettering
31094aae09 man: add man pages for new FSS stuff 2012-08-17 01:09:43 +02:00
Lennart Poettering
abdf799316 man: extend documentation for RestartPreventExitStatus= and SuccessExitStatus= a bit 2012-08-14 18:37:45 +02:00
Lukas Nykryn
96342de68d service: add options RestartPreventExitStatus and SuccessExitStatus
In some cases, like wrong configuration, restarting after error
does not help, so administrator can specify statuses by RestartPreventExitStatus
which will not cause restart of a service.

Sometimes you have non-standart exit status, so this can be specified
by SuccessfulExitStatus.
2012-08-14 14:46:03 +02:00
Lennart Poettering
ac0930c892 namespace: rework namespace support
- don't use pivot_root() anymore, just reuse root hierarchy
- first create all mounts, then mark them read-only so that we get the
  right behaviour when people want writable mounts inside of
  read-only mounts
- don't pass invalid combinations of MS_ constants to the kernel
2012-08-13 15:27:04 +02:00
Lennart Poettering
6f7ea7df77 man: document kernel journal fields 2012-08-09 17:12:07 +02:00
Lennart Poettering
b6a345143b journalctl: support device node matches as shortcut 2012-08-09 17:05:29 +02:00
Lennart Poettering
51abe64c85 journald: basic support for /dev/kmsg parsing 2012-08-09 15:57:24 +02:00
Lennart Poettering
4e818ef351 man: clarify the order of seats in sd_get_seats() is undefined 2012-08-09 15:57:01 +02:00
Michal Sekletar
d568a3350e systemd: introduced new timeout types
Makes possible to specify separate timeout for start and stop of
the service.

[ Improved the manpage. Coding style fix. -- michich ]
2012-08-08 18:11:09 +02:00
Tom Gundersen
4271d8235f cryptsetup: add keyfile-size= support
This is useful e.g. if the keyfile is a raw device, where only parts of it
should be read. It is typically used whenever the keyfile-offset= option is
specified.

Tested-by: Erik Westrup <erik.westrup@gmail.com>
2012-08-03 20:49:55 +02:00
Zbigniew Jędrzejewski-Szmek
871b876ecc man: document three new cgtop options 2012-08-03 18:12:07 +02:00
Lennart Poettering
18c7ed186b journal: add sd_journal_perror() to API 2012-08-01 19:53:23 +02:00
Zbigniew Jędrzejewski-Szmek
5c315b4f2a doc: clarification in system.unit man page 2012-07-31 01:29:40 +02:00
Lennart Poettering
7212a8a99e logind: add new loginctl lock-sessions command 2012-07-29 17:08:47 +02:00
Lennart Poettering
bad1837c18 Revert "man: ship systemd-udevd as the real manpage"
We want to keep things uniform, and hence treat udevd's man page like
any other in the repo. What matters is how users primarily interface
with a service, and that is not the binary path in /usr/lib/systemd but
the service name.

This reverts commit 6c1f3ba54a.
2012-07-29 11:58:41 +02:00
Zbigniew Jędrzejewski-Szmek
b8e8f0cba4 man: grammar fixes for systemd-udev(8) 2012-07-28 23:10:15 +02:00
Dave Reisner
6c1f3ba54a man: ship systemd-udevd as the real manpage
Instead of making systemd-udevd a so-link to systemd-udevd.service,
ship the real page as systemd-udevd to integrate better with distros
where udevd might be run standalone.
2012-07-28 22:35:41 +02:00
Lennart Poettering
941e990db1 journalctl: add --priority= switch for filtering by priority 2012-07-27 10:32:37 +02:00
Michal Sekletar
29283ea4cf systemd: enable/disable instances of template
https://bugzilla.redhat.com/show_bug.cgi?id=752774
2012-07-26 10:02:10 +02:00
Michal Schmidt
f3d52e8cf2 man: rewrite the description of PartOf 2012-07-26 09:34:55 +02:00
Michal Sekletar
85e9a1010d systemd: added new dependency PartOf
This should address TODO item "new dependency type to "group" services
in a target". Semantic of new dependency is as follows. Once configured
it creates dependency which will cause that all dependent units get
stopped if unit they all depend on is stopped or restarted.  Usual use
case would be configuring PartOf=some.target in template unit file
and WantedBy=some.target in [Install] section and enabling desired
number of instances. In this case starting one instance won't pull in
target but stopping or starting target(in case of WantedBy is properly
configured) will cause stop/start of all instances.
2012-07-26 09:16:43 +02:00