Imported Upstream version 219

This commit is contained in:
Martin Pitt 2015-02-17 11:22:16 +01:00
parent f47781d88c
commit e735f4d4ea
1473 changed files with 106942 additions and 77326 deletions

View File

@ -22,6 +22,7 @@ MANPAGES += \
man/localtime.5 \
man/machine-id.5 \
man/machine-info.5 \
man/networkctl.1 \
man/os-release.5 \
man/sd-daemon.3 \
man/sd-id128.3 \
@ -64,7 +65,6 @@ MANPAGES += \
man/systemd-detect-virt.1 \
man/systemd-efi-boot-generator.8 \
man/systemd-escape.1 \
man/systemd-firstboot.1 \
man/systemd-fsck@.service.8 \
man/systemd-fstab-generator.8 \
man/systemd-getty-generator.8 \
@ -99,6 +99,7 @@ MANPAGES += \
man/systemd.automount.5 \
man/systemd.device.5 \
man/systemd.exec.5 \
man/systemd.generator.7 \
man/systemd.journal-fields.7 \
man/systemd.kill.5 \
man/systemd.link.5 \
@ -198,12 +199,14 @@ MANPAGES_ALIAS += \
man/sd_journal_wait.3 \
man/sd_machine_get_ifindices.3 \
man/sd_notifyf.3 \
man/sd_pid_notify.3 \
man/sd_pid_notify_with_fds.3 \
man/sd_pid_notifyf.3 \
man/sleep.conf.d.5 \
man/system.conf.d.5 \
man/systemd-ask-password-console.path.8 \
man/systemd-ask-password-wall.path.8 \
man/systemd-ask-password-wall.service.8 \
man/systemd-firstboot.service.1 \
man/systemd-fsck-root.service.8 \
man/systemd-fsck.8 \
man/systemd-hibernate-resume.8 \
@ -308,12 +311,14 @@ man/sd_journal_test_cursor.3: man/sd_journal_get_cursor.3
man/sd_journal_wait.3: man/sd_journal_get_fd.3
man/sd_machine_get_ifindices.3: man/sd_machine_get_class.3
man/sd_notifyf.3: man/sd_notify.3
man/sd_pid_notify.3: man/sd_notify.3
man/sd_pid_notify_with_fds.3: man/sd_notify.3
man/sd_pid_notifyf.3: man/sd_notify.3
man/sleep.conf.d.5: man/systemd-sleep.conf.5
man/system.conf.d.5: man/systemd-system.conf.5
man/systemd-ask-password-console.path.8: man/systemd-ask-password-console.service.8
man/systemd-ask-password-wall.path.8: man/systemd-ask-password-console.service.8
man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.service.8
man/systemd-firstboot.service.1: man/systemd-firstboot.1
man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
man/systemd-fsck.8: man/systemd-fsck@.service.8
man/systemd-hibernate-resume.8: man/systemd-hibernate-resume@.service.8
@ -566,6 +571,15 @@ man/sd_machine_get_ifindices.html: man/sd_machine_get_class.html
man/sd_notifyf.html: man/sd_notify.html
$(html-alias)
man/sd_pid_notify.html: man/sd_notify.html
$(html-alias)
man/sd_pid_notify_with_fds.html: man/sd_notify.html
$(html-alias)
man/sd_pid_notifyf.html: man/sd_notify.html
$(html-alias)
man/sleep.conf.d.html: man/systemd-sleep.conf.html
$(html-alias)
@ -581,9 +595,6 @@ man/systemd-ask-password-wall.path.html: man/systemd-ask-password-console.servic
man/systemd-ask-password-wall.service.html: man/systemd-ask-password-console.service.html
$(html-alias)
man/systemd-firstboot.service.html: man/systemd-firstboot.html
$(html-alias)
man/systemd-fsck-root.service.html: man/systemd-fsck@.service.html
$(html-alias)
@ -732,6 +743,17 @@ MANPAGES_ALIAS += \
endif
if ENABLE_FIRSTBOOT
MANPAGES += \
man/systemd-firstboot.1
MANPAGES_ALIAS += \
man/systemd-firstboot.service.1
man/systemd-firstboot.service.1: man/systemd-firstboot.1
man/systemd-firstboot.service.html: man/systemd-firstboot.html
$(html-alias)
endif
if ENABLE_HOSTNAMED
MANPAGES += \
man/hostnamectl.1 \
@ -744,6 +766,16 @@ man/systemd-hostnamed.html: man/systemd-hostnamed.service.html
endif
if ENABLE_HWDB
MANPAGES += \
man/hwdb.7 \
man/systemd-hwdb.8
MANPAGES_ALIAS += \
#
endif
if ENABLE_KDBUS
MANPAGES += \
man/sd_bus_creds_get_pid.3 \
@ -1146,10 +1178,16 @@ endif
if ENABLE_MACHINED
MANPAGES += \
man/machinectl.1 \
man/nss-mymachines.8 \
man/systemd-machined.service.8
MANPAGES_ALIAS += \
man/libnss_mymachines.so.2.8 \
man/systemd-machined.8
man/libnss_mymachines.so.2.8: man/nss-mymachines.8
man/systemd-machined.8: man/systemd-machined.service.8
man/libnss_mymachines.so.2.html: man/nss-mymachines.html
$(html-alias)
man/systemd-machined.html: man/systemd-machined.service.html
$(html-alias)
@ -1312,8 +1350,10 @@ if HAVE_MYHOSTNAME
MANPAGES += \
man/nss-myhostname.8
MANPAGES_ALIAS += \
#
man/libnss_myhostname.so.2.8
man/libnss_myhostname.so.2.8: man/nss-myhostname.8
man/libnss_myhostname.so.2.html: man/nss-myhostname.html
$(html-alias)
endif
@ -1593,6 +1633,7 @@ EXTRA_DIST += \
man/halt.xml \
man/hostname.xml \
man/hostnamectl.xml \
man/hwdb.xml \
man/journalctl.xml \
man/journald.conf.xml \
man/kernel-command-line.xml \
@ -1608,7 +1649,9 @@ EXTRA_DIST += \
man/machine-info.xml \
man/machinectl.xml \
man/modules-load.d.xml \
man/networkctl.xml \
man/nss-myhostname.xml \
man/nss-mymachines.xml \
man/os-release.xml \
man/pam_systemd.xml \
man/resolved.conf.xml \
@ -1702,6 +1745,7 @@ EXTRA_DIST += \
man/systemd-hibernate-resume-generator.xml \
man/systemd-hibernate-resume@.service.xml \
man/systemd-hostnamed.service.xml \
man/systemd-hwdb.xml \
man/systemd-inhibit.xml \
man/systemd-initctl.service.xml \
man/systemd-journal-gatewayd.service.xml \
@ -1748,6 +1792,7 @@ EXTRA_DIST += \
man/systemd.device.xml \
man/systemd.directives.xml \
man/systemd.exec.xml \
man/systemd.generator.xml \
man/systemd.index.xml \
man/systemd.journal-fields.xml \
man/systemd.kill.xml \

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

334
NEWS
View File

@ -1,5 +1,329 @@
systemd System and Service Manager
CHANGES WITH 219:
* Introduce a new API "sd-hwdb.h" for querying the hardware
metadata database. With this minimal interface one can query
and enumerate the udev hwdb, decoupled from the old libudev
library. libudev's interface for this is now only a wrapper
around sd-hwdb. A new tool systemd-hwdb has been added to
interface with and update the database.
* When any of systemd's tools copies files (for example due to
tmpfiles' C lines) a btrfs reflink will attempted first,
before bytewise copying is done.
* systemd-nspawn gained a new --ephemeral switch. When
specified a btrfs snapshot is taken of the container's root
directory, and immediately removed when the container
terminates again. Thus, a container can be started whose
changes never alter the container's root directory, and are
lost on container termination. This switch can also be used
for starting a container off the root file system of the
host without affecting the host OS. This switch is only
available on btrfs file systems.
* systemd-nspawn gained a new --template= switch. It takes the
path to a container tree to use as template for the tree
specified via --directory=, should that directory be
missing. This allows instantiating containers dynamically,
on first run. This switch is only available on btrfs file
systems.
* When a .mount unit refers to a mount point on which multiple
mounts are stacked, and the .mount unit is stopped all of
the stacked mount points will now be unmounted until no
mount point remains.
* systemd now has an explicit notion of supported and
unsupported unit types. Jobs enqueued for unsupported unit
types will now fail with an "unsupported" error code. More
specifically .swap, .automount and .device units are not
supported in containers, .busname units are not supported on
non-kdbus systems. .swap and .automount are also not
supported if their respective kernel compile time options
are disabled.
* machinectl gained support for two new "copy-from" and
"copy-to" commands for copying files from a running
container to the host or vice versa.
* machinectl gained support for a new "bind" command to bind
mount host directories into local containers. This is
currently only supported for nspawn containers.
* networkd gained support for configuring bridge forwarding
database entries (fdb) from .network files.
* A new tiny daemon "systemd-importd" has been added that can
download container images in tar, raw, qcow2 or dkr formats,
and make them available locally in /var/lib/machines, so
that they can run as nspawn containers. The daemon can GPG
verify the downloads (not supported for dkr, since it has no
provisions for verifying downloads). It will transparently
decompress bz2, xz, gzip compressed downloads if necessary,
and restore sparse files on disk. The daemon uses privilege
separation to ensure the actual download logic runs with
fewer privileges than the deamon itself. machinectl has
gained new commands "pull-tar", "pull-raw" and "pull-dkr" to
make the functionality of importd available to the
user. With this in place the Fedora and Ubuntu "Cloud"
images can be downloaded and booted as containers unmodified
(the Fedora images lack the appropriate GPG signature files
currently, so they cannot be verified, but this will change
soon, hopefully). Note that downloading images is currently
only fully supported on btrfs.
* machinectl is now able to list container images found in
/var/lib/machines, along with some metadata about sizes of
disk and similar. If the directory is located on btrfs and
quota is enabled, this includes quota display. A new command
"image-status" has been added that shows additional
information about images.
* machinectl is now able to clone container images
efficiently, if the underlying file system (btrfs) supports
it, with the new "machinectl list-images" command. It also
gained commands for renaming and removing images, as well as
marking them read-only or read-write (supported also on
legacy file systems).
* networkd gained support for collecting LLDP network
announcements, from hardware that supports this. This is
shown in networkctl output.
* systemd-run gained support for a new -t (--pty) switch for
invoking a binary on a pty whose input and output is
connected to the invoking terminal. This allows executing
processes as system services while interactively
communicating with them via the terminal. Most interestingly
this is supported across container boundaries. Invoking
"systemd-run -t /bin/bash" is an alternative to running a
full login session, the difference being that the former
will not register a session, nor go through the PAM session
setup.
* tmpfiles gained support for a new "v" line type for creating
btrfs subvolumes. If the underlying file system is a legacy
file system, this automatically degrades to creating a
normal directory. Among others /var/lib/machines is now
created like this at boot, should it be missing.
* The directory /var/lib/containers/ has been deprecated and
been replaced by /var/lib/machines. The term "machines" has
been used in the systemd context as generic term for both
VMs and containers, and hence appears more appropriate for
this, as the directory can also contain raw images bootable
via qemu/kvm.
* systemd-nspawn when invoked with -M but without --directory=
or --image= is now capable of searching for the container
root directory, subvolume or disk image automatically, in
/var/lib/machines. systemd-nspawn@.service has been updated
to make use of this, thus allowing it to be used for raw
disk images, too.
* A new machines.target unit has been introduced that is
supposed to group all containers/VMs invoked as services on
the system. systemd-nspawn@.service has been updated to
integrate with that.
* machinectl gained a new "start" command, for invoking a
container as a service. "machinectl start foo" is mostly
equivalent to "systemctl start systemd-nspawn@foo.service",
but handles escaping in a nicer way.
* systemd-nspawn will now mount most of the cgroupfs tree
read-only into each container, with the exception of the
container's own subtree in the name=systemd hierarchy.
* journald now sets the special FS_NOCOW file flag for its
journal files. This should improve performance on btrfs, by
avoiding heavy fragmentation when journald's write-pattern
is used on COW file systems. It degrades btrfs' data
integrity guarantees for the files to the same levels as for
ext3/ext4 however. This should be OK though as journald does
its own data integrity checks and all its objects are
checksummed on disk. Also, journald should handle btrfs disk
full events a lot more gracefully now, by processing SIGBUS
errors, and not relying on fallocate() anymore.
* When journald detects that journal files it is writing to
have been deleted it will immediately start new journal
files.
* systemd now provides a way to store file descriptors
per-service in PID 1.This is useful for daemons to ensure
that fds they require are not lost during a daemon
restart. The fds are passed to the deamon on the next
invocation in the same way socket activation fds are
passed. This is now used by journald to ensure that the
various sockets connected to all the system's stdout/stderr
are not lost when journald is restarted. File descriptors
may be stored in PID 1 via the sd_pid_notify_with_fds() API,
an extension to sd_notify(). Note that a limit is enforced
on the number of fds a service can store in PID 1, and it
defaults to 0, so that no fds may be stored, unless this is
explicitly turned on.
* The default TERM variable to use for units connected to a
terminal, when no other value is explicitly is set is now
vt220 rather than vt102. This should be fairly safe still,
but allows PgUp/PgDn work.
* The /etc/crypttab option header= as known from Debian is now
supported.
* "loginctl user-status" and "loginctl session-status" will
now show the last 10 lines of log messages of the
user/session following the status output. Similar,
"machinectl status" will show the last 10 log lines
associated with a virtual machine or container
service. (Note that this is usually not the log messages
done in the VM/container itself, but simply what the
container manager logs. For nspawn this includes all console
output however.)
* "loginctl session-status" without further argument will now
show the status of the session of the caller. Similar,
"lock-session", "unlock-session", "activate",
"enable-linger", "disable-linger" may now be called without
session/user parameter in which case they apply to the
caller's session/user.
* An X11 session scriptlet is now shipped that uploads
$DISPLAY and $XAUTHORITY into the environment of the systemd
--user daemon if a session begins. This should improve
compatibility with X11 enabled applications run as systemd
user services.
* Generators are now subject to masking via /etc and /run, the
same way as unit files.
* networkd .network files gained support for configuring
per-link IPv4/IPv6 packet forwarding as well as IPv4
masquerading. This is by default turned on for veth links to
containers, as registered by systemd-nspawn. This means that
nspawn containers run with --network-veth will now get
automatic routed access to the host's networks without any
further configuration or setup, as long as networkd runs on
the host.
* systemd-nspawn gained the --port= (-p) switch to expose TCP
or UDP posts of a container on the host. With this in place
it is possible to run containers with private veth links
(--network-veth), and have their functionality exposed on
the host as if their services were running directly on the
host.
* systemd-nspawn's --network-veth switch now gained a short
version "-n", since with the changes above it is now truly
useful out-of-the-box. The systemd-nspawn@.service has been
updated to make use of it too by default.
* systemd-nspawn will now maintain a per-image R/W lock, to
ensure that the same image is not started more than once
writable. (It's OK to run an image multiple times
simultaneously in read-only mode.)
* systemd-nspawn's --image= option is now capable of
dissecting and booting MBR and GPT disk images that contain
only a single active Linux partition. Previously it
supported only GPT disk images with proper GPT type
IDs. This allows running cloud images from major
distributions directly with systemd-nspawn, without
modification.
* In addition to collecting mouse dpi data in the udev
hardware database, there's now support for collecting angle
information for mouse scroll wheels. The database is
supposed to guarantee similar scrolling behavior on mice
that it knows about. There's also support for collecting
information about Touchpad types.
* udev's input_id built-in will now also collect touch screen
dimension data and attach it to probed devices.
* /etc/os-release gained support for a Distribution Privacy
Policy link field.
* networkd gained support for creating "ipvlan", "gretap",
"ip6gre", "ip6gretap" and "ip6tnl" network devices.
* systemd-tmpfiles gained support for "a" lines for setting
ACLs on files.
* systemd-nspawn will now mount /tmp in the container to
tmpfs, automatically.
* systemd now exposes the memory.usage_in_bytes cgroup
attribute and shows it for each service in the "systemctl
status" output, if available.
* When the user presses Ctrl-Alt-Del more than 7x within 2s an
immediate reboot is triggered. This useful if shutdown is
hung and is unable to complete, to expedite the
operation. Note that this kind of reboot will still unmount
all file systems, and hence should not result in fsck being
run on next reboot.
* A .device unit for an optical block device will now be
considered active only when a medium is in the drive. Also,
mount units are now bound to their backing devices thus
triggering automatic unmounting when devices become
unavailable. With this in place systemd will now
automatically unmount left-over mounts when a CD-ROM is
ejected or an USB stick is yanked from the system.
* networkd-wait-online now has support for waiting for
specific interfaces only (with globbing), and for giving up
after a configurable timeout.
* networkd now exits when idle. It will be automatically
restarted as soon as interfaces show up, are removed or
change state. networkd will stay around as long as there is
at least one DHCP state machine or similar around, that keep
it non-idle.
* networkd may now configure IPv6 link-local addressing in
addition to IPv4 link-local addressing.
* The IPv6 "token" for use in SLAAC may now be configured for
each .network interface in networkd.
* Routes configured with networkd may now be assigned a scope
in .network files.
* networkd's [Match] sections now support globbing and lists
of multiple space-separated matches per item.
Contributions from: Alban Crequy, Alin Rauta, Andrey Chaser,
Bastien Nocera, Bruno Bottazzini, Carlos Garnacho, Carlos
Morata Castillo, Chris Atkinson, Chris J. Arges, Christian
Kirbach, Christian Seiler, Christoph Brill, Colin Guthrie,
Colin Walters, Cristian Rodríguez, Daniele Medri, Daniel Mack,
Dave Reisner, David Herrmann, Djalal Harouni, Erik Auerswald,
Filipe Brandenburger, Frank Theile, Gabor Kelemen, Gabriel de
Perthuis, Harald Hoyer, Hui Wang, Ivan Shapovalov, Jan
Engelhardt, Jan Synacek, Jay Faulkner, Johannes Hölzl, Jonas
Ådahl, Jonathan Boulle, Josef Andersson, Kay Sievers, Ken
Werner, Lennart Poettering, Lucas De Marchi, Lukas Märdian,
Lukas Nykryn, Lukasz Skalski, Luke Shumaker, Mantas Mikulėnas,
Manuel Mendez, Marcel Holtmann, Marc Schmitzer, Marko
Myllynen, Martin Pitt, Maxim Mikityanskiy, Michael Biebl,
Michael Marineau, Michael Olbrich, Michal Schmidt, Mindaugas
Baranauskas, Moez Bouhlel, Naveen Kumar, Patrik Flykt, Paul
Martin, Peter Hutterer, Peter Mattern, Philippe De Swert,
Piotr Drąg, Rafael Ferreira, Rami Rosen, Robert Milasan, Ronny
Chevalier, Sangjung Woo, Sebastien Bacher, Sergey Ptashnick,
Shawn Landden, Stéphane Graber, Susant Sahani, Sylvain
Plantefève, Thomas Hindoe Paaboel Andersen, Tim JP, Tom
Gundersen, Topi Miettinen, Torstein Husebø, Umut Tezduyar
Lindskog, Veres Lajos, Vincent Batts, WaLyong Cho, Wieland
Hoffmann, Zbigniew Jędrzejewski-Szmek
-- Berlin, 2015-02-16
CHANGES WITH 218:
* When querying unit file enablement status (for example via
@ -985,7 +1309,7 @@ CHANGES WITH 214:
fact that many distributions only ship a very small number
of LSB/SysV init scripts nowadays.
* Priviliged Xen (dom0) domains are not considered
* Privileged Xen (dom0) domains are not considered
virtualization anymore by the virtualization detection
logic. After all, they generally have unrestricted access to
the hardware and usually are used to manage the unprivileged
@ -2048,8 +2372,8 @@ CHANGES WITH 208:
* The memory.use_hierarchy cgroup attribute is now enabled for
all cgroups systemd creates in the memory cgroup
hierarchy. This option is likely to be come the built-in
default in the kernel anyway, and the non-hierarchial mode
never made much sense in the intrinsically hierarchial
default in the kernel anyway, and the non-hierarchical mode
never made much sense in the intrinsically hierarchical
cgroup system.
* A new field _SYSTEMD_SLICE= is logged along with all journal
@ -2309,7 +2633,7 @@ CHANGES WITH 205:
together, or apply resource limits on them.
Slice units may be used to partition system resources in an
hierarchial fashion and then assign other units to them. By
hierarchical fashion and then assign other units to them. By
default there are now three slices: system.slice (for all
system services), user.slice (for all user sessions),
machine.slice (for VMs and containers).
@ -3555,7 +3879,7 @@ CHANGES WITH 190:
keys all the time, even in graphical sessions. If DEs want
to handle these events on their own they should take the new
handle-power-key, handle-sleep-key and handle-lid-switch
inhibitors during their runtime. A simple way to achiveve
inhibitors during their runtime. A simple way to achieve
that is to invoke the DE wrapped in an invocation of:
systemd-inhibit --what=handle-power-key:handle-sleep-key:handle-lid-switch ...

18
README
View File

@ -68,8 +68,11 @@ REQUIREMENTS:
create additional symlinks in /dev/disk/ and /dev/tape:
CONFIG_BLK_DEV_BSG
Required for PrivateNetwork in service units:
Required for PrivateNetwork and PrivateDevices in service units:
CONFIG_NET_NS
CONFIG_DEVPTS_MULTIPLE_INSTANCES
Note that systemd-localed.service and other systemd units use
PrivateNetwork and PrivateDevices so this is effectively required.
Optional but strongly recommended:
CONFIG_IPV6
@ -111,7 +114,7 @@ REQUIREMENTS:
libcap
libmount >= 2.20 (from util-linux)
libseccomp >= 1.0.0 (optional)
libblkid >= 2.20 (from util-linux) (optional)
libblkid >= 2.24 (from util-linux) (optional)
libkmod >= 15 (optional)
PAM >= 1.1.2 (optional)
libcryptsetup (optional)
@ -175,14 +178,9 @@ USERS AND GROUPS:
During runtime, the journal daemon requires the
"systemd-journal" system group to exist. New journal files will
be readable by this group (but not writable), which may be used
to grant specific users read access.
It is also recommended to grant read access to all journal
files to the system groups "wheel" and "adm" with a command
like the following in the post installation script of the
package:
# setfacl -nm g:wheel:rx,d:g:wheel:rx,g:adm:rx,d:g:adm:rx /var/log/journal/
to grant specific users read access. In addition, system
groups "wheel" and "adm" will be given read-only access to
journal files using systemd-tmpfiles.service.
The journal gateway daemon requires the
"systemd-journal-gateway" system user and group to

194
TODO
View File

@ -6,8 +6,6 @@ Bugfixes:
automount points even when the original .automount file did not exist
anymore. Only the .mount unit was still around.
* properly handle .mount unit state tracking when two mount points are stacked one on top of another on the exact same mount point.
* ExecStart with unicode characters fails in strv_split_quoted:
[Service]
@ -18,12 +16,13 @@ Bugfixes:
str_split_quoted() should return a real return code, so spawn_child can
report the failure properly.
* When systemctl --host is used, underlying ssh connection can remain open.
bus_close does not kill children?
External:
* Fedora: add an rpmlint check that verifies that all unit files in the RPM are listed in %systemd_post macros.
* Fedora: post FPC ticket to move add %tmpfiles_create to the packaging guidelines
* Fedora: move kernel image to /usr/lib/modules/, kernel-install will take care of populating /boot
* Fedora: remove /etc/resolv.conf tmpfiles hack
@ -35,14 +34,141 @@ External:
Features:
* journalctl --verify: don't show files that are currently being
written to as FAIL, but instead show that their are being written
to.
* nspawn: allow configuring cgroup (and other) properties via
--property= when invoking from the command line.
* add udev rule construct SYSCTL{} to write to sysctls
* assign MESSAGE_ID to log messages about failed services
* coredump: make the handler check /proc/$PID/rlimits for RLIMIT_CORE,
and supress coredump if turned off. Then change RLIMIT_CORE to
infinity by default for all services. This then allows per-service
control of coredumping.
* introduce some call that iterates through cmsg and closes all fds
passed in, and use it everywhere...
* generate better errors when people try to set transient properties
that are not supported...
http://lists.freedesktop.org/archives/systemd-devel/2015-February/028076.html
* nspawn, if stdout/stderr/stdin are non-ttys, don't set up
/dev/console, but instead just pass the fds through directly.
* When runlevel3.target is used to define dependencies on other units,
then we don't pick it up currently, since nothing ever references
runlevel3.target, and never figure out it actually is just an alias
for multi-user.target. A hackish fix could be to add a .wants link
from multi-user.target to runlevel3.target, if it is a symlink to
it. Best would be to create this .wants/ symlink from
sysv-generator. systemd would then load the referenced unit, figure
out it is just an alias and that the dependency would be on itself
and suppress it. Thus the alias and its deps would be loaded as
desired.
* PID 1: when invoking systemctl preset-all on first boots, operate in
an exclusively additive way, i.e. never remove any pre-existing
symlinks, only add new ones.
* Introduce $LISTEN_NAMES to complement $LISTEN_FDS, containing a
colon separated list of identifiers for the fds passed.
* networkd: implement BindCarrier= logic to .network units that binds
application of the file to the carrier sense on another interface,
in order to implement uplink/downlink logic.
* make networkd subscribe to PrepareForSleep(false) and refresh all
DHCP leases then.
* when the fstab-generator runs in the initrd, it should create a /dev/null mask for systemd-fsck-root.service, to avoid that the the root fs is fsck'ed twice.
* maybe introduce WantsMountsFor=? Usecase:
http://lists.freedesktop.org/archives/systemd-devel/2015-January/027729.html
* rework kexec logic to use new kexec_file_load() syscall, so that we
don't have to call kexec tool anymore.
* The udev blkid built-in should expose a property that reflects
whether media was sensed in USB CF/SD card readers. This should then
be used to control SYSTEMD_READY=1/0 so that USB card readers aren't
picked up by systemd unless they contain a medium. This would mirror
the behaviour we already have for CD drives.
* We should remove really old cruft from cdrom_id
* nspawn: emulate /dev/kmsg using CUSE and turn off the syslog syscall
with seccomp. That should provide us with a useful log buffer that
systemd can log to during early boot, and disconnect container logs
from the kernel's logs.
* networkd/udev: implement SR_IOV configuration in .link files:
http://lists.freedesktop.org/archives/systemd-devel/2015-January/027451.html
* When RLIMIT_NPROC is set from a unit file it currently always is set
for root, not for the user set in User=, which makes it
useless. After fixing this, set RLIMIT_NPROC for
systemd-journal-xyz, and all other of our services that run under
their own user ids, and use User= (but only in a world where userns
is ubiquitous since otherwise we cannot invoke those daemons on the
host AND in a container anymore). Also, if LimitNPROC= is used
without User= we should warn and refuse operation.
* logind: maybe allow configuration of the StopTimeout for session scopes
* Set NoNewPriviliges= on all of our own services, where that makes sense
* Rework systemctl's GetAll property parsing to use the generic bus_map_all_properties() API
* rework journald sigbus stuff to use mutex
* import-dkr: support tarsum checksum verification, if it becomes reality one day...
* import-dkr: convert json bits to nspawn configuration
* import: support import from local files, and export to local files
* core/cgroup: support net_cls modules, and support automatically allocating class ids, then add support for making firewall changes depending on it, to implement a per-service firewall
* introduce systemd-nspawn-ephemeral@.service, and hook it into "machinectl start" with a new --ephemeral switch
* logind,machined: add generic catch-all polkit verbs for most privileged operations, similar to systemd itself
* "machinectl status" should also show internal logs of the container in question
* "machinectl list-images" should show os-release data, as well as machine-info data (including deployment level)
* nspawn: when start a container "foobar" look for its configuration in a file "foobar.nspawn" in /etc/systemd/nspawn/ as well as next to the actualy directory or image to boot
* Port various tools to make use of verbs.[ch], where applicable
* "machinectl history"
* "machinectl diff"
* "machinectl commit" that takes a writable snapshot of a tree, invokes a shell in it, and marks it read-only after use
* "machinectl status" should show 10 most recent log lines of both the host logs of the unit of the machine, plus the logs generated in the machine
* add transparent btrfs pool in a loopback file in /var if btrfs operations (such as systemd-import pull-dkr) are used and /var is not a btrfs file system
* systemd-nspawn -x should support ephemeral instances of gpt images
* move machinectl's mount and copy commands into machined
* hostnamectl: show root image uuid
* sysfs set api in libudev is not const
* Find a solution for SMACK capabilities stuff:
http://lists.freedesktop.org/archives/systemd-devel/2014-December/026188.html
* port libmount hookup to use API's own inotify interface, as soon as that is table in libmount
* bash completion for busctl, to make it truly useful
* journald: broken file systems are real (btrfs), we need to handle
SIGBUS in some way if we cannot write or read from the disk.
https://bugzilla.redhat.com/show_bug.cgi?id=1151848
* "systemctl preset-all" should probably order the unit files it
operates on lexicographically before starting to work, in order to
ensure deterministic behaviour if two unit files conflict (like DMs
@ -54,7 +180,7 @@ Features:
* systemd-journal-upload (or a new, related tool): allow pushing out
journal messages onto the network in BSD syslog protocol,
continously. Default to some link-local IP mcast group, to make this
continuously. Default to some link-local IP mcast group, to make this
useful as a one-stop debugging tool.
* synchronize console access with BSD locks:
@ -74,10 +200,6 @@ Features:
* timedated should compensate on SetTime for the time spent in polkit
* figure out what to do with libmount and utab?
* We really should have a FOREACH macro to iterate through inotify events we read, similar to KDBUS_FOREACH_ITEM
* figure out when we can use the coarse timers
* sd-resolve: drop res_query wrapping, people should call via the bus to resolved instead
@ -91,8 +213,6 @@ Features:
* timesyncd + resolved: add ugly bus calls to set NTP and DNS servers per-interface, for usage by NM
* networkd-wait-online really should have a timeout by default
* add infrastructure to allocate dynamic/transient users and UID ranges, for use in user-namespaced containers, per-seat gdm login screens and gdm guest sessions
* machined: add an API so that libvirt-lxc can inform us about network interfaces being removed or added to an existing machine
@ -105,8 +225,6 @@ Features:
* systemd --user should issue sd_notify() upon reaching basic.target, not on becoming idle
* configure.ac pretends dbus was optional but actually hardcodes use of dbus' pkg-config file to determine various dbus dirs such as policy and activation dirs
* consider showing the unit names during boot up in the status output, not just the unit descriptions
* dhcp: do we allow configuring dhcp routes on interfaces that are not the one we got the dhcp info from?
@ -128,7 +246,10 @@ Features:
* systemctl: if some operation fails, show log output?
* systemctl edit: add commented help text to the end, like git commit
* systemctl edit:
- allow creation of units from scratch
- use equvalent of cat() to insert existing config as a comment, prepended with #.
Upon editor exit, lines with one # are removed, lines with two # are left with one #, etc.
* refcounting in sd-resolve is borked
@ -164,6 +285,7 @@ Features:
for all routes to it. possibly a second default for DHCP routes.
- allow Name= to be specified repeatedly in the [Match] section. Maybe also
support Name=foo*|bar*|baz ?
- duplicate address check for static IPs (like ARPCHECK in network-scripts)
* resolved:
- put networkd events and rtnl events at a higher priority, so that
@ -249,9 +371,6 @@ Features:
desktop UIs such as gnome-shell to freeze apps that are not visible
on screen, not unlike how job control works on the shell
* completions:
- manager property enumeration was broken when systemd moved to /usr/lib/
* cgroups:
- implement per-slice CPUFairScheduling=1 switch
- handle jointly mounted controllers correctly
@ -300,21 +419,12 @@ Features:
ReadOnlyDirectories=... for whitelisting files for a service.
* sd-bus:
- GetAllProperties() on a non-existing object does not result in a failure currently
- kdbus: process fd=-1 for incoming msgs
- make dsrt happy, and change userspace header for kdbus to yyyyuta{tv}v
- kdbus: remove NameOwnerChanged kernel messages for monitors
- kdbus: PID/TID goes missing for method calls from outside the PID namespace?
- kdbus: the kernel should not allow messages to be delivered that have a reply serial != 0, reply-expect unset, but no appropriate window
- kdbus: timestamps on kernel's NameOwnerChanged messages?
- kdbus' busnames.target should get pulled in by basic.target
- Ignore .busname units on classic D-Bus boots, systemd-resolved cannot be started on kdbus
without the active policy and should get a Wants=org.freedesktop.resolve1.busname to
pull-in the policy.
- port to sd-resolve for connecting to TCP dbus servers
- kdbus: maybe add controlling tty and ppid metadata fields
- kdbus: maybe add controlling tty metadata fields
- see if we can introduce a new sd_bus_get_owner_machine_id() call to retrieve the machine ID of the machine of the bus itself
- when kdbus does not take our message without memfds, try again with memfds
- introduce sd_bus_emit_object_added()/sd_bus_emit_object_removed() that automatically includes the build-in interfaces in the list
- see if we can drop more message validation on the sending side
- add API to clone sd_bus_message objects
- make AddMatch calls on dbus1 transports async?
@ -369,9 +479,6 @@ Features:
* teach ConditionKernelCommandLine= globs or regexes (in order to match foobar={no,0,off})
* after all byte-wise realloc() is slow, even on glibc, so i guess we
need manual exponential loops after all
* BootLoaderSpec: Clarify that the kernel has to be in $BOOT. Clarify
that the boot loader should be installed to the ESP. Define a way
how an installer can figure out whether a BLS compliant boot loader
@ -464,11 +571,11 @@ Features:
- journal: add a setgid "systemd-journal" utility to invoke from libsystemd-journal, which passes fds via STDOUT and does PK access
- journactl: support negative filtering, i.e. FOOBAR!="waldo",
and !FOOBAR for events without FOOBAR.
- journal: send out marker messages every now and then, and immediately sync with fdatasync() afterwards, in order to have hourly guaranteed syncs.
- journal: store timestamp of journal_file_set_offline() int he header,
so it is possible to display when the file was last synced.
- journal-send.c, log.c: when the log socket is clogged, and we drop, count this and write a message about this when it gets unclogged again.
- journal: find a way to allow dropping history early, based on priority, other rules
- journal: When used on NFS, check payload hashes
- journal live copy, based on libneon (client) and libmicrohttpd (server)
- journald: add kernel cmdline option to disable ratelimiting for debug purposes
- refuse taking lower-case variable names in sd_journal_send() and friends.
- journald: we currently rotate only after MaxUse+MaxFilesize has been reached.
@ -561,12 +668,7 @@ Features:
* currently x-systemd.timeout is lost in the initrd, since crypttab is copied into dracut, but fstab is not
* nspawn:
- bind mount read-only the cgroup tree higher than nspawn
- refuses to boot containers without /etc/machine-id (OK?), and with empty /etc/machine-id (not OK).
- support taking a btrfs snapshot at startup and dropping it afterwards
- introduce machines.target to order after all nspawn instances
- systemd-nspawn@.service should fail if some nspawn arg is invalid, with Type=notify
- PID 1 doesn't apply nspawns devices cgroup policy
* cryptsetup:
- cryptsetup-generator: allow specification of passwords in crypttab itself
@ -629,6 +731,7 @@ Features:
- kill scsi_id
- add trigger --subsystem-match=usb/usb_device device
- reimport udev db after MOVE events for devices without dev_t
- don't keep stale db in case event processing fails (also notify userspace about the failure)
* when a service has the same env var set twice we actually store it twice and return that in systemctl show -p... We should only show the last setting
@ -653,6 +756,8 @@ Features:
* tmpfiles:
- apply "x" on "D" too (see patch from William Douglas)
- replace F with f+.
- instead of ignoring unknown fields, reject them.
* for services: do not set $HOME in services unless requested
@ -763,7 +868,6 @@ Features:
- write more test cases
- implement and do duplicate address detection, see rfc 4862, 5.4.
- implement reconfigure support, see 5.3., 15.11. and 22.20.
- implement information request, see 1.2. and 18.1.5.
- implement support for temporary adressess (IA_TA)
- implement dhcpv6 authentication
- investigate the usefulness of Confirm messages; i.e. are there any

View File

@ -23,15 +23,15 @@
# For an explanation why we do all this, see https://xkcd.com/1024/
-- f77379a8490b408bbe5f6940505a777b
Subject: The Journal has been started
Subject: The journal has been started
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
The system journal process has been starting up, opened the journal
The system journal process has started up, opened the journal
files for writing and is now ready to process requests.
-- d93fb3c9c24d451a97cea615ce59c00b
Subject: The Journal has been stopped
Subject: The journal has been stopped
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -50,8 +50,8 @@ from the service have been dropped.
Note that only messages from the service in question have been
dropped, other services' messages are unaffected.
The limits when messages are dropped may be configured with
RateLimitInterval= and RateLimitBurst= in
The limits controlling when messages are dropped may be configured
with RateLimitInterval= and RateLimitBurst= in
/etc/systemd/journald.conf. See journald.conf(5) for details.
-- e9bf28e6e834481bb6f48f548ad13606
@ -96,7 +96,7 @@ A new session with the ID @SESSION_ID@ has been created for the user @USER_ID@.
The leading process of the session is @LEADER@.
-- 3354939424b4456d9802ca8333ed424a
Subject: A session @SESSION_ID@ has been terminated
Subject: Session @SESSION_ID@ has been terminated
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
@ -112,7 +112,7 @@ Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
A new seat @SEAT_ID@ has been configured and is now available.
-- e7852bfe46784ed0accde04bc864c2d5
Subject: A seat @SEAT_ID@ has now been removed
Subject: Seat @SEAT_ID@ has now been removed
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
@ -178,7 +178,7 @@ Systemd shutdown has been initiated. The shutdown has now begun and
all system services are terminated and all file systems unmounted.
-- 7d4958e842da4a758f6c1cdc7b36dcc5
Subject: Unit @UNIT@ has begun with start-up
Subject: Unit @UNIT@ has begun start-up
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -217,11 +217,11 @@ Unit @UNIT@ has failed.
The result is @RESULT@.
-- d34d037fff1847e6ae669a370e694725
Subject: Unit @UNIT@ has begun with reloading its configuration
Subject: Unit @UNIT@ has begun reloading its configuration
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Unit @UNIT@ has begun with reloading its configuration
Unit @UNIT@ has begun reloading its configuration
-- 7b05ebc668384222baa8881179cfda54
Subject: Unit @UNIT@ has finished reloading its configuration
@ -239,7 +239,7 @@ Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
The process @EXECUTABLE@ could not be executed and failed.
The error number returned while executing this process is @ERRNO@.
The error number returned by this process is @ERRNO@.
-- 0027229ca0644181a76c4e92458afa2e
Subject: One or more messages could not be forwarded to syslog

View File

@ -1,7 +1,7 @@
# This file is part of systemd.
#
# Copyright 2012 Lennart Poettering
# Copyright 2013 Sylvain Plantefève
# Copyright 2013-2015 Sylvain Plantefève
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
@ -23,7 +23,7 @@
# http://www.freedesktop.org/wiki/Software/systemd/catalog
-- f77379a8490b408bbe5f6940505a777b
Subject: Le Journal a été démarré
Subject: Le journal a été démarré
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -31,7 +31,7 @@ Le processus du journal système a démarré, ouvert ses fichiers en écriture
et est prêt à traiter les requêtes.
-- d93fb3c9c24d451a97cea615ce59c00b
Subject: Le Journal a été arrêté
Subject: Le journal a été arrêté
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -55,7 +55,7 @@ paramètres RateLimitInterval= et RateLimitBurst= dans le fichier
/etc/systemd/journald.conf. Voir journald.conf(5) pour plus de détails.
-- e9bf28e6e834481bb6f48f548ad13606
Subject: Des messages du Journal ont été manqués
Subject: Des messages du journal ont été manqués
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

View File

@ -1,7 +1,7 @@
# This file is part of systemd.
#
# Copyright 2012 Lennart Poettering
# Copyright 2014 Piotr Drąg
# Copyright 2014, 2015 Piotr Drąg
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
@ -25,7 +25,7 @@
# For an explanation why we do all this, see https://xkcd.com/1024/
-- f77379a8490b408bbe5f6940505a777b
Subject: Uruchomiono Journal
Subject: Uruchomiono dziennik
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -33,7 +33,7 @@ Systemowy proces dziennika został uruchomiony, otworzył pliki dziennika do
zapisu i jest gotowy do przetwarzania żądań.
-- d93fb3c9c24d451a97cea615ce59c00b
Subject: Zatrzymano Journal
Subject: Zatrzymano dziennik
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -52,12 +52,12 @@ zostały pominięte.
Proszę zauważyć, że tylko komunikaty z danej usługi zostały pominięte. Nie ma
to wpływu na komunikaty innych usług.
Ograniczenia komunikatów mogą być konfigurowane za pomocą opcji
RateLimitInterval= i RateLimitBurst= w pliku
Ograniczenia kontrolujące pomijanie komunikatów mogą być konfigurowane
za pomocą opcji RateLimitInterval= i RateLimitBurst= w pliku
/etc/systemd/journald.conf. Strona journald.conf(5) zawiera więcej informacji.
-- e9bf28e6e834481bb6f48f548ad13606
Subject: Utracono komunikaty Journal
Subject: Utracono komunikaty dziennika
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -223,7 +223,7 @@ Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Proces @EXECUTABLE@ nie mógł zostać wykonany i się nie powiódł.
Numer błędu zwrócony podczas wykonywania tego procesu: @ERRNO@.
Numer błędu zwrócony przez ten proces: @ERRNO@.
-- 0027229ca0644181a76c4e92458afa2e
Subject: Nie można przekazać jednego lub więcej komunikatów do syslog

View File

@ -0,0 +1,264 @@
# This file is part of systemd.
#
# Copyright 2012 Lennart Poettering
# Copyright 2015 Rafael Ferreira (translation)
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# systemd is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
# Catálogo de mensagens para as mensagens do próprio systemd
# O formato do catálogo está documentado em
# http://www.freedesktop.org/wiki/Software/systemd/catalog
# Para uma explicação do porquê de fazermos tudo isso, veja
# https://xkcd.com/1024/
-- f77379a8490b408bbe5f6940505a777b
Subject: O jornal foi inciado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O processo jornal do sistema foi iniciado, arquivos foram abertos e está
pronto para processar requisições.
-- d93fb3c9c24d451a97cea615ce59c00b
Subject: O jornal foi interrompido
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O processo do jornal do sistema foi desligado e todos os arquivos de jornal
do sistema foram fechados.
-- a596d6fe7bfa4994828e72309e95d61e
Subject: Mensagens de um serviço foram suprimidas
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: man:journald.conf(5)
Um serviço registrou no log um número excessivo de mensagens dentro de um
período de tempo. Mensagens do serviço foram descartadas.
Note que apenas mensagens de um serviço em questão foram descartadas; outras
mensagens dos serviços não foram afetadas.
Os controles de limites de quando as mensagens são descartadas pode ser
configurado com RateLimitInterval= e RateLimitBurst= no
/etc/systemd/journald.conf. Veja journald.conf(5) para detalhes.
-- e9bf28e6e834481bb6f48f548ad13606
Subject: Mensagens do jornal foram perdidas
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Mensagens do kernel foram perdidas pois o sistema do jornal não pôde
processá-las em velocidade suficiente para a demanda.
-- fc2e22bc6ee647b6b90729ab34a250b1
Subject: Processo @COREDUMP_PID@ (@COREDUMP_COMM@) despejou núcleo
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: man:core(5)
Processo @COREDUMP_PID@ (@COREDUMP_COMM@) travou e despejou o núcleo.
Isso normalmente indica um erro de programação no programa que travou e
deveria ser relatado para seu fabricante como um erro.
-- 8d45620c1a4348dbb17410da57c60c66
Subject: A nova sessão @SESSION_ID@ foi criada para usuário o @USER_ID@
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
Uma nova sessão com o ID @SESSION_ID@ foi criada para o usuário @USER_ID@.
O processo originador da sessão é @LEADER@.
-- 3354939424b4456d9802ca8333ed424a
Subject: Sessão @SESSION_ID@ foi terminada
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
Um sessão com o ID @SESSION_ID@ foi terminada.
-- fcbefc5da23d428093f97c82a9290f7b
Subject: Um novo seat @SEAT_ID@ está disponível
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
Um novo seat @SEAT_ID@ foi configurado e está disponível.
-- e7852bfe46784ed0accde04bc864c2d5
Subject: Seat @SEAT_ID@ foi removido agora
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
Um seat @SEAT_ID@ foi removido e não está mais disponível.
-- c7a787079b354eaaa9e77b371893cd27
Subject: Time change
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O relógio do sistema foi alterado para @REALTIME@ microssegundos após 1º de
janeiro de 1970.
-- 45f82f4aef7a4bbf942ce861d1f20990
Subject: Fuso horário alterado para @TIMEZONE@
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O fuso horário do sistema foi alterado para @TIMEZONE@.
-- b07a249cd024414a82dd00cd181378ff
Subject: Inicialização do sistema foi concluída
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Todos os serviços do sistema necessários que estão enfileirados para
executar na inicialização do sistema, foram iniciados com sucesso. Note
que isso não significa que a máquina está ociosa, pois os serviços podem
ainda estar ocupados com a inicialização completa.
Inicialização do kernel precisou @KERNEL_USEC@ microssegundos.
Disco de RAM inicial precisou de @INITRD_USEC@ microssegundos.
Inicialização do espaço do usuário precisou de @USERSPACE_USEC@ microssegundos.
-- 6bbd95ee977941e497c48be27c254128
Subject: Estado de suspensão do sistema @SLEEP@ iniciado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O sistema entrou agora no estado de suspensão @SLEEP@.
-- 8811e6df2a8e40f58a94cea26f8ebf14
Subject: Estado de suspensão do sistema @SLEEP@ finalizado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O sistema saiu agora do estado de suspensão @SLEEP@.
-- 98268866d1d54a499c4e98921d93bc40
Subject: Desligamento do sistema iniciado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Desligamento do sistema foi inicializado. O desligamento se iniciou e todos
os serviços do sistema foram terminados e todos os sistemas desmontados.
-- 7d4958e842da4a758f6c1cdc7b36dcc5
Subject: Unidade @UNIT@ sendo iniciado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A unidade @UNIT@ está sendo iniciada.
-- 39f53479d3a045ac8e11786248231fbf
Subject: Unidade @UNIT@ concluiu a inicialização
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A unidade @UNIT@ concluiu a inicialização.
The start-up result is @RESULT@.
-- de5b426a63be47a7b6ac3eaac82e2f6f
Subject: Unidade @UNIT@ sendo desligado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A unidade @UNIT@ está sendo desligada.
-- 9d1aaa27d60140bd96365438aad20286
Subject: A unidade @UNIT@ concluiu o desligamento
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A unidade @UNIT@ concluiu o desligamento.
-- be02cf6855d2428ba40df7e9d022f03d
Subject: A unidade @UNIT@ falhou
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A unidade @UNIT@ falhou.
O resultado é @RESULT@.
-- d34d037fff1847e6ae669a370e694725
Subject: Unidade @UNIT@ iniciou recarregamento de sua configuração
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A unidade @UNIT@ iniciou o recarregamento de sua configuração.
-- 7b05ebc668384222baa8881179cfda54
Subject: Unidade @UNIT@ concluiu recarregamento de sua configuração
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A unidade @UNIT@ concluiu o recarregamento de sua configuração.
O resultado é @RESULT@.
-- 641257651c1b4ec9a8624d7a40a9e1e7
Subject: Processo @EXECUTABLE@ não pôde ser executado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O processo @EXECUTABLE@ não pôde ser executado e falhou.
O número de erro retornado por este processo é @ERRNO@.
-- 0027229ca0644181a76c4e92458afa2e
Subject: Uma ou mais mensagens não puderam ser encaminhadas para o syslog
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Uma ou mais mensagens não puderam ser encaminhadas para o serviço do syslog
em execução paralela ao journald. Isso normalmente indica que a implementação
do syslog não foi capaz de se manter com a velocidade das mensagens
enfileiradas.
-- 1dee0369c7fc4736b7099b38ecb46ee7
Subject: Ponto de montagem não está vazio
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
O diretório @WHERE@ está especificado como ponto de montagem (o segundo campo
no /etc/fstab ou campo Where= no arquivo de unidade do systemd) e não está
vazio. Isso não interfere com a montagem, mas os arquivos pré-existentes
neste diretório se tornaram inacessívels. Para ver aqueles arquivos, sobre os
quais foi realizada a montagem, por favor monte manualmente o sistema de
arquivos subjacente para uma localização secundária.
-- 24d8d4452573402496068381a6312df2
Subject: Uma máquina virtual ou contêiner foi iniciado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A máquina virtual @NAME@ com seu PID @LEADER@ incial foi iniciada e está
pronto para ser usad.
-- 58432bd3bace477cb514b56381b8a758
Subject: Uma máquina virtual ou contêiner foi terminado
Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
A máquina virtual @NAME@ com seu PID @LEADER@ incial foi desligada.

View File

@ -6,15 +6,21 @@
/* Canonical host string. */
#undef CANONICAL_HOST
/* Default index URL to use for image downloads */
#undef DEFAULT_DKR_INDEX_URL
/* Default DNS Servers */
#undef DNS_SERVERS
/* Define if hashmap debugging is to be enabled */
#undef ENABLE_DEBUG_HASHMAP
/* Define if mmap cache debugging is to be enabled */
#undef ENABLE_DEBUG_MMAP_CACHE
/* Define if EFI support is to be enabled */
#undef ENABLE_EFI
/* Define if hashmap debugging is to be enabled */
#undef ENABLE_HASHMAP_DEBUG
/* Define if kdbus support is to be enabled */
#undef ENABLE_KDBUS
@ -45,6 +51,12 @@
/* Define if blkid is available */
#undef HAVE_BLKID
/* Define in BZIP2 is available */
#undef HAVE_BZIP2
/* Define to 1 if you have the <bzlib.h> header file. */
#undef HAVE_BZLIB_H
/* Define if CHKCONFIG is available */
#undef HAVE_CHKCONFIG
@ -71,10 +83,18 @@
to 0 if you don't. */
#undef HAVE_DECL_IFLA_BRPORT_UNICAST_FLOOD
/* Define to 1 if you have the declaration of `IFLA_INET6_ADDR_GEN_MODE', and
to 0 if you don't. */
#undef HAVE_DECL_IFLA_INET6_ADDR_GEN_MODE
/* Define to 1 if you have the declaration of
`IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */
#undef HAVE_DECL_IFLA_IPTUN_6RD_RELAY_PREFIXLEN
/* Define to 1 if you have the declaration of `IFLA_IPVLAN_MODE', and to 0 if
you don't. */
#undef HAVE_DECL_IFLA_IPVLAN_MODE
/* Define to 1 if you have the declaration of `IFLA_MACVLAN_FLAGS', and to 0
if you don't. */
#undef HAVE_DECL_IFLA_MACVLAN_FLAGS
@ -95,6 +115,10 @@
you don't. */
#undef HAVE_DECL_IFLA_VXLAN_LOCAL6
/* Define to 1 if you have the declaration of `kcmp', and to 0 if you don't.
*/
#undef HAVE_DECL_KCMP
/* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0 if
you don't. */
#undef HAVE_DECL_LO_FLAGS_PARTSCAN
@ -107,6 +131,10 @@
don't. */
#undef HAVE_DECL_PIVOT_ROOT
/* Define to 1 if you have the declaration of `renameat2', and to 0 if you
don't. */
#undef HAVE_DECL_RENAMEAT2
/* Define to 1 if you have the declaration of `setns', and to 0 if you don't.
*/
#undef HAVE_DECL_SETNS
@ -144,6 +172,9 @@
/* Define if IMA is available */
#undef HAVE_IMA
/* Importd support available */
#undef HAVE_IMPORTD
/* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA
@ -168,6 +199,9 @@
/* Define if libidn is available */
#undef HAVE_LIBIDN
/* Define if libiptc is available */
#undef HAVE_LIBIPTC
/* Define if libmount is available */
#undef HAVE_LIBMOUNT
@ -328,6 +362,9 @@
/* Define if XZ is available */
#undef HAVE_XZ
/* Define if ZLIB is available */
#undef HAVE_ZLIB
/* Define to 1 if you have the `__secure_getenv' function. */
#undef HAVE___SECURE_GETENV

657
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@
AC_PREREQ([2.64])
AC_INIT([systemd],
[218],
[219],
[http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
[systemd],
[http://www.freedesktop.org/wiki/Software/systemd])
@ -34,7 +34,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr])
AM_MAINTAINER_MODE([enable])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects])
AM_INIT_AUTOMAKE([foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects parallel-tests])
AM_SILENT_RULES([yes])
AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.])
@ -98,6 +98,8 @@ AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
M4_DEFINES=
@ -310,7 +312,7 @@ LIBS="$save_LIBS"
AC_CHECK_FUNCS([memfd_create])
AC_CHECK_FUNCS([__secure_getenv secure_getenv])
AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, LO_FLAGS_PARTSCAN],
AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, renameat2, kcmp, LO_FLAGS_PARTSCAN],
[], [], [[
#include <sys/types.h>
#include <unistd.h>
@ -321,7 +323,9 @@ AC_CHECK_DECLS([gettid, pivot_root, name_to_handle_at, setns, getrandom, LO_FLAG
#include <linux/random.h>
]])
AC_CHECK_DECLS([IFLA_MACVLAN_FLAGS,
AC_CHECK_DECLS([IFLA_INET6_ADDR_GEN_MODE,
IFLA_MACVLAN_FLAGS,
IFLA_IPVLAN_MODE,
IFLA_VTI_REMOTE,
IFLA_PHYS_PORT_ID,
IFLA_BOND_AD_INFO,
@ -432,7 +436,7 @@ AM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
have_blkid=no
AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
if test "x$enable_blkid" != "xno"; then
PKG_CHECK_MODULES(BLKID, [ blkid >= 2.20 ],
PKG_CHECK_MODULES(BLKID, [ blkid >= 2.24 ],
[AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
AC_MSG_ERROR([*** blkid support requested but libraries not found])
@ -556,17 +560,41 @@ have_xz=no
AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
if test "x$enable_xz" != "xno"; then
PKG_CHECK_MODULES(XZ, [ liblzma ],
[AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes])
[AC_DEFINE(HAVE_XZ, 1, [Define if XZ is available]) have_xz=yes], have_xz=no)
if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
AC_MSG_ERROR([*** XZ support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"])
# ------------------------------------------------------------------------------
have_zlib=no
AC_ARG_ENABLE(zlib, AS_HELP_STRING([--disable-zlib], [Disable optional ZLIB support]))
if test "x$enable_zlib" != "xno"; then
PKG_CHECK_MODULES(ZLIB, [ zlib ],
[AC_DEFINE(HAVE_ZLIB, 1, [Define if ZLIB is available]) have_zlib=yes], have_zlib=no)
if test "x$have_zlib" = xno -a "x$enable_zlib" = xyes; then
AC_MSG_ERROR([*** ZLIB support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_ZLIB, [test "$have_zlib" = "yes"])
# ------------------------------------------------------------------------------
have_bzip2=no
AC_ARG_ENABLE(bzip2, AS_HELP_STRING([--enable-bzip2], [Disable optional BZIP2 support]))
AS_IF([test "x$enable_bzip2" != "xno"], [
AC_CHECK_HEADERS(bzlib.h,
[AC_DEFINE(HAVE_BZIP2, 1, [Define in BZIP2 is available])
have_bzip2=yes],
[AS_IF([test "x$have_bzip2" = xyes], [AC_MSG_ERROR([*** BZIP2 support requested but headers not found])])
])
])
AM_CONDITIONAL(HAVE_BZIP2, [test "$have_bzip2" = "yes"])
# ------------------------------------------------------------------------------
have_lz4=no
AC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support]))
AS_IF([test "x$enable_lz4" == "xyes"], [
AS_IF([test "x$enable_lz4" = "xyes"], [
AC_CHECK_HEADERS(lz4.h,
[AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
[AC_MSG_ERROR([*** LZ4 support requested but headers not found])])
@ -643,6 +671,7 @@ if test "x${have_acl}" != xno ; then
if test "x$have_acl" = xyes ; then
ACL_LIBS="-lacl"
AC_DEFINE(HAVE_ACL, 1, [ACL available])
M4_DEFINES="$M4_DEFINES -DHAVE_ACL"
else
have_acl=no
fi
@ -869,6 +898,21 @@ if test "x$enable_libidn" != "xno"; then
fi
AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"])
# ------------------------------------------------------------------------------
have_libiptc=no
AC_ARG_ENABLE(libiptc, AS_HELP_STRING([--disable-libiptc], [Disable optional LIBIPTC support]))
if test "x$enable_libiptc" != "xno"; then
PKG_CHECK_MODULES(LIBIPTC, [libiptc],
[AC_DEFINE(HAVE_LIBIPTC, 1, [Define if libiptc is available])
have_libiptc=yes
M4_DEFINES="$M4_DEFINES -DHAVE_LIBIPTC"],
[have_libiptc=no])
if test "x$have_libiptc" = "xno" -a "x$enable_libiptc" = "xyes"; then
AC_MSG_ERROR([*** libiptc support requested but libraries not found])
fi
fi
AM_CONDITIONAL(HAVE_LIBIPTC, [test "$have_libiptc" = "yes"])
# ------------------------------------------------------------------------------
have_binfmt=no
AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool]))
@ -967,6 +1011,15 @@ fi
AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ])
# ------------------------------------------------------------------------------
have_importd=no
AC_ARG_ENABLE(importd, AS_HELP_STRING([--disable-importd], [disable import daemon]))
if test "x$enable_importd" != "xno"; then
have_importd=yes
fi
AM_CONDITIONAL(ENABLE_IMPORTD, [test "$have_importd" = "yes"])
AS_IF([test "$have_importd" = "yes"], [ AC_DEFINE(HAVE_IMPORTD, [1], [Importd support available]) ])
# ------------------------------------------------------------------------------
have_hostnamed=no
AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon]))
@ -1092,16 +1145,25 @@ fi
AM_CONDITIONAL(ENABLE_EFI, [test "x$have_efi" = "xyes"])
# ------------------------------------------------------------------------------
AC_ARG_WITH(unifont,
AS_HELP_STRING([--with-unifont=PATH],
[Path to unifont.hex]),
[UNIFONT="$withval"],
[UNIFONT="/usr/share/unifont/unifont.hex"])
AC_SUBST(UNIFONT)
have_terminal=no
have_unifont=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
if test "x$enable_terminal" = "xyes"; then
PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes])
AS_IF([test "x$have_terminal" != xyes -a "x$enable_terminal" = xyes],
AC_CHECK_FILE($UNIFONT, [have_unifont=yes])
AS_IF([test "x$have_terminal" != xyes -o "x$have_unifont" != "xyes" -a "x$enable_terminal" = xyes],
[AC_MSG_ERROR([*** terminal support requested but required dependencies not available])],
[test "x$have_terminal" = xyes],
[test "x$have_terminal" = xyes -a "x$have_unifont" = "xyes"],
[AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])])
fi
AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes"])
AM_CONDITIONAL(ENABLE_TERMINAL, [test "x$have_terminal" = "xyes" -a "x$have_unifont" = "xyes"])
# ------------------------------------------------------------------------------
have_kdbus=no
@ -1190,6 +1252,11 @@ AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >=
AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
enable_hwdb=$enableval, enable_hwdb=yes)
AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
@ -1253,22 +1320,17 @@ AC_SUBST(TTY_GID)
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=$($PKG_CONFIG --variable=sysconfdir dbus-1)/dbus-1/system.d])
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
[with_dbussessionservicedir=$($PKG_CONFIG --variable=session_bus_services_dir dbus-1)])
[with_dbussessionservicedir=${datadir}/dbus-1/services])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../system-services)])
AC_ARG_WITH([dbusinterfacedir],
AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
[],
[with_dbusinterfacedir=$(readlink -m $($PKG_CONFIG --variable=session_bus_services_dir dbus-1)/../interfaces)])
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
@ -1311,6 +1373,14 @@ AC_ARG_ENABLE([split-usr],
enable_split_usr=no
])])
AC_ARG_WITH([dkr-index-url],
[AS_HELP_STRING([--dkr-index-url=URL], [Specify the default index URL to use for image downloads])],
[DEFAULT_DKR_INDEX_URL="\"$withval\""],
[DEFAULT_DKR_INDEX_URL="NULL"])
AC_DEFINE_UNQUOTED(DEFAULT_DKR_INDEX_URL, [$DEFAULT_DKR_INDEX_URL], [Default index URL to use for image downloads])
AC_SUBST(DEFAULT_DKR_INDEX_URL)
AS_IF([test "x${enable_split_usr}" = "xyes"], [
AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr])
])
@ -1323,21 +1393,43 @@ AS_IF([test "x$0" != "x./configure"], [
])
AC_ARG_ENABLE(tests,
[AC_HELP_STRING([--disable-tests], [disable tests])],
enable_tests=$enableval, enable_tests=yes)
[AC_HELP_STRING([--disable-tests], [disable tests])],
enable_tests=$enableval, enable_tests=yes)
AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
AC_ARG_ENABLE(hashmap-debug,
[AC_HELP_STRING([--enable-hashmap-debug], [enable hashmap debugging])],
enable_hashmap_debug=$enableval, enable_hashmap_debug=no)
AS_IF([test x$enable_hashmap_debug = xyes], [
AC_DEFINE(ENABLE_HASHMAP_DEBUG, 1, [Define if hashmap debugging is to be enabled])
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug@<:@=LIST@:>@], [enable extra debugging (hashmap,mmap-cache)])],
[if test "x$enableval" = "xyes"; then
enableval="hashmap,mmap-cache"
fi
saved_ifs="$IFS"
IFS="$IFS$PATH_SEPARATOR,"
for name in $enableval; do
case $name in
hashmap)
enable_debug_hashmap=yes
;;
mmap-cache)
enable_debug_mmap_cache=yes
;;
esac
done
IFS="$saved_ifs"],[])
enable_debug=""
AS_IF([test x$enable_debug_hashmap = xyes], [
AC_DEFINE(ENABLE_DEBUG_HASHMAP, 1, [Define if hashmap debugging is to be enabled])
enable_debug="hashmap $enable_debug"
])
AS_IF([test x$enable_debug_mmap_cache = xyes], [
AC_DEFINE(ENABLE_DEBUG_MMAP_CACHE, 1, [Define if mmap cache debugging is to be enabled])
enable_debug="mmap-cache $enable_debug"
])
test -z "$enable_debug" && enable_debug="none"
AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
AC_SUBST([pamlibdir], [$with_pamlibdir])
@ -1365,8 +1457,10 @@ AC_MSG_RESULT([
SELinux: ${have_selinux}
SECCOMP: ${have_seccomp}
SMACK: ${have_smack}
ZLIB: ${have_zlib}
XZ: ${have_xz}
LZ4: ${have_lz4}
BZIP2: ${have_bzip2}
ACL: ${have_acl}
GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode}
@ -1375,6 +1469,7 @@ AC_MSG_RESULT([
GNUTLS: ${have_gnutls}
libcurl: ${have_libcurl}
libidn: ${have_libidn}
libiptc: ${have_libiptc}
ELFUTILS: ${have_elfutils}
binfmt: ${have_binfmt}
vconsole: ${have_vconsole}
@ -1388,6 +1483,7 @@ AC_MSG_RESULT([
rfkill: ${have_rfkill}
logind: ${have_logind}
machined: ${have_machined}
importd: ${have_importd}
hostnamed: ${have_hostnamed}
timedated: ${have_timedated}
timesyncd: ${have_timesyncd}
@ -1407,6 +1503,7 @@ AC_MSG_RESULT([
dbus: ${have_dbus}
nss-myhostname: ${have_myhostname}
gudev: ${enable_gudev}
hwdb: ${enable_hwdb}
gintrospection: ${enable_introspection}
terminal: ${have_terminal}
kdbus: ${have_kdbus}
@ -1419,6 +1516,9 @@ AC_MSG_RESULT([
SysV compatibility: ${SYSTEM_SYSV_COMPAT}
compatibility libraries: ${have_compat_libs}
utmp/wtmp support: ${have_utmp}
ldconfig support: ${enable_ldconfig}
hibernate support: ${enable_hibernate}
extra debugging: ${enable_debug}
prefix: ${prefix}
rootprefix: ${with_rootprefix}
@ -1438,7 +1538,6 @@ AC_MSG_RESULT([
D-Bus policy dir: ${with_dbuspolicydir}
D-Bus session dir: ${with_dbussessionservicedir}
D-Bus system dir: ${with_dbussystemservicedir}
D-Bus interfaces dir: ${with_dbusinterfacedir}
Bash completions dir: ${with_bashcompletiondir}
Zsh completions dir: ${with_zshcompletiondir}
Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
@ -1448,6 +1547,7 @@ AC_MSG_RESULT([
Maximum System UID: ${SYSTEM_UID_MAX}
Maximum System GID: ${SYSTEM_GID_MAX}
Certificate root: ${CERTIFICATEROOT}
Default dkr Index ${DEFAULT_DKR_INDEX_URL}
CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}

View File

@ -147,6 +147,7 @@ DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DEBUGTTY = @DEBUGTTY@
DEFAULT_DKR_INDEX_URL = @DEFAULT_DKR_INDEX_URL@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
@ -216,6 +217,8 @@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBIDN_CFLAGS = @LIBIDN_CFLAGS@
LIBIDN_LIBS = @LIBIDN_LIBS@
LIBIPTC_CFLAGS = @LIBIPTC_CFLAGS@
LIBIPTC_LIBS = @LIBIPTC_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -283,6 +286,7 @@ SHELL = @SHELL@
SPHINX_BUILD = @SPHINX_BUILD@
STRINGS = @STRINGS@
STRIP = @STRIP@
SULOGIN = @SULOGIN@
SUSHELL = @SUSHELL@
SYSTEM_GID_MAX = @SYSTEM_GID_MAX@
SYSTEM_SYSVINIT_PATH = @SYSTEM_SYSVINIT_PATH@
@ -292,6 +296,7 @@ TELINIT = @TELINIT@
TERMINAL_CFLAGS = @TERMINAL_CFLAGS@
TERMINAL_LIBS = @TERMINAL_LIBS@
TTY_GID = @TTY_GID@
UNIFONT = @UNIFONT@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
@ -300,6 +305,8 @@ XKBCOMMON_LIBS = @XKBCOMMON_LIBS@
XSLTPROC = @XSLTPROC@
XZ_CFLAGS = @XZ_CFLAGS@
XZ_LIBS = @XZ_LIBS@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@ -322,7 +329,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
dbusinterfacedir = @dbusinterfacedir@
dbuspolicydir = @dbuspolicydir@
dbussessionservicedir = @dbussessionservicedir@
dbussystemservicedir = @dbussystemservicedir@

View File

@ -15,7 +15,7 @@
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GUdev Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">
For version 218
For version 219
— the latest version of this
documentation can be found at
<a class="ulink" href="http://www.freedesktop.org/software/systemd/gudev/" target="_top">

View File

@ -1 +1 @@
218
219

View File

@ -57,7 +57,7 @@ EXTRA_HFILES=
# Header files to ignore when scanning. Use base file name, no paths
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES = libudev-private.h libudev-hwdb-def.h
IGNORE_HFILES = libudev-private.h
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png

View File

@ -147,6 +147,7 @@ DATADIRNAME = @DATADIRNAME@
DBUS_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@
DEBUGTTY = @DEBUGTTY@
DEFAULT_DKR_INDEX_URL = @DEFAULT_DKR_INDEX_URL@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
@ -216,6 +217,8 @@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBIDN_CFLAGS = @LIBIDN_CFLAGS@
LIBIDN_LIBS = @LIBIDN_LIBS@
LIBIPTC_CFLAGS = @LIBIPTC_CFLAGS@
LIBIPTC_LIBS = @LIBIPTC_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@ -283,6 +286,7 @@ SHELL = @SHELL@
SPHINX_BUILD = @SPHINX_BUILD@
STRINGS = @STRINGS@
STRIP = @STRIP@
SULOGIN = @SULOGIN@
SUSHELL = @SUSHELL@
SYSTEM_GID_MAX = @SYSTEM_GID_MAX@
SYSTEM_SYSVINIT_PATH = @SYSTEM_SYSVINIT_PATH@
@ -292,6 +296,7 @@ TELINIT = @TELINIT@
TERMINAL_CFLAGS = @TERMINAL_CFLAGS@
TERMINAL_LIBS = @TERMINAL_LIBS@
TTY_GID = @TTY_GID@
UNIFONT = @UNIFONT@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
XGETTEXT = @XGETTEXT@
@ -300,6 +305,8 @@ XKBCOMMON_LIBS = @XKBCOMMON_LIBS@
XSLTPROC = @XSLTPROC@
XZ_CFLAGS = @XZ_CFLAGS@
XZ_LIBS = @XZ_LIBS@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
@ -322,7 +329,6 @@ build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
dbusinterfacedir = @dbusinterfacedir@
dbuspolicydir = @dbuspolicydir@
dbussessionservicedir = @dbussessionservicedir@
dbussystemservicedir = @dbussystemservicedir@
@ -428,7 +434,7 @@ EXTRA_HFILES =
# Header files to ignore when scanning. Use base file name, no paths
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
IGNORE_HFILES = libudev-private.h libudev-hwdb-def.h
IGNORE_HFILES = libudev-private.h
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png

View File

@ -15,7 +15,7 @@
<div>
<div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">libudev Reference Manual</p></th></tr></table></div>
<div><p class="releaseinfo">
For version 218
For version 219
— the latest version of this
documentation can be found at
<a class="ulink" href="http://www.freedesktop.org/software/systemd/libudev/" target="_top">

View File

@ -1 +1 @@
218
219

File diff suppressed because it is too large Load Diff

View File

@ -166,7 +166,7 @@ bluetooth:v0035*
ID_VENDOR_FROM_DATABASE=Eclipse (HQ Espana) S.L.
bluetooth:v0036*
ID_VENDOR_FROM_DATABASE=Renesas Technology Corp.
ID_VENDOR_FROM_DATABASE=Renesas Electronics Corporation
bluetooth:v0037*
ID_VENDOR_FROM_DATABASE=Mobilian Corporation
@ -937,7 +937,7 @@ bluetooth:v0135*
ID_VENDOR_FROM_DATABASE=Airewear LLC
bluetooth:v0136*
ID_VENDOR_FROM_DATABASE=ETC sp. z.o.o.
ID_VENDOR_FROM_DATABASE=Seed Labs, Inc. (formerly ETC sp. z.o.o.)
bluetooth:v0137*
ID_VENDOR_FROM_DATABASE=Prestigio Plaza Ltd.
@ -1277,3 +1277,156 @@ bluetooth:v01A6*
bluetooth:v01A7*
ID_VENDOR_FROM_DATABASE=ENERGOUS CORPORATION
bluetooth:v01A8*
ID_VENDOR_FROM_DATABASE=Taobao
bluetooth:v01A9*
ID_VENDOR_FROM_DATABASE=Canon Inc.
bluetooth:v01AA*
ID_VENDOR_FROM_DATABASE=Geophysical Technology Inc.
bluetooth:v01AB*
ID_VENDOR_FROM_DATABASE=Facebook, Inc.
bluetooth:v01AC*
ID_VENDOR_FROM_DATABASE=Nipro Diagnostics, Inc.
bluetooth:v01AD*
ID_VENDOR_FROM_DATABASE=FlightSafety International
bluetooth:v01AE*
ID_VENDOR_FROM_DATABASE=Earlens Corporation
bluetooth:v01AF*
ID_VENDOR_FROM_DATABASE=Sunrise Micro Devices, Inc.
bluetooth:v01B0*
ID_VENDOR_FROM_DATABASE=Star Micronics Co., Ltd.
bluetooth:v01B1*
ID_VENDOR_FROM_DATABASE=Netizens Sp. z o.o.
bluetooth:v01B2*
ID_VENDOR_FROM_DATABASE=Nymi Inc.
bluetooth:v01B3*
ID_VENDOR_FROM_DATABASE=Nytec, Inc.
bluetooth:v01B4*
ID_VENDOR_FROM_DATABASE=Trineo Sp. z o.o.
bluetooth:v01B5*
ID_VENDOR_FROM_DATABASE=Nest Labs Inc.
bluetooth:v01B6*
ID_VENDOR_FROM_DATABASE=LM Technologies Ltd
bluetooth:v01B7*
ID_VENDOR_FROM_DATABASE=General Electric Company
bluetooth:v01B8*
ID_VENDOR_FROM_DATABASE=i+D3 S.L.
bluetooth:v01B9*
ID_VENDOR_FROM_DATABASE=HANA Micron
bluetooth:v01BA*
ID_VENDOR_FROM_DATABASE=Stages Cycling LLC
bluetooth:v01BB*
ID_VENDOR_FROM_DATABASE=Cochlear Bone Anchored Solutions AB
bluetooth:v01BC*
ID_VENDOR_FROM_DATABASE=SenionLab AB
bluetooth:v01BD*
ID_VENDOR_FROM_DATABASE=Syszone Co., Ltd
bluetooth:v01BE*
ID_VENDOR_FROM_DATABASE=Pulsate Mobile Ltd.
bluetooth:v01BF*
ID_VENDOR_FROM_DATABASE=Hong Kong HunterSun Electronic Limited
bluetooth:v01C0*
ID_VENDOR_FROM_DATABASE=pironex GmbH
bluetooth:v01C1*
ID_VENDOR_FROM_DATABASE=BRADATECH Corp.
bluetooth:v01C2*
ID_VENDOR_FROM_DATABASE=Transenergooil AG
bluetooth:v01C3*
ID_VENDOR_FROM_DATABASE=Bunch
bluetooth:v01C4*
ID_VENDOR_FROM_DATABASE=DME Microelectronics
bluetooth:v01C5*
ID_VENDOR_FROM_DATABASE=Bitcraze AB
bluetooth:v01C6*
ID_VENDOR_FROM_DATABASE=HASWARE Inc.
bluetooth:v01C7*
ID_VENDOR_FROM_DATABASE=Abiogenix Inc.
bluetooth:v01C8*
ID_VENDOR_FROM_DATABASE=Poly-Control ApS
bluetooth:v01C9*
ID_VENDOR_FROM_DATABASE=Avi-on
bluetooth:v01CA*
ID_VENDOR_FROM_DATABASE=Laerdal Medical AS
bluetooth:v01CB*
ID_VENDOR_FROM_DATABASE=Fetch My Pet
bluetooth:v01CC*
ID_VENDOR_FROM_DATABASE=Sam Labs Ltd.
bluetooth:v01CD*
ID_VENDOR_FROM_DATABASE=Chengdu Synwing Technology Ltd
bluetooth:v01CE*
ID_VENDOR_FROM_DATABASE=HOUWA SYSTEM DESIGN, k.k.
bluetooth:v01CF*
ID_VENDOR_FROM_DATABASE=BSH
bluetooth:v01D0*
ID_VENDOR_FROM_DATABASE=Primus Inter Pares Ltd
bluetooth:v01D1*
ID_VENDOR_FROM_DATABASE=August
bluetooth:v01D2*
ID_VENDOR_FROM_DATABASE=Gill Electronics
bluetooth:v01D3*
ID_VENDOR_FROM_DATABASE=Sky Wave Design
bluetooth:v01D4*
ID_VENDOR_FROM_DATABASE=Newlab S.r.l.
bluetooth:v01D5*
ID_VENDOR_FROM_DATABASE=ELAD srl
bluetooth:v01D6*
ID_VENDOR_FROM_DATABASE=G-wearables inc.
bluetooth:v01D7*
ID_VENDOR_FROM_DATABASE=Squadrone Systems Inc.
bluetooth:v01D8*
ID_VENDOR_FROM_DATABASE=Code Corporation
bluetooth:v01D9*
ID_VENDOR_FROM_DATABASE=Savant Systems LLC
bluetooth:v01DA*
ID_VENDOR_FROM_DATABASE=Logitech International SA

View File

@ -963,13 +963,13 @@ pci:v00001000d0000005Dsv00001028sd00001F4A*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC H730 Mini (for blades))
pci:v00001000d0000005Dsv00001028sd00001F4D*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC FS33xS)
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC FD33xS)
pci:v00001000d0000005Dsv00001028sd00001F4F*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC H730P Slim)
pci:v00001000d0000005Dsv00001028sd00001F54*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC FS33xD)
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC FD33xD)
pci:v00001000d0000005Dsv000017AAsd00001052*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (ThinkServer RAID 720i)
@ -1383,7 +1383,7 @@ pci:v00001000d00000097sv00001028sd00001F45*
ID_MODEL_FROM_DATABASE=SAS3008 PCI-Express Fusion-MPT SAS-3 (12GB/s HBA internal)
pci:v00001000d00000097sv00001028sd00001F46*
ID_MODEL_FROM_DATABASE=SAS3008 PCI-Express Fusion-MPT SAS-3 (12GB/s HBA external)
ID_MODEL_FROM_DATABASE=SAS3008 PCI-Express Fusion-MPT SAS-3 (12Gbps HBA)
pci:v00001000d00000407*
ID_MODEL_FROM_DATABASE=MegaRAID
@ -5834,6 +5834,9 @@ pci:v00001002d0000678Asv00001002sd00000420*
pci:v00001002d0000678Asv00001002sd00000422*
ID_MODEL_FROM_DATABASE=Tahiti PRO GL [FirePro Series] (Radeon Sky 900)
pci:v00001002d0000678Asv00001002sd00000710*
ID_MODEL_FROM_DATABASE=Tahiti PRO GL [FirePro Series] (FirePro S9050)
pci:v00001002d0000678Asv00001002sd00000B0E*
ID_MODEL_FROM_DATABASE=Tahiti PRO GL [FirePro Series] (FirePro S10000 Passive)
@ -5897,6 +5900,9 @@ pci:v00001002d00006798sv00001092sd00003000*
pci:v00001002d00006798sv00001458sd00002261*
ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (Tahiti XT2 [Radeon HD 7970 GHz Edition OC])
pci:v00001002d00006798sv00001458sd00003001*
ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (Tahiti XTL [Radeon R9 280X OC])
pci:v00001002d00006798sv00001462sd00002774*
ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (MSI R7970 TF 3GD5/OC BE)
@ -7931,6 +7937,9 @@ pci:v00001002d0000692B*
pci:v00001002d0000692F*
ID_MODEL_FROM_DATABASE=Tonga XT GL [FirePro W8100]
pci:v00001002d00006938*
ID_MODEL_FROM_DATABASE=Amethyst XT [Radeon R9 M295X Mac Edition]
pci:v00001002d00006939*
ID_MODEL_FROM_DATABASE=Tonga PRO [Radeon R9 285]
@ -10313,6 +10322,9 @@ pci:v00001014d0000016E*
pci:v00001014d00000170*
ID_MODEL_FROM_DATABASE=GXT6000P Graphics Adapter
pci:v00001014d00000170sv00001092sd00000172*
ID_MODEL_FROM_DATABASE=GXT6000P Graphics Adapter (Fire GL2)
pci:v00001014d0000017D*
ID_MODEL_FROM_DATABASE=GXT300P Graphics Adapter
@ -11903,6 +11915,9 @@ pci:v00001028d00000016*
pci:v00001028d00000016sv00001028sd00001F24*
ID_MODEL_FROM_DATABASE=PowerEdge Expandable RAID controller S300 (PERC S300 Controller)
pci:v00001028d00000073*
ID_MODEL_FROM_DATABASE=NV-RAM Adapter
pci:v00001029*
ID_VENDOR_FROM_DATABASE=Siemens Nixdorf IS
@ -21011,6 +21026,9 @@ pci:v000010B5d00009056sv00001369sd0000C201*
pci:v000010B5d00009056sv000014B4sd0000D10A*
ID_MODEL_FROM_DATABASE=PCI9056 32-bit 66MHz PCI <-> IOBus Bridge (DekTec DTA-110T)
pci:v000010B5d00009056sv000014B4sd0000D128*
ID_MODEL_FROM_DATABASE=PCI9056 32-bit 66MHz PCI <-> IOBus Bridge (Dektec DTA-140)
pci:v000010B5d00009056sv000014B4sd0000D140*
ID_MODEL_FROM_DATABASE=PCI9056 32-bit 66MHz PCI <-> IOBus Bridge (Dektec DTA-140)
@ -27992,6 +28010,12 @@ pci:v000010DEd00000E0C*
pci:v000010DEd00000E0F*
ID_MODEL_FROM_DATABASE=GK208 HDMI/DP Audio Controller
pci:v000010DEd00000E12*
ID_MODEL_FROM_DATABASE=TegraK1 PCIe x4 Bridge
pci:v000010DEd00000E13*
ID_MODEL_FROM_DATABASE=TegraK1 PCIe x1 Bridge
pci:v000010DEd00000E1A*
ID_MODEL_FROM_DATABASE=GK110 HDMI Audio
@ -28520,6 +28544,9 @@ pci:v000010DEd000010D8*
pci:v000010DEd00001140*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M]
pci:v000010DEd00001140sv00001019sd0000999F*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001025sd00000600*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 620M)
@ -28640,6 +28667,9 @@ pci:v000010DEd00001140sv00001025sd00000823*
pci:v000010DEd00001140sv00001025sd00000830*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001025sd00000833*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001025sd00000837*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
@ -28688,12 +28718,42 @@ pci:v000010DEd00001140sv00001025sd00000881*
pci:v000010DEd00001140sv00001025sd0000088A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd0000089B*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd0000090F*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd00000921*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd0000092E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 810M)
pci:v000010DEd00001140sv00001025sd0000092F*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd0000093A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd0000093C*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd0000093F*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd00000941*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd00000945*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd00000954*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd00000965*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001028sd0000054D*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 630M)
@ -28751,12 +28811,24 @@ pci:v000010DEd00001140sv00001028sd000005E8*
pci:v000010DEd00001140sv00001028sd000005F4*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001028sd0000060F*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001028sd0000064E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001028sd00000652*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001028sd00000653*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001028sd00000655*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001028sd0000065E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001028sd00000662*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
@ -28778,6 +28850,12 @@ pci:v000010DEd00001140sv0000103Csd000018FD*
pci:v000010DEd00001140sv0000103Csd000018FF*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 630M)
pci:v000010DEd00001140sv0000103Csd00002335*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv0000103Csd00002337*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv0000103Csd00002AEF*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720A)
@ -28877,9 +28955,66 @@ pci:v000010DEd00001140sv00001043sd0000227A*
pci:v000010DEd00001140sv00001043sd0000228A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000232A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000233A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000236A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000238A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd00008595*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001043sd000085EA*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001043sd000085EB*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd000085EC*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd000085EE*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001043sd000085F3*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000860E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000861A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000861B*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd00008628*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd00008643*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd0000864C*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001043sd00008652*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv0000105Bsd00000DAC*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv0000105Bsd00000DAD*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv0000105Bsd00000EF3*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001072sd0000152D*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
@ -28976,6 +29111,9 @@ pci:v000010DEd00001140sv0000144Dsd0000C0E3*
pci:v000010DEd00001140sv0000144Dsd0000C0E4*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (NVS 5200M)
pci:v000010DEd00001140sv0000144Dsd0000C10D*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv0000144Dsd0000C652*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 620M)
@ -28988,6 +29126,15 @@ pci:v000010DEd00001140sv0000144Dsd0000C711*
pci:v000010DEd00001140sv0000144Dsd0000C736*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 710M)
pci:v000010DEd00001140sv0000144Dsd0000C737*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 710M)
pci:v000010DEd00001140sv0000144Dsd0000C745*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv0000144Dsd0000C750*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001462sd000010B8*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 710M)
@ -29006,9 +29153,27 @@ pci:v000010DEd00001140sv00001462sd0000AAA2*
pci:v000010DEd00001140sv00001462sd0000AAA3*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001462sd0000ACB2*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001462sd0000ACC1*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001462sd0000AE61*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 720M)
pci:v000010DEd00001140sv00001462sd0000AE65*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001462sd0000AE6A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001462sd0000AE71*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv000014C0sd00000083*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv0000152Dsd00000926*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 620M)
@ -29042,6 +29207,9 @@ pci:v000010DEd00001140sv0000152Dsd00001072*
pci:v000010DEd00001140sv0000152Dsd00001086*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv0000152Dsd00001092*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv000017AAsd00002200*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (NVS 5200M)
@ -29093,6 +29261,9 @@ pci:v000010DEd00001140sv000017AAsd0000369D*
pci:v000010DEd00001140sv000017AAsd0000369E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820A)
pci:v000010DEd00001140sv000017AAsd000036A9*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820A)
pci:v000010DEd00001140sv000017AAsd00003800*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
@ -29138,6 +29309,12 @@ pci:v000010DEd00001140sv000017AAsd00003816*
pci:v000010DEd00001140sv000017AAsd00003818*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv000017AAsd0000381A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv000017AAsd0000381C*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv000017AAsd00003901*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 610M / GT 620M)
@ -29153,12 +29330,21 @@ pci:v000010DEd00001140sv000017AAsd00003904*
pci:v000010DEd00001140sv000017AAsd00003905*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv000017AAsd00003907*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv000017AAsd00003910*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 720M)
pci:v000010DEd00001140sv000017AAsd00003912*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 720M)
pci:v000010DEd00001140sv000017AAsd00003913*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv000017AAsd00003915*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv000017AAsd00003977*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
@ -29252,9 +29438,18 @@ pci:v000010DEd00001140sv00001B0Asd000020DD*
pci:v000010DEd00001140sv00001B0Asd000020DF*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 620M)
pci:v000010DEd00001140sv00001B0Asd0000210E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001B0Asd00002202*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M)
pci:v000010DEd00001140sv00001B0Asd000090D7*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001B0Asd000090DD*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001180*
ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 680]
@ -29678,6 +29873,9 @@ pci:v000010DEd00001296*
pci:v000010DEd00001298*
ID_MODEL_FROM_DATABASE=GK208M [GeForce GT 720M]
pci:v000010DEd00001299*
ID_MODEL_FROM_DATABASE=GK208M [GeForce 920M]
pci:v000010DEd000012A0*
ID_MODEL_FROM_DATABASE=GK208
@ -29705,6 +29903,12 @@ pci:v000010DEd00001341sv000017AAsd00003699*
pci:v000010DEd00001341sv000017AAsd0000369C*
ID_MODEL_FROM_DATABASE=GM108M [GeForce 840M] (GeForce 840A)
pci:v000010DEd00001346*
ID_MODEL_FROM_DATABASE=GM108M [GeForce 930M]
pci:v000010DEd00001347*
ID_MODEL_FROM_DATABASE=GM108M [GeForce 940M]
pci:v000010DEd00001380*
ID_MODEL_FROM_DATABASE=GM107 [GeForce GTX 750 Ti]
@ -29715,7 +29919,7 @@ pci:v000010DEd00001382*
ID_MODEL_FROM_DATABASE=GM107 [GeForce GTX 745]
pci:v000010DEd00001389*
ID_MODEL_FROM_DATABASE=GM107GL [GRID M3]
ID_MODEL_FROM_DATABASE=GM107GL [GRID M30]
pci:v000010DEd00001390*
ID_MODEL_FROM_DATABASE=GM107M [GeForce 845M]
@ -29735,6 +29939,21 @@ pci:v000010DEd00001392*
pci:v000010DEd00001393*
ID_MODEL_FROM_DATABASE=GM107M [GeForce 840M]
pci:v000010DEd00001398*
ID_MODEL_FROM_DATABASE=GM107M [GeForce 845M]
pci:v000010DEd0000139A*
ID_MODEL_FROM_DATABASE=GM107M [GeForce GTX 950M]
pci:v000010DEd0000139B*
ID_MODEL_FROM_DATABASE=GM107M [GeForce GTX 960M]
pci:v000010DEd0000139C*
ID_MODEL_FROM_DATABASE=GM107M [GeForce 940M]
pci:v000010DEd000013B0*
ID_MODEL_FROM_DATABASE=GM107GLM [N16P-Q3]
pci:v000010DEd000013B3*
ID_MODEL_FROM_DATABASE=GM107GLM [Quadro K2200M]
@ -29744,8 +29963,11 @@ pci:v000010DEd000013BA*
pci:v000010DEd000013BB*
ID_MODEL_FROM_DATABASE=GM107GL [Quadro K620]
pci:v000010DEd000013BC*
ID_MODEL_FROM_DATABASE=GM107GL [Quadro K1200]
pci:v000010DEd000013BD*
ID_MODEL_FROM_DATABASE=GM107GL [Tesla M40]
ID_MODEL_FROM_DATABASE=GM107GL [GRID M40]
pci:v000010DEd000013C0*
ID_MODEL_FROM_DATABASE=GM204 [GeForce GTX 980]
@ -29771,6 +29993,12 @@ pci:v000010DEd000013D8*
pci:v000010DEd000013D9*
ID_MODEL_FROM_DATABASE=GM204M [GeForce GTX 965M]
pci:v000010DEd00001401*
ID_MODEL_FROM_DATABASE=GM206 [GeForce GTX 960]
pci:v000010DEd000017F0*
ID_MODEL_FROM_DATABASE=GM200GL [Quadro M6000]
pci:v000010DF*
ID_VENDOR_FROM_DATABASE=Emulex Corporation
@ -30236,6 +30464,12 @@ pci:v000010ECd00005249sv0000103Csd00001909*
pci:v000010ECd00005288*
ID_MODEL_FROM_DATABASE=RTS5288 PCI Express Card Reader
pci:v000010ECd00005289*
ID_MODEL_FROM_DATABASE=RTL8411 PCI Express Card Reader
pci:v000010ECd00005289sv00001043sd00001457*
ID_MODEL_FROM_DATABASE=RTL8411 PCI Express Card Reader (K55A Laptop)
pci:v000010ECd00008029*
ID_MODEL_FROM_DATABASE=RTL-8029(AS)
@ -31532,6 +31766,24 @@ pci:v00001106d00000693*
pci:v00001106d00000698*
ID_MODEL_FROM_DATABASE=VT82C693A [Apollo Pro133 AGP]
pci:v00001106d00000709*
ID_MODEL_FROM_DATABASE=VX11 Standard Host Bridge
pci:v00001106d0000070A*
ID_MODEL_FROM_DATABASE=VX11 PCI Express Root Port
pci:v00001106d0000070B*
ID_MODEL_FROM_DATABASE=VX11 PCI Express Root Port
pci:v00001106d0000070C*
ID_MODEL_FROM_DATABASE=VX11 PCI Express Root Port
pci:v00001106d0000070D*
ID_MODEL_FROM_DATABASE=VX11 PCI Express Root Port
pci:v00001106d0000070E*
ID_MODEL_FROM_DATABASE=VX11 PCI Express Root Port
pci:v00001106d00000926*
ID_MODEL_FROM_DATABASE=VT82C926 [Amazon]
@ -32273,6 +32525,30 @@ pci:v00001106d00003189sv00001458sd00005000*
pci:v00001106d00003189sv00001849sd00003189*
ID_MODEL_FROM_DATABASE=VT8377 [KT400/KT600 AGP] Host Bridge (K7VT series Motherboards)
pci:v00001106d000031B0*
ID_MODEL_FROM_DATABASE=VX11 Standard Host Bridge
pci:v00001106d000031B1*
ID_MODEL_FROM_DATABASE=VX11 Standard Host Bridge
pci:v00001106d000031B2*
ID_MODEL_FROM_DATABASE=VX11 DRAM Controller
pci:v00001106d000031B3*
ID_MODEL_FROM_DATABASE=VX11 Power Management Controller
pci:v00001106d000031B4*
ID_MODEL_FROM_DATABASE=VX11 I/O APIC
pci:v00001106d000031B5*
ID_MODEL_FROM_DATABASE=VX11 Scratch Device
pci:v00001106d000031B7*
ID_MODEL_FROM_DATABASE=VX11 Standard Host Bridge
pci:v00001106d000031B8*
ID_MODEL_FROM_DATABASE=VX11 PCI to PCI Bridge
pci:v00001106d00003204*
ID_MODEL_FROM_DATABASE=K8M800 Host Bridge
@ -32429,6 +32705,15 @@ pci:v00001106d00003410sv000019DAsd0000A179*
pci:v00001106d00003432*
ID_MODEL_FROM_DATABASE=VL80x xHCI USB 3.0 Controller
pci:v00001106d00003456*
ID_MODEL_FROM_DATABASE=VX11 Standard Host Bridge
pci:v00001106d0000345B*
ID_MODEL_FROM_DATABASE=VX11 Miscellaneous Bus
pci:v00001106d00003A01*
ID_MODEL_FROM_DATABASE=VX11 Graphics [Chrome 645/640]
pci:v00001106d00004149*
ID_MODEL_FROM_DATABASE=VIA VT6420 (ATA133) Controller
@ -32729,6 +33014,15 @@ pci:v00001106d00008D04*
pci:v00001106d00009001*
ID_MODEL_FROM_DATABASE=VX900 Serial ATA Controller
pci:v00001106d00009082*
ID_MODEL_FROM_DATABASE=Standard AHCI 1.0 SATA Controller
pci:v00001106d00009140*
ID_MODEL_FROM_DATABASE=HDMI Audio Device
pci:v00001106d00009201*
ID_MODEL_FROM_DATABASE=USB3.0 Controller
pci:v00001106d00009530*
ID_MODEL_FROM_DATABASE=Secure Digital Memory Card Controller
@ -34295,6 +34589,9 @@ pci:v00001131d00007146sv00001894sd00000020*
pci:v00001131d00007146sv00001894sd00000023*
ID_MODEL_FROM_DATABASE=SAA7146 (TVStation DVB-C plus)
pci:v00001131d00007146sv00001894sd00000054*
ID_MODEL_FROM_DATABASE=SAA7146 (TV-Station DVB-S)
pci:v00001131d00007160*
ID_MODEL_FROM_DATABASE=SAA7160
@ -34367,6 +34664,9 @@ pci:v00001131d00007164sv00000070sd000089A0*
pci:v00001131d00007164sv00000070sd000089A1*
ID_MODEL_FROM_DATABASE=SAA7164 (WinTV HVR-2200)
pci:v00001131d00007164sv00000070sd0000F123*
ID_MODEL_FROM_DATABASE=SAA7164 (WinTV HVR-2205)
pci:v00001131d00007231*
ID_MODEL_FROM_DATABASE=SAA7231
@ -36102,7 +36402,10 @@ pci:v0000117C*
ID_VENDOR_FROM_DATABASE=ATTO Technology, Inc.
pci:v0000117Cd0000002C*
ID_MODEL_FROM_DATABASE=SAS RAID Adapter
ID_MODEL_FROM_DATABASE=ExpressSAS R380
pci:v0000117Cd0000002D*
ID_MODEL_FROM_DATABASE=ExpressSAS R348
pci:v0000117Cd00000030*
ID_MODEL_FROM_DATABASE=Ultra320 SCSI Host Adapter
@ -36122,6 +36425,18 @@ pci:v0000117Cd00000030sv0000117Csd0000802F*
pci:v0000117Cd00000033*
ID_MODEL_FROM_DATABASE=SAS Adapter
pci:v0000117Cd00000041*
ID_MODEL_FROM_DATABASE=ExpressSAS R30F
pci:v0000117Cd00008013*
ID_MODEL_FROM_DATABASE=ExpressPCI UL4D
pci:v0000117Cd00008014*
ID_MODEL_FROM_DATABASE=ExpressPCI UL4S
pci:v0000117Cd00008027*
ID_MODEL_FROM_DATABASE=ExpressPCI UL5D
pci:v0000117D*
ID_VENDOR_FROM_DATABASE=Becton & Dickinson
@ -37505,6 +37820,9 @@ pci:v000011ABd00007820*
pci:v000011ABd00007823*
ID_MODEL_FROM_DATABASE=MV78230 [Armada XP] ARM SoC
pci:v000011ABd00007846*
ID_MODEL_FROM_DATABASE=88F6820 [Armada 385] ARM SoC
pci:v000011ABd0000F003*
ID_MODEL_FROM_DATABASE=GT-64010 Primary Image Piranha Image Generator
@ -44885,6 +45203,9 @@ pci:v00001425d00005087*
pci:v00001425d00005088*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller
pci:v00001425d00005089*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Ethernet Controller
pci:v00001425d00005401*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller
@ -44975,6 +45296,9 @@ pci:v00001425d00005487*
pci:v00001425d00005488*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller
pci:v00001425d00005489*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Ethernet Controller
pci:v00001425d00005501*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller
@ -45065,6 +45389,9 @@ pci:v00001425d00005587*
pci:v00001425d00005588*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Storage Controller
pci:v00001425d00005589*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Storage Controller
pci:v00001425d00005601*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller
@ -45155,6 +45482,9 @@ pci:v00001425d00005687*
pci:v00001425d00005688*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Storage Controller
pci:v00001425d00005689*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Storage Controller
pci:v00001425d00005701*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller
@ -45245,6 +45575,9 @@ pci:v00001425d00005787*
pci:v00001425d00005788*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller
pci:v00001425d00005789*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Ethernet Controller
pci:v00001425d00005801*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller [VF]
@ -45335,6 +45668,9 @@ pci:v00001425d00005887*
pci:v00001425d00005888*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller [VF]
pci:v00001425d00005889*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Ethernet Controller [VF]
pci:v00001425d0000A000*
ID_MODEL_FROM_DATABASE=PE10K Unified Wire Ethernet Controller
@ -46058,6 +46394,9 @@ pci:v000014C3*
pci:v000014C3d00007630*
ID_MODEL_FROM_DATABASE=MT7630e 802.11bgn Wireless Network Adapter
pci:v000014C3d00007662*
ID_MODEL_FROM_DATABASE=MT7662E 802.11ac PCI Express Wireless Network Adapter
pci:v000014C4*
ID_VENDOR_FROM_DATABASE=IWASAKI Information Systems Co Ltd
@ -46304,6 +46643,9 @@ pci:v000014E4d00000811*
pci:v000014E4d00000816*
ID_MODEL_FROM_DATABASE=BCM3302 Sentry5 MIPS32 CPU
pci:v000014E4d00001570*
ID_MODEL_FROM_DATABASE=720p FaceTime HD Camera
pci:v000014E4d00001600*
ID_MODEL_FROM_DATABASE=NetXtreme BCM5752 Gigabit Ethernet PCI Express
@ -47930,6 +48272,9 @@ pci:v000014E4d00004344*
pci:v000014E4d00004350*
ID_MODEL_FROM_DATABASE=BCM43222 Wireless Network Adapter
pci:v000014E4d00004351*
ID_MODEL_FROM_DATABASE=BCM43222 802.11abgn Wireless Network Adapter
pci:v000014E4d00004353*
ID_MODEL_FROM_DATABASE=BCM43224 802.11a/b/g/n
@ -47978,6 +48323,12 @@ pci:v000014E4d00004365sv00001028sd00000016*
pci:v000014E4d000043A0*
ID_MODEL_FROM_DATABASE=BCM4360 802.11ac Wireless Network Adapter
pci:v000014E4d000043A1*
ID_MODEL_FROM_DATABASE=BCM4360 802.11ac Wireless Network Adapter
pci:v000014E4d000043A2*
ID_MODEL_FROM_DATABASE=BCM4360 802.11ac Wireless Network Adapter
pci:v000014E4d000043A9*
ID_MODEL_FROM_DATABASE=BCM43217 802.11b/g/n
@ -47997,16 +48348,16 @@ pci:v000014E4d000043BC*
ID_MODEL_FROM_DATABASE=BCM43602 802.11ac Wireless LAN SoC
pci:v000014E4d000043D3*
ID_MODEL_FROM_DATABASE=BCM43567
ID_MODEL_FROM_DATABASE=BCM43567 802.11ac Wireless Network Adapter
pci:v000014E4d000043D9*
ID_MODEL_FROM_DATABASE=BCM43570
ID_MODEL_FROM_DATABASE=BCM43570 802.11ac Wireless Network Adapter
pci:v000014E4d000043DF*
ID_MODEL_FROM_DATABASE=BCM4354 802.11ac Wireless LAN SoC
pci:v000014E4d000043EC*
ID_MODEL_FROM_DATABASE=BCM4356
ID_MODEL_FROM_DATABASE=BCM4356 802.11ac Wireless Network Adapter
pci:v000014E4d00004401*
ID_MODEL_FROM_DATABASE=BCM4401 100Base-T
@ -48989,6 +49340,9 @@ pci:v000014F1d00008852*
pci:v000014F1d00008852sv00000070sd00008010*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinTV HVR-1400 ExpressCard)
pci:v000014F1d00008852sv00000070sd0000F038*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinTV HVR-5525)
pci:v000014F1d00008852sv0000107Dsd00006F22*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinFast PxTV1200)
@ -49004,6 +49358,15 @@ pci:v000014F1d00008852sv0000153Bsd0000117E*
pci:v000014F1d00008852sv000018ACsd0000DB78*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (FusionHDTV DVB-T Dual Express)
pci:v000014F1d00008852sv00004254sd00000950*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (S950)
pci:v000014F1d00008852sv00004254sd00000952*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (S952)
pci:v000014F1d00008852sv00004254sd00000982*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (T982)
pci:v000014F1d00008852sv00004254sd00009580*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (T9580)
@ -49550,6 +49913,9 @@ pci:v00001542*
pci:v00001542d00009260*
ID_MODEL_FROM_DATABASE=RCIM-II Real-Time Clock & Interrupt Module
pci:v00001542d00009271*
ID_MODEL_FROM_DATABASE=RCIM-III Real-Time Clock & Interrupt Module (PCIe)
pci:v00001542d00009272*
ID_MODEL_FROM_DATABASE=Pulse Width Modulator Card
@ -51539,6 +51905,9 @@ pci:v0000168Cd00000032*
pci:v0000168Cd00000032sv0000103Csd00001838*
ID_MODEL_FROM_DATABASE=AR9485 Wireless Network Adapter (AR9485/HB125 802.11bgn 1×1 Wi-Fi Adapter)
pci:v0000168Cd00000032sv0000105Bsd0000E044*
ID_MODEL_FROM_DATABASE=AR9485 Wireless Network Adapter (Unex DHXA-225)
pci:v0000168Cd00000033*
ID_MODEL_FROM_DATABASE=AR9580 Wireless Network Adapter
@ -51560,6 +51929,9 @@ pci:v0000168Cd00000037sv00001A3Bsd00002100*
pci:v0000168Cd0000003C*
ID_MODEL_FROM_DATABASE=QCA988x 802.11ac Wireless Network Adapter
pci:v0000168Cd0000003E*
ID_MODEL_FROM_DATABASE=Killer N1525 Wireless-AC
pci:v0000168Cd00000207*
ID_MODEL_FROM_DATABASE=AR5210 Wireless Network Adapter [AR5000 802.11a]
@ -51872,6 +52244,24 @@ pci:v000016D5d00006303*
pci:v000016D5d00006304*
ID_MODEL_FROM_DATABASE=XMC Module with user-configurable Virtex-6 FPGA, 365k logic cells, no front I/O
pci:v000016D5d00007000*
ID_MODEL_FROM_DATABASE=XMC-7K325F: User-configurable Kintex-7 FPGA, 325k logic cells plus SFP front I/O
pci:v000016D5d00007001*
ID_MODEL_FROM_DATABASE=XMC-7K410F: User-configurable Kintex-7 FPGA, 410k logic cells plus SFP front I/O
pci:v000016D5d00007002*
ID_MODEL_FROM_DATABASE=XMC-7K325AX: User-Configurable Kintex-7 FPGA, 325k logic cells with AXM Plug-In I/O
pci:v000016D5d00007003*
ID_MODEL_FROM_DATABASE=XMC-7K410AX: User-Configurable Kintex-7 FPGA, 410k logic cells with AXM Plug-In I/O
pci:v000016D5d00007004*
ID_MODEL_FROM_DATABASE=XMC-7K325CC: User-Configurable Kintex-7 FPGA, 325k logic cells, conduction-cooled
pci:v000016D5d00007005*
ID_MODEL_FROM_DATABASE=XMC-7K410CC: User-Configurable Kintex-7 FPGA, 410k logic cells, conduction-cooled
pci:v000016DA*
ID_VENDOR_FROM_DATABASE=Advantech Co., Ltd.
@ -52325,6 +52715,9 @@ pci:v00001796d00000011*
pci:v00001796d00000012*
ID_MODEL_FROM_DATABASE=SIS1100-e quad link
pci:v00001796d00000015*
ID_MODEL_FROM_DATABASE=SIS8100 [Gigabit link, MicroTCA]
pci:v00001797*
ID_VENDOR_FROM_DATABASE=Techwell Inc.
@ -55154,6 +55547,12 @@ pci:v00001AE9d00000201*
pci:v00001AE9d00000301*
ID_MODEL_FROM_DATABASE=Wil6200 802.11ad Wireless Network Adapter
pci:v00001AE9d00000302*
ID_MODEL_FROM_DATABASE=Wil6200 802.11ad Wireless Network Adapter
pci:v00001AE9d00000310*
ID_MODEL_FROM_DATABASE=Wil6200 802.11ad Wireless Network Adapter
pci:v00001AEC*
ID_VENDOR_FROM_DATABASE=Wolfson Microelectronics
@ -55349,6 +55748,12 @@ pci:v00001B37*
pci:v00001B37d00000014*
ID_MODEL_FROM_DATABASE=ADQ412
pci:v00001B39*
ID_VENDOR_FROM_DATABASE=sTec, Inc.
pci:v00001B39d00000001*
ID_MODEL_FROM_DATABASE=S1120 PCIe Accelerator SSD
pci:v00001B3A*
ID_VENDOR_FROM_DATABASE=Westar Display Technologies
@ -55463,6 +55868,9 @@ pci:v00001B55d0000F1C4*
pci:v00001B66*
ID_VENDOR_FROM_DATABASE=Deltacast
pci:v00001B66d00000007*
ID_MODEL_FROM_DATABASE=Delta-3G-elp-11 SDI I/O Board
pci:v00001B6F*
ID_VENDOR_FROM_DATABASE=Etron Technology, Inc.
@ -55511,6 +55919,9 @@ pci:v00001B85*
pci:v00001B85d00001041*
ID_MODEL_FROM_DATABASE=RevoDrive 3 X2 PCI-Express SSD 240 GB (Marvell Controller)
pci:v00001B85d00008788*
ID_MODEL_FROM_DATABASE=RevoDrive Hybrid
pci:v00001B96*
ID_VENDOR_FROM_DATABASE=Western Digital
@ -55592,6 +56003,12 @@ pci:v00001C1C*
pci:v00001C1Cd00000001*
ID_MODEL_FROM_DATABASE=82C101
pci:v00001C28*
ID_VENDOR_FROM_DATABASE=Lite-On IT Corp. / Plextor
pci:v00001C28d00000122*
ID_MODEL_FROM_DATABASE=M6e PCI Express SSD [Marvell 88SS9183]
pci:v00001C2C*
ID_VENDOR_FROM_DATABASE=Fiberblaze
@ -55691,6 +56108,15 @@ pci:v00001CF7*
pci:v00001D21*
ID_VENDOR_FROM_DATABASE=Allo
pci:v00001D26*
ID_VENDOR_FROM_DATABASE=Kalray Inc.
pci:v00001D26d00000040*
ID_MODEL_FROM_DATABASE=Turbocard2 Accelerator
pci:v00001D26d0000E004*
ID_MODEL_FROM_DATABASE=AB01/EMB01 Development Board
pci:v00001D44*
ID_VENDOR_FROM_DATABASE=DPT
@ -55994,6 +56420,12 @@ pci:v000037D9*
pci:v000037D9d00001138*
ID_MODEL_FROM_DATABASE=SCHD-PH-8 Phase detector
pci:v000037D9d00001140*
ID_MODEL_FROM_DATABASE=VR-12-PCI
pci:v000037D9d00001141*
ID_MODEL_FROM_DATABASE=PCI-485(422)
pci:v00003842*
ID_VENDOR_FROM_DATABASE=eVga.com. Corp.
@ -58874,6 +59306,9 @@ pci:v00008086d00000A26*
pci:v00008086d00000A2A*
ID_MODEL_FROM_DATABASE=Haswell-ULT Integrated Graphics Controller
pci:v00008086d00000A2E*
ID_MODEL_FROM_DATABASE=Haswell-ULT Integrated Graphics Controller
pci:v00008086d00000BE0*
ID_MODEL_FROM_DATABASE=Atom Processor D2xxx/N2xxx Integrated Graphics Controller
@ -59534,6 +59969,9 @@ pci:v00008086d00000F0C*
pci:v00008086d00000F0E*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series LPIO1 SPI Controller
pci:v00008086d00000F12*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series SMBus Controller
pci:v00008086d00000F14*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series SDIO Controller
@ -59549,6 +59987,18 @@ pci:v00008086d00000F18*
pci:v00008086d00000F1C*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series Power Control Unit
pci:v00008086d00000F20*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series SATA IDE Controller
pci:v00008086d00000F21*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series SATA IDE Controller
pci:v00008086d00000F22*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series SATA AHCI Controller
pci:v00008086d00000F23*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series SATA AHCI Controller
pci:v00008086d00000F28*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series LPE Audio Controller
@ -59591,6 +60041,21 @@ pci:v00008086d00000F46*
pci:v00008086d00000F47*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #7
pci:v00008086d00000F48*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series PCI Express Root Port 1
pci:v00008086d00000F4A*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series PCI Express Root Port 2
pci:v00008086d00000F4C*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series PCI Express Root Port 3
pci:v00008086d00000F4E*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series PCI Express Root Port 4
pci:v00008086d00000F50*
ID_MODEL_FROM_DATABASE=Atom Processor E3800 Series eMMC 4.5 Controller
pci:v00008086d00001000*
ID_MODEL_FROM_DATABASE=82542 Gigabit Ethernet Controller (Fiber)
@ -62213,6 +62678,21 @@ pci:v00008086d000015A2*
pci:v00008086d000015A3*
ID_MODEL_FROM_DATABASE=Ethernet Connection (3) I218-V
pci:v00008086d000015A8*
ID_MODEL_FROM_DATABASE=Ethernet Connection X552 Virtual Function
pci:v00008086d000015AA*
ID_MODEL_FROM_DATABASE=Ethernet Connection X552 10 GbE Backplane
pci:v00008086d000015AB*
ID_MODEL_FROM_DATABASE=Ethernet Connection X552 10 GbE Backplane
pci:v00008086d000015AC*
ID_MODEL_FROM_DATABASE=Ethernet Connection X552 10 GbE SFP+
pci:v00008086d000015AD*
ID_MODEL_FROM_DATABASE=Ethernet Connection X552/X557-AT 10GBASE-T
pci:v00008086d000015B7*
ID_MODEL_FROM_DATABASE=Ethernet Connection (2) I219-LM

View File

@ -5,9 +5,6 @@
usb:v0001*
ID_VENDOR_FROM_DATABASE=Fry's Electronics
usb:v0001p142B*
ID_MODEL_FROM_DATABASE=Arbiter Systems, Inc.
usb:v0001p7778*
ID_MODEL_FROM_DATABASE=Counterfeit flash drive [Kingston]
@ -10565,6 +10562,9 @@ usb:v04A9p26DA*
usb:v04A9p26E6*
ID_MODEL_FROM_DATABASE=iR1024
usb:v04A9p2736*
ID_MODEL_FROM_DATABASE=I-SENSYS MF4550d
usb:v04A9p2737*
ID_MODEL_FROM_DATABASE=MF4410
@ -11402,6 +11402,18 @@ usb:v04A9p3289*
usb:v04A9p328A*
ID_MODEL_FROM_DATABASE=PowerShot ELPH 150 IS / IXUS 155
usb:v04A9p328B*
ID_MODEL_FROM_DATABASE=PowerShot N Facebook(R) Ready
usb:v04A9p329A*
ID_MODEL_FROM_DATABASE=PowerShot SX60 HS
usb:v04A9p329B*
ID_MODEL_FROM_DATABASE=PowerShot SX520 HS
usb:v04A9p329C*
ID_MODEL_FROM_DATABASE=PowerShot SX400 IS
usb:v04AA*
ID_VENDOR_FROM_DATABASE=DaeWoo Telecom, Ltd
@ -21701,6 +21713,9 @@ usb:v05E3p0608*
usb:v05E3p0610*
ID_MODEL_FROM_DATABASE=4-port hub
usb:v05E3p0616*
ID_MODEL_FROM_DATABASE=hub
usb:v05E3p0660*
ID_MODEL_FROM_DATABASE=USB 2.0 Hub
@ -30254,6 +30269,9 @@ usb:v0924p3CE8*
usb:v0924p3D5B*
ID_MODEL_FROM_DATABASE=Phaser 6115MFP TWAIN Scanner
usb:v0924p3D6D*
ID_MODEL_FROM_DATABASE=WorkCentre 6015N/NI
usb:v0924p420F*
ID_MODEL_FROM_DATABASE=WorkCentre PE220 Series
@ -30561,7 +30579,7 @@ usb:v0930p6540*
ID_MODEL_FROM_DATABASE=TransMemory Flash Memory
usb:v0930p6544*
ID_MODEL_FROM_DATABASE=Kingston DataTraveler 2.0 Stick (2GB)
ID_MODEL_FROM_DATABASE=TransMemory-Mini / Kingston DataTraveler 2.0 Stick (2GB)
usb:v0930p6545*
ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102/2.0 / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick
@ -30884,6 +30902,9 @@ usb:v0951p1656*
usb:v0951p1665*
ID_MODEL_FROM_DATABASE=Digital DataTraveler SE9 64GB
usb:v0951p1666*
ID_MODEL_FROM_DATABASE=DataTraveler G4
usb:v0951p1689*
ID_MODEL_FROM_DATABASE=DataTraveler SE9
@ -30903,7 +30924,7 @@ usb:v0955p7030*
ID_MODEL_FROM_DATABASE=Tegra 3 (recovery mode)
usb:v0955p7100*
ID_MODEL_FROM_DATABASE=Notion Ink Adam
ID_MODEL_FROM_DATABASE=Tegra Device
usb:v0955p7820*
ID_MODEL_FROM_DATABASE=Tegra 2 AC100 developer mode
@ -34532,6 +34553,12 @@ usb:v0BC2p2300*
usb:v0BC2p2320*
ID_MODEL_FROM_DATABASE=USB 3.0 bridge [Portable Expansion Drive]
usb:v0BC2p2321*
ID_MODEL_FROM_DATABASE=Expansion Portable
usb:v0BC2p2340*
ID_MODEL_FROM_DATABASE=FreeAgent External Hard Drive
usb:v0BC2p3000*
ID_MODEL_FROM_DATABASE=FreeAgent Desktop
@ -35735,6 +35762,15 @@ usb:v0C4Bp0100*
usb:v0C4Bp0300*
ID_MODEL_FROM_DATABASE=cyberJack pinpad(a)
usb:v0C4Bp0400*
ID_MODEL_FROM_DATABASE=cyberJack e-com(a)
usb:v0C4Bp0401*
ID_MODEL_FROM_DATABASE=cyberJack pinpad(a2)
usb:v0C4Bp0500*
ID_MODEL_FROM_DATABASE=cyberJack RFID standard dual interface smartcard reader
usb:v0C4Bp0501*
ID_MODEL_FROM_DATABASE=cyberJack RFID comfort dual interface smartcard reader
@ -48560,6 +48596,15 @@ usb:v1C26*
usb:v1C27*
ID_VENDOR_FROM_DATABASE=HuiYang D & S Cable Co., Ltd.
usb:v1C29*
ID_VENDOR_FROM_DATABASE=Elster GmbH
usb:v1C29p0001*
ID_MODEL_FROM_DATABASE=ExMFE5 Simulator
usb:v1C29p10FC*
ID_MODEL_FROM_DATABASE=enCore device
usb:v1C31*
ID_VENDOR_FROM_DATABASE=LS Cable Ltd.
@ -50475,7 +50520,25 @@ usb:v2639p0013*
ID_MODEL_FROM_DATABASE=MTi-300 AHRS
usb:v2639p0017*
ID_MODEL_FROM_DATABASE=MTi-G-700 GPS INS
ID_MODEL_FROM_DATABASE=MTi-G 7xx GNSS/INS
usb:v2639p0100*
ID_MODEL_FROM_DATABASE=Body Pack
usb:v2639p0101*
ID_MODEL_FROM_DATABASE=Awinda Station
usb:v2639p0102*
ID_MODEL_FROM_DATABASE=Awinda Dongle
usb:v2639p0103*
ID_MODEL_FROM_DATABASE=Sync Station
usb:v2639p0200*
ID_MODEL_FROM_DATABASE=MTw
usb:v2639pD00D*
ID_MODEL_FROM_DATABASE=Wireless Receiver
usb:v2650*
ID_VENDOR_FROM_DATABASE=Electronics For Imaging, Inc. [hex]
@ -50735,15 +50798,36 @@ usb:v3125*
usb:v3125p0001*
ID_MODEL_FROM_DATABASE=TrackerPod Camera Stand
usb:v3136*
ID_VENDOR_FROM_DATABASE=Navini Networks
usb:v3176*
ID_VENDOR_FROM_DATABASE=Whanam Electronics Co., Ltd
usb:v3195*
ID_VENDOR_FROM_DATABASE=Link Instruments
usb:v3195pF190*
ID_MODEL_FROM_DATABASE=MSO-19
usb:v3195pF280*
ID_MODEL_FROM_DATABASE=MSO-28
usb:v3195pF281*
ID_MODEL_FROM_DATABASE=MSO-28
usb:v3275*
ID_VENDOR_FROM_DATABASE=VidzMedia Pte Ltd
usb:v3275p4FB1*
ID_MODEL_FROM_DATABASE=MonsterTV P2H
usb:v3333*
ID_VENDOR_FROM_DATABASE=InLine
usb:v3333p3333*
ID_MODEL_FROM_DATABASE=2 port KVM switch model 60652K
usb:v3334*
ID_VENDOR_FROM_DATABASE=AEI
@ -50762,6 +50846,12 @@ usb:v3340p0E3A*
usb:v3340pA0A3*
ID_MODEL_FROM_DATABASE=deltaX 5 BT (D) PDA
usb:v3344*
ID_VENDOR_FROM_DATABASE=Leaguer Microelectronics (LME)
usb:v3344p3744*
ID_MODEL_FROM_DATABASE=OEM PC Remote
usb:v3504*
ID_VENDOR_FROM_DATABASE=Micro Star
@ -51308,6 +51398,12 @@ usb:v4146p9281*
usb:v4146pBA01*
ID_MODEL_FROM_DATABASE=Intuix Flash Drive
usb:v4168*
ID_VENDOR_FROM_DATABASE=Targus
usb:v4168p1010*
ID_MODEL_FROM_DATABASE=Wireless Compact Laser Mouse
usb:v4242*
ID_VENDOR_FROM_DATABASE=USB Design by Example
@ -51317,6 +51413,15 @@ usb:v4242p4201*
usb:v4242p4220*
ID_MODEL_FROM_DATABASE=Echo 1 Camera
usb:v4255*
ID_VENDOR_FROM_DATABASE=GoPro
usb:v4255p1000*
ID_MODEL_FROM_DATABASE=9FF2 [Digital Photo Display]
usb:v4255p2000*
ID_MODEL_FROM_DATABASE=HD2-14 [Hero 2 Camera]
usb:v4317*
ID_VENDOR_FROM_DATABASE=Broadcom Corp.
@ -51455,6 +51560,18 @@ usb:v5345*
usb:v5345p1234*
ID_MODEL_FROM_DATABASE=PDS6062T Oscilloscope
usb:v534C*
ID_VENDOR_FROM_DATABASE=SatoshiLabs
usb:v534Cp0001*
ID_MODEL_FROM_DATABASE=Bitcoin Wallet [TREZOR]
usb:v5354*
ID_VENDOR_FROM_DATABASE=Meyer Instruments (MIS)
usb:v5354p0017*
ID_MODEL_FROM_DATABASE=PAXcam2
usb:v544D*
ID_VENDOR_FROM_DATABASE=Transmeta Corp.
@ -51605,6 +51722,9 @@ usb:v5986p02D0*
usb:v5986p03D0*
ID_MODEL_FROM_DATABASE=Lenovo Integrated Webcam [R5U877]
usb:v59E3*
ID_VENDOR_FROM_DATABASE=Nonolith Labs
usb:v5A57*
ID_VENDOR_FROM_DATABASE=Zinwell
@ -51653,6 +51773,93 @@ usb:v6189p182D*
usb:v6189p2068*
ID_MODEL_FROM_DATABASE=USB to serial cable (v2)
usb:v6244*
ID_VENDOR_FROM_DATABASE=LightingSoft AG
usb:v6244p0101*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI5A
usb:v6244p0201*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI5C
usb:v6244p0300*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI6 Firmware download
usb:v6244p0301*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI6C
usb:v6244p0302*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI6A
usb:v6244p0303*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI6D
usb:v6244p0400*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK1A
usb:v6244p0401*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK1A
usb:v6244p0410*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI7 Firmware Download
usb:v6244p0411*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI7A
usb:v6244p0420*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI8A Firmware Download
usb:v6244p0421*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI8A
usb:v6244p0430*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI8C Firmware Download
usb:v6244p0431*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI8C
usb:v6244p0440*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI9A Firmware Download
usb:v6244p0441*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI9A
usb:v6244p0450*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI9C Firmware Download
usb:v6244p0451*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI9C
usb:v6244p0460*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK2 Firmware download
usb:v6244p0461*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK2
usb:v6244p0470*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK1B Firmware download
usb:v6244p0471*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK1B
usb:v6244p0480*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK3 Firmware download
usb:v6244p0481*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK3
usb:v6244p0490*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI9D Firmware Download
usb:v6244p0491*
ID_MODEL_FROM_DATABASE=Intelligent Usb Dmx Interface SIUDI9D
usb:v6244p0500*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK2B Firmware download
usb:v6244p0501*
ID_MODEL_FROM_DATABASE=Touch Sensitive Intelligent Control Keypad STICK2B
usb:v6253*
ID_VENDOR_FROM_DATABASE=TwinHan Technology Co., Ltd
@ -51926,6 +52133,30 @@ usb:v8341*
usb:v8341p2000*
ID_MODEL_FROM_DATABASE=Flashdisk
usb:v8564*
ID_VENDOR_FROM_DATABASE=Transcend Information, Inc.
usb:v8564p1000*
ID_MODEL_FROM_DATABASE=JetFlash
usb:v8564p4000*
ID_MODEL_FROM_DATABASE=RDF8
usb:v8644*
ID_VENDOR_FROM_DATABASE=Intenso GmbG
usb:v8644p8003*
ID_MODEL_FROM_DATABASE=Micro Line
usb:v8644p800B*
ID_MODEL_FROM_DATABASE=Micro Line (4GB)
usb:v8E06*
ID_VENDOR_FROM_DATABASE=CH Products, Inc.
usb:v8E06pF700*
ID_MODEL_FROM_DATABASE=DT225 Trackball
usb:v9016*
ID_VENDOR_FROM_DATABASE=Sitecom
@ -51983,6 +52214,18 @@ usb:v9710p7832*
usb:v9710p7840*
ID_MODEL_FROM_DATABASE=MCS7820/MCS7840 2/4 port serial adapter
usb:v9849*
ID_VENDOR_FROM_DATABASE=Bestmedia CD Recordable GmbH & Co. KG
usb:v9849p0701*
ID_MODEL_FROM_DATABASE=Platinum MyDrive HP
usb:v9999*
ID_VENDOR_FROM_DATABASE=Odeon
usb:v9999p0001*
ID_MODEL_FROM_DATABASE=JAF Mobile Phone Flasher Interface
usb:v99FA*
ID_VENDOR_FROM_DATABASE=Grandtec
@ -52067,12 +52310,30 @@ usb:vA727p6895*
usb:vA727p6897*
ID_MODEL_FROM_DATABASE=AR5523
usb:vAAAA*
ID_VENDOR_FROM_DATABASE=MXT
usb:vAAAAp8815*
ID_MODEL_FROM_DATABASE=microSD CardReader
usb:vABCD*
ID_VENDOR_FROM_DATABASE=Unknown
usb:vABCDpCDEE*
ID_MODEL_FROM_DATABASE=Petcam
usb:vB58E*
ID_VENDOR_FROM_DATABASE=Blue Microphones
usb:vB58Ep9E84*
ID_MODEL_FROM_DATABASE=Yeti Stereo Microphone
usb:vC216*
ID_VENDOR_FROM_DATABASE=Card Device Expert Co., LTD
usb:vC216p0180*
ID_MODEL_FROM_DATABASE=MSR90 MagStripe reader
usb:vC251*
ID_VENDOR_FROM_DATABASE=Keil Software, Inc.
@ -52088,6 +52349,15 @@ usb:vCACEp0002*
usb:vCACEp0300*
ID_MODEL_FROM_DATABASE=AirPcap NX [Atheros AR9001U-(2)NG]
usb:vCD12*
ID_VENDOR_FROM_DATABASE=SMART TECHNOLOGY INDUSTRIAL LTD.
usb:vD208*
ID_VENDOR_FROM_DATABASE=Ultimarc
usb:vD208p0310*
ID_MODEL_FROM_DATABASE=Mini-PAC Arcade Control Interface
usb:vD209*
ID_VENDOR_FROM_DATABASE=Ultimarc
@ -52097,6 +52367,12 @@ usb:vD209p0301*
usb:vD209p0501*
ID_MODEL_FROM_DATABASE=Ultra-Stik Ultimarc Ultra-Stik Player 1
usb:vD904*
ID_VENDOR_FROM_DATABASE=LogiLink
usb:vD904p0003*
ID_MODEL_FROM_DATABASE=Laser Mouse (ID0009A)
usb:vE4E4*
ID_VENDOR_FROM_DATABASE=Xorcom Ltd.
@ -52193,14 +52469,50 @@ usb:vEB1ApE355*
usb:vEB2A*
ID_VENDOR_FROM_DATABASE=KWorld
usb:vEF18*
ID_VENDOR_FROM_DATABASE=SMART TECHNOLOGY INDUSTRIAL LTD.
usb:vF003*
ID_VENDOR_FROM_DATABASE=Hewlett Packard
usb:vF003p6002*
ID_MODEL_FROM_DATABASE=PhotoSmart C500
usb:vF182*
ID_VENDOR_FROM_DATABASE=Leap Motion
usb:vF182p0003*
ID_MODEL_FROM_DATABASE=Controller
usb:vF4EC*
ID_VENDOR_FROM_DATABASE=Atten Electronics / Siglent Technologies
usb:vF4ECpEE38*
ID_MODEL_FROM_DATABASE=Digital Storage Oscilloscope
usb:vF4ED*
ID_VENDOR_FROM_DATABASE=Shenzhen Siglent Co., Ltd.
usb:vF4EDpEE37*
ID_MODEL_FROM_DATABASE=SDG1010 Waveform Generator
usb:vF4EDpEE3A*
ID_MODEL_FROM_DATABASE=SDG1010 Waveform Generator (TMC mode)
usb:vF766*
ID_VENDOR_FROM_DATABASE=Hama
usb:vF766p0001*
ID_MODEL_FROM_DATABASE=PC-Gamepad "Greystorm"
usb:vFC08*
ID_VENDOR_FROM_DATABASE=Conrad Electronic SE
usb:vFC08p0101*
ID_MODEL_FROM_DATABASE=MIDI Cable UA0037
usb:vFFEE*
ID_VENDOR_FROM_DATABASE=FNK Tech
usb:vFFEEp0100*
ID_MODEL_FROM_DATABASE=Card Reader Controller RTS5101/RTS5111/RTS5116

View File

@ -473,6 +473,14 @@ keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnFalco:pvr*
# KEYBOARD_KEY_3e=fullscreen, no defined key sym
# HP EliteBook 725 G2
keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPLicrice:pvr*
# HP ProBook 440 G2
keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHP440G2:pvr*
# HP ProBook 445 G1
keyboard:dmi:bvn*:bvr*:bd*:svnHewlett-Packard*:pnHPProBook445G1NotebookPC:pvr*
KEYBOARD_KEY_81=f20 # Fn+F8; Microphone mute button, should be micmute
###########################################################
# IBM
###########################################################
@ -562,6 +570,10 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*3000*:pvr*
KEYBOARD_KEY_98=suspend # Fn+F12 hibernate
KEYBOARD_KEY_b4=prog1 # Lenovo Care
# "Lenovo Care" Key of the 3000 N200
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO:pn0769AP2:pvr3000N200:*
KEYBOARD_KEY_b4=prog1
# lenovo-ideapad
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*:pvr*
@ -586,7 +598,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*:pvrThinkPad*X2*Tablet*
# ThinkPad X6 Tablet
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X6*:pvr*
KEYBOARD_KEY_6c=direction # rotate
KEYBOARD_KEY_68=f13 # toolbox
KEYBOARD_KEY_68=leftmeta # toolbox
KEYBOARD_KEY_6b=esc # escape
KEYBOARD_KEY_6d=right # right on d-pad
KEYBOARD_KEY_6e=left # left on d-pad
@ -597,7 +609,7 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X6*:pvr*
# ThinkPad X41 Tablet
keyboard:dmi:bvn*:bvr*:bd*:svnIBM*:pn18666TU:pvr*
KEYBOARD_KEY_6c=direction # rotate
KEYBOARD_KEY_68=f13 # toolbox
KEYBOARD_KEY_68=leftmeta # toolbox
KEYBOARD_KEY_6b=esc # escape
KEYBOARD_KEY_69=enter # enter on d-pad
@ -796,14 +808,16 @@ keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnGE70*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*:pvr*
KEYBOARD_KEY_c2=ejectcd
#
# some MSI models generate ACPI/input events on the LNXVIDEO input devices,
# plus some extra synthesized ones on atkbd as an echo of actually changing the
# brightness; so ignore those atkbd ones, to avoid loops
keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U-100*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U100*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*N033:*
KEYBOARD_KEY_f7=reserved
KEYBOARD_KEY_f8=reserved
#
# MSI Wind U90/U100 generates separate touchpad on/off keycodes so ignore touchpad toggle keycode
keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnU90/U100:*
KEYBOARD_KEY_e4=reserved

View File

@ -28,11 +28,36 @@
# mouse:usb:v17efp6019:*
# mouse:*:name:Lenovo Optical USB Mouse:
#
# To add local entries, create a new file
# /etc/udev/hwdb.d/71-mouse-local.hwdb
# and add your rules there. To load the new rules execute (as root):
# udevadm hwdb --update
# udevadm trigger /dev/input/eventXX
# where /dev/input/eventXX is the mouse in question. If in
# doubt, simply use /dev/input/event* to reload all input rules.
#
# If your changes are generally applicable, open a bug report on
# http://bugs.freedesktop.org/enter_bug.cgi?product=systemd
# and include your new rules, a description of the device, and the
# output of
# udevadm info /dev/input/eventXX
# (or /dev/input/event*).
#
# Allowed properties are:
# MOUSE_DPI
# MOUSE_WHEEL_CLICK_ANGLE
#
#########################################
# MOUSE_DPI #
#########################################
#
# DPI settings are specified as
# MOUSE_DPI=<dpi>[@<frequency>]
#
# Where <dpi> is the resolution in dots per inch, and <frequency> the
# optional sampling frequency in Hz.
# sampling frequency in Hz (optional). If a device supports dynamic
# frequency scaling, the maximum frequency should be used. For devices
# supporting multiple fixed frequencies, see below.
#
# The value of MOUSE_DPI is:
# - a single integer for single-resolution mice, e.g.
@ -48,7 +73,7 @@
# ascending order, whichever appropriate.
#
# The frequency must be given to either none or all resolutions. If the
# device supports multiple frequencies, the order of items is
# device supports multiple fixed frequencies, the order of items is
# MOUSE_DPI=r1@f1 r2@f1 r3@f1 r1@f2 r2@f2 r3@f2
#
# If the default manufacturer-set resolution is unclear, a resolution of
@ -62,20 +87,27 @@
# third-party software) must not be entered into this file, use a local
# hwdb instead.
#
# To add local entries, create a new file
# /etc/udev/hwdb.d/71-mouse-local.hwdb
# and add your rules there. To load the new rules execute (as root):
# udevadm hwdb --update
# udevadm trigger /dev/input/eventXX
# where /dev/input/eventXX is the mouse in question. If in
# doubt, simply use /dev/input/event* to reload all input rules.
#########################################
# MOUSE_WHEEL_CLICK_ANGLE #
#########################################
#
# If your changes are generally applicable, open a bug report on
# http://bugs.freedesktop.org/enter_bug.cgi?product=systemd
# and include your new rules, a description of the device, and the
# output of
# udevadm info /dev/input/eventXX
# (or /dev/input/event*).
# The angle in degrees per mouse wheel 'click', specified as
# MOUSE_WHEEL_CLICK_ANGLE=<degrees>
#
# Most mice have a 15 degree click stop (24 clicks per full rotation).
#
#
# Sort by by brand, type (usb, bluetooth), DPI, frequency.
# For mice with switchable resolution, sort by the starred entry.
##########################################
# Chicony
##########################################
# Chicony 2.4G Multimedia Wireless Kit MG-0919
mouse:usb:v04f2p0963:name:Chicony 2.4G Multimedia Wireless Kit:
MOUSE_DPI=1000@142
##########################################
# Dell
@ -85,6 +117,13 @@
mouse:usb:v046dpc063:name:DELL DELL USB Laser Mouse:
MOUSE_DPI=1000@125
##########################################
# Fujitsu Siemens
##########################################
mouse:usb:v0461p4d16:name:USB Optical Mouse:
MOUSE_DPI=500@125
##########################################
# Lenovo
##########################################
@ -106,72 +145,139 @@ mouse:usb:v17efp6044:name:ThinkPad USB Laser Mouse:
# model name. The usb vid/pid is the same for all those devices.
# Until 3.19 is available, this list just has the Wireless PID entry.
# Logitech B605 Wireless Mouse (also M505)
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101d:
MOUSE_DPI=900@166
# Logitech M-BJ58 Optical Mouse
mouse:usb:v046dpc00e:name:Logitech USB-PS/2 Optical Mouse:
# Logitech MX310 Optical Mouse
mouse:usb:v046dpc01b:name:Logitech USB-PS/2 Optical Mouse:
# Logitech USB-PS/2 M-BT58
mouse:usb:v046dpc03e:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=400@125
# Lenovo USB mouse model MO28UOL
mouse:usb:v04b3p310c:name:USB Optical Mouse:
MOUSE_DPI=400@142
# Logitech USB-PS/2 M-BZ96C
mouse:usb:v046dpc045:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=600@125
# Logitech Wireless Mouse M325
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:400a:
MOUSE_DPI=600@166
MOUSE_WHEEL_CLICK_ANGLE=20
# Logitech MX1000 Laser Cordless Mouse
mouse:usb:v046dpc50e:name:Logitech USB RECEIVER:
# Logitech Cordless Click! Plus
mouse:usb:v046dpc50e:name:Logitech USB Receiver:
# Logitech, Inc. RX 300 Optical Mouse
mouse:usb:v046dpc040:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=800@125
# Logitech MX 518
mouse:usb:v046dpc01e:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=400@125 *800@125 1600@125
# Logitech, Inc. RX 250 Optical Mouse
mouse:usb:v046dpc050:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=800@142
# Logitech G400 (Wired)
mouse:usb:v046dpc245:name:Logitech Gaming Mouse G400:
MOUSE_DPI=400@1000 *800@1000 1800@1000 3600@1000
# Logitech G400s (Wired)
mouse:usb:v046dpc24c:name:Logitech G400s Optical Gaming Mouse:
MOUSE_DPI=400@1000 *800@1000 2000@1000 4000@1000
# Logitech Wireless Mouse M185
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4008:
# Logitech M705 (marathon mouse)
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101b:
MOUSE_DPI=800@166
# Logitech G500s Laser Gaming Mouse
mouse:usb:v046dpc24e:name:Logitech G500s Laser Gaming Mouse:
MOUSE_DPI=400@500 *800@500 2000@500
# Logitech B605 Wireless Mouse (also M505)
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101d:
MOUSE_DPI=900@166
# Logitech RX1000 Laser Mouse
mouse:usb:v046dpc046:name:Logitech USB Optical Mouse:
# Logitech M100 Optical Mouse
mouse:usb:v046dpc05a:name:Logitech USB Optical Mouse:
# Logitech USB Laser Mouse M-U0011-O rebranded as "terra Laser"
mouse:usb:v046dpc065:name:Logitech USB Laser Mouse:
MOUSE_DPI=1000@125
# Logitech MK260 Wireless Combo Receiver aka M-R0011
mouse:usb:v046dpc52e:name:Logitech USB Receiver:
MOUSE_DPI=1000@200
# Logitech G700 Laser Mouse (Wired)
mouse:usb:v046dpc06b:name:Logitech G700 Laser Mouse:
# Logitech G700 Laser Mouse (Wireless)
mouse:usb:v046dpc531:name:Logitech USB Receiver:
MOUSE_DPI=*1000@500 3800@500 500@1000 1500@1000 2000@1000
# Logitech Wireless Mouse M185
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4008:
MOUSE_DPI=800@166
# Logitech M705 (marathon mouse)
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101b:
MOUSE_DPI=800@166
# Logitech ZoneTouch Mouse T400
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4026:
MOUSE_DPI=1300@166
# Logitech USB Laser Mouse M-UAS144 [LS1 Laser Mouse]
mouse:usb:v046dpc062:name:Logitech USB Laser Mouse:
# Logitech USB Laser Mouse M-U0007
mouse:usb:v046dpc069:name:Logitech USB Laser Mouse:
MOUSE_DPI=1200@125
# Logitech T620 (or, the soap)
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4027:
MOUSE_DPI=1200@250
# Logitech Wirless Mouse M325
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:400a:
MOUSE_DPI=600@166
# Logitech ZoneTouch Mouse T400
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4026:
MOUSE_DPI=1300@166
# Logitech Ultrathin Touch Mouse
mouse:bluetooth:v046dpb00d:name:Ultrathin Touch Mouse:
MOUSE_DPI=1000@1000
# Logitech USB Optical Mouse
mouse:usb:v046dpc05a:name:Logitech USB Optical Mouse:
MOUSE_DPI=1000@125
# Logitech USB-PS/2 M-BZ96C
mouse:usb:v046dpc045:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=600@125
# Logitech USB-PS/2 M-BT58
mouse:usb:v046dpc03e:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=400@125
# ImExPS/2 Logitech Wheel Mouse
mouse:ps2:*:name:ImExPS/2 Logitech Wheel Mouse:
MOUSE_DPI=400@250
##########################################
# Microsoft
##########################################
mouse:usb:v045ep0040:name:Microsoft Microsoft 3-Button Mouse with IntelliEye(TM):
MOUSE_DPI=400@125
# Note: unsure that these work, it's likely that all devices on these
# receivers show up with the same vid/pid/name
# Microsoft Sculpt Ergonomic Mouse
mouse:usb:v045ep07a5:name:Microsoft Microsoft® 2.4GHz Transceiver v9.0:
MOUSE_DPI=1000@142
# Microsoft Arc Touch Mouse USB
mouse:usb:v045ep07b1:name:Microsoft Microsoft® Nano Transceiver v1.0:
MOUSE_DPI=1400@142
# Microsoft Wireless Laser Mouse 8000
mouse:bluetooth:v045ep0702:name:Microsoft Wireless Laser Mouse 8000:
MOUSE_DPI=1000@1000
##########################################
# Oklick
##########################################
# Oklick 406S Bluetooth Laster Mouse
# Oklick 406S Bluetooth Laser Mouse
mouse:bluetooth:v056ep0061:name:Laser BTmouse:
MOUSE_DPI=*800@333 1600@333
##########################################
# Razer
##########################################
# Razer Abyssus
mouse:usb:v1532p0042:name:Razer Razer Abyssus:
MOUSE_DPI=3500@1000

39
hwdb/70-touchpad.hwdb Normal file
View File

@ -0,0 +1,39 @@
# This file is part of systemd.
#
# The lookup keys are composed in:
# 70-touchpad.rules
#
# Note: The format of the "touchpad:" prefix match key is a
# contract between the rules file and the hardware data, it might
# change in later revisions to support more or better matches, it
# is not necessarily expected to be a stable ABI.
#
# Match string format:
# touchpad:pnpid:<pnpid>:
#
# To add local entries, create a new file
# /etc/udev/hwdb.d/71-touchpad-local.hwdb
# and add your rules there. To load the new rules execute (as root):
# udevadm hwdb --update
# udevadm trigger /dev/input/eventXX
# where /dev/input/eventXX is the touchpad in question. If in
# doubt, simply use /dev/input/event* to reload all input rules.
#
# If your changes are generally applicable, open a bug report on
# http://bugs.freedesktop.org/enter_bug.cgi?product=systemd
# and include your new rules, a description of the device, and the
# output of
# udevadm info /dev/input/eventXX
# (or /dev/input/event*).
#
# Allowed properties are:
# TOUCHPAD_HAS_TRACKPOINT_BUTTONS=1
#
# If the TOUCHPAD_HAS_TRACKPOINT_BUTTONS property is set, this
# device has # the trackpoint buttons wired up to the touchpad as
# BTN_0, BTN_1 and BTN_2. This affects the Lenovo X1 Carbon 3rd
# and the *50 series (T450, T550, etc.)
# Lenovo X1 Carbon 3rd
touchpad:pnpid:*LEN0048*:
TOUCHPAD_HAS_TRACKPOINT_BUTTONS=1

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140007389054800"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
process and generate 128-bit ID values. The 128-bit ID
values processed and generated by these APIs are a
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string
format. These functions impose no structure on the
used IDs, much unlike OSF UUIDs or Microsoft GUIDs,
but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented
functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID
as 16 separate bytes or two 64-bit words. It is generally
safer to access the ID components by their 8-bit array
to avoid endianness issues. This union is intended to
be passed call-by-value (as opposed to
call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used
to denote a constant 128-bit ID in source code. A
commonly used idiom is to assign a name to a 128-bit
ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be
used to convert constant 128-bit IDs into constant
strings for output. The following example code will
output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140147783872816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to process and
generate 128-bit ID values. The 128-bit ID values processed and
generated by these APIs are a generalization of OSF UUIDs as
defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string format. These functions
impose no structure on the used IDs, much unlike OSF UUIDs or
Microsoft GUIDs, but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>
and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
separate bytes or two 64-bit words. It is generally safer to
access the ID components by their 8-bit array to avoid endianness
issues. This union is intended to be passed call-by-value (as
opposed to call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and decode 128-bit
IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
constant 128-bit ID in source code. A commonly used idiom is to
assign a name to a 128-bit ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be used to
convert constant 128-bit IDs into constant strings for output. The
following example code will output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
}</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used
to format a 128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following
example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
}</pre><p>Use <code class="function">sd_id128_equal()</code> to compare two 128-bit IDs:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated
with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140007381428800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140147774744128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140007389110688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm140147783971584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140007389054800"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
process and generate 128-bit ID values. The 128-bit ID
values processed and generated by these APIs are a
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string
format. These functions impose no structure on the
used IDs, much unlike OSF UUIDs or Microsoft GUIDs,
but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented
functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID
as 16 separate bytes or two 64-bit words. It is generally
safer to access the ID components by their 8-bit array
to avoid endianness issues. This union is intended to
be passed call-by-value (as opposed to
call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used
to denote a constant 128-bit ID in source code. A
commonly used idiom is to assign a name to a 128-bit
ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be
used to convert constant 128-bit IDs into constant
strings for output. The following example code will
output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140147783872816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to process and
generate 128-bit ID values. The 128-bit ID values processed and
generated by these APIs are a generalization of OSF UUIDs as
defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string format. These functions
impose no structure on the used IDs, much unlike OSF UUIDs or
Microsoft GUIDs, but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>
and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
separate bytes or two 64-bit words. It is generally safer to
access the ID components by their 8-bit array to avoid endianness
issues. This union is intended to be passed call-by-value (as
opposed to call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and decode 128-bit
IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
constant 128-bit ID in source code. A commonly used idiom is to
assign a name to a 128-bit ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be used to
convert constant 128-bit IDs into constant strings for output. The
following example code will output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
}</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used
to format a 128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following
example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
}</pre><p>Use <code class="function">sd_id128_equal()</code> to compare two 128-bit IDs:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated
with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140007381428800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140147774744128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140007389110688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm140147783971584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140007389054800"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
process and generate 128-bit ID values. The 128-bit ID
values processed and generated by these APIs are a
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string
format. These functions impose no structure on the
used IDs, much unlike OSF UUIDs or Microsoft GUIDs,
but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented
functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID
as 16 separate bytes or two 64-bit words. It is generally
safer to access the ID components by their 8-bit array
to avoid endianness issues. This union is intended to
be passed call-by-value (as opposed to
call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used
to denote a constant 128-bit ID in source code. A
commonly used idiom is to assign a name to a 128-bit
ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be
used to convert constant 128-bit IDs into constant
strings for output. The following example code will
output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140147783872816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to process and
generate 128-bit ID values. The 128-bit ID values processed and
generated by these APIs are a generalization of OSF UUIDs as
defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string format. These functions
impose no structure on the used IDs, much unlike OSF UUIDs or
Microsoft GUIDs, but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>
and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
separate bytes or two 64-bit words. It is generally safer to
access the ID components by their 8-bit array to avoid endianness
issues. This union is intended to be passed call-by-value (as
opposed to call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and decode 128-bit
IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
constant 128-bit ID in source code. A commonly used idiom is to
assign a name to a 128-bit ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be used to
convert constant 128-bit IDs into constant strings for output. The
following example code will output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
}</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used
to format a 128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following
example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
}</pre><p>Use <code class="function">sd_id128_equal()</code> to compare two 128-bit IDs:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated
with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140007381428800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140147774744128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140007389110688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm140147783971584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140007389054800"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to
process and generate 128-bit ID values. The 128-bit ID
values processed and generated by these APIs are a
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string
format. These functions impose no structure on the
used IDs, much unlike OSF UUIDs or Microsoft GUIDs,
but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented
functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID
as 16 separate bytes or two 64-bit words. It is generally
safer to access the ID components by their 8-bit array
to avoid endianness issues. This union is intended to
be passed call-by-value (as opposed to
call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used
to denote a constant 128-bit ID in source code. A
commonly used idiom is to assign a name to a 128-bit
ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be
used to convert constant 128-bit IDs into constant
strings for output. The following example code will
output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-id128"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-id128, sd_id128_t, SD_ID128_MAKE, SD_ID128_CONST_STR, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL, sd_id128_equal — APIs for processing 128-bit IDs</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-id128.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140147783872816"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-id128.h</code> provides APIs to process and
generate 128-bit ID values. The 128-bit ID values processed and
generated by these APIs are a generalization of OSF UUIDs as
defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string format. These functions
impose no structure on the used IDs, much unlike OSF UUIDs or
Microsoft GUIDs, but are fully compatible with those types of IDs.
</p><p>See
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>
and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>
for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
union type:</p><pre class="programlisting">typedef union sd_id128 {
uint8_t bytes[16];
uint64_t qwords[2];
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
separate bytes or two 64-bit words. It is generally safer to
access the ID components by their 8-bit array to avoid endianness
issues. This union is intended to be passed call-by-value (as
opposed to call-by-reference) and may be directly manipulated by
clients.</p><p>A couple of macros are defined to denote and decode 128-bit
IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
constant 128-bit ID in source code. A commonly used idiom is to
assign a name to a 128-bit ID using this macro:</p><pre class="programlisting">#define SD_MESSAGE_COREDUMP SD_ID128_MAKE(fc,2e,22,bc,6e,e6,47,b6,b9,07,29,ab,34,a2,50,b1)</pre><p><code class="function">SD_ID128_CONST_STR()</code> may be used to
convert constant 128-bit IDs into constant strings for output. The
following example code will output the string
"fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
}</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used
to format a 128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following
example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
128-bit ID in a
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t id;
id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id));
return 0;
}</pre><p>Use <code class="function">sd_id128_equal()</code> to compare two 128-bit IDs:</p><pre class="programlisting">int main(int argc, char *argv[]) {
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated
with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140007381428800"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
sd_id128_t a, b, c;
a = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a;
assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b));
return 0;
}</pre><p>Note that new, randomized IDs may be generated with
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<code class="option">--new-id</code> option.</p></div><div class="refsect1"><a name="idm140147774744128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140007389110688"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm140147783971584"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_id128_to_string.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_to_string</span>(3)</span></a>,
<a href="sd_id128_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a>,
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>,
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(7)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -19,200 +19,183 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139870240160032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns
a file descriptor that may be asynchronously polled in
an external event loop and is signaled as soon as the
journal changes, because new entries or files were
added, rotation took place, or files have been
deleted, and similar. The file descriptor is suitable
for usage in
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
<code class="function">sd_journal_get_events()</code> for an
events mask to watch for. The call takes one argument:
the journal context object. Note that not all file
systems are capable of generating the necessary events
for wakeups from this file descriptor for changes to
be noticed immediately. In particular network files
systems do not generate suitable file change events in
all cases. Cases like this can be detected with
<code class="function">sd_journal_reliable_fd()</code>,
below. <code class="function">sd_journal_get_timeout()</code>
will ensure in these cases that wake-ups happen
frequently enough for changes to be noticed, although
with a certain latency.</p><p><code class="function">sd_journal_get_events()</code>
will return the <code class="function">poll()</code> mask to
wait for. This function will return a combination of
<code class="constant">POLLIN</code> and
<code class="constant">POLLOUT</code> and similar to fill into
the "<code class="literal">.events</code>" field of
<code class="varname">struct pollfd</code>.</p><p><code class="function">sd_journal_get_timeout()</code>
will return a timeout value for usage in
<code class="function">poll()</code>. This returns a value in
microseconds since the epoch of
<code class="constant">CLOCK_MONOTONIC</code> for timing out
<code class="function">poll()</code> in
<code class="varname">timeout_usec</code>. See
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
for details about
<code class="constant">CLOCK_MONOTONIC</code>. If there is no
timeout to wait for, this will fill in
<code class="constant">(uint64_t) -1</code> instead. Note that
<code class="function">poll()</code> takes a relative timeout
in milliseconds rather than an absolute timeout in
microseconds. To convert the absolute 'us' timeout
into relative 'ms', use code like the
following:</p><pre class="programlisting">uint64_t t;
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140121381493808"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns a file
descriptor that may be asynchronously polled in an external event
loop and is signaled as soon as the journal changes, because new
entries or files were added, rotation took place, or files have
been deleted, and similar. The file descriptor is suitable for
usage in
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>.
Use <code class="function">sd_journal_get_events()</code> for an events
mask to watch for. The call takes one argument: the journal
context object. Note that not all file systems are capable of
generating the necessary events for wakeups from this file
descriptor for changes to be noticed immediately. In particular
network files systems do not generate suitable file change events
in all cases. Cases like this can be detected with
<code class="function">sd_journal_reliable_fd()</code>, below.
<code class="function">sd_journal_get_timeout()</code> will ensure in these
cases that wake-ups happen frequently enough for changes to be
noticed, although with a certain latency.</p><p><code class="function">sd_journal_get_events()</code> will return the
<code class="function">poll()</code> mask to wait for. This function will
return a combination of <code class="constant">POLLIN</code> and
<code class="constant">POLLOUT</code> and similar to fill into the
"<code class="literal">.events</code>" field of <code class="varname">struct
pollfd</code>.</p><p><code class="function">sd_journal_get_timeout()</code> will return a
timeout value for usage in <code class="function">poll()</code>. This
returns a value in microseconds since the epoch of
<code class="constant">CLOCK_MONOTONIC</code> for timing out
<code class="function">poll()</code> in <code class="varname">timeout_usec</code>.
See
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
for details about <code class="constant">CLOCK_MONOTONIC</code>. If there
is no timeout to wait for, this will fill in <code class="constant">(uint64_t)
-1</code> instead. Note that <code class="function">poll()</code> takes
a relative timeout in milliseconds rather than an absolute timeout
in microseconds. To convert the absolute 'us' timeout into
relative 'ms', use code like the following:</p><pre class="programlisting">uint64_t t;
int msec;
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}</pre><p>The code above does not do any error checking
for brevity's sake. The calculated <code class="varname">msec</code>
integer can be passed directly as
<code class="function">poll()</code>'s timeout
parameter.</p><p>After each <code class="function">poll()</code> wake-up
<code class="function">sd_journal_process()</code> needs to be
called to process events. This call will also indicate
what kind of change has been detected (see below; note
that spurious wake-ups are possible).</p><p>A synchronous alternative for using
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code> and
<code class="function">sd_journal_process()</code> is
<code class="function">sd_journal_wait()</code>. It will
synchronously wait until the journal gets changed. The
maximum time this call sleeps may be controlled with
the <em class="parameter"><code>timeout_usec</code></em>
parameter. Pass <code class="constant">(uint64_t) -1</code> to
wait indefinitely. Internally this call simply
combines <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code>,
<code class="function">poll()</code> and
<code class="function">sd_journal_process()</code> into
one.</p><p><code class="function">sd_journal_reliable_fd()</code>
may be used to check whether the wakeup events from
the file descriptor returned by
<code class="function">sd_journal_get_fd()</code> are known to
be immediately triggered. On certain file systems
where file change events from the OS are not available
(such as NFS) changes need to be polled for
repeatedly, and hence are detected only with a certain
latency. This call will return a positive value if the
journal changes are detected immediately and zero when
they need to be polled for and hence might be noticed
only with a certain latency. Note that there's usually
no need to invoke this function directly as
<code class="function">sd_journal_get_timeout()</code> on these
file systems will ask for timeouts explicitly
anyway.</p></div><div class="refsect1"><a name="idm139870240119632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns
a valid file descriptor on success or a negative
errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
returns a combination of <code class="constant">POLLIN</code>,
<code class="constant">POLLOUT</code> and suchlike on success or
a negative errno-style error code.</p><p><code class="function">sd_journal_reliable_fd()</code>
returns a positive integer if the file descriptor
returned by <code class="function">sd_journal_get_fd()</code>
will generate wake-ups immediately for all journal
changes. Returns 0 if there might be a latency
involved.</p><p><code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> return one of
<code class="constant">SD_JOURNAL_NOP</code>,
<code class="constant">SD_JOURNAL_APPEND</code> or
<code class="constant">SD_JOURNAL_INVALIDATE</code> on success or
a negative errno-style error code. If
<code class="constant">SD_JOURNAL_NOP</code> is returned, the
journal did not change since the last invocation. If
<code class="constant">SD_JOURNAL_APPEND</code> is returned, new
entries have been appended to the end of the
journal. If <code class="constant">SD_JOURNAL_INVALIDATE</code>,
journal files were added or removed (possibly due to
rotation). In the latter event, live-view UIs should
probably refresh their entire display, while in the
case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
sufficient to simply continue reading at the previous
end of the journal.</p></div><div class="refsect1"><a name="idm139870235144576"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_reliable_fd()</code>,
<code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139870235138752"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}</pre><p>The code above does not do any error checking for brevity's
sake. The calculated <code class="varname">msec</code> integer can be passed
directly as <code class="function">poll()</code>'s timeout
parameter.</p><p>After each <code class="function">poll()</code> wake-up
<code class="function">sd_journal_process()</code> needs to be called to
process events. This call will also indicate what kind of change
has been detected (see below; note that spurious wake-ups are
possible).</p><p>A synchronous alternative for using
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code> and
<code class="function">sd_journal_process()</code> is
<code class="function">sd_journal_wait()</code>. It will synchronously wait
until the journal gets changed. The maximum time this call sleeps
may be controlled with the <em class="parameter"><code>timeout_usec</code></em>
parameter. Pass <code class="constant">(uint64_t) -1</code> to wait
indefinitely. Internally this call simply combines
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code>,
<code class="function">poll()</code> and
<code class="function">sd_journal_process()</code> into one.</p><p><code class="function">sd_journal_reliable_fd()</code> may be used to
check whether the wakeup events from the file descriptor returned
by <code class="function">sd_journal_get_fd()</code> are known to be
immediately triggered. On certain file systems where file change
events from the OS are not available (such as NFS) changes need to
be polled for repeatedly, and hence are detected only with a
certain latency. This call will return a positive value if the
journal changes are detected immediately and zero when they need
to be polled for and hence might be noticed only with a certain
latency. Note that there's usually no need to invoke this function
directly as <code class="function">sd_journal_get_timeout()</code> on these
file systems will ask for timeouts explicitly anyway.</p></div><div class="refsect1"><a name="idm140121381454848"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns a valid
file descriptor on success or a negative errno-style error
code.</p><p><code class="function">sd_journal_get_events()</code> returns a
combination of <code class="constant">POLLIN</code>,
<code class="constant">POLLOUT</code> and suchlike on success or a negative
errno-style error code.</p><p><code class="function">sd_journal_reliable_fd()</code> returns a
positive integer if the file descriptor returned by
<code class="function">sd_journal_get_fd()</code> will generate wake-ups
immediately for all journal changes. Returns 0 if there might be a
latency involved.</p><p><code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> return one of
<code class="constant">SD_JOURNAL_NOP</code>,
<code class="constant">SD_JOURNAL_APPEND</code> or
<code class="constant">SD_JOURNAL_INVALIDATE</code> on success or a
negative errno-style error code. If
<code class="constant">SD_JOURNAL_NOP</code> is returned, the journal did
not change since the last invocation. If
<code class="constant">SD_JOURNAL_APPEND</code> is returned, new entries
have been appended to the end of the journal. If
<code class="constant">SD_JOURNAL_INVALIDATE</code>, journal files were
added or removed (possibly due to rotation). In the latter event,
live-view UIs should probably refresh their entire display, while
in the case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
sufficient to simply continue reading at the previous end of the
journal.</p></div><div class="refsect1"><a name="idm140121381556448"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_reliable_fd()</code>,
<code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> interfaces are available as
a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140121376465504"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal, in a live view tracking all
changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) {
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
for (;;) {
const void *d;
size_t l;
r = sd_journal_next(j);
if (r &lt; 0) {
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
break;
}
if (r == 0) {
/* Reached the end, let's wait for changes, and try again */
r = sd_journal_wait(j, (uint64_t) -1);
if (r &lt; 0) {
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
break;
}
continue;
}
r = sd_journal_get_data(j, "MESSAGE", &amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, (const char*) d);
}
sd_journal_close(j);
return 0;
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
for (;;) {
const void *d;
size_t l;
r = sd_journal_next(j);
if (r &lt; 0) {
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
break;
}
if (r == 0) {
/* Reached the end, let's wait for changes, and try again */
r = sd_journal_wait(j, (uint64_t) -1);
if (r &lt; 0) {
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
break;
}
continue;
}
r = sd_journal_get_data(j, "MESSAGE", &amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, (const char*) d);
}
sd_journal_close(j);
return 0;
}</pre><p>Waiting with <code class="function">poll()</code> (this
example lacks all error checking for the sake of
simplicity):</p><pre class="programlisting">#include &lt;sys/poll.h&gt;
example lacks all error checking for the sake of
simplicity):</p><pre class="programlisting">#include &lt;poll.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int wait_for_changes(sd_journal *j) {
struct pollfd pollfd;
int msec;
struct pollfd pollfd;
int msec;
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}
pollfd.fd = sd_journal_get_fd(j);
pollfd.events = sd_journal_get_events(j);
poll(&amp;pollfd, 1, msec);
return sd_journal_process(j);
}</pre></div><div class="refsect1"><a name="idm139870235132128"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
</p></div></div></body></html>
pollfd.fd = sd_journal_get_fd(j);
pollfd.events = sd_journal_get_events(j);
poll(&amp;pollfd, 1, msec);
return sd_journal_process(j);
}</pre></div><div class="refsect1"><a name="idm140121376459680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
</p></div></div></body></html>

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139693584531584"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens
the log journal for reading. It will find all journal
files automatically and interleave them automatically
when reading. As first argument it takes a pointer to
a <code class="varname">sd_journal</code> pointer, which on
success will contain a journal context object. The
second argument is a flags field, which may consist of
the following flags ORed together:
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure
only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>
makes sure only volatile journal files will be opened,
excluding those which are stored on persistent
storage. <code class="constant">SD_JOURNAL_SYSTEM</code>
will cause journal files of system services and the
kernel (in opposition to user session processes) to
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code>
will cause journal files of the current user to be
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code>
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes an absolute directory path as argument. All
journal files in this directory will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes a <code class="constant">NULL</code>-terminated list
of file paths to open. All files will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call. Please note
that in the case of a live journal, this function is only
useful for debugging, because individual journal files
can be rotated at any moment, and the opening of
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code>
is similar to <code class="function">sd_journal_open()</code>
but opens the journal files of a running
OS container. The specified machine name refers to a
container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be
used in the child after a fork. Functions which take a
journal object as an argument
(<code class="function">sd_journal_next()</code> and others)
will return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will
close the journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and
free its resources.</p><p>When opening the journal only journal files
accessible to the calling user will be opened. If
journal files are not accessible to the caller, this
will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal
after opening it with
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a
specific journal entry as <span class="emphasis"><em>current</em></span> entry,
similar to a file seek index in a classic file system
file, but without absolute positions. It may be
altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible
via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor
strings may be used to globally identify a specific
journal entry in a stable way and then later to seek
to it (or if the specific entry is not available
locally, to its closest entry in time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related
calls.</p></div><div class="refsect1"><a name="idm139693586294336"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls
return 0 on success or a negative errno-style error
code. <code class="function">sd_journal_close()</code> returns
nothing.</p></div><div class="refsect1"><a name="idm139693586290128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139693586284960"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added
in systemd-38.</p><p><code class="function">sd_journal_open_directory()</code>
was added in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>,
and <code class="function">sd_journal_open_files()</code>
were added in systemd-205.
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
was deprecated.</p></div><div class="refsect1"><a name="idm139693581595616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140423144980192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens the log journal
for reading. It will find all journal files automatically and
interleave them automatically when reading. As first argument it
takes a pointer to a <code class="varname">sd_journal</code> pointer, which
on success will contain a journal context object. The second
argument is a flags field, which may consist of the following
flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
makes sure only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only volatile journal files will be opened, excluding those which
are stored on persistent storage.
<code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
system services and the kernel (in opposition to user session
processes) to be opened.
<code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
files of the current user to be opened. If neither
<code class="constant">SD_JOURNAL_SYSTEM</code> nor
<code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
to <code class="function">sd_journal_open()</code> but takes an absolute
directory path as argument. All journal files in this directory
will be opened and interleaved automatically. This call also takes
a flags argument, but it must be passed as 0 as no flags are
currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
<code class="function">sd_journal_open()</code> but takes a
<code class="constant">NULL</code>-terminated list of file paths to open.
All files will be opened and interleaved automatically. This call
also takes a flags argument, but it must be passed as 0 as no
flags are currently understood for this call. Please note that in
the case of a live journal, this function is only useful for
debugging, because individual journal files can be rotated at any
moment, and the opening of specific files is inherently
racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
to <code class="function">sd_journal_open()</code> but opens the journal
files of a running OS container. The specified machine name refers
to a container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be used in the
child after a fork. Functions which take a journal object as an
argument (<code class="function">sd_journal_next()</code> and others) will
return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will close the
journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and free its
resources.</p><p>When opening the journal only journal files accessible to
the calling user will be opened. If journal files are not
accessible to the caller, this will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal after opening
it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a specific
journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
file seek index in a classic file system file, but without
absolute positions. It may be altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be exported in
<span class="emphasis"><em>cursor</em></span> strings, as accessible via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
Cursor strings may be used to globally identify a specific journal
entry in a stable way and then later to seek to it (or if the
specific entry is not available locally, to its closest entry in
time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related calls.</p></div><div class="refsect1"><a name="idm140423144946896"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls return 0 on
success or a negative errno-style error code.
<code class="function">sd_journal_close()</code> returns nothing.</p></div><div class="refsect1"><a name="idm140423144942720"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are available
as a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140423139973184"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_files()</code> were added in
systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
deprecated.</p></div><div class="refsect1"><a name="idm140423139966848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>

View File

@ -19,81 +19,75 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139865548677952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_next()</code> advances
the read pointer into the journal by one entry. The
only argument taken is a journal context object as
allocated via
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>. After
successful invocation the entry may be read with
functions such as
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>.</p><p>Similarly, <code class="function">sd_journal_previous()</code> sets
the read pointer back one entry.</p><p><code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code>
advance/set back the read pointer by multiple entries
at once, as specified in the <code class="varname">skip</code>
parameter.</p><p>The journal is strictly ordered by reception
time, and hence advancing to the next entry guarantees
that the entry then pointing to is later in time than
then previous one, or has the same timestamp.</p><p>Note that
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
and related calls will fail unless
<code class="function">sd_journal_next()</code> has been
invoked at least once in order to position the read
pointer on a journal entry.</p><p>Note that the
<code class="function">SD_JOURNAL_FOREACH()</code> macro may be used
as a wrapper around
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and <code class="function">sd_journal_next()</code> in order to
make iterating through the journal easier. See below
for an example. Similarly,
<code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
may be used for iterating the journal in reverse
order.</p></div><div class="refsect1"><a name="idm139865550462000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The four calls return the number of entries
advanced/set back on success or a negative errno-style
error code. When the end or beginning of the journal
is reached, a number smaller than requested is
returned. More specifically, if
<code class="function">sd_journal_next()</code> or
<code class="function">sd_journal_previous()</code> reach the
end/beginning of the journal they will return 0,
instead of 1 when they are successful. This should be
considered an EOF marker.</p></div><div class="refsect1"><a name="idm139865550458880"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
<code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139865550452976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140058934083792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_next()</code> advances the read
pointer into the journal by one entry. The only argument taken is
a journal context object as allocated via
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>.
After successful invocation the entry may be read with functions
such as
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>.</p><p>Similarly, <code class="function">sd_journal_previous()</code> sets
the read pointer back one entry.</p><p><code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code> advance/set back
the read pointer by multiple entries at once, as specified in the
<code class="varname">skip</code> parameter.</p><p>The journal is strictly ordered by reception time, and hence
advancing to the next entry guarantees that the entry then
pointing to is later in time than then previous one, or has the
same timestamp.</p><p>Note that
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
and related calls will fail unless
<code class="function">sd_journal_next()</code> has been invoked at least
once in order to position the read pointer on a journal
entry.</p><p>Note that the <code class="function">SD_JOURNAL_FOREACH()</code>
macro may be used as a wrapper around
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and <code class="function">sd_journal_next()</code> in order to make
iterating through the journal easier. See below for an example.
Similarly, <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code> may
be used for iterating the journal in reverse order.</p></div><div class="refsect1"><a name="idm140058934070880"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The four calls return the number of entries advanced/set
back on success or a negative errno-style error code. When the end
or beginning of the journal is reached, a number smaller than
requested is returned. More specifically, if
<code class="function">sd_journal_next()</code> or
<code class="function">sd_journal_previous()</code> reach the end/beginning
of the journal they will return 0, instead of 1 when they are
successful. This should be considered an EOF marker.</p></div><div class="refsect1"><a name="idm140058934060672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_next()</code>,
<code class="function">sd_journal_previous()</code>,
<code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code> interfaces are
available as a shared library, which can be compiled and linked to
with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140058934054864"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) {
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
SD_JOURNAL_FOREACH(j) {
const char *d;
size_t l;
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
SD_JOURNAL_FOREACH(j) {
const char *d;
size_t l;
r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, d);
}
sd_journal_close(j);
return 0;
}</pre></div><div class="refsect1"><a name="idm139865550442144"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>
</p></div></div></body></html>
printf("%.*s\n", (int) l, d);
}
sd_journal_close(j);
return 0;
}</pre></div><div class="refsect1"><a name="idm140058934052128"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>
</p></div></div></body></html>

View File

@ -19,81 +19,75 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139865548677952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_next()</code> advances
the read pointer into the journal by one entry. The
only argument taken is a journal context object as
allocated via
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>. After
successful invocation the entry may be read with
functions such as
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>.</p><p>Similarly, <code class="function">sd_journal_previous()</code> sets
the read pointer back one entry.</p><p><code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code>
advance/set back the read pointer by multiple entries
at once, as specified in the <code class="varname">skip</code>
parameter.</p><p>The journal is strictly ordered by reception
time, and hence advancing to the next entry guarantees
that the entry then pointing to is later in time than
then previous one, or has the same timestamp.</p><p>Note that
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
and related calls will fail unless
<code class="function">sd_journal_next()</code> has been
invoked at least once in order to position the read
pointer on a journal entry.</p><p>Note that the
<code class="function">SD_JOURNAL_FOREACH()</code> macro may be used
as a wrapper around
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and <code class="function">sd_journal_next()</code> in order to
make iterating through the journal easier. See below
for an example. Similarly,
<code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code>
may be used for iterating the journal in reverse
order.</p></div><div class="refsect1"><a name="idm139865550462000"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The four calls return the number of entries
advanced/set back on success or a negative errno-style
error code. When the end or beginning of the journal
is reached, a number smaller than requested is
returned. More specifically, if
<code class="function">sd_journal_next()</code> or
<code class="function">sd_journal_previous()</code> reach the
end/beginning of the journal they will return 0,
instead of 1 when they are successful. This should be
considered an EOF marker.</p></div><div class="refsect1"><a name="idm139865550458880"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_next()</code>, <code class="function">sd_journal_previous()</code>,
<code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139865550452976"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_next"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_next, sd_journal_previous, sd_journal_next_skip, sd_journal_previous_skip, SD_JOURNAL_FOREACH, SD_JOURNAL_FOREACH_BACKWARDS — Advance or set back the read pointer in the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_next_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_previous_skip</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">skip</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_BACKWARDS</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140058934083792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_next()</code> advances the read
pointer into the journal by one entry. The only argument taken is
a journal context object as allocated via
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>.
After successful invocation the entry may be read with functions
such as
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>.</p><p>Similarly, <code class="function">sd_journal_previous()</code> sets
the read pointer back one entry.</p><p><code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code> advance/set back
the read pointer by multiple entries at once, as specified in the
<code class="varname">skip</code> parameter.</p><p>The journal is strictly ordered by reception time, and hence
advancing to the next entry guarantees that the entry then
pointing to is later in time than then previous one, or has the
same timestamp.</p><p>Note that
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
and related calls will fail unless
<code class="function">sd_journal_next()</code> has been invoked at least
once in order to position the read pointer on a journal
entry.</p><p>Note that the <code class="function">SD_JOURNAL_FOREACH()</code>
macro may be used as a wrapper around
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and <code class="function">sd_journal_next()</code> in order to make
iterating through the journal easier. See below for an example.
Similarly, <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code> may
be used for iterating the journal in reverse order.</p></div><div class="refsect1"><a name="idm140058934070880"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The four calls return the number of entries advanced/set
back on success or a negative errno-style error code. When the end
or beginning of the journal is reached, a number smaller than
requested is returned. More specifically, if
<code class="function">sd_journal_next()</code> or
<code class="function">sd_journal_previous()</code> reach the end/beginning
of the journal they will return 0, instead of 1 when they are
successful. This should be considered an EOF marker.</p></div><div class="refsect1"><a name="idm140058934060672"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_next()</code>,
<code class="function">sd_journal_previous()</code>,
<code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_previous_skip()</code> interfaces are
available as a shared library, which can be compiled and linked to
with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140058934054864"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) {
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
SD_JOURNAL_FOREACH(j) {
const char *d;
size_t l;
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
SD_JOURNAL_FOREACH(j) {
const char *d;
size_t l;
r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, d);
}
sd_journal_close(j);
return 0;
}</pre></div><div class="refsect1"><a name="idm139865550442144"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>
</p></div></div></body></html>
printf("%.*s\n", (int) l, d);
}
sd_journal_close(j);
return 0;
}</pre></div><div class="refsect1"><a name="idm140058934052128"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>
</p></div></div></body></html>

View File

@ -19,107 +19,92 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140399443665936"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_data()</code> gets
the data object associated with a specific field from
the current journal entry. It takes four arguments:
the journal context object, a string with the field
name to request, plus a pair of pointers to
pointer/size variables where the data object and its
size shall be stored in. The field name should be an
entry field name. Well-known field names are listed in
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>. The
returned data is in a read-only memory map and is only
valid until the next invocation of
<code class="function">sd_journal_get_data()</code> or
<code class="function">sd_journal_enumerate_data()</code>, or
the read pointer is altered. Note that the data
returned will be prefixed with the field name and
'='. Also note that by default data fields larger than
64K might get truncated to 64K. This threshold may be
changed and turned off with
<code class="function">sd_journal_set_data_threshold()</code> (see
below).</p><p><code class="function">sd_journal_enumerate_data()</code>
may be used to iterate through all fields of the
current entry. On each invocation the data for the
next field is returned. The order of these fields is
not defined. The data returned is in the same format
as with <code class="function">sd_journal_get_data()</code> and
also follows the same life-time semantics.</p><p><code class="function">sd_journal_restart_data()</code>
resets the data enumeration index to the beginning of
the entry. The next invocation of
<code class="function">sd_journal_enumerate_data()</code> will return the first
field of the entry again.</p><p>Note that the
<code class="function">SD_JOURNAL_FOREACH_DATA()</code> macro
may be used as a handy wrapper around
<code class="function">sd_journal_restart_data()</code> and
<code class="function">sd_journal_enumerate_data()</code>.</p><p>Note that these functions will not work before
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
(or related call) has been called at least
once, in order to position the read pointer at a valid entry.</p><p><code class="function">sd_journal_set_data_threshold()</code>
may be used to change the data field size threshold
for data returned by
<code class="function">sd_journal_get_data()</code>,
<code class="function">sd_journal_enumerate_data()</code> and
<code class="function">sd_journal_enumerate_unique()</code>. This
threshold is a hint only: it indicates that the client
program is interested only in the initial parts of the
data fields, up to the threshold in size -- but the
library might still return larger data objects. That
means applications should not rely exclusively on this
setting to limit the size of the data fields returned,
but need to apply a explicit size limit on the
returned data as well. This threshold defaults to 64K
by default. To retrieve the complete data fields this
threshold should be turned off by setting it to 0, so
that the library always returns the complete data
objects. It is recommended to set this threshold as
low as possible since this relieves the library from
having to decompress large compressed data objects in
full.</p><p><code class="function">sd_journal_get_data_threshold()</code>
returns the currently configured data field size
threshold.</p></div><div class="refsect1"><a name="idm140399443639760"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_data()</code>
returns 0 on success or a negative errno-style error
code. If the current entry does not include the
specified field, -ENOENT is returned. If
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
has not been called at least once, -EADDRNOTAVAIL is
returned. <code class="function">sd_journal_enumerate_data()</code>
returns a positive integer if the next field has been
read, 0 when no more fields are known, or a negative
errno-style error
code. <code class="function">sd_journal_restart_data()</code>
returns
nothing. <code class="function">sd_journal_set_data_threshold()</code>
and <code class="function">sd_journal_get_threshold()</code>
return 0 on success or a negative errno-style error
code.</p></div><div class="refsect1"><a name="idm140399443633712"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_data()</code>,
<code class="function">sd_journal_enumerate_data()</code>,
<code class="function">sd_journal_restart_data()</code>,
<code class="function">sd_journal_set_data_threshold()</code>
and
<code class="function">sd_journal_get_data_threshold()</code>
interfaces are available as a shared library, which can
be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140399438662352"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for a complete example how to use
<code class="function">sd_journal_get_data()</code>.</p><p>Use the
<code class="function">SD_JOURNAL_FOREACH_DATA</code> macro to
iterate through all fields of the current journal
entry:</p><pre class="programlisting">...
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_get_data"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_data, sd_journal_enumerate_data, sd_journal_restart_data, SD_JOURNAL_FOREACH_DATA, sd_journal_set_data_threshold, sd_journal_get_data_threshold — Read data fields from the current journal entry</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_data</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_DATA</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_set_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_data_threshold</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">sz</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139825930516144"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_data()</code> gets the data
object associated with a specific field from the current journal
entry. It takes four arguments: the journal context object, a
string with the field name to request, plus a pair of pointers to
pointer/size variables where the data object and its size shall be
stored in. The field name should be an entry field name.
Well-known field names are listed in
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.
The returned data is in a read-only memory map and is only valid
until the next invocation of
<code class="function">sd_journal_get_data()</code> or
<code class="function">sd_journal_enumerate_data()</code>, or the read
pointer is altered. Note that the data returned will be prefixed
with the field name and '='. Also note that by default data fields
larger than 64K might get truncated to 64K. This threshold may be
changed and turned off with
<code class="function">sd_journal_set_data_threshold()</code> (see
below).</p><p><code class="function">sd_journal_enumerate_data()</code> may be used
to iterate through all fields of the current entry. On each
invocation the data for the next field is returned. The order of
these fields is not defined. The data returned is in the same
format as with <code class="function">sd_journal_get_data()</code> and also
follows the same life-time semantics.</p><p><code class="function">sd_journal_restart_data()</code> resets the
data enumeration index to the beginning of the entry. The next
invocation of <code class="function">sd_journal_enumerate_data()</code>
will return the first field of the entry again.</p><p>Note that the <code class="function">SD_JOURNAL_FOREACH_DATA()</code>
macro may be used as a handy wrapper around
<code class="function">sd_journal_restart_data()</code> and
<code class="function">sd_journal_enumerate_data()</code>.</p><p>Note that these functions will not work before
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
(or related call) has been called at least once, in order to
position the read pointer at a valid entry.</p><p><code class="function">sd_journal_set_data_threshold()</code> may be
used to change the data field size threshold for data returned by
<code class="function">sd_journal_get_data()</code>,
<code class="function">sd_journal_enumerate_data()</code> and
<code class="function">sd_journal_enumerate_unique()</code>. This threshold
is a hint only: it indicates that the client program is interested
only in the initial parts of the data fields, up to the threshold
in size -- but the library might still return larger data objects.
That means applications should not rely exclusively on this
setting to limit the size of the data fields returned, but need to
apply a explicit size limit on the returned data as well. This
threshold defaults to 64K by default. To retrieve the complete
data fields this threshold should be turned off by setting it to
0, so that the library always returns the complete data objects.
It is recommended to set this threshold as low as possible since
this relieves the library from having to decompress large
compressed data objects in full.</p><p><code class="function">sd_journal_get_data_threshold()</code> returns
the currently configured data field size threshold.</p></div><div class="refsect1"><a name="idm139825930490992"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_data()</code> returns 0 on
success or a negative errno-style error code. If the current entry
does not include the specified field, -ENOENT is returned. If
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
has not been called at least once, -EADDRNOTAVAIL is returned.
<code class="function">sd_journal_enumerate_data()</code> returns a
positive integer if the next field has been read, 0 when no more
fields are known, or a negative errno-style error code.
<code class="function">sd_journal_restart_data()</code> returns nothing.
<code class="function">sd_journal_set_data_threshold()</code> and
<code class="function">sd_journal_get_threshold()</code> return 0 on
success or a negative errno-style error code.</p></div><div class="refsect1"><a name="idm139825930485232"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_data()</code>,
<code class="function">sd_journal_enumerate_data()</code>,
<code class="function">sd_journal_restart_data()</code>,
<code class="function">sd_journal_set_data_threshold()</code> and
<code class="function">sd_journal_get_data_threshold()</code> interfaces
are available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139825930478656"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for a complete example how to use
<code class="function">sd_journal_get_data()</code>.</p><p>Use the
<code class="function">SD_JOURNAL_FOREACH_DATA</code> macro to
iterate through all fields of the current journal
entry:</p><pre class="programlisting">...
int print_fields(sd_journal *j) {
const void *data;
size_t length;
SD_JOURNAL_FOREACH_DATA(j, data, length)
printf("%.*s\n", (int) length, data);
const void *data;
size_t length;
SD_JOURNAL_FOREACH_DATA(j, data, length)
printf("%.*s\n", (int) length, data);
}
...</pre></div><div class="refsect1"><a name="idm140399438657856"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
<a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a>
</p></div></div></body></html>
...</pre></div><div class="refsect1"><a name="idm139825925509680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_realtime_usec.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_realtime_usec</span>(3)</span></a>,
<a href="sd_journal_query_unique.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_query_unique</span>(3)</span></a>
</p></div></div></body></html>

View File

@ -19,93 +19,84 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140355358752928"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_query_unique()</code>
queries the journal for all unique values the
specified field can take. It takes two arguments: the
journal to query and the field name to look
for. Well-known field names are listed on
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>. Field
names must be specified without a trailing '='. After
this function has been executed successfully the field
values may be queried using
<code class="function">sd_journal_enumerate_unique()</code>. Invoking
this call a second time will change the field name
being queried and reset the enumeration index to the
first field value that matches.</p><p><code class="function">sd_journal_enumerate_unique()</code>
may be used to iterate through all data fields which
match the previously selected field name as set with
<code class="function">sd_journal_query_unique()</code>. On
each invocation the next field data matching the field
name is returned. The order of the returned data
fields is not defined. It takes three arguments: the
journal context object, plus a pair of pointers to
pointer/size variables where the data object and its
size shall be stored in. The returned data is in a
read-only memory map and is only valid until the next
invocation of
<code class="function">sd_journal_enumerate_unique()</code>. Note
that the data returned will be prefixed with the field
name and '='. Note that this call is subject to the
data field size threshold as controlled by
<code class="function">sd_journal_set_data_threshold()</code>.</p><p><code class="function">sd_journal_restart_unique()</code>
resets the data enumeration index to the beginning of
the list. The next invocation of
<code class="function">sd_journal_enumerate_unique()</code>
will return the first field data matching the field
name again.</p><p>Note that the
<code class="function">SD_JOURNAL_FOREACH_UNIQUE()</code> macro
may be used as a handy wrapper around
<code class="function">sd_journal_restart_unique()</code> and
<code class="function">sd_journal_enumerate_unique()</code>.</p><p>Note that these functions currently are not
influenced by matches set with
<code class="function">sd_journal_add_match()</code> but this
might change in a later version of this
software.</p></div><div class="refsect1"><a name="idm140355360536320"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_query_unique()</code>
returns 0 on success or a negative errno-style error
code. <code class="function">sd_journal_enumerate_unique()</code>
returns a positive integer if the next field data has
been read, 0 when no more fields are known, or a
negative errno-style error
code. <code class="function">sd_journal_restart_unique()</code>
returns nothing.</p></div><div class="refsect1"><a name="idm140355360532768"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
<code class="function">sd_journal_enumerate_unique()</code> and
<code class="function">sd_journal_restart_unique()</code>
interfaces are available as a shared library, which can
be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140355360527568"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Use the
<code class="function">SD_JOURNAL_FOREACH_UNIQUE</code> macro
to iterate through all values a field of the journal
can take. The following example lists all unit names
referenced in the journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_query_unique"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_query_unique, sd_journal_enumerate_unique, sd_journal_restart_unique, SD_JOURNAL_FOREACH_UNIQUE — Read unique data fields from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_query_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">field</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_enumerate_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void **<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t *<var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_restart_unique</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef"><b class="fsfunc">SD_JOURNAL_FOREACH_UNIQUE</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>const void *<var class="pdparam">data</var>, </td></tr><tr><td> </td><td>size_t <var class="pdparam">length</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140488052010080"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_query_unique()</code> queries the
journal for all unique values the specified field can take. It
takes two arguments: the journal to query and the field name to
look for. Well-known field names are listed on
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>.
Field names must be specified without a trailing '='. After this
function has been executed successfully the field values may be
queried using <code class="function">sd_journal_enumerate_unique()</code>.
Invoking this call a second time will change the field name being
queried and reset the enumeration index to the first field value
that matches.</p><p><code class="function">sd_journal_enumerate_unique()</code> may be
used to iterate through all data fields which match the previously
selected field name as set with
<code class="function">sd_journal_query_unique()</code>. On each invocation
the next field data matching the field name is returned. The order
of the returned data fields is not defined. It takes three
arguments: the journal context object, plus a pair of pointers to
pointer/size variables where the data object and its size shall be
stored in. The returned data is in a read-only memory map and is
only valid until the next invocation of
<code class="function">sd_journal_enumerate_unique()</code>. Note that the
data returned will be prefixed with the field name and '='. Note
that this call is subject to the data field size threshold as
controlled by
<code class="function">sd_journal_set_data_threshold()</code>.</p><p><code class="function">sd_journal_restart_unique()</code> resets the
data enumeration index to the beginning of the list. The next
invocation of <code class="function">sd_journal_enumerate_unique()</code>
will return the first field data matching the field name
again.</p><p>Note that the
<code class="function">SD_JOURNAL_FOREACH_UNIQUE()</code> macro may be used
as a handy wrapper around
<code class="function">sd_journal_restart_unique()</code> and
<code class="function">sd_journal_enumerate_unique()</code>.</p><p>Note that these functions currently are not influenced by
matches set with <code class="function">sd_journal_add_match()</code> but
this might change in a later version of this software.</p></div><div class="refsect1"><a name="idm140488051997008"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_query_unique()</code> returns 0 on
success or a negative errno-style error code.
<code class="function">sd_journal_enumerate_unique()</code> returns a
positive integer if the next field data has been read, 0 when no
more fields are known, or a negative errno-style error code.
<code class="function">sd_journal_restart_unique()</code> returns
nothing.</p></div><div class="refsect1"><a name="idm140488051993648"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_query_unique()</code>,
<code class="function">sd_journal_enumerate_unique()</code> and
<code class="function">sd_journal_restart_unique()</code> interfaces are
available as a shared library, which can be compiled and linked to
with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140488051981152"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Use the <code class="function">SD_JOURNAL_FOREACH_UNIQUE</code> macro
to iterate through all values a field of the journal can take. The
following example lists all unit names referenced in the
journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) {
sd_journal *j;
const void *d;
size_t l;
int r;
sd_journal *j;
const void *d;
size_t l;
int r;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
r = sd_journal_query_unique(j, "_SYSTEMD_UNIT");
if (r &lt; 0) {
fprintf(stderr, "Failed to query journal: %s\n", strerror(-r));
return 1;
}
SD_JOURNAL_FOREACH_UNIQUE(j, d, l)
printf("%.*s\n", (int) l, (const char*) d);
sd_journal_close(j);
return 0;
}</pre></div><div class="refsect1"><a name="idm140355360524768"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a>
</p></div></div></body></html>
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
r = sd_journal_query_unique(j, "_SYSTEMD_UNIT");
if (r &lt; 0) {
fprintf(stderr, "Failed to query journal: %s\n", strerror(-r));
return 1;
}
SD_JOURNAL_FOREACH_UNIQUE(j, d, l)
printf("%.*s\n", (int) l, (const char*) d);
sd_journal_close(j);
return 0;
}</pre></div><div class="refsect1"><a name="idm140488051976848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="sd_journal_add_match.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_add_match</span>(3)</span></a>
</p></div></div></body></html>

View File

@ -19,200 +19,183 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139870240160032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns
a file descriptor that may be asynchronously polled in
an external event loop and is signaled as soon as the
journal changes, because new entries or files were
added, rotation took place, or files have been
deleted, and similar. The file descriptor is suitable
for usage in
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
<code class="function">sd_journal_get_events()</code> for an
events mask to watch for. The call takes one argument:
the journal context object. Note that not all file
systems are capable of generating the necessary events
for wakeups from this file descriptor for changes to
be noticed immediately. In particular network files
systems do not generate suitable file change events in
all cases. Cases like this can be detected with
<code class="function">sd_journal_reliable_fd()</code>,
below. <code class="function">sd_journal_get_timeout()</code>
will ensure in these cases that wake-ups happen
frequently enough for changes to be noticed, although
with a certain latency.</p><p><code class="function">sd_journal_get_events()</code>
will return the <code class="function">poll()</code> mask to
wait for. This function will return a combination of
<code class="constant">POLLIN</code> and
<code class="constant">POLLOUT</code> and similar to fill into
the "<code class="literal">.events</code>" field of
<code class="varname">struct pollfd</code>.</p><p><code class="function">sd_journal_get_timeout()</code>
will return a timeout value for usage in
<code class="function">poll()</code>. This returns a value in
microseconds since the epoch of
<code class="constant">CLOCK_MONOTONIC</code> for timing out
<code class="function">poll()</code> in
<code class="varname">timeout_usec</code>. See
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
for details about
<code class="constant">CLOCK_MONOTONIC</code>. If there is no
timeout to wait for, this will fill in
<code class="constant">(uint64_t) -1</code> instead. Note that
<code class="function">poll()</code> takes a relative timeout
in milliseconds rather than an absolute timeout in
microseconds. To convert the absolute 'us' timeout
into relative 'ms', use code like the
following:</p><pre class="programlisting">uint64_t t;
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140121381493808"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns a file
descriptor that may be asynchronously polled in an external event
loop and is signaled as soon as the journal changes, because new
entries or files were added, rotation took place, or files have
been deleted, and similar. The file descriptor is suitable for
usage in
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>.
Use <code class="function">sd_journal_get_events()</code> for an events
mask to watch for. The call takes one argument: the journal
context object. Note that not all file systems are capable of
generating the necessary events for wakeups from this file
descriptor for changes to be noticed immediately. In particular
network files systems do not generate suitable file change events
in all cases. Cases like this can be detected with
<code class="function">sd_journal_reliable_fd()</code>, below.
<code class="function">sd_journal_get_timeout()</code> will ensure in these
cases that wake-ups happen frequently enough for changes to be
noticed, although with a certain latency.</p><p><code class="function">sd_journal_get_events()</code> will return the
<code class="function">poll()</code> mask to wait for. This function will
return a combination of <code class="constant">POLLIN</code> and
<code class="constant">POLLOUT</code> and similar to fill into the
"<code class="literal">.events</code>" field of <code class="varname">struct
pollfd</code>.</p><p><code class="function">sd_journal_get_timeout()</code> will return a
timeout value for usage in <code class="function">poll()</code>. This
returns a value in microseconds since the epoch of
<code class="constant">CLOCK_MONOTONIC</code> for timing out
<code class="function">poll()</code> in <code class="varname">timeout_usec</code>.
See
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
for details about <code class="constant">CLOCK_MONOTONIC</code>. If there
is no timeout to wait for, this will fill in <code class="constant">(uint64_t)
-1</code> instead. Note that <code class="function">poll()</code> takes
a relative timeout in milliseconds rather than an absolute timeout
in microseconds. To convert the absolute 'us' timeout into
relative 'ms', use code like the following:</p><pre class="programlisting">uint64_t t;
int msec;
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}</pre><p>The code above does not do any error checking
for brevity's sake. The calculated <code class="varname">msec</code>
integer can be passed directly as
<code class="function">poll()</code>'s timeout
parameter.</p><p>After each <code class="function">poll()</code> wake-up
<code class="function">sd_journal_process()</code> needs to be
called to process events. This call will also indicate
what kind of change has been detected (see below; note
that spurious wake-ups are possible).</p><p>A synchronous alternative for using
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code> and
<code class="function">sd_journal_process()</code> is
<code class="function">sd_journal_wait()</code>. It will
synchronously wait until the journal gets changed. The
maximum time this call sleeps may be controlled with
the <em class="parameter"><code>timeout_usec</code></em>
parameter. Pass <code class="constant">(uint64_t) -1</code> to
wait indefinitely. Internally this call simply
combines <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code>,
<code class="function">poll()</code> and
<code class="function">sd_journal_process()</code> into
one.</p><p><code class="function">sd_journal_reliable_fd()</code>
may be used to check whether the wakeup events from
the file descriptor returned by
<code class="function">sd_journal_get_fd()</code> are known to
be immediately triggered. On certain file systems
where file change events from the OS are not available
(such as NFS) changes need to be polled for
repeatedly, and hence are detected only with a certain
latency. This call will return a positive value if the
journal changes are detected immediately and zero when
they need to be polled for and hence might be noticed
only with a certain latency. Note that there's usually
no need to invoke this function directly as
<code class="function">sd_journal_get_timeout()</code> on these
file systems will ask for timeouts explicitly
anyway.</p></div><div class="refsect1"><a name="idm139870240119632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns
a valid file descriptor on success or a negative
errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
returns a combination of <code class="constant">POLLIN</code>,
<code class="constant">POLLOUT</code> and suchlike on success or
a negative errno-style error code.</p><p><code class="function">sd_journal_reliable_fd()</code>
returns a positive integer if the file descriptor
returned by <code class="function">sd_journal_get_fd()</code>
will generate wake-ups immediately for all journal
changes. Returns 0 if there might be a latency
involved.</p><p><code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> return one of
<code class="constant">SD_JOURNAL_NOP</code>,
<code class="constant">SD_JOURNAL_APPEND</code> or
<code class="constant">SD_JOURNAL_INVALIDATE</code> on success or
a negative errno-style error code. If
<code class="constant">SD_JOURNAL_NOP</code> is returned, the
journal did not change since the last invocation. If
<code class="constant">SD_JOURNAL_APPEND</code> is returned, new
entries have been appended to the end of the
journal. If <code class="constant">SD_JOURNAL_INVALIDATE</code>,
journal files were added or removed (possibly due to
rotation). In the latter event, live-view UIs should
probably refresh their entire display, while in the
case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
sufficient to simply continue reading at the previous
end of the journal.</p></div><div class="refsect1"><a name="idm139870235144576"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_reliable_fd()</code>,
<code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139870235138752"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}</pre><p>The code above does not do any error checking for brevity's
sake. The calculated <code class="varname">msec</code> integer can be passed
directly as <code class="function">poll()</code>'s timeout
parameter.</p><p>After each <code class="function">poll()</code> wake-up
<code class="function">sd_journal_process()</code> needs to be called to
process events. This call will also indicate what kind of change
has been detected (see below; note that spurious wake-ups are
possible).</p><p>A synchronous alternative for using
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code> and
<code class="function">sd_journal_process()</code> is
<code class="function">sd_journal_wait()</code>. It will synchronously wait
until the journal gets changed. The maximum time this call sleeps
may be controlled with the <em class="parameter"><code>timeout_usec</code></em>
parameter. Pass <code class="constant">(uint64_t) -1</code> to wait
indefinitely. Internally this call simply combines
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code>,
<code class="function">poll()</code> and
<code class="function">sd_journal_process()</code> into one.</p><p><code class="function">sd_journal_reliable_fd()</code> may be used to
check whether the wakeup events from the file descriptor returned
by <code class="function">sd_journal_get_fd()</code> are known to be
immediately triggered. On certain file systems where file change
events from the OS are not available (such as NFS) changes need to
be polled for repeatedly, and hence are detected only with a
certain latency. This call will return a positive value if the
journal changes are detected immediately and zero when they need
to be polled for and hence might be noticed only with a certain
latency. Note that there's usually no need to invoke this function
directly as <code class="function">sd_journal_get_timeout()</code> on these
file systems will ask for timeouts explicitly anyway.</p></div><div class="refsect1"><a name="idm140121381454848"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns a valid
file descriptor on success or a negative errno-style error
code.</p><p><code class="function">sd_journal_get_events()</code> returns a
combination of <code class="constant">POLLIN</code>,
<code class="constant">POLLOUT</code> and suchlike on success or a negative
errno-style error code.</p><p><code class="function">sd_journal_reliable_fd()</code> returns a
positive integer if the file descriptor returned by
<code class="function">sd_journal_get_fd()</code> will generate wake-ups
immediately for all journal changes. Returns 0 if there might be a
latency involved.</p><p><code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> return one of
<code class="constant">SD_JOURNAL_NOP</code>,
<code class="constant">SD_JOURNAL_APPEND</code> or
<code class="constant">SD_JOURNAL_INVALIDATE</code> on success or a
negative errno-style error code. If
<code class="constant">SD_JOURNAL_NOP</code> is returned, the journal did
not change since the last invocation. If
<code class="constant">SD_JOURNAL_APPEND</code> is returned, new entries
have been appended to the end of the journal. If
<code class="constant">SD_JOURNAL_INVALIDATE</code>, journal files were
added or removed (possibly due to rotation). In the latter event,
live-view UIs should probably refresh their entire display, while
in the case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
sufficient to simply continue reading at the previous end of the
journal.</p></div><div class="refsect1"><a name="idm140121381556448"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_reliable_fd()</code>,
<code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> interfaces are available as
a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140121376465504"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal, in a live view tracking all
changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) {
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
for (;;) {
const void *d;
size_t l;
r = sd_journal_next(j);
if (r &lt; 0) {
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
break;
}
if (r == 0) {
/* Reached the end, let's wait for changes, and try again */
r = sd_journal_wait(j, (uint64_t) -1);
if (r &lt; 0) {
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
break;
}
continue;
}
r = sd_journal_get_data(j, "MESSAGE", &amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, (const char*) d);
}
sd_journal_close(j);
return 0;
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
for (;;) {
const void *d;
size_t l;
r = sd_journal_next(j);
if (r &lt; 0) {
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
break;
}
if (r == 0) {
/* Reached the end, let's wait for changes, and try again */
r = sd_journal_wait(j, (uint64_t) -1);
if (r &lt; 0) {
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
break;
}
continue;
}
r = sd_journal_get_data(j, "MESSAGE", &amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, (const char*) d);
}
sd_journal_close(j);
return 0;
}</pre><p>Waiting with <code class="function">poll()</code> (this
example lacks all error checking for the sake of
simplicity):</p><pre class="programlisting">#include &lt;sys/poll.h&gt;
example lacks all error checking for the sake of
simplicity):</p><pre class="programlisting">#include &lt;poll.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int wait_for_changes(sd_journal *j) {
struct pollfd pollfd;
int msec;
struct pollfd pollfd;
int msec;
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}
pollfd.fd = sd_journal_get_fd(j);
pollfd.events = sd_journal_get_events(j);
poll(&amp;pollfd, 1, msec);
return sd_journal_process(j);
}</pre></div><div class="refsect1"><a name="idm139870235132128"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
</p></div></div></body></html>
pollfd.fd = sd_journal_get_fd(j);
pollfd.events = sd_journal_get_events(j);
poll(&amp;pollfd, 1, msec);
return sd_journal_process(j);
}</pre></div><div class="refsect1"><a name="idm140121376459680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
</p></div></div></body></html>

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139693584531584"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens
the log journal for reading. It will find all journal
files automatically and interleave them automatically
when reading. As first argument it takes a pointer to
a <code class="varname">sd_journal</code> pointer, which on
success will contain a journal context object. The
second argument is a flags field, which may consist of
the following flags ORed together:
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure
only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>
makes sure only volatile journal files will be opened,
excluding those which are stored on persistent
storage. <code class="constant">SD_JOURNAL_SYSTEM</code>
will cause journal files of system services and the
kernel (in opposition to user session processes) to
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code>
will cause journal files of the current user to be
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code>
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes an absolute directory path as argument. All
journal files in this directory will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes a <code class="constant">NULL</code>-terminated list
of file paths to open. All files will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call. Please note
that in the case of a live journal, this function is only
useful for debugging, because individual journal files
can be rotated at any moment, and the opening of
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code>
is similar to <code class="function">sd_journal_open()</code>
but opens the journal files of a running
OS container. The specified machine name refers to a
container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be
used in the child after a fork. Functions which take a
journal object as an argument
(<code class="function">sd_journal_next()</code> and others)
will return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will
close the journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and
free its resources.</p><p>When opening the journal only journal files
accessible to the calling user will be opened. If
journal files are not accessible to the caller, this
will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal
after opening it with
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a
specific journal entry as <span class="emphasis"><em>current</em></span> entry,
similar to a file seek index in a classic file system
file, but without absolute positions. It may be
altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible
via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor
strings may be used to globally identify a specific
journal entry in a stable way and then later to seek
to it (or if the specific entry is not available
locally, to its closest entry in time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related
calls.</p></div><div class="refsect1"><a name="idm139693586294336"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls
return 0 on success or a negative errno-style error
code. <code class="function">sd_journal_close()</code> returns
nothing.</p></div><div class="refsect1"><a name="idm139693586290128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139693586284960"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added
in systemd-38.</p><p><code class="function">sd_journal_open_directory()</code>
was added in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>,
and <code class="function">sd_journal_open_files()</code>
were added in systemd-205.
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
was deprecated.</p></div><div class="refsect1"><a name="idm139693581595616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140423144980192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens the log journal
for reading. It will find all journal files automatically and
interleave them automatically when reading. As first argument it
takes a pointer to a <code class="varname">sd_journal</code> pointer, which
on success will contain a journal context object. The second
argument is a flags field, which may consist of the following
flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
makes sure only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only volatile journal files will be opened, excluding those which
are stored on persistent storage.
<code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
system services and the kernel (in opposition to user session
processes) to be opened.
<code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
files of the current user to be opened. If neither
<code class="constant">SD_JOURNAL_SYSTEM</code> nor
<code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
to <code class="function">sd_journal_open()</code> but takes an absolute
directory path as argument. All journal files in this directory
will be opened and interleaved automatically. This call also takes
a flags argument, but it must be passed as 0 as no flags are
currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
<code class="function">sd_journal_open()</code> but takes a
<code class="constant">NULL</code>-terminated list of file paths to open.
All files will be opened and interleaved automatically. This call
also takes a flags argument, but it must be passed as 0 as no
flags are currently understood for this call. Please note that in
the case of a live journal, this function is only useful for
debugging, because individual journal files can be rotated at any
moment, and the opening of specific files is inherently
racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
to <code class="function">sd_journal_open()</code> but opens the journal
files of a running OS container. The specified machine name refers
to a container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be used in the
child after a fork. Functions which take a journal object as an
argument (<code class="function">sd_journal_next()</code> and others) will
return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will close the
journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and free its
resources.</p><p>When opening the journal only journal files accessible to
the calling user will be opened. If journal files are not
accessible to the caller, this will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal after opening
it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a specific
journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
file seek index in a classic file system file, but without
absolute positions. It may be altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be exported in
<span class="emphasis"><em>cursor</em></span> strings, as accessible via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
Cursor strings may be used to globally identify a specific journal
entry in a stable way and then later to seek to it (or if the
specific entry is not available locally, to its closest entry in
time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related calls.</p></div><div class="refsect1"><a name="idm140423144946896"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls return 0 on
success or a negative errno-style error code.
<code class="function">sd_journal_close()</code> returns nothing.</p></div><div class="refsect1"><a name="idm140423144942720"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are available
as a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140423139973184"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_files()</code> were added in
systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
deprecated.</p></div><div class="refsect1"><a name="idm140423139966848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>

View File

@ -19,200 +19,183 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139870240160032"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns
a file descriptor that may be asynchronously polled in
an external event loop and is signaled as soon as the
journal changes, because new entries or files were
added, rotation took place, or files have been
deleted, and similar. The file descriptor is suitable
for usage in
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>. Use
<code class="function">sd_journal_get_events()</code> for an
events mask to watch for. The call takes one argument:
the journal context object. Note that not all file
systems are capable of generating the necessary events
for wakeups from this file descriptor for changes to
be noticed immediately. In particular network files
systems do not generate suitable file change events in
all cases. Cases like this can be detected with
<code class="function">sd_journal_reliable_fd()</code>,
below. <code class="function">sd_journal_get_timeout()</code>
will ensure in these cases that wake-ups happen
frequently enough for changes to be noticed, although
with a certain latency.</p><p><code class="function">sd_journal_get_events()</code>
will return the <code class="function">poll()</code> mask to
wait for. This function will return a combination of
<code class="constant">POLLIN</code> and
<code class="constant">POLLOUT</code> and similar to fill into
the "<code class="literal">.events</code>" field of
<code class="varname">struct pollfd</code>.</p><p><code class="function">sd_journal_get_timeout()</code>
will return a timeout value for usage in
<code class="function">poll()</code>. This returns a value in
microseconds since the epoch of
<code class="constant">CLOCK_MONOTONIC</code> for timing out
<code class="function">poll()</code> in
<code class="varname">timeout_usec</code>. See
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
for details about
<code class="constant">CLOCK_MONOTONIC</code>. If there is no
timeout to wait for, this will fill in
<code class="constant">(uint64_t) -1</code> instead. Note that
<code class="function">poll()</code> takes a relative timeout
in milliseconds rather than an absolute timeout in
microseconds. To convert the absolute 'us' timeout
into relative 'ms', use code like the
following:</p><pre class="programlisting">uint64_t t;
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_get_fd"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_get_fd, sd_journal_get_events, sd_journal_get_timeout, sd_journal_process, sd_journal_wait, sd_journal_reliable_fd, SD_JOURNAL_NOP, SD_JOURNAL_APPEND, SD_JOURNAL_INVALIDATE — Journal change notification
interface</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_events</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_get_timeout</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t *<var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_process</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_wait</b>(</code></td><td>sd_journal *<var class="pdparam">j</var>, </td></tr><tr><td> </td><td>uint64_t <var class="pdparam">timeout_usec</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_reliable_fd</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140121381493808"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns a file
descriptor that may be asynchronously polled in an external event
loop and is signaled as soon as the journal changes, because new
entries or files were added, rotation took place, or files have
been deleted, and similar. The file descriptor is suitable for
usage in
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>.
Use <code class="function">sd_journal_get_events()</code> for an events
mask to watch for. The call takes one argument: the journal
context object. Note that not all file systems are capable of
generating the necessary events for wakeups from this file
descriptor for changes to be noticed immediately. In particular
network files systems do not generate suitable file change events
in all cases. Cases like this can be detected with
<code class="function">sd_journal_reliable_fd()</code>, below.
<code class="function">sd_journal_get_timeout()</code> will ensure in these
cases that wake-ups happen frequently enough for changes to be
noticed, although with a certain latency.</p><p><code class="function">sd_journal_get_events()</code> will return the
<code class="function">poll()</code> mask to wait for. This function will
return a combination of <code class="constant">POLLIN</code> and
<code class="constant">POLLOUT</code> and similar to fill into the
"<code class="literal">.events</code>" field of <code class="varname">struct
pollfd</code>.</p><p><code class="function">sd_journal_get_timeout()</code> will return a
timeout value for usage in <code class="function">poll()</code>. This
returns a value in microseconds since the epoch of
<code class="constant">CLOCK_MONOTONIC</code> for timing out
<code class="function">poll()</code> in <code class="varname">timeout_usec</code>.
See
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
for details about <code class="constant">CLOCK_MONOTONIC</code>. If there
is no timeout to wait for, this will fill in <code class="constant">(uint64_t)
-1</code> instead. Note that <code class="function">poll()</code> takes
a relative timeout in milliseconds rather than an absolute timeout
in microseconds. To convert the absolute 'us' timeout into
relative 'ms', use code like the following:</p><pre class="programlisting">uint64_t t;
int msec;
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}</pre><p>The code above does not do any error checking
for brevity's sake. The calculated <code class="varname">msec</code>
integer can be passed directly as
<code class="function">poll()</code>'s timeout
parameter.</p><p>After each <code class="function">poll()</code> wake-up
<code class="function">sd_journal_process()</code> needs to be
called to process events. This call will also indicate
what kind of change has been detected (see below; note
that spurious wake-ups are possible).</p><p>A synchronous alternative for using
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code> and
<code class="function">sd_journal_process()</code> is
<code class="function">sd_journal_wait()</code>. It will
synchronously wait until the journal gets changed. The
maximum time this call sleeps may be controlled with
the <em class="parameter"><code>timeout_usec</code></em>
parameter. Pass <code class="constant">(uint64_t) -1</code> to
wait indefinitely. Internally this call simply
combines <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code>,
<code class="function">poll()</code> and
<code class="function">sd_journal_process()</code> into
one.</p><p><code class="function">sd_journal_reliable_fd()</code>
may be used to check whether the wakeup events from
the file descriptor returned by
<code class="function">sd_journal_get_fd()</code> are known to
be immediately triggered. On certain file systems
where file change events from the OS are not available
(such as NFS) changes need to be polled for
repeatedly, and hence are detected only with a certain
latency. This call will return a positive value if the
journal changes are detected immediately and zero when
they need to be polled for and hence might be noticed
only with a certain latency. Note that there's usually
no need to invoke this function directly as
<code class="function">sd_journal_get_timeout()</code> on these
file systems will ask for timeouts explicitly
anyway.</p></div><div class="refsect1"><a name="idm139870240119632"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns
a valid file descriptor on success or a negative
errno-style error code.</p><p><code class="function">sd_journal_get_events()</code>
returns a combination of <code class="constant">POLLIN</code>,
<code class="constant">POLLOUT</code> and suchlike on success or
a negative errno-style error code.</p><p><code class="function">sd_journal_reliable_fd()</code>
returns a positive integer if the file descriptor
returned by <code class="function">sd_journal_get_fd()</code>
will generate wake-ups immediately for all journal
changes. Returns 0 if there might be a latency
involved.</p><p><code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> return one of
<code class="constant">SD_JOURNAL_NOP</code>,
<code class="constant">SD_JOURNAL_APPEND</code> or
<code class="constant">SD_JOURNAL_INVALIDATE</code> on success or
a negative errno-style error code. If
<code class="constant">SD_JOURNAL_NOP</code> is returned, the
journal did not change since the last invocation. If
<code class="constant">SD_JOURNAL_APPEND</code> is returned, new
entries have been appended to the end of the
journal. If <code class="constant">SD_JOURNAL_INVALIDATE</code>,
journal files were added or removed (possibly due to
rotation). In the latter event, live-view UIs should
probably refresh their entire display, while in the
case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
sufficient to simply continue reading at the previous
end of the journal.</p></div><div class="refsect1"><a name="idm139870235144576"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_reliable_fd()</code>,
<code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139870235138752"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal, in a live view tracking all changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}</pre><p>The code above does not do any error checking for brevity's
sake. The calculated <code class="varname">msec</code> integer can be passed
directly as <code class="function">poll()</code>'s timeout
parameter.</p><p>After each <code class="function">poll()</code> wake-up
<code class="function">sd_journal_process()</code> needs to be called to
process events. This call will also indicate what kind of change
has been detected (see below; note that spurious wake-ups are
possible).</p><p>A synchronous alternative for using
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code> and
<code class="function">sd_journal_process()</code> is
<code class="function">sd_journal_wait()</code>. It will synchronously wait
until the journal gets changed. The maximum time this call sleeps
may be controlled with the <em class="parameter"><code>timeout_usec</code></em>
parameter. Pass <code class="constant">(uint64_t) -1</code> to wait
indefinitely. Internally this call simply combines
<code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_get_timeout()</code>,
<code class="function">poll()</code> and
<code class="function">sd_journal_process()</code> into one.</p><p><code class="function">sd_journal_reliable_fd()</code> may be used to
check whether the wakeup events from the file descriptor returned
by <code class="function">sd_journal_get_fd()</code> are known to be
immediately triggered. On certain file systems where file change
events from the OS are not available (such as NFS) changes need to
be polled for repeatedly, and hence are detected only with a
certain latency. This call will return a positive value if the
journal changes are detected immediately and zero when they need
to be polled for and hence might be noticed only with a certain
latency. Note that there's usually no need to invoke this function
directly as <code class="function">sd_journal_get_timeout()</code> on these
file systems will ask for timeouts explicitly anyway.</p></div><div class="refsect1"><a name="idm140121381454848"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p><code class="function">sd_journal_get_fd()</code> returns a valid
file descriptor on success or a negative errno-style error
code.</p><p><code class="function">sd_journal_get_events()</code> returns a
combination of <code class="constant">POLLIN</code>,
<code class="constant">POLLOUT</code> and suchlike on success or a negative
errno-style error code.</p><p><code class="function">sd_journal_reliable_fd()</code> returns a
positive integer if the file descriptor returned by
<code class="function">sd_journal_get_fd()</code> will generate wake-ups
immediately for all journal changes. Returns 0 if there might be a
latency involved.</p><p><code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> return one of
<code class="constant">SD_JOURNAL_NOP</code>,
<code class="constant">SD_JOURNAL_APPEND</code> or
<code class="constant">SD_JOURNAL_INVALIDATE</code> on success or a
negative errno-style error code. If
<code class="constant">SD_JOURNAL_NOP</code> is returned, the journal did
not change since the last invocation. If
<code class="constant">SD_JOURNAL_APPEND</code> is returned, new entries
have been appended to the end of the journal. If
<code class="constant">SD_JOURNAL_INVALIDATE</code>, journal files were
added or removed (possibly due to rotation). In the latter event,
live-view UIs should probably refresh their entire display, while
in the case of <code class="constant">SD_JOURNAL_APPEND</code>, it is
sufficient to simply continue reading at the previous end of the
journal.</p></div><div class="refsect1"><a name="idm140121381556448"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_get_fd()</code>,
<code class="function">sd_journal_get_events()</code>,
<code class="function">sd_journal_reliable_fd()</code>,
<code class="function">sd_journal_process()</code> and
<code class="function">sd_journal_wait()</code> interfaces are available as
a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140121376465504"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><p>Iterating through the journal, in a live view tracking all
changes:</p><pre class="programlisting">#include &lt;stdio.h&gt;
#include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) {
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
for (;;) {
const void *d;
size_t l;
r = sd_journal_next(j);
if (r &lt; 0) {
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
break;
}
if (r == 0) {
/* Reached the end, let's wait for changes, and try again */
r = sd_journal_wait(j, (uint64_t) -1);
if (r &lt; 0) {
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
break;
}
continue;
}
r = sd_journal_get_data(j, "MESSAGE", &amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, (const char*) d);
}
sd_journal_close(j);
return 0;
int r;
sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1;
}
for (;;) {
const void *d;
size_t l;
r = sd_journal_next(j);
if (r &lt; 0) {
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-r));
break;
}
if (r == 0) {
/* Reached the end, let's wait for changes, and try again */
r = sd_journal_wait(j, (uint64_t) -1);
if (r &lt; 0) {
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-r));
break;
}
continue;
}
r = sd_journal_get_data(j, "MESSAGE", &amp;d, &amp;l);
if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue;
}
printf("%.*s\n", (int) l, (const char*) d);
}
sd_journal_close(j);
return 0;
}</pre><p>Waiting with <code class="function">poll()</code> (this
example lacks all error checking for the sake of
simplicity):</p><pre class="programlisting">#include &lt;sys/poll.h&gt;
example lacks all error checking for the sake of
simplicity):</p><pre class="programlisting">#include &lt;poll.h&gt;
#include &lt;systemd/sd-journal.h&gt;
int wait_for_changes(sd_journal *j) {
struct pollfd pollfd;
int msec;
struct pollfd pollfd;
int msec;
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}
sd_journal_get_timeout(m, &amp;t);
if (t == (uint64_t) -1)
msec = -1;
else {
struct timespec ts;
uint64_t n;
clock_getttime(CLOCK_MONOTONIC, &amp;ts);
n = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
msec = t &gt; n ? (int) ((t - n + 999) / 1000) : 0;
}
pollfd.fd = sd_journal_get_fd(j);
pollfd.events = sd_journal_get_events(j);
poll(&amp;pollfd, 1, msec);
return sd_journal_process(j);
}</pre></div><div class="refsect1"><a name="idm139870235132128"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
</p></div></div></body></html>
pollfd.fd = sd_journal_get_fd(j);
pollfd.events = sd_journal_get_events(j);
poll(&amp;pollfd, 1, msec);
return sd_journal_process(j);
}</pre></div><div class="refsect1"><a name="idm140121376459680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/poll.2.html"><span class="citerefentry"><span class="refentrytitle">poll</span>(2)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/clock_gettime.2.html"><span class="citerefentry"><span class="refentrytitle">clock_gettime</span>(2)</span></a>
</p></div></div></body></html>

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139693584531584"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens
the log journal for reading. It will find all journal
files automatically and interleave them automatically
when reading. As first argument it takes a pointer to
a <code class="varname">sd_journal</code> pointer, which on
success will contain a journal context object. The
second argument is a flags field, which may consist of
the following flags ORed together:
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure
only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>
makes sure only volatile journal files will be opened,
excluding those which are stored on persistent
storage. <code class="constant">SD_JOURNAL_SYSTEM</code>
will cause journal files of system services and the
kernel (in opposition to user session processes) to
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code>
will cause journal files of the current user to be
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code>
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes an absolute directory path as argument. All
journal files in this directory will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes a <code class="constant">NULL</code>-terminated list
of file paths to open. All files will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call. Please note
that in the case of a live journal, this function is only
useful for debugging, because individual journal files
can be rotated at any moment, and the opening of
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code>
is similar to <code class="function">sd_journal_open()</code>
but opens the journal files of a running
OS container. The specified machine name refers to a
container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be
used in the child after a fork. Functions which take a
journal object as an argument
(<code class="function">sd_journal_next()</code> and others)
will return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will
close the journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and
free its resources.</p><p>When opening the journal only journal files
accessible to the calling user will be opened. If
journal files are not accessible to the caller, this
will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal
after opening it with
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a
specific journal entry as <span class="emphasis"><em>current</em></span> entry,
similar to a file seek index in a classic file system
file, but without absolute positions. It may be
altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible
via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor
strings may be used to globally identify a specific
journal entry in a stable way and then later to seek
to it (or if the specific entry is not available
locally, to its closest entry in time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related
calls.</p></div><div class="refsect1"><a name="idm139693586294336"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls
return 0 on success or a negative errno-style error
code. <code class="function">sd_journal_close()</code> returns
nothing.</p></div><div class="refsect1"><a name="idm139693586290128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139693586284960"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added
in systemd-38.</p><p><code class="function">sd_journal_open_directory()</code>
was added in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>,
and <code class="function">sd_journal_open_files()</code>
were added in systemd-205.
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
was deprecated.</p></div><div class="refsect1"><a name="idm139693581595616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140423144980192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens the log journal
for reading. It will find all journal files automatically and
interleave them automatically when reading. As first argument it
takes a pointer to a <code class="varname">sd_journal</code> pointer, which
on success will contain a journal context object. The second
argument is a flags field, which may consist of the following
flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
makes sure only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only volatile journal files will be opened, excluding those which
are stored on persistent storage.
<code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
system services and the kernel (in opposition to user session
processes) to be opened.
<code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
files of the current user to be opened. If neither
<code class="constant">SD_JOURNAL_SYSTEM</code> nor
<code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
to <code class="function">sd_journal_open()</code> but takes an absolute
directory path as argument. All journal files in this directory
will be opened and interleaved automatically. This call also takes
a flags argument, but it must be passed as 0 as no flags are
currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
<code class="function">sd_journal_open()</code> but takes a
<code class="constant">NULL</code>-terminated list of file paths to open.
All files will be opened and interleaved automatically. This call
also takes a flags argument, but it must be passed as 0 as no
flags are currently understood for this call. Please note that in
the case of a live journal, this function is only useful for
debugging, because individual journal files can be rotated at any
moment, and the opening of specific files is inherently
racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
to <code class="function">sd_journal_open()</code> but opens the journal
files of a running OS container. The specified machine name refers
to a container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be used in the
child after a fork. Functions which take a journal object as an
argument (<code class="function">sd_journal_next()</code> and others) will
return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will close the
journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and free its
resources.</p><p>When opening the journal only journal files accessible to
the calling user will be opened. If journal files are not
accessible to the caller, this will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal after opening
it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a specific
journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
file seek index in a classic file system file, but without
absolute positions. It may be altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be exported in
<span class="emphasis"><em>cursor</em></span> strings, as accessible via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
Cursor strings may be used to globally identify a specific journal
entry in a stable way and then later to seek to it (or if the
specific entry is not available locally, to its closest entry in
time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related calls.</p></div><div class="refsect1"><a name="idm140423144946896"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls return 0 on
success or a negative errno-style error code.
<code class="function">sd_journal_close()</code> returns nothing.</p></div><div class="refsect1"><a name="idm140423144942720"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are available
as a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140423139973184"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_files()</code> were added in
systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
deprecated.</p></div><div class="refsect1"><a name="idm140423139966848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>

View File

@ -19,132 +19,122 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140135545385872"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_print()</code> may be
used to submit simple, plain text log entries to the
system journal. The first argument is a priority
value. This is followed by a format string and its
parameters, similar to
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
or
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The
priority value is one of
<code class="constant">LOG_EMERG</code>,
<code class="constant">LOG_ALERT</code>,
<code class="constant">LOG_CRIT</code>,
<code class="constant">LOG_ERR</code>,
<code class="constant">LOG_WARNING</code>,
<code class="constant">LOG_NOTICE</code>,
<code class="constant">LOG_INFO</code>,
<code class="constant">LOG_DEBUG</code>, as defined in
<code class="filename">syslog.h</code>, see
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
for details. It is recommended to use this call to
submit log messages in the application locale or system
locale and in UTF-8 format, but no such restrictions
are enforced.</p><p><code class="function">sd_journal_printv()</code> is
similar to <code class="function">sd_journal_print()</code> but
takes a variable argument list encapsulated in an
object of type <code class="varname">va_list</code> (see
<a href="stdarg.html"><span class="citerefentry"><span class="refentrytitle">stdarg</span>(3)</span></a>
for more information) instead of the format string. It
is otherwise equivalent in behavior.</p><p><code class="function">sd_journal_send()</code> may be
used to submit structured log entries to the system
journal. It takes a series of format strings, each
immediately followed by their associated parameters,
terminated by <code class="constant">NULL</code>. The strings passed should be of
the format "<code class="literal">VARIABLE=value</code>". The
variable name must be in uppercase and consist only of
characters, numbers and underscores, and may not begin
with an underscore. (All assignments that do not
follow this syntax will be ignored.) The value can be
of any size and format. It is highly recommended to
submit text strings formatted in the UTF-8 character
encoding only, and submit binary fields only when
formatting in UTF-8 strings is not sensible. A number
of well known fields are defined, see
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>
for details, but additional application defined fields
may be used. A variable may be assigned more than one
value per entry.</p><p><code class="function">sd_journal_sendv()</code> is
similar to <code class="function">sd_journal_send()</code> but
takes an array of <code class="varname">struct iovec</code> (as
defined in <code class="filename">uio.h</code>, see
<a href="readv.html"><span class="citerefentry"><span class="refentrytitle">readv</span>(3)</span></a>
for details) instead of the format string. Each
structure should reference one field of the entry to
submit. The second argument specifies the number of
structures in the array.
<code class="function">sd_journal_sendv()</code> is
particularly useful to submit binary objects to the
journal where that is necessary.</p><p><code class="function">sd_journal_perror()</code> is a
similar to
<a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>
and writes a message to the journal that consists of
the passed string, suffixed with ": " and a human
readable representation of the current error code
stored in
<a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If
the message string is passed as <code class="constant">NULL</code> or empty string,
only the error string representation will be written,
prefixed with nothing. An additional journal field
ERRNO= is included in the entry containing the numeric
error code formatted as decimal string. The log
priority used is <code class="constant">LOG_ERR</code> (3).</p><p>Note that <code class="function">sd_journal_send()</code>
is a wrapper around
<code class="function">sd_journal_sendv()</code> to make it
easier to use when only text strings shall be
submitted. Also, the following two calls are
mostly equivalent:</p><pre class="programlisting">sd_journal_print(LOG_INFO, "Hello World, this is PID %lu!", (unsigned long) getpid());
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_print"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_print, sd_journal_printv, sd_journal_send, sd_journal_sendv, sd_journal_perror, SD_JOURNAL_SUPPRESS_LOCATION — Submit log entries to the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_print</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_printv</b>(</code></td><td>int <var class="pdparam">priority</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>va_list <var class="pdparam">ap</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_send</b>(</code></td><td>const char *<var class="pdparam">format</var>, </td></tr><tr><td> </td><td>...<code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_sendv</b>(</code></td><td>const struct iovec *<var class="pdparam">iov</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">n</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_perror</b>(</code></td><td>const char *<var class="pdparam">message</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139822287458016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_print()</code> may be used to
submit simple, plain text log entries to the system journal. The
first argument is a priority value. This is followed by a format
string and its parameters, similar to
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a>
or
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>.
The priority value is one of
<code class="constant">LOG_EMERG</code>,
<code class="constant">LOG_ALERT</code>,
<code class="constant">LOG_CRIT</code>,
<code class="constant">LOG_ERR</code>,
<code class="constant">LOG_WARNING</code>,
<code class="constant">LOG_NOTICE</code>,
<code class="constant">LOG_INFO</code>,
<code class="constant">LOG_DEBUG</code>, as defined in
<code class="filename">syslog.h</code>, see
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
for details. It is recommended to use this call to submit log
messages in the application locale or system locale and in UTF-8
format, but no such restrictions are enforced.</p><p><code class="function">sd_journal_printv()</code> is similar to
<code class="function">sd_journal_print()</code> but takes a variable
argument list encapsulated in an object of type
<code class="varname">va_list</code> (see
<a href="stdarg.html"><span class="citerefentry"><span class="refentrytitle">stdarg</span>(3)</span></a>
for more information) instead of the format string. It is
otherwise equivalent in behavior.</p><p><code class="function">sd_journal_send()</code> may be used to submit
structured log entries to the system journal. It takes a series of
format strings, each immediately followed by their associated
parameters, terminated by <code class="constant">NULL</code>. The strings
passed should be of the format "<code class="literal">VARIABLE=value</code>".
The variable name must be in uppercase and consist only of
characters, numbers and underscores, and may not begin with an
underscore. (All assignments that do not follow this syntax will
be ignored.) The value can be of any size and format. It is highly
recommended to submit text strings formatted in the UTF-8
character encoding only, and submit binary fields only when
formatting in UTF-8 strings is not sensible. A number of well
known fields are defined, see
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>
for details, but additional application defined fields may be
used. A variable may be assigned more than one value per
entry.</p><p><code class="function">sd_journal_sendv()</code> is similar to
<code class="function">sd_journal_send()</code> but takes an array of
<code class="varname">struct iovec</code> (as defined in
<code class="filename">uio.h</code>, see
<a href="readv.html"><span class="citerefentry"><span class="refentrytitle">readv</span>(3)</span></a>
for details) instead of the format string. Each structure should
reference one field of the entry to submit. The second argument
specifies the number of structures in the array.
<code class="function">sd_journal_sendv()</code> is particularly useful to
submit binary objects to the journal where that is
necessary.</p><p><code class="function">sd_journal_perror()</code> is a similar to
<a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>
and writes a message to the journal that consists of the passed
string, suffixed with ": " and a human readable representation of
the current error code stored in
<a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>.
If the message string is passed as <code class="constant">NULL</code> or
empty string, only the error string representation will be
written, prefixed with nothing. An additional journal field ERRNO=
is included in the entry containing the numeric error code
formatted as decimal string. The log priority used is
<code class="constant">LOG_ERR</code> (3).</p><p>Note that <code class="function">sd_journal_send()</code> is a
wrapper around <code class="function">sd_journal_sendv()</code> to make it
easier to use when only text strings shall be submitted. Also, the
following two calls are mostly equivalent:</p><pre class="programlisting">sd_journal_print(LOG_INFO, "Hello World, this is PID %lu!", (unsigned long) getpid());
sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(),
"PRIORITY=%i", LOG_INFO,
NULL);</pre><p>Note that these calls implicitly add fields for
the source file, function name and code line where
invoked. This is implemented with macros. If this is
not desired, it can be turned off by defining
SD_JOURNAL_SUPPRESS_LOCATION before including
<code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
and <code class="function">sd_journal_print()</code> may
largely be used interchangeably
functionality-wise. However, note that log messages
logged via the former take a different path to the
journal server than the later, and hence global
chronological ordering between the two streams cannot
be guaranteed. Using
<code class="function">sd_journal_print()</code> has the
benefit of logging source code line, filenames, and
functions as metadata along all entries, and
guaranteeing chronological ordering with structured
log entries that are generated via
<code class="function">sd_journal_send()</code>. Using
<code class="function">syslog()</code> has the benefit of being
more portable.</p></div><div class="refsect1"><a name="idm140135547140944"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The four calls return 0 on success or a negative
errno-style error code. The
<a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
variable itself is not altered.</p><p>If
<a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
is not running (the socket is not present), those
functions do nothing, and also return 0.</p></div><div class="refsect1"><a name="idm140135547137200"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety"></a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
</p><p><code class="function">sd_journal_print</code>,
<code class="function">sd_journal_printv</code>,
<code class="function">sd_journal_send</code>, and
<code class="function">sd_journal_perror</code> are
not async signal safe.</p></div><div class="refsect1"><a name="idm140135547131520"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_print()</code>,
<code class="function">sd_journal_printv()</code>,
<code class="function">sd_journal_send()</code> and
<code class="function">sd_journal_sendv()</code> interfaces
are available as a shared library, which can be compiled
and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140135542443344"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
<a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
<a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
<a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
</p></div></div></body></html>
"PRIORITY=%i", LOG_INFO,
NULL);</pre><p>Note that these calls implicitly add fields for the source
file, function name and code line where invoked. This is
implemented with macros. If this is not desired, it can be turned
off by defining SD_JOURNAL_SUPPRESS_LOCATION before including
<code class="filename">sd-journal.h</code>.</p><p><a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
and <code class="function">sd_journal_print()</code> may
largely be used interchangeably
functionality-wise. However, note that log messages
logged via the former take a different path to the
journal server than the later, and hence global
chronological ordering between the two streams cannot
be guaranteed. Using
<code class="function">sd_journal_print()</code> has the
benefit of logging source code line, filenames, and
functions as metadata along all entries, and
guaranteeing chronological ordering with structured
log entries that are generated via
<code class="function">sd_journal_send()</code>. Using
<code class="function">syslog()</code> has the benefit of being
more portable.</p></div><div class="refsect1"><a name="idm139822287416560"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The four calls return 0 on success or a negative errno-style
error code. The
<a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>
variable itself is not altered.</p><p>If
<a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>
is not running (the socket is not present), those functions do
nothing, and also return 0.</p></div><div class="refsect1"><a name="idm139822282448320"></a><h2 id="Async signal safety">Async signal safety<a class="headerlink" title="Permalink to this headline" href="#Async%20signal%20safety"></a></h2><p><code class="function">sd_journal_sendv()</code> is "async signal
safe" in the meaning of
<a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
</p><p><code class="function">sd_journal_print</code>,
<code class="function">sd_journal_printv</code>,
<code class="function">sd_journal_send</code>, and
<code class="function">sd_journal_perror</code> are
not async signal safe.</p></div><div class="refsect1"><a name="idm139822282443152"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_print()</code>,
<code class="function">sd_journal_printv()</code>,
<code class="function">sd_journal_send()</code> and
<code class="function">sd_journal_sendv()</code> interfaces are available
as a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139822282438000"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_stream_fd.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_stream_fd</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
<a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>,
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
<a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>,
<a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a>
</p></div></div></body></html>

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139693584531584"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens
the log journal for reading. It will find all journal
files automatically and interleave them automatically
when reading. As first argument it takes a pointer to
a <code class="varname">sd_journal</code> pointer, which on
success will contain a journal context object. The
second argument is a flags field, which may consist of
the following flags ORed together:
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure
only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>
makes sure only volatile journal files will be opened,
excluding those which are stored on persistent
storage. <code class="constant">SD_JOURNAL_SYSTEM</code>
will cause journal files of system services and the
kernel (in opposition to user session processes) to
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code>
will cause journal files of the current user to be
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code>
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes an absolute directory path as argument. All
journal files in this directory will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code>
is similar to <code class="function">sd_journal_open()</code>
but takes a <code class="constant">NULL</code>-terminated list
of file paths to open. All files will be opened and
interleaved automatically. This call also takes a
flags argument, but it must be passed as 0 as no flags
are currently understood for this call. Please note
that in the case of a live journal, this function is only
useful for debugging, because individual journal files
can be rotated at any moment, and the opening of
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code>
is similar to <code class="function">sd_journal_open()</code>
but opens the journal files of a running
OS container. The specified machine name refers to a
container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be
used in the child after a fork. Functions which take a
journal object as an argument
(<code class="function">sd_journal_next()</code> and others)
will return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will
close the journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and
free its resources.</p><p>When opening the journal only journal files
accessible to the calling user will be opened. If
journal files are not accessible to the caller, this
will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal
after opening it with
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a
specific journal entry as <span class="emphasis"><em>current</em></span> entry,
similar to a file seek index in a classic file system
file, but without absolute positions. It may be
altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible
via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor
strings may be used to globally identify a specific
journal entry in a stable way and then later to seek
to it (or if the specific entry is not available
locally, to its closest entry in time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related
calls.</p></div><div class="refsect1"><a name="idm139693586294336"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls
return 0 on success or a negative errno-style error
code. <code class="function">sd_journal_close()</code> returns
nothing.</p></div><div class="refsect1"><a name="idm139693586290128"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are
available as a shared library, which can be compiled and
linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm139693586284960"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added
in systemd-38.</p><p><code class="function">sd_journal_open_directory()</code>
was added in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>,
and <code class="function">sd_journal_open_files()</code>
were added in systemd-205.
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code>
was deprecated.</p></div><div class="refsect1"><a name="idm139693581595616"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_journal_open"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_journal_open, sd_journal_open_directory, sd_journal_open_files, sd_journal_open_container, sd_journal_close, sd_journal, SD_JOURNAL_LOCAL_ONLY, SD_JOURNAL_RUNTIME_ONLY, SD_JOURNAL_SYSTEM, SD_JOURNAL_CURRENT_USER — Open the system journal for reading</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-journal.h&gt;</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_directory</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">path</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_files</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char **<var class="pdparam">paths</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_journal_open_container</b>(</code></td><td>sd_journal **<var class="pdparam">ret</var>, </td></tr><tr><td> </td><td>const char *<var class="pdparam">machine</var>, </td></tr><tr><td> </td><td>int <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">sd_journal_close</b>(</code></td><td>sd_journal *<var class="pdparam">j</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140423144980192"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_journal_open()</code> opens the log journal
for reading. It will find all journal files automatically and
interleave them automatically when reading. As first argument it
takes a pointer to a <code class="varname">sd_journal</code> pointer, which
on success will contain a journal context object. The second
argument is a flags field, which may consist of the following
flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
makes sure only journal files generated on the local machine will
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only volatile journal files will be opened, excluding those which
are stored on persistent storage.
<code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
system services and the kernel (in opposition to user session
processes) to be opened.
<code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
files of the current user to be opened. If neither
<code class="constant">SD_JOURNAL_SYSTEM</code> nor
<code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
to <code class="function">sd_journal_open()</code> but takes an absolute
directory path as argument. All journal files in this directory
will be opened and interleaved automatically. This call also takes
a flags argument, but it must be passed as 0 as no flags are
currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
<code class="function">sd_journal_open()</code> but takes a
<code class="constant">NULL</code>-terminated list of file paths to open.
All files will be opened and interleaved automatically. This call
also takes a flags argument, but it must be passed as 0 as no
flags are currently understood for this call. Please note that in
the case of a live journal, this function is only useful for
debugging, because individual journal files can be rotated at any
moment, and the opening of specific files is inherently
racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
to <code class="function">sd_journal_open()</code> but opens the journal
files of a running OS container. The specified machine name refers
to a container that is registered with
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>.</p><p><code class="varname">sd_journal</code> objects cannot be used in the
child after a fork. Functions which take a journal object as an
argument (<code class="function">sd_journal_next()</code> and others) will
return <code class="constant">-ECHILD</code> after a fork.
</p><p><code class="function">sd_journal_close()</code> will close the
journal context allocated with
<code class="function">sd_journal_open()</code> or
<code class="function">sd_journal_open_directory()</code> and free its
resources.</p><p>When opening the journal only journal files accessible to
the calling user will be opened. If journal files are not
accessible to the caller, this will be silently ignored.</p><p>See
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
for an example of how to iterate through the journal after opening
it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
<code class="function">sd_journal_open()</code> references a specific
journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
file seek index in a classic file system file, but without
absolute positions. It may be altered with
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
and
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
and related calls. The current entry position may be exported in
<span class="emphasis"><em>cursor</em></span> strings, as accessible via
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
Cursor strings may be used to globally identify a specific journal
entry in a stable way and then later to seek to it (or if the
specific entry is not available locally, to its closest entry in
time)
<a href="sd_journal_seek_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_cursor</span>(3)</span></a>.</p><p>Notification of journal changes is available via
<code class="function">sd_journal_get_fd()</code> and related calls.</p></div><div class="refsect1"><a name="idm140423144946896"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code>, and
<code class="function">sd_journal_open_files()</code> calls return 0 on
success or a negative errno-style error code.
<code class="function">sd_journal_close()</code> returns nothing.</p></div><div class="refsect1"><a name="idm140423144942720"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>The <code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_open_directory()</code> and
<code class="function">sd_journal_close()</code> interfaces are available
as a shared library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140423139973184"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p><code class="function">sd_journal_open()</code>,
<code class="function">sd_journal_close()</code>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
<code class="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_files()</code> were added in
systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
deprecated.</p></div><div class="refsect1"><a name="idm140423139966848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</span></a>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
</p></div></div></body></html>

View File

@ -19,71 +19,71 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd_listen_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_listen_fds, SD_LISTEN_FDS_START — Check for file descriptors passed by the system manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><pre class="funcsynopsisinfo">#define SD_LISTEN_FDS_START 3</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_listen_fds</b>(</code></td><td>int <var class="pdparam">unset_environment</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm139851094982208"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_listen_fds()</code> shall be
called by a daemon to check for file descriptors
passed by the init system as part of the socket-based
activation logic.</p><p>If the <em class="parameter"><code>unset_environment</code></em>
parameter is non-zero,
<code class="function">sd_listen_fds()</code> will unset the
<code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code>
environment variables before returning (regardless of
whether the function call itself succeeded or
not). Further calls to
<code class="function">sd_listen_fds()</code> will then fail,
but the variables are no longer inherited by child
processes.</p><p>If a daemon receives more than one file
descriptor, they will be passed in the same order as
configured in the systemd socket definition
file. Nonetheless, it is recommended to verify the
correct socket types before using them. To simplify
this checking, the functions
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a>,
<a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a>,
<a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a>
are provided. In order to maximize flexibility, it is
recommended to make these checks as loose as possible
without allowing incorrect setups. i.e. often, the
actual port number a socket is bound to matters little
for the service to work, hence it should not be
verified. On the other hand, whether a socket is a
datagram or stream socket matters a lot for the most
common program logics and should be checked.</p><p>This function call will set the FD_CLOEXEC flag
for all passed file descriptors to avoid further
inheritance to children of the calling process.</p></div><div class="refsect1"><a name="idm139851094971376"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>On failure, this call returns a negative
errno-style error code. If
<code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code>
was not set or was not correctly set for this daemon and
hence no file descriptors were received, 0 is
returned. Otherwise, the number of file descriptors
passed is returned. The application may find them
starting with file descriptor SD_LISTEN_FDS_START,
i.e. file descriptor 3.</p></div><div class="refsect1"><a name="idm139851098872768"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd_listen_fds"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd_listen_fds, SD_LISTEN_FDS_START — Check for file descriptors passed by the system manager</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre><pre class="funcsynopsisinfo">#define SD_LISTEN_FDS_START 3</pre><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">sd_listen_fds</b>(</code></td><td>int <var class="pdparam">unset_environment</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idm140327131529648"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="function">sd_listen_fds()</code> shall be called by a
daemon to check for file descriptors passed by the init system as
part of the socket-based activation logic.</p><p>If the <em class="parameter"><code>unset_environment</code></em> parameter is
non-zero, <code class="function">sd_listen_fds()</code> will unset the
<code class="varname">$LISTEN_FDS</code> and <code class="varname">$LISTEN_PID</code>
environment variables before returning (regardless of whether the
function call itself succeeded or not). Further calls to
<code class="function">sd_listen_fds()</code> will then fail, but the
variables are no longer inherited by child processes.</p><p>If a daemon receives more than one file descriptor, they
will be passed in the same order as configured in the systemd
socket unit file (see
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>
for details). Nonetheless, it is recommended to verify the correct
socket types before using them. To simplify this checking, the
functions
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a>,
<a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a>,
<a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a>
are provided. In order to maximize flexibility, it is recommended
to make these checks as loose as possible without allowing
incorrect setups. i.e. often, the actual port number a socket is
bound to matters little for the service to work, hence it should
not be verified. On the other hand, whether a socket is a datagram
or stream socket matters a lot for the most common program logics
and should be checked.</p><p>This function call will set the FD_CLOEXEC flag for all
passed file descriptors to avoid further inheritance to children
of the calling process.</p><p>If multiple socket units activate the same service the order
of the file descriptors passed to its main process is undefined.
If additional file descriptors have been passed to the service
manager using
<a href="sd_pid_notify_with_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_notify_with_fds</span>(3)</span></a>'s
"<code class="literal">FDSTORE=1</code>" messages, these file descriptors are
passed last, in arbitrary order, and with duplicates
removed.</p></div><div class="refsect1"><a name="idm140327135414800"></a><h2 id="Return Value">Return Value<a class="headerlink" title="Permalink to this headline" href="#Return%20Value"></a></h2><p>On failure, this call returns a negative errno-style error
code. If
<code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code> was
not set or was not correctly set for this daemon and hence no file
descriptors were received, 0 is returned. Otherwise, the number of
file descriptors passed is returned. The application may find them
starting with file descriptor SD_LISTEN_FDS_START, i.e. file
descriptor 3.</p></div><div class="refsect1"><a name="idm140327135412464"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p><p>Internally, this function checks whether the
<code class="varname">$LISTEN_PID</code> environment variable
equals the daemon PID. If not, it returns
immediately. Otherwise, it parses the number passed in
the <code class="varname">$LISTEN_FDS</code> environment
variable, then sets the FD_CLOEXEC flag for the parsed
number of file descriptors starting from
SD_LISTEN_FDS_START. Finally, it returns the parsed
number.</p></div><div class="refsect1"><a name="idm139851098869392"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code>, </span><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID"></a></dt><dd><p>Set by the init system
for supervised processes that use
socket-based activation. This
environment variable specifies the
data
<code class="function">sd_listen_fds()</code>
parses. See above for
details.</p></dd></dl></div></div><div class="refsect1"><a name="idm139851098864848"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a>,
<a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a>,
<a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>
</p></div></div></body></html>
<code class="varname">$LISTEN_PID</code> environment variable equals the
daemon PID. If not, it returns immediately. Otherwise, it parses
the number passed in the <code class="varname">$LISTEN_FDS</code>
environment variable, then sets the FD_CLOEXEC flag for the parsed
number of file descriptors starting from SD_LISTEN_FDS_START.
Finally, it returns the parsed number.</p></div><div class="refsect1"><a name="idm140327135409200"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="$LISTEN_PID"><span class="term"><code class="varname">$LISTEN_PID</code>, </span><span class="term"><code class="varname">$LISTEN_FDS</code></span><a class="headerlink" title="Permalink to this term" href="#%24LISTEN_PID"></a></dt><dd><p>Set by the init system
for supervised processes that use
socket-based activation. This
environment variable specifies the
data
<code class="function">sd_listen_fds()</code>
parses. See above for
details.</p></dd></dl></div></div><div class="refsect1"><a name="idm140327135404896"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a>,
<a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a>,
<a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>
</p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm140559535292016"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs
for new-style daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions
implemented. In addition to these functions, a couple
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="sd-daemon"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>sd-daemon, SD_EMERG, SD_ALERT, SD_CRIT, SD_ERR, SD_WARNING, SD_NOTICE, SD_INFO, SD_DEBUG — APIs for
new-style daemons</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><pre class="funcsynopsisinfo">#include &lt;systemd/sd-daemon.h&gt;</pre></div><div class="cmdsynopsis"><p><code class="command">pkg-config --cflags --libs libsystemd</code> </p></div></div><div class="refsect1"><a name="idm139723944054320"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><code class="filename">sd-daemon.h</code> provide APIs for new-style
daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions implemented. In addition
to these functions, a couple of logging prefixes are defined as
macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */
#define SD_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in
conjunction with stderr-based logging as implemented
by systemd. If a systemd service definition file is
configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes
can be used to encode a log level in lines
printed. This is similar to the kernel
<code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix
every line with one of these strings. A line that is
not prefixed will be logged at the default log level
SD_INFO.</p><div class="example"><a name="idm140559536520816"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level
NOTICE by issuing this call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140559530637408"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
#define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
stderr-based logging as implemented by systemd. If a systemd
service definition file is configured with
<code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=kmsg</code>, these prefixes can be used
to encode a log level in lines printed. This is similar to the
kernel <code class="function">printk()</code>-style logging. See
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s
log level system. To use these prefixes simply prefix every line
with one of these strings. A line that is not prefixed will be
logged at the default log level SD_INFO.</p><div class="example"><a name="idm139723940257568"></a><p class="title"><b>Example 1. Hello World</b></p><div class="example-contents"><p>A daemon may log with the log level NOTICE by issuing this
call:</p><pre class="programlisting">fprintf(stderr, SD_NOTICE "Hello World!\n");</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139723935707104"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p><a name="pkgconfig-text"></a>These APIs are implemented as a shared
library, which can be compiled and linked to with the
<code class="constant">libsystemd</code> <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
file.</p></div><div class="refsect1"><a name="idm140559535185056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm139723940255008"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="sd_listen_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_listen_fds</span>(3)</span></a>,
<a href="sd_notify.html"><span class="citerefentry"><span class="refentrytitle">sd_notify</span>(3)</span></a>,
<a href="sd_booted.html"><span class="citerefentry"><span class="refentrytitle">sd_booted</span>(3)</span></a>,
<a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>,
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/fprintf.3.html"><span class="citerefentry"><span class="refentrytitle">fprintf</span>(3)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -1,5 +1,5 @@
'\" t
.TH "BINFMT\&.D" "5" "" "systemd 218" "binfmt.d"
.TH "BINFMT\&.D" "5" "" "systemd 219" "binfmt.d"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View File

@ -19,17 +19,16 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="binfmt.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>binfmt.d — Configure additional binary formats for
executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/binfmt.d/*.conf</code></p><p><code class="filename">/run/binfmt.d/*.conf</code></p><p><code class="filename">/usr/lib/binfmt.d/*.conf</code></p></div><div class="refsect1"><a name="idm140552302860096"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>At boot,
<a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a>
reads configuration files from the above directories
to register in the kernel additional binary
formats for executables.</p></div><div class="refsect1"><a name="idm140552302857824"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format"></a></h2><p>Each file contains a list of binfmt_misc kernel
binary format rules. Consult <a class="ulink" href="https://www.kernel.org/doc/Documentation/binfmt_misc.txt" target="_top">binfmt_misc.txt</a>
for more information on registration of additional
binary formats and how to write rules.</p><p>Empty lines and lines beginning with ; and # are
ignored. Note that this means you may not use ; and #
as delimiter in binary format rules.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="binfmt.d"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>binfmt.d — Configure additional binary formats for
executables at boot</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/binfmt.d/*.conf</code></p><p><code class="filename">/run/binfmt.d/*.conf</code></p><p><code class="filename">/usr/lib/binfmt.d/*.conf</code></p></div><div class="refsect1"><a name="idm140021845271952"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>At boot,
<a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a>
reads configuration files from the above directories to register
in the kernel additional binary formats for executables.</p></div><div class="refsect1"><a name="idm140021845426016"></a><h2 id="Configuration Format">Configuration Format<a class="headerlink" title="Permalink to this headline" href="#Configuration%20Format"></a></h2><p>Each file contains a list of binfmt_misc kernel binary
format rules. Consult <a class="ulink" href="https://www.kernel.org/doc/Documentation/binfmt_misc.txt" target="_top">binfmt_misc.txt</a>
for more information on registration of additional binary formats
and how to write rules.</p><p>Empty lines and lines beginning with ; and # are ignored.
Note that this means you may not use ; and # as delimiter in
binary format rules.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<code class="filename">/etc/</code>, <code class="filename">/run/</code>, and
<code class="filename">/usr/lib/</code>, in order of precedence.
Each configuration file in these configuration directories shall be named in
@ -49,10 +48,10 @@
the vendor, the recommended way is to place a symlink to
<code class="filename">/dev/null</code> in the configuration directory in
<code class="filename">/etc/</code>, with the same filename as the vendor
configuration file.</p></div><div class="refsect1"><a name="idm140552302854256"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example"></a></h2><div class="example"><a name="idm140552302853584"></a><p class="title"><b>Example 1. /etc/binfmt.d/wine.conf example:</b></p><div class="example-contents"><pre class="programlisting"># Start WINE on Windows executables
:DOSWin:M::MZ::/usr/bin/wine:</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140552302851936"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a>,
<a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>,
<a href="http://linux.die.net/man/8/wine"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
</p></div></div></body></html>
configuration file.</p></div><div class="refsect1"><a name="idm140021843989968"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example"></a></h2><div class="example"><a name="idm140021845502720"></a><p class="title"><b>Example 1. /etc/binfmt.d/wine.conf example:</b></p><div class="example-contents"><pre class="programlisting"># Start WINE on Windows executables
:DOSWin:M::MZ::/usr/bin/wine:</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140021844490944"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd-binfmt.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-binfmt.service</span>(8)</span></a>,
<a href="systemd-delta.html"><span class="citerefentry"><span class="refentrytitle">systemd-delta</span>(1)</span></a>,
<a href="http://linux.die.net/man/8/wine"><span class="citerefentry"><span class="refentrytitle">wine</span>(8)</span></a>
</p></div></div></body></html>

View File

@ -20,83 +20,82 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
<refentry id="binfmt.d" conditional='ENABLE_BINFMT'
xmlns:xi="http://www.w3.org/2001/XInclude">
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>binfmt.d</title>
<productname>systemd</productname>
<refentryinfo>
<title>binfmt.d</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>binfmt.d</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>binfmt.d</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>binfmt.d</refname>
<refpurpose>Configure additional binary formats for
executables at boot</refpurpose>
</refnamediv>
<refnamediv>
<refname>binfmt.d</refname>
<refpurpose>Configure additional binary formats for
executables at boot</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>/etc/binfmt.d/*.conf</filename></para>
<para><filename>/run/binfmt.d/*.conf</filename></para>
<para><filename>/usr/lib/binfmt.d/*.conf</filename></para>
</refsynopsisdiv>
<refsynopsisdiv>
<para><filename>/etc/binfmt.d/*.conf</filename></para>
<para><filename>/run/binfmt.d/*.conf</filename></para>
<para><filename>/usr/lib/binfmt.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para>At boot,
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
reads configuration files from the above directories
to register in the kernel additional binary
formats for executables.</para>
</refsect1>
<para>At boot,
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
reads configuration files from the above directories to register
in the kernel additional binary formats for executables.</para>
</refsect1>
<refsect1>
<title>Configuration Format</title>
<refsect1>
<title>Configuration Format</title>
<para>Each file contains a list of binfmt_misc kernel
binary format rules. Consult <ulink
url="https://www.kernel.org/doc/Documentation/binfmt_misc.txt">binfmt_misc.txt</ulink>
for more information on registration of additional
binary formats and how to write rules.</para>
<para>Each file contains a list of binfmt_misc kernel binary
format rules. Consult <ulink
url="https://www.kernel.org/doc/Documentation/binfmt_misc.txt">binfmt_misc.txt</ulink>
for more information on registration of additional binary formats
and how to write rules.</para>
<para>Empty lines and lines beginning with ; and # are
ignored. Note that this means you may not use ; and #
as delimiter in binary format rules.</para>
</refsect1>
<para>Empty lines and lines beginning with ; and # are ignored.
Note that this means you may not use ; and # as delimiter in
binary format rules.</para>
</refsect1>
<xi:include href="standard-conf.xml" xpointer="confd" />
<xi:include href="standard-conf.xml" xpointer="confd" />
<refsect1>
<title>Example</title>
<example>
<title>/etc/binfmt.d/wine.conf example:</title>
<refsect1>
<title>Example</title>
<example>
<title>/etc/binfmt.d/wine.conf example:</title>
<programlisting># Start WINE on Windows executables
<programlisting># Start WINE on Windows executables
:DOSWin:M::MZ::/usr/bin/wine:</programlisting>
</example>
</refsect1>
</example>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-binfmt.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>wine</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "BOOTCHART\&.CONF" "5" "" "systemd 218" "bootchart.conf"
.TH "BOOTCHART\&.CONF" "5" "" "systemd 219" "bootchart.conf"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -97,7 +97,7 @@ Configures the output directory for writing the graphs\&. By default, bootchart
\fIInit=[path]\fR
.RS 4
Configures bootchart to run a non\-standard binary instead of
/sbin/init\&. This option is only relevant if bootchart was invoked from the kernel command line with init=/usr/lib/systemd/systemd\-bootchart\&.
/usr/lib/systemd/systemd\&. This option is only relevant if bootchart was invoked from the kernel command line with init=/usr/lib/systemd/systemd\-bootchart\&.
.RE
.PP
\fIPlotMemoryUsage=no\fR

View File

@ -19,12 +19,11 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="bootchart.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootchart.conf, bootchart.conf.d — Boot performance analysis graphing tool configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/bootchart.conf</code></p><p><code class="filename">/etc/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/bootchart.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm139953107943408"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>When starting, systemd-bootchart will read the
configuration file
<code class="filename">/etc/systemd/bootchart.conf</code>, followed by
the files in the <code class="filename">bootchart.conf.d</code>
directories. These configuration files determine logging
parameters and graph output.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="bootchart.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootchart.conf, bootchart.conf.d — Boot performance analysis graphing tool configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/bootchart.conf</code></p><p><code class="filename">/etc/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/bootchart.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm140158922052944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>When starting, systemd-bootchart will read the configuration
file <code class="filename">/etc/systemd/bootchart.conf</code>, followed by
the files in the <code class="filename">bootchart.conf.d</code>
directories. These configuration files determine logging
parameters and graph output.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<code class="filename">/etc/</code>, <code class="filename">/run/</code>, and
<code class="filename">/usr/lib/</code>, in order of precedence.
Each configuration file in these configuration directories shall be named in
@ -48,33 +47,35 @@
<code class="filename">/etc/</code>. This file is read before any of the
configuration directories, and has the lowest precedence; entries in a file
in any configuration directory override entries in the single configuration
file.</p></div><div class="refsect1"><a name="idm139953107938896"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="Samples=500"><span class="term"><code class="varname">Samples=500</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=500"></a></dt><dd><p>Configure the amount of samples to
record in total before bootchart exits. Each sample will
record at intervals defined by Frequency=.</p></dd><dt id="Frequency=25"><span class="term"><code class="varname">Frequency=25</code></span><a class="headerlink" title="Permalink to this term" href="#Frequency=25"></a></dt><dd><p>Configure the sample log frequency.
This can be a fractional number, but must be larger than
0.0. Most systems can cope with values under 25-50 without
impacting boot time severely.</p></dd><dt id="Relative=no"><span class="term"><code class="varname">Relative=no</code></span><a class="headerlink" title="Permalink to this term" href="#Relative=no"></a></dt><dd><p>Configures whether the left axis of the
output graph equals time=0.0 (<code class="constant">CLOCK_MONOTONIC</code> start). This
is useful for using bootchart at post-boot time to profile
an already booted system, otherwise the graph would become
extremely large. If set to yes, the horizontal axis starts
at the first recorded sample instead of time=0.0.
</p></dd><dt id="Filter=no"><span class="term"><code class="varname">Filter=no</code></span><a class="headerlink" title="Permalink to this term" href="#Filter=no"></a></dt><dd><p>Configures whether the resulting graph
should omit tasks that did not contribute significantly
to the boot. Processes that are too short-lived (only
seen in one sample) or that do not consume any significant
CPU time (less than 0.001sec) will not be displayed in
the output graph.</p></dd><dt id="Output=[path]"><span class="term"><code class="varname">Output=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Output=%5Bpath%5D"></a></dt><dd><p>Configures the output directory for writing
the graphs. By default, bootchart writes the graphs to
<code class="filename">/run/log</code>.</p></dd><dt id="Init=[path]"><span class="term"><code class="varname">Init=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Init=%5Bpath%5D"></a></dt><dd><p>Configures bootchart to run a non-standard
binary instead of <code class="filename">/sbin/init</code>. This
option is only relevant if bootchart was invoked from the
kernel command line with
init=/usr/lib/systemd/systemd-bootchart.</p></dd><dt id="PlotMemoryUsage=no"><span class="term"><code class="varname">PlotMemoryUsage=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotMemoryUsage=no"></a></dt><dd><p>If set to yes, enables logging and graphing
of processes' PSS memory consumption.</p></dd><dt id="PlotEntropyGraph=no"><span class="term"><code class="varname">PlotEntropyGraph=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotEntropyGraph=no"></a></dt><dd><p>If set to yes, enables logging and graphing
of the kernel random entropy pool size.</p></dd><dt id="ScaleX=100"><span class="term"><code class="varname">ScaleX=100</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleX=100"></a></dt><dd><p>Horizontal scaling factor for all variable
graph components.</p></dd><dt id="ScaleY=20"><span class="term"><code class="varname">ScaleY=20</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleY=20"></a></dt><dd><p>Vertical scaling factor for all variable
graph components.</p></dd><dt id="ControlGroup=no"><span class="term"><code class="varname">ControlGroup=no</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=no"></a></dt><dd><p>Display process control group.</p></dd></dl></div></div><div class="refsect1"><a name="idm139953111870352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>,
<a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm140158921534208"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="Samples=500"><span class="term"><code class="varname">Samples=500</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=500"></a></dt><dd><p>Configure the amount of samples to record in
total before bootchart exits. Each sample will record at
intervals defined by Frequency=.</p></dd><dt id="Frequency=25"><span class="term"><code class="varname">Frequency=25</code></span><a class="headerlink" title="Permalink to this term" href="#Frequency=25"></a></dt><dd><p>Configure the sample log frequency. This can
be a fractional number, but must be larger than 0.0. Most
systems can cope with values under 25-50 without impacting
boot time severely.</p></dd><dt id="Relative=no"><span class="term"><code class="varname">Relative=no</code></span><a class="headerlink" title="Permalink to this term" href="#Relative=no"></a></dt><dd><p>Configures whether the left axis of the output
graph equals time=0.0 (<code class="constant">CLOCK_MONOTONIC</code>
start). This is useful for using bootchart at post-boot time
to profile an already booted system, otherwise the graph would
become extremely large. If set to yes, the horizontal axis
starts at the first recorded sample instead of time=0.0.
</p></dd><dt id="Filter=no"><span class="term"><code class="varname">Filter=no</code></span><a class="headerlink" title="Permalink to this term" href="#Filter=no"></a></dt><dd><p>Configures whether the resulting graph should
omit tasks that did not contribute significantly to the boot.
Processes that are too short-lived (only seen in one sample)
or that do not consume any significant CPU time (less than
0.001sec) will not be displayed in the output
graph.</p></dd><dt id="Output=[path]"><span class="term"><code class="varname">Output=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Output=%5Bpath%5D"></a></dt><dd><p>Configures the output directory for writing
the graphs. By default, bootchart writes the graphs to
<code class="filename">/run/log</code>.</p></dd><dt id="Init=[path]"><span class="term"><code class="varname">Init=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Init=%5Bpath%5D"></a></dt><dd><p>Configures bootchart to run a non-standard
binary instead of
<code class="filename">/usr/lib/systemd/systemd</code>. This option is
only relevant if bootchart was invoked from the kernel command
line with
init=/usr/lib/systemd/systemd-bootchart.</p></dd><dt id="PlotMemoryUsage=no"><span class="term"><code class="varname">PlotMemoryUsage=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotMemoryUsage=no"></a></dt><dd><p>If set to yes, enables logging and graphing of
processes' PSS memory consumption.</p></dd><dt id="PlotEntropyGraph=no"><span class="term"><code class="varname">PlotEntropyGraph=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotEntropyGraph=no"></a></dt><dd><p>If set to yes, enables logging and graphing of
the kernel random entropy pool size.</p></dd><dt id="ScaleX=100"><span class="term"><code class="varname">ScaleX=100</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleX=100"></a></dt><dd><p>Horizontal scaling factor for all variable
graph components.</p></dd><dt id="ScaleY=20"><span class="term"><code class="varname">ScaleY=20</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleY=20"></a></dt><dd><p>Vertical scaling factor for all variable graph
components.</p></dd><dt id="ControlGroup=no"><span class="term"><code class="varname">ControlGroup=no</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=no"></a></dt><dd><p>Display process control group.
</p></dd></dl></div></div><div class="refsect1"><a name="idm140158921267200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>,
<a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
</p></div></div></body></html>

View File

@ -19,12 +19,11 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="bootchart.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootchart.conf, bootchart.conf.d — Boot performance analysis graphing tool configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/bootchart.conf</code></p><p><code class="filename">/etc/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/bootchart.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm139953107943408"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>When starting, systemd-bootchart will read the
configuration file
<code class="filename">/etc/systemd/bootchart.conf</code>, followed by
the files in the <code class="filename">bootchart.conf.d</code>
directories. These configuration files determine logging
parameters and graph output.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="bootchart.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootchart.conf, bootchart.conf.d — Boot performance analysis graphing tool configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/bootchart.conf</code></p><p><code class="filename">/etc/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/bootchart.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/bootchart.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm140158922052944"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>When starting, systemd-bootchart will read the configuration
file <code class="filename">/etc/systemd/bootchart.conf</code>, followed by
the files in the <code class="filename">bootchart.conf.d</code>
directories. These configuration files determine logging
parameters and graph output.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<code class="filename">/etc/</code>, <code class="filename">/run/</code>, and
<code class="filename">/usr/lib/</code>, in order of precedence.
Each configuration file in these configuration directories shall be named in
@ -48,33 +47,35 @@
<code class="filename">/etc/</code>. This file is read before any of the
configuration directories, and has the lowest precedence; entries in a file
in any configuration directory override entries in the single configuration
file.</p></div><div class="refsect1"><a name="idm139953107938896"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="Samples=500"><span class="term"><code class="varname">Samples=500</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=500"></a></dt><dd><p>Configure the amount of samples to
record in total before bootchart exits. Each sample will
record at intervals defined by Frequency=.</p></dd><dt id="Frequency=25"><span class="term"><code class="varname">Frequency=25</code></span><a class="headerlink" title="Permalink to this term" href="#Frequency=25"></a></dt><dd><p>Configure the sample log frequency.
This can be a fractional number, but must be larger than
0.0. Most systems can cope with values under 25-50 without
impacting boot time severely.</p></dd><dt id="Relative=no"><span class="term"><code class="varname">Relative=no</code></span><a class="headerlink" title="Permalink to this term" href="#Relative=no"></a></dt><dd><p>Configures whether the left axis of the
output graph equals time=0.0 (<code class="constant">CLOCK_MONOTONIC</code> start). This
is useful for using bootchart at post-boot time to profile
an already booted system, otherwise the graph would become
extremely large. If set to yes, the horizontal axis starts
at the first recorded sample instead of time=0.0.
</p></dd><dt id="Filter=no"><span class="term"><code class="varname">Filter=no</code></span><a class="headerlink" title="Permalink to this term" href="#Filter=no"></a></dt><dd><p>Configures whether the resulting graph
should omit tasks that did not contribute significantly
to the boot. Processes that are too short-lived (only
seen in one sample) or that do not consume any significant
CPU time (less than 0.001sec) will not be displayed in
the output graph.</p></dd><dt id="Output=[path]"><span class="term"><code class="varname">Output=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Output=%5Bpath%5D"></a></dt><dd><p>Configures the output directory for writing
the graphs. By default, bootchart writes the graphs to
<code class="filename">/run/log</code>.</p></dd><dt id="Init=[path]"><span class="term"><code class="varname">Init=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Init=%5Bpath%5D"></a></dt><dd><p>Configures bootchart to run a non-standard
binary instead of <code class="filename">/sbin/init</code>. This
option is only relevant if bootchart was invoked from the
kernel command line with
init=/usr/lib/systemd/systemd-bootchart.</p></dd><dt id="PlotMemoryUsage=no"><span class="term"><code class="varname">PlotMemoryUsage=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotMemoryUsage=no"></a></dt><dd><p>If set to yes, enables logging and graphing
of processes' PSS memory consumption.</p></dd><dt id="PlotEntropyGraph=no"><span class="term"><code class="varname">PlotEntropyGraph=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotEntropyGraph=no"></a></dt><dd><p>If set to yes, enables logging and graphing
of the kernel random entropy pool size.</p></dd><dt id="ScaleX=100"><span class="term"><code class="varname">ScaleX=100</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleX=100"></a></dt><dd><p>Horizontal scaling factor for all variable
graph components.</p></dd><dt id="ScaleY=20"><span class="term"><code class="varname">ScaleY=20</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleY=20"></a></dt><dd><p>Vertical scaling factor for all variable
graph components.</p></dd><dt id="ControlGroup=no"><span class="term"><code class="varname">ControlGroup=no</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=no"></a></dt><dd><p>Display process control group.</p></dd></dl></div></div><div class="refsect1"><a name="idm139953111870352"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>,
<a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
</p></div></div></body></html>
file.</p></div><div class="refsect1"><a name="idm140158921534208"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="Samples=500"><span class="term"><code class="varname">Samples=500</code></span><a class="headerlink" title="Permalink to this term" href="#Samples=500"></a></dt><dd><p>Configure the amount of samples to record in
total before bootchart exits. Each sample will record at
intervals defined by Frequency=.</p></dd><dt id="Frequency=25"><span class="term"><code class="varname">Frequency=25</code></span><a class="headerlink" title="Permalink to this term" href="#Frequency=25"></a></dt><dd><p>Configure the sample log frequency. This can
be a fractional number, but must be larger than 0.0. Most
systems can cope with values under 25-50 without impacting
boot time severely.</p></dd><dt id="Relative=no"><span class="term"><code class="varname">Relative=no</code></span><a class="headerlink" title="Permalink to this term" href="#Relative=no"></a></dt><dd><p>Configures whether the left axis of the output
graph equals time=0.0 (<code class="constant">CLOCK_MONOTONIC</code>
start). This is useful for using bootchart at post-boot time
to profile an already booted system, otherwise the graph would
become extremely large. If set to yes, the horizontal axis
starts at the first recorded sample instead of time=0.0.
</p></dd><dt id="Filter=no"><span class="term"><code class="varname">Filter=no</code></span><a class="headerlink" title="Permalink to this term" href="#Filter=no"></a></dt><dd><p>Configures whether the resulting graph should
omit tasks that did not contribute significantly to the boot.
Processes that are too short-lived (only seen in one sample)
or that do not consume any significant CPU time (less than
0.001sec) will not be displayed in the output
graph.</p></dd><dt id="Output=[path]"><span class="term"><code class="varname">Output=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Output=%5Bpath%5D"></a></dt><dd><p>Configures the output directory for writing
the graphs. By default, bootchart writes the graphs to
<code class="filename">/run/log</code>.</p></dd><dt id="Init=[path]"><span class="term"><code class="varname">Init=[path]</code></span><a class="headerlink" title="Permalink to this term" href="#Init=%5Bpath%5D"></a></dt><dd><p>Configures bootchart to run a non-standard
binary instead of
<code class="filename">/usr/lib/systemd/systemd</code>. This option is
only relevant if bootchart was invoked from the kernel command
line with
init=/usr/lib/systemd/systemd-bootchart.</p></dd><dt id="PlotMemoryUsage=no"><span class="term"><code class="varname">PlotMemoryUsage=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotMemoryUsage=no"></a></dt><dd><p>If set to yes, enables logging and graphing of
processes' PSS memory consumption.</p></dd><dt id="PlotEntropyGraph=no"><span class="term"><code class="varname">PlotEntropyGraph=no</code></span><a class="headerlink" title="Permalink to this term" href="#PlotEntropyGraph=no"></a></dt><dd><p>If set to yes, enables logging and graphing of
the kernel random entropy pool size.</p></dd><dt id="ScaleX=100"><span class="term"><code class="varname">ScaleX=100</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleX=100"></a></dt><dd><p>Horizontal scaling factor for all variable
graph components.</p></dd><dt id="ScaleY=20"><span class="term"><code class="varname">ScaleY=20</code></span><a class="headerlink" title="Permalink to this term" href="#ScaleY=20"></a></dt><dd><p>Vertical scaling factor for all variable graph
components.</p></dd><dt id="ControlGroup=no"><span class="term"><code class="varname">ControlGroup=no</code></span><a class="headerlink" title="Permalink to this term" href="#ControlGroup=no"></a></dt><dd><p>Display process control group.
</p></dd></dl></div></div><div class="refsect1"><a name="idm140158921267200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-bootchart.html"><span class="citerefentry"><span class="refentrytitle">systemd-bootchart</span>(1)</span></a>,
<a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
</p></div></div></body></html>

View File

@ -1,7 +1,6 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
@ -26,148 +25,149 @@
-->
<refentry id="bootchart.conf" conditional='ENABLE_BOOTCHART'
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>bootchart.conf</title>
<productname>systemd</productname>
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>bootchart.conf</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Auke</firstname>
<surname>Kok</surname>
<email>auke-jan.h.kok@intel.com</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Auke</firstname>
<surname>Kok</surname>
<email>auke-jan.h.kok@intel.com</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>bootchart.conf</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>bootchart.conf</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>bootchart.conf</refname>
<refname>bootchart.conf.d</refname>
<refpurpose>Boot performance analysis graphing tool configuration files</refpurpose>
</refnamediv>
<refnamediv>
<refname>bootchart.conf</refname>
<refname>bootchart.conf.d</refname>
<refpurpose>Boot performance analysis graphing tool configuration files</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>/etc/systemd/bootchart.conf</filename></para>
<para><filename>/etc/systemd/bootchart.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/bootchart.conf.d/*.conf</filename></para>
<para><filename>/usr/lib/systemd/bootchart.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsynopsisdiv>
<para><filename>/etc/systemd/bootchart.conf</filename></para>
<para><filename>/etc/systemd/bootchart.conf.d/*.conf</filename></para>
<para><filename>/run/systemd/bootchart.conf.d/*.conf</filename></para>
<para><filename>/usr/lib/systemd/bootchart.conf.d/*.conf</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para>When starting, systemd-bootchart will read the
configuration file
<filename>/etc/systemd/bootchart.conf</filename>, followed by
the files in the <filename>bootchart.conf.d</filename>
directories. These configuration files determine logging
parameters and graph output.</para>
</refsect1>
<para>When starting, systemd-bootchart will read the configuration
file <filename>/etc/systemd/bootchart.conf</filename>, followed by
the files in the <filename>bootchart.conf.d</filename>
directories. These configuration files determine logging
parameters and graph output.</para>
</refsect1>
<xi:include href="standard-conf.xml" xpointer="confd" />
<xi:include href="standard-conf.xml" xpointer="conf" />
<xi:include href="standard-conf.xml" xpointer="confd" />
<xi:include href="standard-conf.xml" xpointer="conf" />
<refsect1>
<title>Options</title>
<refsect1>
<title>Options</title>
<variablelist class='bootchart-directives'>
<variablelist class='bootchart-directives'>
<varlistentry>
<term><varname>Samples=500</varname></term>
<listitem><para>Configure the amount of samples to
record in total before bootchart exits. Each sample will
record at intervals defined by Frequency=.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Samples=500</varname></term>
<listitem><para>Configure the amount of samples to record in
total before bootchart exits. Each sample will record at
intervals defined by Frequency=.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Frequency=25</varname></term>
<listitem><para>Configure the sample log frequency.
This can be a fractional number, but must be larger than
0.0. Most systems can cope with values under 25-50 without
impacting boot time severely.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Frequency=25</varname></term>
<listitem><para>Configure the sample log frequency. This can
be a fractional number, but must be larger than 0.0. Most
systems can cope with values under 25-50 without impacting
boot time severely.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Relative=no</varname></term>
<listitem><para>Configures whether the left axis of the
output graph equals time=0.0 (<constant>CLOCK_MONOTONIC</constant> start). This
is useful for using bootchart at post-boot time to profile
an already booted system, otherwise the graph would become
extremely large. If set to yes, the horizontal axis starts
at the first recorded sample instead of time=0.0.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Relative=no</varname></term>
<listitem><para>Configures whether the left axis of the output
graph equals time=0.0 (<constant>CLOCK_MONOTONIC</constant>
start). This is useful for using bootchart at post-boot time
to profile an already booted system, otherwise the graph would
become extremely large. If set to yes, the horizontal axis
starts at the first recorded sample instead of time=0.0.
</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Filter=no</varname></term>
<listitem><para>Configures whether the resulting graph
should omit tasks that did not contribute significantly
to the boot. Processes that are too short-lived (only
seen in one sample) or that do not consume any significant
CPU time (less than 0.001sec) will not be displayed in
the output graph.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Filter=no</varname></term>
<listitem><para>Configures whether the resulting graph should
omit tasks that did not contribute significantly to the boot.
Processes that are too short-lived (only seen in one sample)
or that do not consume any significant CPU time (less than
0.001sec) will not be displayed in the output
graph.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Output=[path]</varname></term>
<listitem><para>Configures the output directory for writing
the graphs. By default, bootchart writes the graphs to
<filename>/run/log</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Output=[path]</varname></term>
<listitem><para>Configures the output directory for writing
the graphs. By default, bootchart writes the graphs to
<filename>/run/log</filename>.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Init=[path]</varname></term>
<listitem><para>Configures bootchart to run a non-standard
binary instead of <filename>/sbin/init</filename>. This
option is only relevant if bootchart was invoked from the
kernel command line with
init=/usr/lib/systemd/systemd-bootchart.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>Init=[path]</varname></term>
<listitem><para>Configures bootchart to run a non-standard
binary instead of
<filename>/usr/lib/systemd/systemd</filename>. This option is
only relevant if bootchart was invoked from the kernel command
line with
init=/usr/lib/systemd/systemd-bootchart.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>PlotMemoryUsage=no</varname></term>
<listitem><para>If set to yes, enables logging and graphing
of processes' PSS memory consumption.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>PlotMemoryUsage=no</varname></term>
<listitem><para>If set to yes, enables logging and graphing of
processes' PSS memory consumption.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>PlotEntropyGraph=no</varname></term>
<listitem><para>If set to yes, enables logging and graphing
of the kernel random entropy pool size.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>PlotEntropyGraph=no</varname></term>
<listitem><para>If set to yes, enables logging and graphing of
the kernel random entropy pool size.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ScaleX=100</varname></term>
<listitem><para>Horizontal scaling factor for all variable
graph components.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ScaleX=100</varname></term>
<listitem><para>Horizontal scaling factor for all variable
graph components.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ScaleY=20</varname></term>
<listitem><para>Vertical scaling factor for all variable
graph components.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ScaleY=20</varname></term>
<listitem><para>Vertical scaling factor for all variable graph
components.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ControlGroup=no</varname></term>
<listitem><para>Display process control group.</para></listitem>
</varlistentry>
<varlistentry>
<term><varname>ControlGroup=no</varname></term>
<listitem><para>Display process control group.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
</variablelist>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd-bootchart</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.directives</refentrytitle><manvolnum>7</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "BOOTCTL" "1" "" "systemd 218" "bootctl"
.TH "BOOTCTL" "1" "" "systemd 219" "bootctl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View File

@ -19,19 +19,17 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="bootctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootctl — Control the firmware and boot manager settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">bootctl</code> [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm139835163607920"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>bootctl</strong></span> may be used to
query or (in the future) change the firmware and boot
manager settings.</p><p>Firmware information is available only on EFI
systems.</p><p>Currently, only the <span class="citerefentry"><span class="refentrytitle">gummiboot</span>(8)</span> boot
manager implements the required boot loader interface
to provide complete boot manager information.</p></div><div class="refsect1"><a name="idm139835163603968"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="status"><span class="term"><span class="command"><strong>status</strong></span></span><a class="headerlink" title="Permalink to this term" href="#status"></a></dt><dd><p>Show firmware and boot
manager information about the system,
including secure boot mode status and
selected firmware entry (where
available).</p></dd></dl></div></div><div class="refsect1"><a name="idm139835163597888"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure
code otherwise.</p></div><div class="refsect1"><a name="idm139835163596704"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface" target="_top">Boot loader interface</a>,
<a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec" target="_top">Boot loader specification</a>,
<a class="ulink" href="http://www.freedesktop.org/wiki/Software/gummiboot/" target="_top">gummiboot</a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="bootctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootctl — Control the firmware and boot manager settings</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">bootctl</code> [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm140378023982448"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>bootctl</strong></span> may be used to query or (in the
future) change the firmware and boot manager settings.</p><p>Firmware information is available only on EFI systems.
</p><p>Currently, only the
<span class="citerefentry"><span class="refentrytitle">gummiboot</span>(8)</span>
boot manager implements the required boot loader interface to
provide complete boot manager information.</p></div><div class="refsect1"><a name="idm140378025972432"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="status"><span class="term"><span class="command"><strong>status</strong></span></span><a class="headerlink" title="Permalink to this term" href="#status"></a></dt><dd><p>Show firmware and boot manager information
about the system, including secure boot mode status and
selected firmware entry (where available).</p></dd></dl></div></div><div class="refsect1"><a name="idm140378024984608"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure code
otherwise.</p></div><div class="refsect1"><a name="idm140378024532128"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface" target="_top">Boot loader interface</a>,
<a class="ulink" href="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec" target="_top">Boot loader specification</a>,
<a class="ulink" href="http://www.freedesktop.org/wiki/Software/gummiboot/" target="_top">gummiboot</a>
</p></div></div></body></html>

View File

@ -1,6 +1,6 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
@ -20,95 +20,93 @@
-->
<refentry id="bootctl" conditional='ENABLE_EFI'
xmlns:xi="http://www.w3.org/2001/XInclude">
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>bootctl</title>
<productname>systemd</productname>
<refentryinfo>
<title>bootctl</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Kay</firstname>
<surname>Sievers</surname>
<email>kay@vrfy.org</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Kay</firstname>
<surname>Sievers</surname>
<email>kay@vrfy.org</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>bootctl</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>bootctl</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>bootctl</refname>
<refpurpose>Control the firmware and boot manager settings</refpurpose>
</refnamediv>
<refnamediv>
<refname>bootctl</refname>
<refpurpose>Control the firmware and boot manager settings</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>bootctl</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="req">COMMAND</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>bootctl</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="req">COMMAND</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para><command>bootctl</command> may be used to
query or (in the future) change the firmware and boot
manager settings.</para>
<para><command>bootctl</command> may be used to query or (in the
future) change the firmware and boot manager settings.</para>
<para>Firmware information is available only on EFI
systems.</para>
<para>Firmware information is available only on EFI systems.
</para>
<para>Currently, only the <citerefentry project='gummiboot'><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry> boot
manager implements the required boot loader interface
to provide complete boot manager information.</para>
</refsect1>
<para>Currently, only the
<citerefentry project='gummiboot'><refentrytitle>gummiboot</refentrytitle><manvolnum>8</manvolnum></citerefentry>
boot manager implements the required boot loader interface to
provide complete boot manager information.</para>
</refsect1>
<refsect1>
<title>Options</title>
<refsect1>
<title>Options</title>
<para>The following options are understood:</para>
<para>The following options are understood:</para>
<variablelist>
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
</variablelist>
<variablelist>
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
</variablelist>
<para>The following commands are understood:</para>
<para>The following commands are understood:</para>
<variablelist>
<varlistentry>
<term><command>status</command></term>
<variablelist>
<varlistentry>
<term><command>status</command></term>
<listitem><para>Show firmware and boot
manager information about the system,
including secure boot mode status and
selected firmware entry (where
available).</para></listitem>
</varlistentry>
</variablelist>
<listitem><para>Show firmware and boot manager information
about the system, including secure boot mode status and
selected firmware entry (where available).</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
</refsect1>
<refsect1>
<title>Exit status</title>
<refsect1>
<title>Exit status</title>
<para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
<para>On success, 0 is returned, a non-zero failure code
otherwise.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface">Boot loader interface</ulink>,
<ulink url="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>,
<ulink url="http://www.freedesktop.org/wiki/Software/gummiboot/">gummiboot</ulink>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<ulink url="http://www.freedesktop.org/wiki/Software/systemd/BootLoaderInterface">Boot loader interface</ulink>,
<ulink url="http://www.freedesktop.org/wiki/Specifications/BootLoaderSpec">Boot loader specification</ulink>,
<ulink url="http://www.freedesktop.org/wiki/Software/gummiboot/">gummiboot</ulink>
</para>
</refsect1>
</refentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "BOOTUP" "7" "" "systemd 218" "bootup"
.TH "BOOTUP" "7" "" "systemd 219" "bootup"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View File

@ -19,62 +19,51 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="bootup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootup — System bootup process</p></div><div class="refsect1"><a name="idm140227976111856"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>A number of different components are involved in
the system boot. Immediately after power-up, the
system BIOS will do minimal hardware initialization,
and hand control over to a boot loader stored on a
persistent storage device. This boot loader will then
invoke an OS kernel from disk (or the network). In the
Linux case, this kernel (optionally) extracts and
executes an initial RAM disk image (initrd), such as
generated by
<a href="http://linux.die.net/man/8/dracut"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>,
which looks for the root file system (possibly using
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
for this). After the root file system is found and
mounted, the initrd hands over control to the host's
system manager (such as
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>)
stored on the OS image, which is then responsible for
probing all remaining hardware, mounting all necessary
file systems and spawning all configured
services.</p><p>On shutdown, the system manager stops all
services, unmounts all file systems (detaching the
storage technologies backing them), and then
(optionally) jumps back into the initrd code which
unmounts/detaches the root file system and the storage
it resides on. As a last step, the system is powered down.</p><p>Additional information about the system boot
process may be found in
<a href="http://man7.org/linux/man-pages/man7/boot.7.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm140227972324736"></a><h2 id="System Manager Bootup">System Manager Bootup<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Bootup"></a></h2><p>At boot, the system manager on the OS image is
responsible for initializing the required file
systems, services and drivers that are necessary for
operation of the system. On
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
systems, this process is split up in various discrete
steps which are exposed as target units. (See
<a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>
for detailed information about target units.) The
boot-up process is highly parallelized so that the
order in which specific target units are reached is not
deterministic, but still adheres to a limited amount
of ordering structure.</p><p>When systemd starts up the system, it will
activate all units that are dependencies of
<code class="filename">default.target</code> (as well as
recursively all dependencies of these
dependencies). Usually,
<code class="filename">default.target</code> is simply an alias
of <code class="filename">graphical.target</code> or
<code class="filename">multi-user.target</code>, depending on
whether the system is configured for a graphical UI or
only for a text console. To enforce minimal ordering
between the units pulled in, a number of well-known
target units are available, as listed on
<a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>.</p><p>The following chart is a structural overview of
these well-known units and their position in the
boot-up logic. The arrows describe which units are
pulled in and ordered before which other units. Units
near the top are started before units nearer to the
bottom of the chart.</p><pre class="programlisting">local-fs-pre.target
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="bootup"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>bootup — System bootup process</p></div><div class="refsect1"><a name="idm140621163247792"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>A number of different components are involved in the system
boot. Immediately after power-up, the system BIOS will do minimal
hardware initialization, and hand control over to a boot loader
stored on a persistent storage device. This boot loader will then
invoke an OS kernel from disk (or the network). In the Linux case,
this kernel (optionally) extracts and executes an initial RAM disk
image (initrd), such as generated by
<a href="http://linux.die.net/man/8/dracut"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>,
which looks for the root file system (possibly using
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
for this). After the root file system is found and mounted, the
initrd hands over control to the host's system manager (such as
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>)
stored on the OS image, which is then responsible for probing all
remaining hardware, mounting all necessary file systems and
spawning all configured services.</p><p>On shutdown, the system manager stops all services, unmounts
all file systems (detaching the storage technologies backing
them), and then (optionally) jumps back into the initrd code which
unmounts/detaches the root file system and the storage it resides
on. As a last step, the system is powered down.</p><p>Additional information about the system boot process may be
found in
<a href="http://man7.org/linux/man-pages/man7/boot.7.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>.</p></div><div class="refsect1"><a name="idm140621163241104"></a><h2 id="System Manager Bootup">System Manager Bootup<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Bootup"></a></h2><p>At boot, the system manager on the OS image is responsible
for initializing the required file systems, services and drivers
that are necessary for operation of the system. On
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
systems, this process is split up in various discrete steps which
are exposed as target units. (See
<a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>
for detailed information about target units.) The boot-up process
is highly parallelized so that the order in which specific target
units are reached is not deterministic, but still adheres to a
limited amount of ordering structure.</p><p>When systemd starts up the system, it will activate all
units that are dependencies of <code class="filename">default.target</code>
(as well as recursively all dependencies of these dependencies).
Usually, <code class="filename">default.target</code> is simply an alias of
<code class="filename">graphical.target</code> or
<code class="filename">multi-user.target</code>, depending on whether the
system is configured for a graphical UI or only for a text
console. To enforce minimal ordering between the units pulled in,
a number of well-known target units are available, as listed on
<a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>.</p><p>The following chart is a structural overview of these
well-known units and their position in the boot-up logic. The
arrows describe which units are pulled in and ordered before which
other units. Units near the top are started before units nearer to
the bottom of the chart.</p><pre class="programlisting">local-fs-pre.target
|
v
(various mounts and (various swap (various cryptsetup
@ -116,47 +105,39 @@
\_________________ | _________________/
\|/
v
<span class="emphasis"><em>graphical.target</em></span></pre><p>Target units that are commonly used as boot
targets are <span class="emphasis"><em>emphasized</em></span>. These
units are good choices as goal targets, for
example by passing them to the
<code class="varname">systemd.unit=</code> kernel command line
option (see
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>)
or by symlinking <code class="filename">default.target</code>
to them.</p><p><code class="filename">timers.target</code> is pulled-in
by <code class="filename">basic.target</code> asynchronously.
This allows timers units to depend on services which
become only available later in boot.</p></div><div class="refsect1"><a name="idm140227976202592"></a><h2 id="Bootup in the Initial RAM Disk (initrd)">Bootup in the Initial RAM Disk (initrd)<a class="headerlink" title="Permalink to this headline" href="#Bootup%20in%20the%20Initial%20RAM%20Disk%20(initrd)"></a></h2><p>The initial RAM disk implementation (initrd) can
be set up using systemd as well. In this case, boot up
inside the initrd follows the following
structure.</p><p>The default target in the initrd is
<code class="filename">initrd.target</code>. The bootup process
begins identical to the system manager bootup (see
above) until it reaches
<code class="filename">basic.target</code>. From there, systemd
approaches the special target
<code class="filename">initrd.target</code>. If the root device
can be mounted at <code class="filename">/sysroot</code>, the
<code class="filename">sysroot.mount</code> unit becomes active
and <code class="filename">initrd-root-fs.target</code> is
reached. The service
<code class="filename">initrd-parse-etc.service</code> scans
<code class="filename">/sysroot/etc/fstab</code> for a possible
<code class="filename">/usr</code> mount point and additional
entries marked with the
<span class="emphasis"><em>x-initrd.mount</em></span> option. All
entries found are mounted below
<code class="filename">/sysroot</code>, and
<code class="filename">initrd-fs.target</code> is reached. The
service <code class="filename">initrd-cleanup.service</code>
isolates to the
<code class="filename">initrd-switch-root.target</code>, where
cleanup services can run. As the very last step, the
<code class="filename">initrd-switch-root.service</code> is
activated, which will cause the system to switch its
root to <code class="filename">/sysroot</code>.
</p><pre class="programlisting"> : (beginning identical to above)
<span class="emphasis"><em>graphical.target</em></span></pre><p>Target units that are commonly used as boot targets are
<span class="emphasis"><em>emphasized</em></span>. These units are good choices as
goal targets, for example by passing them to the
<code class="varname">systemd.unit=</code> kernel command line option (see
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>)
or by symlinking <code class="filename">default.target</code> to them.
</p><p><code class="filename">timers.target</code> is pulled-in by
<code class="filename">basic.target</code> asynchronously. This allows
timers units to depend on services which become only available
later in boot.</p></div><div class="refsect1"><a name="idm140621167127680"></a><h2 id="Bootup in the Initial RAM Disk (initrd)">Bootup in the Initial RAM Disk (initrd)<a class="headerlink" title="Permalink to this headline" href="#Bootup%20in%20the%20Initial%20RAM%20Disk%20(initrd)"></a></h2><p>The initial RAM disk implementation (initrd) can be set up
using systemd as well. In this case, boot up inside the initrd
follows the following structure.</p><p>The default target in the initrd is
<code class="filename">initrd.target</code>. The bootup process begins
identical to the system manager bootup (see above) until it
reaches <code class="filename">basic.target</code>. From there, systemd
approaches the special target <code class="filename">initrd.target</code>.
If the root device can be mounted at
<code class="filename">/sysroot</code>, the
<code class="filename">sysroot.mount</code> unit becomes active and
<code class="filename">initrd-root-fs.target</code> is reached. The service
<code class="filename">initrd-parse-etc.service</code> scans
<code class="filename">/sysroot/etc/fstab</code> for a possible
<code class="filename">/usr</code> mount point and additional entries
marked with the <span class="emphasis"><em>x-initrd.mount</em></span> option. All
entries found are mounted below <code class="filename">/sysroot</code>, and
<code class="filename">initrd-fs.target</code> is reached. The service
<code class="filename">initrd-cleanup.service</code> isolates to the
<code class="filename">initrd-switch-root.target</code>, where cleanup
services can run. As the very last step, the
<code class="filename">initrd-switch-root.service</code> is activated,
which will cause the system to switch its root to
<code class="filename">/sysroot</code>.
</p><pre class="programlisting"> : (beginning identical to above)
:
v
basic.target
@ -205,9 +186,8 @@
initrd-switch-root.service
|
v
Transition to Host OS</pre></div><div class="refsect1"><a name="idm140227976178064"></a><h2 id="System Manager Shutdown">System Manager Shutdown<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Shutdown"></a></h2><p>System shutdown with systemd also consists of
various target units with some minimal ordering
structure applied:</p><pre class="programlisting"> (conflicts with (conflicts with
Transition to Host OS</pre></div><div class="refsect1"><a name="idm140621167101792"></a><h2 id="System Manager Shutdown">System Manager Shutdown<a class="headerlink" title="Permalink to this headline" href="#System%20Manager%20Shutdown"></a></h2><p>System shutdown with systemd also consists of various target
units with some minimal ordering structure applied:</p><pre class="programlisting"> (conflicts with (conflicts with
all system all file system
services) mounts, swaps,
| cryptsetup
@ -232,10 +212,11 @@
systemd-reboot.service systemd-poweroff.service systemd-halt.service systemd-kexec.service
| | | |
v v v v
<span class="emphasis"><em>reboot.target</em></span> <span class="emphasis"><em>poweroff.target</em></span> <span class="emphasis"><em>halt.target</em></span> <span class="emphasis"><em>kexec.target</em></span></pre><p>Commonly used system shutdown targets are <span class="emphasis"><em>emphasized</em></span>.</p></div><div class="refsect1"><a name="idm140227976170176"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="http://man7.org/linux/man-pages/man7/boot.7.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>,
<a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
<a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>,
<a href="http://linux.die.net/man/8/dracut"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>
</p></div></div></body></html>
<span class="emphasis"><em>reboot.target</em></span> <span class="emphasis"><em>poweroff.target</em></span> <span class="emphasis"><em>halt.target</em></span> <span class="emphasis"><em>kexec.target</em></span></pre><p>Commonly used system shutdown targets are
<span class="emphasis"><em>emphasized</em></span>.</p></div><div class="refsect1"><a name="idm140621167095680"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="http://man7.org/linux/man-pages/man7/boot.7.html"><span class="citerefentry"><span class="refentrytitle">boot</span>(7)</span></a>,
<a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
<a href="systemd.target.html"><span class="citerefentry"><span class="refentrytitle">systemd.target</span>(5)</span></a>,
<a href="http://linux.die.net/man/8/dracut"><span class="citerefentry"><span class="refentrytitle">dracut</span>(8)</span></a>
</p></div></div></body></html>

View File

@ -1,6 +1,6 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
@ -23,103 +23,92 @@
<refentry id="bootup">
<refentryinfo>
<title>bootup</title>
<productname>systemd</productname>
<refentryinfo>
<title>bootup</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>bootup</refentrytitle>
<manvolnum>7</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>bootup</refentrytitle>
<manvolnum>7</manvolnum>
</refmeta>
<refnamediv>
<refname>bootup</refname>
<refpurpose>System bootup process</refpurpose>
</refnamediv>
<refnamediv>
<refname>bootup</refname>
<refpurpose>System bootup process</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para>A number of different components are involved in
the system boot. Immediately after power-up, the
system BIOS will do minimal hardware initialization,
and hand control over to a boot loader stored on a
persistent storage device. This boot loader will then
invoke an OS kernel from disk (or the network). In the
Linux case, this kernel (optionally) extracts and
executes an initial RAM disk image (initrd), such as
generated by
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
which looks for the root file system (possibly using
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
for this). After the root file system is found and
mounted, the initrd hands over control to the host's
system manager (such as
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
stored on the OS image, which is then responsible for
probing all remaining hardware, mounting all necessary
file systems and spawning all configured
services.</para>
<para>A number of different components are involved in the system
boot. Immediately after power-up, the system BIOS will do minimal
hardware initialization, and hand control over to a boot loader
stored on a persistent storage device. This boot loader will then
invoke an OS kernel from disk (or the network). In the Linux case,
this kernel (optionally) extracts and executes an initial RAM disk
image (initrd), such as generated by
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
which looks for the root file system (possibly using
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
for this). After the root file system is found and mounted, the
initrd hands over control to the host's system manager (such as
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
stored on the OS image, which is then responsible for probing all
remaining hardware, mounting all necessary file systems and
spawning all configured services.</para>
<para>On shutdown, the system manager stops all
services, unmounts all file systems (detaching the
storage technologies backing them), and then
(optionally) jumps back into the initrd code which
unmounts/detaches the root file system and the storage
it resides on. As a last step, the system is powered down.</para>
<para>On shutdown, the system manager stops all services, unmounts
all file systems (detaching the storage technologies backing
them), and then (optionally) jumps back into the initrd code which
unmounts/detaches the root file system and the storage it resides
on. As a last step, the system is powered down.</para>
<para>Additional information about the system boot
process may be found in
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
</refsect1>
<para>Additional information about the system boot process may be
found in
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
</refsect1>
<refsect1>
<title>System Manager Bootup</title>
<refsect1>
<title>System Manager Bootup</title>
<para>At boot, the system manager on the OS image is
responsible for initializing the required file
systems, services and drivers that are necessary for
operation of the system. On
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
systems, this process is split up in various discrete
steps which are exposed as target units. (See
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for detailed information about target units.) The
boot-up process is highly parallelized so that the
order in which specific target units are reached is not
deterministic, but still adheres to a limited amount
of ordering structure.</para>
<para>At boot, the system manager on the OS image is responsible
for initializing the required file systems, services and drivers
that are necessary for operation of the system. On
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
systems, this process is split up in various discrete steps which
are exposed as target units. (See
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for detailed information about target units.) The boot-up process
is highly parallelized so that the order in which specific target
units are reached is not deterministic, but still adheres to a
limited amount of ordering structure.</para>
<para>When systemd starts up the system, it will
activate all units that are dependencies of
<filename>default.target</filename> (as well as
recursively all dependencies of these
dependencies). Usually,
<filename>default.target</filename> is simply an alias
of <filename>graphical.target</filename> or
<filename>multi-user.target</filename>, depending on
whether the system is configured for a graphical UI or
only for a text console. To enforce minimal ordering
between the units pulled in, a number of well-known
target units are available, as listed on
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
<para>When systemd starts up the system, it will activate all
units that are dependencies of <filename>default.target</filename>
(as well as recursively all dependencies of these dependencies).
Usually, <filename>default.target</filename> is simply an alias of
<filename>graphical.target</filename> or
<filename>multi-user.target</filename>, depending on whether the
system is configured for a graphical UI or only for a text
console. To enforce minimal ordering between the units pulled in,
a number of well-known target units are available, as listed on
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para>
<para>The following chart is a structural overview of
these well-known units and their position in the
boot-up logic. The arrows describe which units are
pulled in and ordered before which other units. Units
near the top are started before units nearer to the
bottom of the chart.</para>
<para>The following chart is a structural overview of these
well-known units and their position in the boot-up logic. The
arrows describe which units are pulled in and ordered before which
other units. Units near the top are started before units nearer to
the bottom of the chart.</para>
<programlisting>local-fs-pre.target
|
@ -165,56 +154,48 @@
v
<emphasis>graphical.target</emphasis></programlisting>
<para>Target units that are commonly used as boot
targets are <emphasis>emphasized</emphasis>. These
units are good choices as goal targets, for
example by passing them to the
<varname>systemd.unit=</varname> kernel command line
option (see
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
or by symlinking <filename>default.target</filename>
to them.</para>
<para>Target units that are commonly used as boot targets are
<emphasis>emphasized</emphasis>. These units are good choices as
goal targets, for example by passing them to the
<varname>systemd.unit=</varname> kernel command line option (see
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>)
or by symlinking <filename>default.target</filename> to them.
</para>
<para><filename>timers.target</filename> is pulled-in
by <filename>basic.target</filename> asynchronously.
This allows timers units to depend on services which
become only available later in boot.</para>
</refsect1>
<para><filename>timers.target</filename> is pulled-in by
<filename>basic.target</filename> asynchronously. This allows
timers units to depend on services which become only available
later in boot.</para>
</refsect1>
<refsect1>
<title>Bootup in the Initial RAM Disk (initrd)</title>
<para>The initial RAM disk implementation (initrd) can
be set up using systemd as well. In this case, boot up
inside the initrd follows the following
structure.</para>
<refsect1>
<title>Bootup in the Initial RAM Disk (initrd)</title>
<para>The initial RAM disk implementation (initrd) can be set up
using systemd as well. In this case, boot up inside the initrd
follows the following structure.</para>
<para>The default target in the initrd is
<filename>initrd.target</filename>. The bootup process
begins identical to the system manager bootup (see
above) until it reaches
<filename>basic.target</filename>. From there, systemd
approaches the special target
<filename>initrd.target</filename>. If the root device
can be mounted at <filename>/sysroot</filename>, the
<filename>sysroot.mount</filename> unit becomes active
and <filename>initrd-root-fs.target</filename> is
reached. The service
<filename>initrd-parse-etc.service</filename> scans
<filename>/sysroot/etc/fstab</filename> for a possible
<filename>/usr</filename> mount point and additional
entries marked with the
<emphasis>x-initrd.mount</emphasis> option. All
entries found are mounted below
<filename>/sysroot</filename>, and
<filename>initrd-fs.target</filename> is reached. The
service <filename>initrd-cleanup.service</filename>
isolates to the
<filename>initrd-switch-root.target</filename>, where
cleanup services can run. As the very last step, the
<filename>initrd-switch-root.service</filename> is
activated, which will cause the system to switch its
root to <filename>/sysroot</filename>.
</para>
<para>The default target in the initrd is
<filename>initrd.target</filename>. The bootup process begins
identical to the system manager bootup (see above) until it
reaches <filename>basic.target</filename>. From there, systemd
approaches the special target <filename>initrd.target</filename>.
If the root device can be mounted at
<filename>/sysroot</filename>, the
<filename>sysroot.mount</filename> unit becomes active and
<filename>initrd-root-fs.target</filename> is reached. The service
<filename>initrd-parse-etc.service</filename> scans
<filename>/sysroot/etc/fstab</filename> for a possible
<filename>/usr</filename> mount point and additional entries
marked with the <emphasis>x-initrd.mount</emphasis> option. All
entries found are mounted below <filename>/sysroot</filename>, and
<filename>initrd-fs.target</filename> is reached. The service
<filename>initrd-cleanup.service</filename> isolates to the
<filename>initrd-switch-root.target</filename>, where cleanup
services can run. As the very last step, the
<filename>initrd-switch-root.service</filename> is activated,
which will cause the system to switch its root to
<filename>/sysroot</filename>.
</para>
<programlisting> : (beginning identical to above)
:
@ -266,18 +247,13 @@
|
v
Transition to Host OS</programlisting>
</refsect1>
<refsect1>
<title>System Manager Shutdown</title>
<para>System shutdown with systemd also consists of
various target units with some minimal ordering
structure applied:</para>
</refsect1>
<refsect1>
<title>System Manager Shutdown</title>
<para>System shutdown with systemd also consists of various target
units with some minimal ordering structure applied:</para>
<programlisting> (conflicts with (conflicts with
all system all file system
@ -306,18 +282,19 @@ systemd-reboot.service systemd-poweroff.service systemd-halt.service syste
v v v v
<emphasis>reboot.target</emphasis> <emphasis>poweroff.target</emphasis> <emphasis>halt.target</emphasis> <emphasis>kexec.target</emphasis></programlisting>
<para>Commonly used system shutdown targets are <emphasis>emphasized</emphasis>.</para>
</refsect1>
<para>Commonly used system shutdown targets are
<emphasis>emphasized</emphasis>.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.target</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>dracut</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "BUSCTL" "1" "" "systemd 218" "busctl"
.TH "BUSCTL" "1" "" "systemd 219" "busctl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -73,11 +73,6 @@ When showing messages being exchanged, show only the subset matching
\fIMATCH\fR\&.
.RE
.PP
\fB\-\-no\-legend\fR
.RS 4
Do not print the legend, i\&.e\&. the column headers and the footer\&.
.RE
.PP
\fB\-\-size=\fR
.RS 4
When used with the
@ -185,6 +180,16 @@ Execute the operation remotely\&. Specify a hostname, or a username and hostname
Execute operation on a local container\&. Specify a container name to connect to\&.
.RE
.PP
\fB\-\-no\-pager\fR
.RS 4
Do not pipe output into a pager\&.
.RE
.PP
\fB\-\-no\-legend\fR
.RS 4
Do not print the legend, i\&.e\&. column headers and the footer with hints\&.
.RE
.PP
\fB\-h\fR, \fB\-\-help\fR
.RS 4
Print a short help text and exit\&.
@ -194,11 +199,6 @@ Print a short help text and exit\&.
.RS 4
Print a short version string and exit\&.
.RE
.PP
\fB\-\-no\-pager\fR
.RS 4
Do not pipe output into a pager\&.
.RE
.SH "COMMANDS"
.PP
The following commands are understood:
@ -238,9 +238,9 @@ Shows an object tree of one or more services\&. If
is specified, show object tree of the specified services only\&. Otherwise, show all object trees of all services on the bus that acquired at least one well\-known name\&.
.RE
.PP
\fBintrospect\fR \fISERVICE\fR \fIOBJECT\fR
\fBintrospect\fR \fISERVICE\fR \fIOBJECT\fR [\fIINTERFACE\fR]
.RS 4
Show interfaces, methods, properties and signals of the specified object (identified by its path) on the specified service\&.
Show interfaces, methods, properties and signals of the specified object (identified by its path) on the specified service\&. If the interface argument is passed the output is limited to members of the specified interface\&.
.RE
.PP
\fBcall\fR \fISERVICE\fR \fIOBJECT\fR \fIINTERFACE\fR \fIMETHOD\fR [\fISIGNATURE\fR\ [\fIARGUMENT\fR...]]

View File

@ -19,8 +19,8 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="busctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>busctl — Introspect the bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">busctl</code> [OPTIONS...] [COMMAND] [<em class="replaceable"><code>NAME</code></em>...]</p></div></div><div class="refsect1"><a name="idm140615102621232"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>busctl</strong></span> may be used to
introspect and monitor the D-Bus bus.</p></div><div class="refsect1"><a name="idm140615102619488"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--address=ADDRESS"><span class="term"><code class="option">--address=<em class="replaceable"><code>ADDRESS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--address=ADDRESS"></a></dt><dd><p>Connect to the bus specified by
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="busctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>busctl — Introspect the bus</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">busctl</code> [OPTIONS...] [COMMAND] [<em class="replaceable"><code>NAME</code></em>...]</p></div></div><div class="refsect1"><a name="idm140613074880256"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>busctl</strong></span> may be used to
introspect and monitor the D-Bus bus.</p></div><div class="refsect1"><a name="idm140613074878512"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--address=ADDRESS"><span class="term"><code class="option">--address=<em class="replaceable"><code>ADDRESS</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--address=ADDRESS"></a></dt><dd><p>Connect to the bus specified by
<em class="replaceable"><code>ADDRESS</code></em> instead of using suitable
defaults for either the system or user bus (see
<code class="option">--system</code> and <code class="option">--user</code>
@ -35,9 +35,7 @@
only "well-known" names will be shown.</p></dd><dt id="--activatable"><span class="term"><code class="option">--activatable</code></span><a class="headerlink" title="Permalink to this term" href="#--activatable"></a></dt><dd><p>When showing the list of endpoints, show
only endpoints which have actually not been activated yet,
but may be started automatically if accessed.</p></dd><dt id="--match=MATCH"><span class="term"><code class="option">--match=<em class="replaceable"><code>MATCH</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--match=MATCH"></a></dt><dd><p>When showing messages being exchanged, show only the
subset matching <em class="replaceable"><code>MATCH</code></em>.</p></dd><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend"></a></dt><dd><p>Do not print the legend,
i.e. the column headers and the
footer.</p></dd><dt id="--size="><span class="term"><code class="option">--size=</code></span><a class="headerlink" title="Permalink to this term" href="#--size="></a></dt><dd><p>When used with the <span class="command"><strong>capture</strong></span> command
subset matching <em class="replaceable"><code>MATCH</code></em>.</p></dd><dt id="--size="><span class="term"><code class="option">--size=</code></span><a class="headerlink" title="Permalink to this term" href="#--size="></a></dt><dd><p>When used with the <span class="command"><strong>capture</strong></span> command
specifies the maximum bus message size to capture
("snaplen"). Defaults to 4096 bytes.</p></dd><dt id="--list"><span class="term"><code class="option">--list</code></span><a class="headerlink" title="Permalink to this term" href="#--list"></a></dt><dd><p>When used with the <span class="command"><strong>tree</strong></span> command shows a
flat list of object paths instead of a tree.</p></dd><dt id="--quiet"><span class="term"><code class="option">--quiet</code></span><a class="headerlink" title="Permalink to this term" href="#--quiet"></a></dt><dd><p>When used with the <span class="command"><strong>call</strong></span> command
@ -89,8 +87,9 @@
instance. Container names may be enumerated with
<span class="command"><strong>machinectl -H
<em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M"></a></dt><dd><p><a name="machine-text"></a>Execute operation on a local container. Specify a
container name to connect to.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager"></a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm140615101541984"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands"></a></h2><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="list"><span class="term"><span class="command"><strong>list</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list"></a></dt><dd><p>Show service names on the bus. This is the
container name to connect to.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager"></a></dt><dd><p>Do not pipe output into a pager.</p></dd><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend"></a></dt><dd><p>Do not print the legend, i.e. column headers and the
footer with hints.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div></div><div class="refsect1"><a name="idm140613073806304"></a><h2 id="Commands">Commands<a class="headerlink" title="Permalink to this headline" href="#Commands"></a></h2><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="list"><span class="term"><span class="command"><strong>list</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list"></a></dt><dd><p>Show service names on the bus. This is the
default if no command is specified.</p></dd><dt id="status SERVICE"><span class="term"><span class="command"><strong>status</strong></span> [<em class="replaceable"><code>SERVICE</code></em>]</span><a class="headerlink" title="Permalink to this term" href="#status%20SERVICE"></a></dt><dd><p>Show process information and credentials of a
bus service (if one is specified by its unique or well-known
name), a process (if one is specified by its numeric PID), or
@ -108,9 +107,11 @@
services. If <em class="replaceable"><code>SERVICE</code></em> is specified,
show object tree of the specified services only. Otherwise,
show all object trees of all services on the bus that acquired
at least one well-known name.</p></dd><dt id="introspect SERVICE OBJECT"><span class="term"><span class="command"><strong>introspect</strong></span> <em class="replaceable"><code>SERVICE</code></em> <em class="replaceable"><code>OBJECT</code></em> </span><a class="headerlink" title="Permalink to this term" href="#introspect%20SERVICE%20OBJECT"></a></dt><dd><p>Show interfaces, methods, properties and
at least one well-known name.</p></dd><dt id="introspect SERVICE OBJECT INTERFACE"><span class="term"><span class="command"><strong>introspect</strong></span> <em class="replaceable"><code>SERVICE</code></em> <em class="replaceable"><code>OBJECT</code></em> [<em class="replaceable"><code>INTERFACE</code></em>]</span><a class="headerlink" title="Permalink to this term" href="#introspect%20SERVICE%20OBJECT%20INTERFACE"></a></dt><dd><p>Show interfaces, methods, properties and
signals of the specified object (identified by its path) on
the specified service.</p></dd><dt id="call SERVICE OBJECT INTERFACE METHOD SIGNATURE ARGUMENT"><span class="term"><span class="command"><strong>call</strong></span> <em class="replaceable"><code>SERVICE</code></em> <em class="replaceable"><code>OBJECT</code></em> <em class="replaceable"><code>INTERFACE</code></em> <em class="replaceable"><code>METHOD</code></em> [<em class="replaceable"><code>SIGNATURE</code></em> [<em class="replaceable"><code>ARGUMENT</code></em>...]]</span><a class="headerlink" title="Permalink to this term" href="#call%20SERVICE%20OBJECT%20INTERFACE%20METHOD%20SIGNATURE%20ARGUMENT"></a></dt><dd><p>Invoke a method and show the response. Takes a
the specified service. If the interface argument is passed the
output is limited to members of the specified
interface.</p></dd><dt id="call SERVICE OBJECT INTERFACE METHOD SIGNATURE ARGUMENT"><span class="term"><span class="command"><strong>call</strong></span> <em class="replaceable"><code>SERVICE</code></em> <em class="replaceable"><code>OBJECT</code></em> <em class="replaceable"><code>INTERFACE</code></em> <em class="replaceable"><code>METHOD</code></em> [<em class="replaceable"><code>SIGNATURE</code></em> [<em class="replaceable"><code>ARGUMENT</code></em>...]]</span><a class="headerlink" title="Permalink to this term" href="#call%20SERVICE%20OBJECT%20INTERFACE%20METHOD%20SIGNATURE%20ARGUMENT"></a></dt><dd><p>Invoke a method and show the response. Takes a
service name, object path, interface name and method name. If
parameters shall be passed to the method call a signature
string is required, followed by the arguments, individually
@ -125,7 +126,7 @@
more elaborate output format.</p></dd><dt id="set-property SERVICE OBJECT INTERFACE PROPERTY SIGNATURE ARGUMENT"><span class="term"><span class="command"><strong>set-property</strong></span> <em class="replaceable"><code>SERVICE</code></em> <em class="replaceable"><code>OBJECT</code></em> <em class="replaceable"><code>INTERFACE</code></em> <em class="replaceable"><code>PROPERTY</code></em> <em class="replaceable"><code>SIGNATURE</code></em> <em class="replaceable"><code>ARGUMENT</code></em>... </span><a class="headerlink" title="Permalink to this term" href="#set-property%20SERVICE%20OBJECT%20INTERFACE%20PROPERTY%20SIGNATURE%20ARGUMENT"></a></dt><dd><p>Set the current value an object
property. Takes a service name, object path, interface name,
property name, property signature, followed by a list of
parameters formatted as strings.</p></dd><dt id="help"><span class="term"><span class="command"><strong>help</strong></span></span><a class="headerlink" title="Permalink to this term" href="#help"></a></dt><dd><p>Show command syntax help.</p></dd></dl></div></div><div class="refsect1"><a name="idm140615101496672"></a><h2 id="Parameter Formatting">Parameter Formatting<a class="headerlink" title="Permalink to this headline" href="#Parameter%20Formatting"></a></h2><p>The <span class="command"><strong>call</strong></span> and
parameters formatted as strings.</p></dd><dt id="help"><span class="term"><span class="command"><strong>help</strong></span></span><a class="headerlink" title="Permalink to this term" href="#help"></a></dt><dd><p>Show command syntax help.</p></dd></dl></div></div><div class="refsect1"><a name="idm140613073759888"></a><h2 id="Parameter Formatting">Parameter Formatting<a class="headerlink" title="Permalink to this headline" href="#Parameter%20Formatting"></a></h2><p>The <span class="command"><strong>call</strong></span> and
<span class="command"><strong>set-property</strong></span> commands take a signature string
followed by a list of parameters formatted as string (for details
on D-Bus signature strings see the <a class="ulink" href="http://dbus.freedesktop.org/doc/dbus-specification.html#type-system" target="_top">Type
@ -161,7 +162,7 @@
understood, the <span class="command"><strong>call</strong></span> and
<span class="command"><strong>get-property</strong></span> commands may generate a more
verbose, multi-line output when passed the
<code class="option">--verbose</code> option.</p></div><div class="refsect1"><a name="idm140615101475488"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><div class="example"><a name="idm140615101474848"></a><p class="title"><b>Example 1. Write and Read a Property</b></p><div class="example-contents"><p>The following two commands first write a property and then
<code class="option">--verbose</code> option.</p></div><div class="refsect1"><a name="idm140613073738704"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><div class="example"><a name="idm140613073738064"></a><p class="title"><b>Example 1. Write and Read a Property</b></p><div class="example-contents"><p>The following two commands first write a property and then
read it back. The property is found on the
"<code class="literal">/org/freedesktop/systemd1</code>" object of the
"<code class="literal">org.freedesktop.systemd1</code>" service. The name of
@ -169,7 +170,7 @@
"<code class="literal">org.freedesktop.systemd1.Manager</code>"
interface. The property contains a single string:</p><pre class="programlisting"># busctl set-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LogLevel s debug
# busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager LogLevel
s "debug"</pre></div></div><br class="example-break"><div class="example"><a name="idm140615101470192"></a><p class="title"><b>Example 2. Terse and Verbose Output</b></p><div class="example-contents"><p>The following two commands read a property that contains
s "debug"</pre></div></div><br class="example-break"><div class="example"><a name="idm140613073733408"></a><p class="title"><b>Example 2. Terse and Verbose Output</b></p><div class="example-contents"><p>The following two commands read a property that contains
an array of strings, and first show it in terse format, followed
by verbose format:</p><pre class="programlisting">$ busctl get-property org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager Environment
as 2 "LANG=en_US.UTF-8" "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
@ -177,7 +178,7 @@ $ busctl get-property --verbose org.freedesktop.systemd1 /org/freedesktop/system
ARRAY "s" {
STRING "LANG=en_US.UTF-8";
STRING "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin";
};</pre></div></div><br class="example-break"><div class="example"><a name="idm140615101467776"></a><p class="title"><b>Example 3. Invoking a Method</b></p><div class="example-contents"><p>The following command invokes a the
};</pre></div></div><br class="example-break"><div class="example"><a name="idm140613073730992"></a><p class="title"><b>Example 3. Invoking a Method</b></p><div class="example-contents"><p>The following command invokes a the
"<code class="literal">StartUnit</code>" method on the
"<code class="literal">org.freedesktop.systemd1.Manager</code>"
interface of the
@ -188,7 +189,7 @@ ARRAY "s" {
"<code class="literal">replace</code>". As result of the method
call a single object path parameter is received and
shown:</p><pre class="programlisting"># busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager StartUnit ss "cups.service" "replace"
o "/org/freedesktop/systemd1/job/42684"</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140615101461824"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
o "/org/freedesktop/systemd1/job/42684"</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140613073725040"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="dbus-daemon.html"><span class="citerefentry"><span class="refentrytitle">dbus-daemon</span>(1)</span></a>,
<a class="ulink" href="http://freedesktop.org/wiki/Software/dbus" target="_top">D-Bus</a>,
<a class="ulink" href="https://code.google.com/p/d-bus/" target="_top">kdbus</a>,

View File

@ -3,22 +3,22 @@
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
This file is part of systemd.
Copyright 2014 Zbigniew Jędrzejewski-Szmek
Copyright 2014 Zbigniew Jędrzejewski-Szmek
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
-->
<refentry id="busctl"
@ -123,16 +123,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<!-- TODO: link to sd_bus_add_match when it is written? -->
</varlistentry>
<varlistentry>
<term><option>--no-legend</option></term>
<listitem>
<para>Do not print the legend,
i.e. the column headers and the
footer.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>--size=</option></term>
@ -251,9 +241,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
<xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
<xi:include href="standard-options.xml" xpointer="no-legend" />
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
</variablelist>
</refsect1>
@ -313,11 +304,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</varlistentry>
<varlistentry>
<term><command>introspect</command> <arg choice="plain"><replaceable>SERVICE</replaceable></arg> <arg choice="plain"><replaceable>OBJECT</replaceable></arg></term>
<term><command>introspect</command> <arg choice="plain"><replaceable>SERVICE</replaceable></arg> <arg choice="plain"><replaceable>OBJECT</replaceable></arg> <arg choice="opt"><replaceable>INTERFACE</replaceable></arg></term>
<listitem><para>Show interfaces, methods, properties and
signals of the specified object (identified by its path) on
the specified service.</para></listitem>
the specified service. If the interface argument is passed the
output is limited to members of the specified
interface.</para></listitem>
</varlistentry>
<varlistentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "COREDUMP\&.CONF" "5" "" "systemd 218" "coredump.conf"
.TH "COREDUMP\&.CONF" "5" "" "systemd 219" "coredump.conf"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View File

@ -19,7 +19,7 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="coredump.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredump.conf, coredump.conf.d — Coredump storage configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/coredump.conf</code></p><p><code class="filename">/etc/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/coredump.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm139981363469840"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>These files configure the behaviour of
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="coredump.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredump.conf, coredump.conf.d — Coredump storage configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/coredump.conf</code></p><p><code class="filename">/etc/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/coredump.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm140238536060400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>These files configure the behaviour of
<a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
a handler for core dumps invoked by the kernel.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<code class="filename">/etc/</code>, <code class="filename">/run/</code>, and
@ -45,7 +45,7 @@
<code class="filename">/etc/</code>. This file is read before any of the
configuration directories, and has the lowest precedence; entries in a file
in any configuration directory override entries in the single configuration
file.</p></div><div class="refsect1"><a name="idm139981363466160"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>All options are configured in the
file.</p></div><div class="refsect1"><a name="idm140238534823936"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>All options are configured in the
"<code class="literal">[Coredump]</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="Storage="><span class="term"><code class="varname">Storage=</code></span><a class="headerlink" title="Permalink to this term" href="#Storage="></a></dt><dd><p>Controls where to store cores. One of
"<code class="literal">none</code>", "<code class="literal">external</code>",
"<code class="literal">journal</code>", and "<code class="literal">both</code>". When
@ -75,7 +75,7 @@
by coredumps might temporarily exceed these limits while
coredumps are processed. Note that old coredumps are also
removed based on time via
<a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm139981367346272"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm140238535030304"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
<a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>,
<a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>

View File

@ -19,7 +19,7 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="coredump.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredump.conf, coredump.conf.d — Coredump storage configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/coredump.conf</code></p><p><code class="filename">/etc/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/coredump.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm139981363469840"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>These files configure the behaviour of
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="coredump.conf"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredump.conf, coredump.conf.d — Coredump storage configuration files</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/systemd/coredump.conf</code></p><p><code class="filename">/etc/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/run/systemd/coredump.conf.d/*.conf</code></p><p><code class="filename">/usr/lib/systemd/coredump.conf.d/*.conf</code></p></div><div class="refsect1"><a name="idm140238536060400"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>These files configure the behaviour of
<a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
a handler for core dumps invoked by the kernel.</p></div><div class="refsection"><a name="confd"></a><h2>Configuration Directories and Precedence</h2><p>Configuration files are read from directories in
<code class="filename">/etc/</code>, <code class="filename">/run/</code>, and
@ -45,7 +45,7 @@
<code class="filename">/etc/</code>. This file is read before any of the
configuration directories, and has the lowest precedence; entries in a file
in any configuration directory override entries in the single configuration
file.</p></div><div class="refsect1"><a name="idm139981363466160"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>All options are configured in the
file.</p></div><div class="refsect1"><a name="idm140238534823936"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>All options are configured in the
"<code class="literal">[Coredump]</code>" section:</p><div class="variablelist"><dl class="variablelist"><dt id="Storage="><span class="term"><code class="varname">Storage=</code></span><a class="headerlink" title="Permalink to this term" href="#Storage="></a></dt><dd><p>Controls where to store cores. One of
"<code class="literal">none</code>", "<code class="literal">external</code>",
"<code class="literal">journal</code>", and "<code class="literal">both</code>". When
@ -75,7 +75,7 @@
by coredumps might temporarily exceed these limits while
coredumps are processed. Note that old coredumps are also
removed based on time via
<a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm139981367346272"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm140238535030304"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
<a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>,
<a href="systemd-tmpfiles.html"><span class="citerefentry"><span class="refentrytitle">systemd-tmpfiles</span>(8)</span></a>

View File

@ -1,5 +1,4 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">

View File

@ -1,5 +1,5 @@
'\" t
.TH "COREDUMPCTL" "1" "" "systemd 218" "coredumpctl"
.TH "COREDUMPCTL" "1" "" "systemd 219" "coredumpctl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -35,7 +35,7 @@ The following options are understood:
.PP
\fB\-\-no\-legend\fR
.RS 4
Do not print the column headers\&.
Do not print column headers\&.
.RE
.PP
\fB\-1\fR
@ -158,7 +158,7 @@ On success, 0 is returned; otherwise, a non\-zero failure code is returned\&. No
.RE
.\}
.PP
\fBExample\ \&4.\ \&Extract the last coredump of /usr/bin/bar to a file named bar.coredump\fR
\fBExample\ \&4.\ \&Extract the last coredump of /usr/bin/bar to a file named bar\&.coredump\fR
.sp
.if n \{\
.RS 4

View File

@ -19,48 +19,37 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="coredumpctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredumpctl — Retrieve coredumps from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">coredumpctl</code> [OPTIONS...] {COMMAND} [PID|COMM|EXE|MATCH...]</p></div></div><div class="refsect1"><a name="idm139813662265248"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>coredumpctl</strong></span> may be used to
retrieve coredumps from
<a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm139813662262656"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend"></a></dt><dd><p>Do not print the column headers.
</p></dd><dt id="-1"><span class="term"><code class="option">-1</code></span><a class="headerlink" title="Permalink to this term" href="#-1"></a></dt><dd><p>Show information of a
single coredump only, instead of
listing all known coredumps.
</p></dd><dt id="-F"><span class="term"><code class="option">-F</code>, </span><span class="term"><code class="option">--field=</code></span><a class="headerlink" title="Permalink to this term" href="#-F"></a></dt><dd><p>Print all possible
data values the specified field
takes in matching coredump entries of the
journal.</p></dd><dt id="-o"><span class="term"><code class="option">-o</code>, </span><span class="term"><code class="option">--output=FILE</code></span><a class="headerlink" title="Permalink to this term" href="#-o"></a></dt><dd><p>Write the core to
<code class="option">FILE</code>.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager"></a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="list"><span class="term"><span class="command"><strong>list</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list"></a></dt><dd><p>List coredumps
captured in the journal matching
specified characteristics. If no
command is specified, this is the
implied default.</p></dd><dt id="info"><span class="term"><span class="command"><strong>info</strong></span></span><a class="headerlink" title="Permalink to this term" href="#info"></a></dt><dd><p>Show detailed
information about coredumps captured
in the journal.</p></dd><dt id="dump"><span class="term"><span class="command"><strong>dump</strong></span></span><a class="headerlink" title="Permalink to this term" href="#dump"></a></dt><dd><p>Extract the last coredump
matching specified characteristics.
The coredump will be written on standard output,
unless an output file is specified with
<code class="option">-o/--output</code>.
</p></dd><dt id="gdb"><span class="term"><span class="command"><strong>gdb</strong></span></span><a class="headerlink" title="Permalink to this term" href="#gdb"></a></dt><dd><p>Invoke the GNU
debugger on the last coredump matching
specified characteristics.
</p></dd></dl></div></div><div class="refsect1"><a name="idm139813666142544"></a><h2 id="Matching">Matching<a class="headerlink" title="Permalink to this headline" href="#Matching"></a></h2><p>A match can be:</p><div class="variablelist"><dl class="variablelist"><dt id="PID"><span class="term"><em class="replaceable"><code>PID</code></em></span><a class="headerlink" title="Permalink to this term" href="#PID"></a></dt><dd><p>Process ID of the
process that dumped
core. An integer.</p></dd><dt id="COMM"><span class="term"><em class="replaceable"><code>COMM</code></em></span><a class="headerlink" title="Permalink to this term" href="#COMM"></a></dt><dd><p>Name of the executable
(matches <code class="option">COREDUMP_COMM=</code>).
Must not contain slashes.
</p></dd><dt id="EXE"><span class="term"><em class="replaceable"><code>EXE</code></em></span><a class="headerlink" title="Permalink to this term" href="#EXE"></a></dt><dd><p>Path to the executable
(matches <code class="option">COREDUMP_EXE=</code>).
Must contain at least one slash.
</p></dd><dt id="MATCH"><span class="term"><em class="replaceable"><code>MATCH</code></em></span><a class="headerlink" title="Permalink to this term" href="#MATCH"></a></dt><dd><p>General journalctl predicates
(see <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>).
Must contain an equal sign.
</p></dd></dl></div></div><div class="refsect1"><a name="idm139813666125792"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned; otherwise, a non-zero failure
code is returned. Not finding any matching coredumps is treated
as failure.
</p></div><div class="refsect1"><a name="idm139813666124416"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><div class="example"><a name="idm139813666123744"></a><p class="title"><b>Example 1. List all the coredumps of a program named foo</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl list foo</pre></div></div><br class="example-break"><div class="example"><a name="idm139813666122288"></a><p class="title"><b>Example 2. Invoke gdb on the last coredump</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl gdb</pre></div></div><br class="example-break"><div class="example"><a name="idm139813666120784"></a><p class="title"><b>Example 3. Show information about a process that dumped core, matching by its PID 6654</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl info 6654</pre></div></div><br class="example-break"><div class="example"><a name="idm139813666119328"></a><p class="title"><b>Example 4. Extract the last coredump of /usr/bin/bar to a file named bar.coredump</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl -o bar.coredump dump /usr/bin/bar</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139813666117776"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
<a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>,
<a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man1/gdb.1.html"><span class="citerefentry"><span class="refentrytitle">gdb</span>(1)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="coredumpctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>coredumpctl — Retrieve coredumps from the journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">coredumpctl</code> [OPTIONS...] {COMMAND} [PID|COMM|EXE|MATCH...]</p></div></div><div class="refsect1"><a name="idm139775730512512"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>coredumpctl</strong></span> may be used to
retrieve coredumps from
<a href="systemd-journald.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm139775730520240"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-legend"><span class="term"><code class="option">--no-legend</code></span><a class="headerlink" title="Permalink to this term" href="#--no-legend"></a></dt><dd><p>Do not print column headers.
</p></dd><dt id="-1"><span class="term"><code class="option">-1</code></span><a class="headerlink" title="Permalink to this term" href="#-1"></a></dt><dd><p>Show information of a single coredump only,
instead of listing all known coredumps. </p></dd><dt id="-F"><span class="term"><code class="option">-F</code>, </span><span class="term"><code class="option">--field=</code></span><a class="headerlink" title="Permalink to this term" href="#-F"></a></dt><dd><p>Print all possible data values the specified
field takes in matching coredump entries of the
journal.</p></dd><dt id="-o"><span class="term"><code class="option">-o</code>, </span><span class="term"><code class="option">--output=FILE</code></span><a class="headerlink" title="Permalink to this term" href="#-o"></a></dt><dd><p>Write the core to <code class="option">FILE</code>.
</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager"></a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="list"><span class="term"><span class="command"><strong>list</strong></span></span><a class="headerlink" title="Permalink to this term" href="#list"></a></dt><dd><p>List coredumps captured in the journal
matching specified characteristics. If no command is
specified, this is the implied default.</p></dd><dt id="info"><span class="term"><span class="command"><strong>info</strong></span></span><a class="headerlink" title="Permalink to this term" href="#info"></a></dt><dd><p>Show detailed information about coredumps
captured in the journal.</p></dd><dt id="dump"><span class="term"><span class="command"><strong>dump</strong></span></span><a class="headerlink" title="Permalink to this term" href="#dump"></a></dt><dd><p>Extract the last coredump matching specified
characteristics. The coredump will be written on standard
output, unless an output file is specified with
<code class="option">-o/--output</code>. </p></dd><dt id="gdb"><span class="term"><span class="command"><strong>gdb</strong></span></span><a class="headerlink" title="Permalink to this term" href="#gdb"></a></dt><dd><p>Invoke the GNU debugger on the last coredump
matching specified characteristics. </p></dd></dl></div></div><div class="refsect1"><a name="idm139775732333232"></a><h2 id="Matching">Matching<a class="headerlink" title="Permalink to this headline" href="#Matching"></a></h2><p>A match can be:</p><div class="variablelist"><dl class="variablelist"><dt id="PID"><span class="term"><em class="replaceable"><code>PID</code></em></span><a class="headerlink" title="Permalink to this term" href="#PID"></a></dt><dd><p>Process ID of the
process that dumped
core. An integer.</p></dd><dt id="COMM"><span class="term"><em class="replaceable"><code>COMM</code></em></span><a class="headerlink" title="Permalink to this term" href="#COMM"></a></dt><dd><p>Name of the executable (matches
<code class="option">COREDUMP_COMM=</code>). Must not contain slashes.
</p></dd><dt id="EXE"><span class="term"><em class="replaceable"><code>EXE</code></em></span><a class="headerlink" title="Permalink to this term" href="#EXE"></a></dt><dd><p>Path to the executable (matches
<code class="option">COREDUMP_EXE=</code>). Must contain at least one
slash. </p></dd><dt id="MATCH"><span class="term"><em class="replaceable"><code>MATCH</code></em></span><a class="headerlink" title="Permalink to this term" href="#MATCH"></a></dt><dd><p>General journalctl predicates (see
<a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>).
Must contain an equal sign. </p></dd></dl></div></div><div class="refsect1"><a name="idm139775730263920"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned; otherwise, a non-zero failure
code is returned. Not finding any matching coredumps is treated as
failure.
</p></div><div class="refsect1"><a name="idm139775731940864"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples"></a></h2><div class="example"><a name="idm139775730835696"></a><p class="title"><b>Example 1. List all the coredumps of a program named foo</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl list foo</pre></div></div><br class="example-break"><div class="example"><a name="idm139775732504096"></a><p class="title"><b>Example 2. Invoke gdb on the last coredump</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl gdb</pre></div></div><br class="example-break"><div class="example"><a name="idm139775733320192"></a><p class="title"><b>Example 3. Show information about a process that dumped core,
matching by its PID 6654</b></p><div class="example-contents"><pre class="programlisting"># coredumpctl info 6654</pre></div></div><br class="example-break"><div class="example"><a name="idm139775731323344"></a><p class="title"><b>Example 4. Extract the last coredump of /usr/bin/bar to a file named
<code class="filename">bar.coredump</code></b></p><div class="example-contents"><pre class="programlisting"># coredumpctl -o bar.coredump dump /usr/bin/bar</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm139775732394720"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
<a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>,
<a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man1/gdb.1.html"><span class="citerefentry"><span class="refentrytitle">gdb</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -1,6 +1,6 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
@ -22,227 +22,216 @@
-->
<refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
xmlns:xi="http://www.w3.org/2001/XInclude">
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>coredumpctl</title>
<productname>systemd</productname>
<refentryinfo>
<title>coredumpctl</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Zbigniew</firstname>
<surname>Jędrzejewski-Szmek</surname>
<email>zbyszek@in.waw.pl</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Zbigniew</firstname>
<surname>Jędrzejewski-Szmek</surname>
<email>zbyszek@in.waw.pl</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>coredumpctl</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>coredumpctl</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>coredumpctl</refname>
<refpurpose>Retrieve coredumps from the journal</refpurpose>
</refnamediv>
<refnamediv>
<refname>coredumpctl</refname>
<refpurpose>Retrieve coredumps from the journal</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>coredumpctl</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="req">COMMAND</arg>
<arg choice="opt" rep="repeat">PID|COMM|EXE|MATCH</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>coredumpctl</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="req">COMMAND</arg>
<arg choice="opt" rep="repeat">PID|COMM|EXE|MATCH</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para><command>coredumpctl</command> may be used to
retrieve coredumps from
<citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
</refsect1>
<para><command>coredumpctl</command> may be used to
retrieve coredumps from
<citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
</refsect1>
<refsect1>
<title>Options</title>
<refsect1>
<title>Options</title>
<para>The following options are understood:</para>
<para>The following options are understood:</para>
<variablelist>
<varlistentry>
<term><option>--no-legend</option></term>
<variablelist>
<varlistentry>
<term><option>--no-legend</option></term>
<listitem><para>Do not print the column headers.
</para></listitem>
</varlistentry>
<listitem><para>Do not print column headers.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-1</option></term>
<varlistentry>
<term><option>-1</option></term>
<listitem><para>Show information of a
single coredump only, instead of
listing all known coredumps.
</para></listitem>
</varlistentry>
<listitem><para>Show information of a single coredump only,
instead of listing all known coredumps. </para></listitem>
</varlistentry>
<varlistentry>
<term><option>-F</option></term>
<term><option>--field=</option></term>
<varlistentry>
<term><option>-F</option></term>
<term><option>--field=</option></term>
<listitem><para>Print all possible
data values the specified field
takes in matching coredump entries of the
journal.</para></listitem>
</varlistentry>
<listitem><para>Print all possible data values the specified
field takes in matching coredump entries of the
journal.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-o</option></term>
<term><option>--output=FILE</option></term>
<varlistentry>
<term><option>-o</option></term>
<term><option>--output=FILE</option></term>
<listitem><para>Write the core to
<option>FILE</option>.</para></listitem>
</varlistentry>
<listitem><para>Write the core to <option>FILE</option>.
</para></listitem>
</varlistentry>
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
</variablelist>
</variablelist>
<para>The following commands are understood:</para>
<para>The following commands are understood:</para>
<variablelist>
<varlistentry>
<term><command>list</command></term>
<variablelist>
<varlistentry>
<term><command>list</command></term>
<listitem><para>List coredumps
captured in the journal matching
specified characteristics. If no
command is specified, this is the
implied default.</para></listitem>
</varlistentry>
<listitem><para>List coredumps captured in the journal
matching specified characteristics. If no command is
specified, this is the implied default.</para></listitem>
</varlistentry>
<varlistentry>
<term><command>info</command></term>
<varlistentry>
<term><command>info</command></term>
<listitem><para>Show detailed
information about coredumps captured
in the journal.</para></listitem>
</varlistentry>
<listitem><para>Show detailed information about coredumps
captured in the journal.</para></listitem>
</varlistentry>
<varlistentry>
<term><command>dump</command></term>
<varlistentry>
<term><command>dump</command></term>
<listitem><para>Extract the last coredump
matching specified characteristics.
The coredump will be written on standard output,
unless an output file is specified with
<option>-o/--output</option>.
</para></listitem>
</varlistentry>
<listitem><para>Extract the last coredump matching specified
characteristics. The coredump will be written on standard
output, unless an output file is specified with
<option>-o/--output</option>. </para></listitem>
</varlistentry>
<varlistentry>
<term><command>gdb</command></term>
<varlistentry>
<term><command>gdb</command></term>
<listitem><para>Invoke the GNU
debugger on the last coredump matching
specified characteristics.
</para></listitem>
</varlistentry>
<listitem><para>Invoke the GNU debugger on the last coredump
matching specified characteristics. </para></listitem>
</varlistentry>
</variablelist>
</variablelist>
</refsect1>
</refsect1>
<refsect1>
<title>Matching</title>
<refsect1>
<title>Matching</title>
<para>A match can be:</para>
<para>A match can be:</para>
<variablelist>
<varlistentry>
<term><replaceable>PID</replaceable></term>
<variablelist>
<varlistentry>
<term><replaceable>PID</replaceable></term>
<listitem><para>Process ID of the
process that dumped
core. An integer.</para></listitem>
</varlistentry>
<listitem><para>Process ID of the
process that dumped
core. An integer.</para></listitem>
</varlistentry>
<varlistentry>
<term><replaceable>COMM</replaceable></term>
<varlistentry>
<term><replaceable>COMM</replaceable></term>
<listitem><para>Name of the executable
(matches <option>COREDUMP_COMM=</option>).
Must not contain slashes.
</para></listitem>
</varlistentry>
<listitem><para>Name of the executable (matches
<option>COREDUMP_COMM=</option>). Must not contain slashes.
</para></listitem>
</varlistentry>
<varlistentry>
<term><replaceable>EXE</replaceable></term>
<varlistentry>
<term><replaceable>EXE</replaceable></term>
<listitem><para>Path to the executable
(matches <option>COREDUMP_EXE=</option>).
Must contain at least one slash.
</para></listitem>
</varlistentry>
<listitem><para>Path to the executable (matches
<option>COREDUMP_EXE=</option>). Must contain at least one
slash. </para></listitem>
</varlistentry>
<varlistentry>
<term><replaceable>MATCH</replaceable></term>
<varlistentry>
<term><replaceable>MATCH</replaceable></term>
<listitem><para>General journalctl predicates
(see <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
Must contain an equal sign.
</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<listitem><para>General journalctl predicates (see
<citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
Must contain an equal sign. </para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Exit status</title>
<para>On success, 0 is returned; otherwise, a non-zero failure
code is returned. Not finding any matching coredumps is treated
as failure.
</para>
</refsect1>
<refsect1>
<title>Exit status</title>
<para>On success, 0 is returned; otherwise, a non-zero failure
code is returned. Not finding any matching coredumps is treated as
failure.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<refsect1>
<title>Examples</title>
<example>
<title>List all the coredumps of a program named foo</title>
<example>
<title>List all the coredumps of a program named foo</title>
<programlisting># coredumpctl list foo</programlisting>
</example>
<programlisting># coredumpctl list foo</programlisting>
</example>
<example>
<title>Invoke gdb on the last coredump</title>
<example>
<title>Invoke gdb on the last coredump</title>
<programlisting># coredumpctl gdb</programlisting>
</example>
<programlisting># coredumpctl gdb</programlisting>
</example>
<example>
<title>Show information about a process that dumped core, matching by its PID 6654</title>
<example>
<title>Show information about a process that dumped core,
matching by its PID 6654</title>
<programlisting># coredumpctl info 6654</programlisting>
</example>
<programlisting># coredumpctl info 6654</programlisting>
</example>
<example>
<title>Extract the last coredump of /usr/bin/bar to a file named bar.coredump</title>
<example>
<title>Extract the last coredump of /usr/bin/bar to a file named
<filename noindex="true">bar.coredump</filename></title>
<programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
</example>
</refsect1>
<programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
</example>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "CRYPTTAB" "5" "" "systemd 218" "crypttab"
.TH "CRYPTTAB" "5" "" "systemd 219" "crypttab"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -78,6 +78,13 @@ Specifies the hash to use for password hashing\&. See
for possible values and the default value of this option\&.
.RE
.PP
\fBheader=\fR
.RS 4
Use a detached (separated) metadata device or file where the LUKS header is stored\&. This option is only relevant for LUKS devices\&. See
\fBcryptsetup\fR(8)
for possible values and the default value of this option\&.
.RE
.PP
\fBkeyfile\-offset=\fR
.RS 4
Specifies the number of bytes to skip at the start of the key file\&. See
@ -198,7 +205,7 @@ Specifies the timeout for querying for a password\&. If no unit is specified, se
.PP
\fBx\-systemd\&.device\-timeout=\fR
.RS 4
Specifies how long systemd should wait for a device to show up before giving up on the entry\&. The argument is a time in seconds or explicitly specifified units of
Specifies how long systemd should wait for a device to show up before giving up on the entry\&. The argument is a time in seconds or explicitly specified units of
"s",
"min",
"h",
@ -240,9 +247,9 @@ Set up four encrypted block devices\&. One using LUKS for normal storage, anothe
.\}
.nf
luks UUID=2505567a\-9e27\-4efe\-a4d5\-15ad146c258b
swap /dev/sda7 /dev/urandom swap
swap /dev/sda7 /dev/urandom swap
truecrypt /dev/sda2 /etc/container_password tcrypt
hidden /mnt/tc_hidden /dev/null tcrypt\-hidden,tcrypt\-keyfile=/etc/keyfile
hidden /mnt/tc_hidden /dev/null tcrypt\-hidden,tcrypt\-keyfile=/etc/keyfile
.fi
.if n \{\
.RE

View File

@ -19,160 +19,143 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="crypttab"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>crypttab — Configuration for encrypted block devices</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/crypttab</code></p></div><div class="refsect1"><a name="idm140208008975968"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>The <code class="filename">/etc/crypttab</code> file
describes encrypted block devices that are set up
during system boot.</p><p>Empty lines and lines starting with the "<code class="literal">#</code>"
character are ignored. Each of the remaining lines
describes one encrypted block device, fields on the
line are delimited by white space. The first two
fields are mandatory, the remaining two are
optional.</p><p>Setting up encrypted block devices using this file
supports three encryption modes: LUKS, TrueCrypt and plain.
See <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for more information about each mode. When no mode is specified
in the options field and the block device contains a LUKS
signature, it is opened as a LUKS device; otherwise, it is
assumed to be in raw dm-crypt (plain mode) format.</p><p>The first field contains the name of the
resulting encrypted block device; the device is set up
within <code class="filename">/dev/mapper/</code>.</p><p>The second field contains a path to the
underlying block device or file, or a specification of a block
device via "<code class="literal">UUID=</code>" followed by the
UUID.</p><p>The third field specifies the encryption
password. If the field is not present or the password
is set to "<code class="literal">none</code>" or "<code class="literal">-</code>",
the password has to be manually entered during system boot.
Otherwise, the field is interpreted as a absolute path to
a file containing the encryption password. For swap encryption,
<code class="filename">/dev/urandom</code> or the hardware
device <code class="filename">/dev/hw_random</code> can be used
as the password file; using
<code class="filename">/dev/random</code> may prevent boot
completion if the system does not have enough entropy
to generate a truly random encryption key.</p><p>The fourth field, if present, is a
comma-delimited list of options. The following
options are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="discard"><span class="term"><code class="option">discard</code></span><a class="headerlink" title="Permalink to this term" href="#discard"></a></dt><dd><p>Allow discard requests to be
passed through the encrypted block device. This
improves performance on SSD storage but has
security implications.</p></dd><dt id="cipher="><span class="term"><code class="option">cipher=</code></span><a class="headerlink" title="Permalink to this term" href="#cipher="></a></dt><dd><p>Specifies the cipher to use. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of
this option. A cipher with unpredictable IV
values, such as "<code class="literal">aes-cbc-essiv:sha256</code>",
is recommended.</p></dd><dt id="hash="><span class="term"><code class="option">hash=</code></span><a class="headerlink" title="Permalink to this term" href="#hash="></a></dt><dd><p>Specifies the hash to use for
password hashing. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of
this option.</p></dd><dt id="keyfile-offset="><span class="term"><code class="option">keyfile-offset=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-offset="></a></dt><dd><p>Specifies the number of bytes to
skip at the start of the key file. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of
this option.</p></dd><dt id="keyfile-size="><span class="term"><code class="option">keyfile-size=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-size="></a></dt><dd><p>Specifies the maximum number
of bytes to read from the key file. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of
this option. This option is ignored in plain
encryption mode, as the key file size is then
given by the key size.</p></dd><dt id="key-slot="><span class="term"><code class="option">key-slot=</code></span><a class="headerlink" title="Permalink to this term" href="#key-slot="></a></dt><dd><p>Specifies the key slot to
compare the passphrase or key against.
If the key slot does not match the given
passphrase or key, but another would, the
setup of the device will fail regardless.
This option implies <code class="option">luks</code>. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values. The default is to try
all key slots in sequential order.</p></dd><dt id="luks"><span class="term"><code class="option">luks</code></span><a class="headerlink" title="Permalink to this term" href="#luks"></a></dt><dd><p>Force LUKS mode. When this mode
is used, the following options are ignored since
they are provided by the LUKS header on the
device: <code class="option">cipher=</code>,
<code class="option">hash=</code>,
<code class="option">size=</code>.</p></dd><dt id="noauto"><span class="term"><code class="option">noauto</code></span><a class="headerlink" title="Permalink to this term" href="#noauto"></a></dt><dd><p>This device will not be
automatically unlocked on boot.</p></dd><dt id="nofail"><span class="term"><code class="option">nofail</code></span><a class="headerlink" title="Permalink to this term" href="#nofail"></a></dt><dd><p>The system will not wait for the
device to show up and be unlocked at boot, and
not fail the boot if it does not show up.</p></dd><dt id="plain"><span class="term"><code class="option">plain</code></span><a class="headerlink" title="Permalink to this term" href="#plain"></a></dt><dd><p>Force plain encryption mode.</p></dd><dt id="read-only"><span class="term"><code class="option">read-only</code>, </span><span class="term"><code class="option">readonly</code></span><a class="headerlink" title="Permalink to this term" href="#read-only"></a></dt><dd><p>Set up the encrypted block
device in read-only mode.</p></dd><dt id="size="><span class="term"><code class="option">size=</code></span><a class="headerlink" title="Permalink to this term" href="#size="></a></dt><dd><p>Specifies the key size
in bits. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of
this option.</p></dd><dt id="swap"><span class="term"><code class="option">swap</code></span><a class="headerlink" title="Permalink to this term" href="#swap"></a></dt><dd><p>The encrypted block device will
be used as a swap device, and will be formatted
accordingly after setting up the encrypted
block device, with
<a href="http://man7.org/linux/man-pages/man8/mkswap.8.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>.
This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">swap</code>
option will destroy the contents of the named
partition during every boot, so make sure the
underlying block device is specified correctly.</p></dd><dt id="tcrypt"><span class="term"><code class="option">tcrypt</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt"></a></dt><dd><p>Use TrueCrypt encryption mode.
When this mode is used, the following options are
ignored since they are provided by the TrueCrypt
header on the device or do not apply:
<code class="option">cipher=</code>,
<code class="option">hash=</code>,
<code class="option">keyfile-offset=</code>,
<code class="option">keyfile-size=</code>,
<code class="option">size=</code>.</p><p>When this mode is used, the passphrase is
read from the key file given in the third field.
Only the first line of this file is read,
excluding the new line character.</p><p>Note that the TrueCrypt format uses both
passphrase and key files to derive a password
for the volume. Therefore, the passphrase and
all key files need to be provided. Use
<code class="option">tcrypt-keyfile=</code> to provide
the absolute path to all key files. When using
an empty passphrase in combination with one or
more key files, use "<code class="literal">/dev/null</code>"
as the password file in the third field.</p></dd><dt id="tcrypt-hidden"><span class="term"><code class="option">tcrypt-hidden</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-hidden"></a></dt><dd><p>Use the hidden TrueCrypt volume.
This option implies <code class="option">tcrypt</code>.</p><p>This will map the hidden volume that is
inside of the volume provided in the second
field. Please note that there is no protection
for the hidden volume if the outer volume is
mounted instead. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for more information on this limitation.</p></dd><dt id="tcrypt-keyfile="><span class="term"><code class="option">tcrypt-keyfile=</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-keyfile="></a></dt><dd><p>Specifies the absolute path to a
key file to use for a TrueCrypt volume. This
implies <code class="option">tcrypt</code> and can be
used more than once to provide several key
files.</p><p>See the entry for <code class="option">tcrypt</code>
on the behavior of the passphrase and key files
when using TrueCrypt encryption mode.</p></dd><dt id="tcrypt-system"><span class="term"><code class="option">tcrypt-system</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-system"></a></dt><dd><p>Use TrueCrypt in system
encryption mode. This option implies
<code class="option">tcrypt</code>.</p></dd><dt id="timeout="><span class="term"><code class="option">timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#timeout="></a></dt><dd><p>Specifies the timeout for
querying for a password. If no unit is
specified, seconds is used. Supported units are
s, ms, us, min, h, d. A timeout of 0 waits
indefinitely (which is the default).</p></dd><dt id="x-systemd.device-timeout="><span class="term"><code class="option">x-systemd.device-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.device-timeout="></a></dt><dd><p>Specifies how long
systemd should wait for a device to
show up before giving up on the
entry. The argument is a time in
seconds or explicitly specifified
units of "<code class="literal">s</code>",
"<code class="literal">min</code>",
"<code class="literal">h</code>",
"<code class="literal">ms</code>".
</p></dd><dt id="tmp"><span class="term"><code class="option">tmp</code></span><a class="headerlink" title="Permalink to this term" href="#tmp"></a></dt><dd><p>The encrypted block device will
be prepared for using it as <code class="filename">/tmp</code>;
it will be formatted using
<a href="http://man7.org/linux/man-pages/man8/mke2fs.8.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>.
This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">tmp</code>
option will destroy the contents of the named
partition during every boot, so make sure the
underlying block device is specified correctly.</p></dd><dt id="tries="><span class="term"><code class="option">tries=</code></span><a class="headerlink" title="Permalink to this term" href="#tries="></a></dt><dd><p>Specifies the maximum number of
times the user is queried for a password.
The default is 3. If set to 0, the user is
queried for a password indefinitely.</p></dd><dt id="verify"><span class="term"><code class="option">verify</code></span><a class="headerlink" title="Permalink to this term" href="#verify"></a></dt><dd><p> If the encryption password is
read from console, it has to be entered twice to
prevent typos.</p></dd></dl></div><p>At early boot and when the system manager
configuration is reloaded, this file is translated into
native systemd units
by <a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm140208007872128"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example"></a></h2><div class="example"><a name="idm140208007871488"></a><p class="title"><b>Example 1. /etc/crypttab example</b></p><div class="example-contents"><p>Set up four encrypted block devices. One using
LUKS for normal storage, another one for usage as a swap
device and two TrueCrypt volumes.</p><pre class="programlisting">luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
swap /dev/sda7 /dev/urandom swap
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="crypttab"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>crypttab — Configuration for encrypted block devices</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/crypttab</code></p></div><div class="refsect1"><a name="idm140688860579392"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>The <code class="filename">/etc/crypttab</code> file describes
encrypted block devices that are set up during system boot.</p><p>Empty lines and lines starting with the "<code class="literal">#</code>"
character are ignored. Each of the remaining lines describes one
encrypted block device, fields on the line are delimited by white
space. The first two fields are mandatory, the remaining two are
optional.</p><p>Setting up encrypted block devices using this file supports
three encryption modes: LUKS, TrueCrypt and plain. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for more information about each mode. When no mode is specified in
the options field and the block device contains a LUKS signature,
it is opened as a LUKS device; otherwise, it is assumed to be in
raw dm-crypt (plain mode) format.</p><p>The first field contains the name of the resulting encrypted
block device; the device is set up within
<code class="filename">/dev/mapper/</code>.</p><p>The second field contains a path to the underlying block
device or file, or a specification of a block device via
"<code class="literal">UUID=</code>" followed by the UUID.</p><p>The third field specifies the encryption password. If the
field is not present or the password is set to
"<code class="literal">none</code>" or "<code class="literal">-</code>", the password has
to be manually entered during system boot. Otherwise, the field is
interpreted as a absolute path to a file containing the encryption
password. For swap encryption, <code class="filename">/dev/urandom</code>
or the hardware device <code class="filename">/dev/hw_random</code> can be
used as the password file; using <code class="filename">/dev/random</code>
may prevent boot completion if the system does not have enough
entropy to generate a truly random encryption key.</p><p>The fourth field, if present, is a comma-delimited list of
options. The following options are recognized:</p><div class="variablelist"><dl class="variablelist"><dt id="discard"><span class="term"><code class="option">discard</code></span><a class="headerlink" title="Permalink to this term" href="#discard"></a></dt><dd><p>Allow discard requests to be passed through
the encrypted block device. This improves performance on SSD
storage but has security implications.</p></dd><dt id="cipher="><span class="term"><code class="option">cipher=</code></span><a class="headerlink" title="Permalink to this term" href="#cipher="></a></dt><dd><p>Specifies the cipher to use. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of this option. A
cipher with unpredictable IV values, such as
"<code class="literal">aes-cbc-essiv:sha256</code>", is
recommended.</p></dd><dt id="hash="><span class="term"><code class="option">hash=</code></span><a class="headerlink" title="Permalink to this term" href="#hash="></a></dt><dd><p>Specifies the hash to use for password
hashing. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of this
option.</p></dd><dt id="header="><span class="term"><code class="option">header=</code></span><a class="headerlink" title="Permalink to this term" href="#header="></a></dt><dd><p>Use a detached (separated) metadata device or
file where the LUKS header is stored. This option is only
relevant for LUKS devices. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of this
option.</p></dd><dt id="keyfile-offset="><span class="term"><code class="option">keyfile-offset=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-offset="></a></dt><dd><p>Specifies the number of bytes to skip at the
start of the key file. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of this
option.</p></dd><dt id="keyfile-size="><span class="term"><code class="option">keyfile-size=</code></span><a class="headerlink" title="Permalink to this term" href="#keyfile-size="></a></dt><dd><p>Specifies the maximum number of bytes to read
from the key file. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of this option. This
option is ignored in plain encryption mode, as the key file
size is then given by the key size.</p></dd><dt id="key-slot="><span class="term"><code class="option">key-slot=</code></span><a class="headerlink" title="Permalink to this term" href="#key-slot="></a></dt><dd><p>Specifies the key slot to compare the
passphrase or key against. If the key slot does not match the
given passphrase or key, but another would, the setup of the
device will fail regardless. This option implies
<code class="option">luks</code>. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values. The default is to try all key slots in
sequential order.</p></dd><dt id="luks"><span class="term"><code class="option">luks</code></span><a class="headerlink" title="Permalink to this term" href="#luks"></a></dt><dd><p>Force LUKS mode. When this mode is used, the
following options are ignored since they are provided by the
LUKS header on the device: <code class="option">cipher=</code>,
<code class="option">hash=</code>,
<code class="option">size=</code>.</p></dd><dt id="noauto"><span class="term"><code class="option">noauto</code></span><a class="headerlink" title="Permalink to this term" href="#noauto"></a></dt><dd><p>This device will not be automatically unlocked
on boot.</p></dd><dt id="nofail"><span class="term"><code class="option">nofail</code></span><a class="headerlink" title="Permalink to this term" href="#nofail"></a></dt><dd><p>The system will not wait for the device to
show up and be unlocked at boot, and not fail the boot if it
does not show up.</p></dd><dt id="plain"><span class="term"><code class="option">plain</code></span><a class="headerlink" title="Permalink to this term" href="#plain"></a></dt><dd><p>Force plain encryption mode.</p></dd><dt id="read-only"><span class="term"><code class="option">read-only</code>, </span><span class="term"><code class="option">readonly</code></span><a class="headerlink" title="Permalink to this term" href="#read-only"></a></dt><dd><p>Set up the encrypted block device in read-only
mode.</p></dd><dt id="size="><span class="term"><code class="option">size=</code></span><a class="headerlink" title="Permalink to this term" href="#size="></a></dt><dd><p>Specifies the key size in bits. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for possible values and the default value of this
option.</p></dd><dt id="swap"><span class="term"><code class="option">swap</code></span><a class="headerlink" title="Permalink to this term" href="#swap"></a></dt><dd><p>The encrypted block device will be used as a
swap device, and will be formatted accordingly after setting
up the encrypted block device, with
<a href="http://man7.org/linux/man-pages/man8/mkswap.8.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>.
This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">swap</code> option will
destroy the contents of the named partition during every boot,
so make sure the underlying block device is specified
correctly.</p></dd><dt id="tcrypt"><span class="term"><code class="option">tcrypt</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt"></a></dt><dd><p>Use TrueCrypt encryption mode. When this mode
is used, the following options are ignored since they are
provided by the TrueCrypt header on the device or do not
apply:
<code class="option">cipher=</code>,
<code class="option">hash=</code>,
<code class="option">keyfile-offset=</code>,
<code class="option">keyfile-size=</code>,
<code class="option">size=</code>.</p><p>When this mode is used, the passphrase is read from the
key file given in the third field. Only the first line of this
file is read, excluding the new line character.</p><p>Note that the TrueCrypt format uses both passphrase and
key files to derive a password for the volume. Therefore, the
passphrase and all key files need to be provided. Use
<code class="option">tcrypt-keyfile=</code> to provide the absolute path
to all key files. When using an empty passphrase in
combination with one or more key files, use
"<code class="literal">/dev/null</code>" as the password file in the third
field.</p></dd><dt id="tcrypt-hidden"><span class="term"><code class="option">tcrypt-hidden</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-hidden"></a></dt><dd><p>Use the hidden TrueCrypt volume. This option
implies <code class="option">tcrypt</code>.</p><p>This will map the hidden volume that is inside of the
volume provided in the second field. Please note that there is
no protection for the hidden volume if the outer volume is
mounted instead. See
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
for more information on this limitation.</p></dd><dt id="tcrypt-keyfile="><span class="term"><code class="option">tcrypt-keyfile=</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-keyfile="></a></dt><dd><p>Specifies the absolute path to a key file to
use for a TrueCrypt volume. This implies
<code class="option">tcrypt</code> and can be used more than once to
provide several key files.</p><p>See the entry for <code class="option">tcrypt</code> on the
behavior of the passphrase and key files when using TrueCrypt
encryption mode.</p></dd><dt id="tcrypt-system"><span class="term"><code class="option">tcrypt-system</code></span><a class="headerlink" title="Permalink to this term" href="#tcrypt-system"></a></dt><dd><p>Use TrueCrypt in system encryption mode. This
option implies <code class="option">tcrypt</code>.</p></dd><dt id="timeout="><span class="term"><code class="option">timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#timeout="></a></dt><dd><p>Specifies the timeout for querying for a
password. If no unit is specified, seconds is used. Supported
units are s, ms, us, min, h, d. A timeout of 0 waits
indefinitely (which is the default).</p></dd><dt id="x-systemd.device-timeout="><span class="term"><code class="option">x-systemd.device-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.device-timeout="></a></dt><dd><p>Specifies how long systemd should wait for a
device to show up before giving up on the entry. The argument
is a time in seconds or explicitly specified units of
"<code class="literal">s</code>",
"<code class="literal">min</code>",
"<code class="literal">h</code>",
"<code class="literal">ms</code>".
</p></dd><dt id="tmp"><span class="term"><code class="option">tmp</code></span><a class="headerlink" title="Permalink to this term" href="#tmp"></a></dt><dd><p>The encrypted block device will be prepared
for using it as <code class="filename">/tmp</code>; it will be
formatted using
<a href="http://man7.org/linux/man-pages/man8/mke2fs.8.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>.
This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">tmp</code> option will
destroy the contents of the named partition during every boot,
so make sure the underlying block device is specified
correctly.</p></dd><dt id="tries="><span class="term"><code class="option">tries=</code></span><a class="headerlink" title="Permalink to this term" href="#tries="></a></dt><dd><p>Specifies the maximum number of times the user
is queried for a password. The default is 3. If set to 0, the
user is queried for a password indefinitely.</p></dd><dt id="verify"><span class="term"><code class="option">verify</code></span><a class="headerlink" title="Permalink to this term" href="#verify"></a></dt><dd><p> If the encryption password is read from
console, it has to be entered twice to prevent
typos.</p></dd></dl></div><p>At early boot and when the system manager configuration is
reloaded, this file is translated into native systemd units by
<a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>.</p></div><div class="refsect1"><a name="idm140688859486096"></a><h2 id="Example">Example<a class="headerlink" title="Permalink to this headline" href="#Example"></a></h2><div class="example"><a name="idm140688859485456"></a><p class="title"><b>Example 1. /etc/crypttab example</b></p><div class="example-contents"><p>Set up four encrypted block devices. One using LUKS for
normal storage, another one for usage as a swap device and two
TrueCrypt volumes.</p><pre class="programlisting">luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
swap /dev/sda7 /dev/urandom swap
truecrypt /dev/sda2 /etc/container_password tcrypt
hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140208007869104"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a>,
<a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>,
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man8/mkswap.8.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man8/mke2fs.8.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>
</p></div></div></body></html>
hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm140688859483136"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemd-cryptsetup@.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup@.service</span>(8)</span></a>,
<a href="systemd-cryptsetup-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-cryptsetup-generator</span>(8)</span></a>,
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man8/mkswap.8.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man8/mke2fs.8.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>
</p></div></div></body></html>

View File

@ -27,377 +27,366 @@
-->
<refentry id="crypttab" conditional='HAVE_LIBCRYPTSETUP'>
<refentryinfo>
<title>crypttab</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Documentation</contrib>
<firstname>Miloslav</firstname>
<surname>Trmac</surname>
<email>mitr@redhat.com</email>
</author>
<author>
<contrib>Documentation</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>crypttab</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>crypttab</refname>
<refpurpose>Configuration for encrypted block devices</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>/etc/crypttab</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>The <filename>/etc/crypttab</filename> file
describes encrypted block devices that are set up
during system boot.</para>
<para>Empty lines and lines starting with the <literal>#</literal>
character are ignored. Each of the remaining lines
describes one encrypted block device, fields on the
line are delimited by white space. The first two
fields are mandatory, the remaining two are
optional.</para>
<para>Setting up encrypted block devices using this file
supports three encryption modes: LUKS, TrueCrypt and plain.
See <citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for more information about each mode. When no mode is specified
in the options field and the block device contains a LUKS
signature, it is opened as a LUKS device; otherwise, it is
assumed to be in raw dm-crypt (plain mode) format.</para>
<para>The first field contains the name of the
resulting encrypted block device; the device is set up
within <filename>/dev/mapper/</filename>.</para>
<para>The second field contains a path to the
underlying block device or file, or a specification of a block
device via <literal>UUID=</literal> followed by the
UUID.</para>
<para>The third field specifies the encryption
password. If the field is not present or the password
is set to <literal>none</literal> or <literal>-</literal>,
the password has to be manually entered during system boot.
Otherwise, the field is interpreted as a absolute path to
a file containing the encryption password. For swap encryption,
<filename>/dev/urandom</filename> or the hardware
device <filename>/dev/hw_random</filename> can be used
as the password file; using
<filename>/dev/random</filename> may prevent boot
completion if the system does not have enough entropy
to generate a truly random encryption key.</para>
<para>The fourth field, if present, is a
comma-delimited list of options. The following
options are recognized:</para>
<variablelist class='fstab-options'>
<varlistentry>
<term><option>discard</option></term>
<listitem><para>Allow discard requests to be
passed through the encrypted block device. This
improves performance on SSD storage but has
security implications.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>cipher=</option></term>
<listitem><para>Specifies the cipher to use. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of
this option. A cipher with unpredictable IV
values, such as <literal>aes-cbc-essiv:sha256</literal>,
is recommended.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>hash=</option></term>
<listitem><para>Specifies the hash to use for
password hashing. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of
this option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>keyfile-offset=</option></term>
<listitem><para>Specifies the number of bytes to
skip at the start of the key file. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of
this option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>keyfile-size=</option></term>
<listitem><para>Specifies the maximum number
of bytes to read from the key file. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of
this option. This option is ignored in plain
encryption mode, as the key file size is then
given by the key size.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>key-slot=</option></term>
<listitem><para>Specifies the key slot to
compare the passphrase or key against.
If the key slot does not match the given
passphrase or key, but another would, the
setup of the device will fail regardless.
This option implies <option>luks</option>. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values. The default is to try
all key slots in sequential order.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>luks</option></term>
<listitem><para>Force LUKS mode. When this mode
is used, the following options are ignored since
they are provided by the LUKS header on the
device: <option>cipher=</option>,
<option>hash=</option>,
<option>size=</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>noauto</option></term>
<listitem><para>This device will not be
automatically unlocked on boot.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>nofail</option></term>
<listitem><para>The system will not wait for the
device to show up and be unlocked at boot, and
not fail the boot if it does not show up.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>plain</option></term>
<listitem><para>Force plain encryption mode.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>read-only</option></term><term><option>readonly</option></term>
<listitem><para>Set up the encrypted block
device in read-only mode.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>size=</option></term>
<listitem><para>Specifies the key size
in bits. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of
this option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>swap</option></term>
<listitem><para>The encrypted block device will
be used as a swap device, and will be formatted
accordingly after setting up the encrypted
block device, with
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
This option implies <option>plain</option>.</para>
<para>WARNING: Using the <option>swap</option>
option will destroy the contents of the named
partition during every boot, so make sure the
underlying block device is specified correctly.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt</option></term>
<listitem><para>Use TrueCrypt encryption mode.
When this mode is used, the following options are
ignored since they are provided by the TrueCrypt
header on the device or do not apply:
<option>cipher=</option>,
<option>hash=</option>,
<option>keyfile-offset=</option>,
<option>keyfile-size=</option>,
<option>size=</option>.</para>
<para>When this mode is used, the passphrase is
read from the key file given in the third field.
Only the first line of this file is read,
excluding the new line character.</para>
<para>Note that the TrueCrypt format uses both
passphrase and key files to derive a password
for the volume. Therefore, the passphrase and
all key files need to be provided. Use
<option>tcrypt-keyfile=</option> to provide
the absolute path to all key files. When using
an empty passphrase in combination with one or
more key files, use <literal>/dev/null</literal>
as the password file in the third field.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt-hidden</option></term>
<listitem><para>Use the hidden TrueCrypt volume.
This option implies <option>tcrypt</option>.</para>
<para>This will map the hidden volume that is
inside of the volume provided in the second
field. Please note that there is no protection
for the hidden volume if the outer volume is
mounted instead. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for more information on this limitation.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt-keyfile=</option></term>
<listitem><para>Specifies the absolute path to a
key file to use for a TrueCrypt volume. This
implies <option>tcrypt</option> and can be
used more than once to provide several key
files.</para>
<para>See the entry for <option>tcrypt</option>
on the behavior of the passphrase and key files
when using TrueCrypt encryption mode.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt-system</option></term>
<listitem><para>Use TrueCrypt in system
encryption mode. This option implies
<option>tcrypt</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>timeout=</option></term>
<listitem><para>Specifies the timeout for
querying for a password. If no unit is
specified, seconds is used. Supported units are
s, ms, us, min, h, d. A timeout of 0 waits
indefinitely (which is the default).</para></listitem>
</varlistentry>
<varlistentry>
<term><option>x-systemd.device-timeout=</option></term>
<listitem><para>Specifies how long
systemd should wait for a device to
show up before giving up on the
entry. The argument is a time in
seconds or explicitly specifified
units of <literal>s</literal>,
<literal>min</literal>,
<literal>h</literal>,
<literal>ms</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tmp</option></term>
<listitem><para>The encrypted block device will
be prepared for using it as <filename>/tmp</filename>;
it will be formatted using
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
This option implies <option>plain</option>.</para>
<para>WARNING: Using the <option>tmp</option>
option will destroy the contents of the named
partition during every boot, so make sure the
underlying block device is specified correctly.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tries=</option></term>
<listitem><para>Specifies the maximum number of
times the user is queried for a password.
The default is 3. If set to 0, the user is
queried for a password indefinitely.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>verify</option></term>
<listitem><para> If the encryption password is
read from console, it has to be entered twice to
prevent typos.</para></listitem>
</varlistentry>
</variablelist>
<para>At early boot and when the system manager
configuration is reloaded, this file is translated into
native systemd units
by <citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
</refsect1>
<refsect1>
<title>Example</title>
<example>
<title>/etc/crypttab example</title>
<para>Set up four encrypted block devices. One using
LUKS for normal storage, another one for usage as a swap
device and two TrueCrypt volumes.</para>
<programlisting>luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
swap /dev/sda7 /dev/urandom swap
<refentryinfo>
<title>crypttab</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Documentation</contrib>
<firstname>Miloslav</firstname>
<surname>Trmac</surname>
<email>mitr@redhat.com</email>
</author>
<author>
<contrib>Documentation</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>crypttab</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>crypttab</refname>
<refpurpose>Configuration for encrypted block devices</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>/etc/crypttab</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>The <filename>/etc/crypttab</filename> file describes
encrypted block devices that are set up during system boot.</para>
<para>Empty lines and lines starting with the <literal>#</literal>
character are ignored. Each of the remaining lines describes one
encrypted block device, fields on the line are delimited by white
space. The first two fields are mandatory, the remaining two are
optional.</para>
<para>Setting up encrypted block devices using this file supports
three encryption modes: LUKS, TrueCrypt and plain. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for more information about each mode. When no mode is specified in
the options field and the block device contains a LUKS signature,
it is opened as a LUKS device; otherwise, it is assumed to be in
raw dm-crypt (plain mode) format.</para>
<para>The first field contains the name of the resulting encrypted
block device; the device is set up within
<filename>/dev/mapper/</filename>.</para>
<para>The second field contains a path to the underlying block
device or file, or a specification of a block device via
<literal>UUID=</literal> followed by the UUID.</para>
<para>The third field specifies the encryption password. If the
field is not present or the password is set to
<literal>none</literal> or <literal>-</literal>, the password has
to be manually entered during system boot. Otherwise, the field is
interpreted as a absolute path to a file containing the encryption
password. For swap encryption, <filename>/dev/urandom</filename>
or the hardware device <filename>/dev/hw_random</filename> can be
used as the password file; using <filename>/dev/random</filename>
may prevent boot completion if the system does not have enough
entropy to generate a truly random encryption key.</para>
<para>The fourth field, if present, is a comma-delimited list of
options. The following options are recognized:</para>
<variablelist class='fstab-options'>
<varlistentry>
<term><option>discard</option></term>
<listitem><para>Allow discard requests to be passed through
the encrypted block device. This improves performance on SSD
storage but has security implications.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>cipher=</option></term>
<listitem><para>Specifies the cipher to use. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of this option. A
cipher with unpredictable IV values, such as
<literal>aes-cbc-essiv:sha256</literal>, is
recommended.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>hash=</option></term>
<listitem><para>Specifies the hash to use for password
hashing. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of this
option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>header=</option></term>
<listitem><para>Use a detached (separated) metadata device or
file where the LUKS header is stored. This option is only
relevant for LUKS devices. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of this
option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>keyfile-offset=</option></term>
<listitem><para>Specifies the number of bytes to skip at the
start of the key file. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of this
option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>keyfile-size=</option></term>
<listitem><para>Specifies the maximum number of bytes to read
from the key file. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of this option. This
option is ignored in plain encryption mode, as the key file
size is then given by the key size.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>key-slot=</option></term>
<listitem><para>Specifies the key slot to compare the
passphrase or key against. If the key slot does not match the
given passphrase or key, but another would, the setup of the
device will fail regardless. This option implies
<option>luks</option>. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values. The default is to try all key slots in
sequential order.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>luks</option></term>
<listitem><para>Force LUKS mode. When this mode is used, the
following options are ignored since they are provided by the
LUKS header on the device: <option>cipher=</option>,
<option>hash=</option>,
<option>size=</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>noauto</option></term>
<listitem><para>This device will not be automatically unlocked
on boot.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>nofail</option></term>
<listitem><para>The system will not wait for the device to
show up and be unlocked at boot, and not fail the boot if it
does not show up.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>plain</option></term>
<listitem><para>Force plain encryption mode.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>read-only</option></term><term><option>readonly</option></term>
<listitem><para>Set up the encrypted block device in read-only
mode.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>size=</option></term>
<listitem><para>Specifies the key size in bits. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for possible values and the default value of this
option.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>swap</option></term>
<listitem><para>The encrypted block device will be used as a
swap device, and will be formatted accordingly after setting
up the encrypted block device, with
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
This option implies <option>plain</option>.</para>
<para>WARNING: Using the <option>swap</option> option will
destroy the contents of the named partition during every boot,
so make sure the underlying block device is specified
correctly.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt</option></term>
<listitem><para>Use TrueCrypt encryption mode. When this mode
is used, the following options are ignored since they are
provided by the TrueCrypt header on the device or do not
apply:
<option>cipher=</option>,
<option>hash=</option>,
<option>keyfile-offset=</option>,
<option>keyfile-size=</option>,
<option>size=</option>.</para>
<para>When this mode is used, the passphrase is read from the
key file given in the third field. Only the first line of this
file is read, excluding the new line character.</para>
<para>Note that the TrueCrypt format uses both passphrase and
key files to derive a password for the volume. Therefore, the
passphrase and all key files need to be provided. Use
<option>tcrypt-keyfile=</option> to provide the absolute path
to all key files. When using an empty passphrase in
combination with one or more key files, use
<literal>/dev/null</literal> as the password file in the third
field.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt-hidden</option></term>
<listitem><para>Use the hidden TrueCrypt volume. This option
implies <option>tcrypt</option>.</para>
<para>This will map the hidden volume that is inside of the
volume provided in the second field. Please note that there is
no protection for the hidden volume if the outer volume is
mounted instead. See
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>
for more information on this limitation.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt-keyfile=</option></term>
<listitem><para>Specifies the absolute path to a key file to
use for a TrueCrypt volume. This implies
<option>tcrypt</option> and can be used more than once to
provide several key files.</para>
<para>See the entry for <option>tcrypt</option> on the
behavior of the passphrase and key files when using TrueCrypt
encryption mode.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tcrypt-system</option></term>
<listitem><para>Use TrueCrypt in system encryption mode. This
option implies <option>tcrypt</option>.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>timeout=</option></term>
<listitem><para>Specifies the timeout for querying for a
password. If no unit is specified, seconds is used. Supported
units are s, ms, us, min, h, d. A timeout of 0 waits
indefinitely (which is the default).</para></listitem>
</varlistentry>
<varlistentry>
<term><option>x-systemd.device-timeout=</option></term>
<listitem><para>Specifies how long systemd should wait for a
device to show up before giving up on the entry. The argument
is a time in seconds or explicitly specified units of
<literal>s</literal>,
<literal>min</literal>,
<literal>h</literal>,
<literal>ms</literal>.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tmp</option></term>
<listitem><para>The encrypted block device will be prepared
for using it as <filename>/tmp</filename>; it will be
formatted using
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
This option implies <option>plain</option>.</para>
<para>WARNING: Using the <option>tmp</option> option will
destroy the contents of the named partition during every boot,
so make sure the underlying block device is specified
correctly.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>tries=</option></term>
<listitem><para>Specifies the maximum number of times the user
is queried for a password. The default is 3. If set to 0, the
user is queried for a password indefinitely.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>verify</option></term>
<listitem><para> If the encryption password is read from
console, it has to be entered twice to prevent
typos.</para></listitem>
</varlistentry>
</variablelist>
<para>At early boot and when the system manager configuration is
reloaded, this file is translated into native systemd units by
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
</refsect1>
<refsect1>
<title>Example</title>
<example>
<title>/etc/crypttab example</title>
<para>Set up four encrypted block devices. One using LUKS for
normal storage, another one for usage as a swap device and two
TrueCrypt volumes.</para>
<programlisting>luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
swap /dev/sda7 /dev/urandom swap
truecrypt /dev/sda2 /etc/container_password tcrypt
hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting>
</example>
</refsect1>
hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting>
</example>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-cryptsetup@.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-cryptsetup-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>cryptsetup</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>mkswap</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>mke2fs</refentrytitle><manvolnum>8</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -60,6 +60,18 @@
</a>
</xsl:template>
<xsl:template match="citerefentry[@project='mankier']">
<a>
<xsl:attribute name="href">
<xsl:text>https://www.mankier.com/</xsl:text>
<xsl:value-of select="manvolnum"/>
<xsl:text>/</xsl:text>
<xsl:value-of select="refentrytitle"/>
</xsl:attribute>
<xsl:call-template name="inline.charseq"/>
</a>
</xsl:template>
<xsl:template match="citerefentry[@project='archlinux']">
<a>
<xsl:attribute name="href">

View File

@ -1,5 +1,5 @@
'\" t
.TH "DAEMON" "7" "" "systemd 218" "daemon"
.TH "DAEMON" "7" "" "systemd 219" "daemon"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -603,10 +603,10 @@ AS_IF([test "x$with_systemdsystemunitdir" = "xyes" \-o "x$with_systemdsystemunit
def_systemdsystemunitdir=$($PKG_CONFIG \-\-variable=systemdsystemunitdir systemd)
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
[AC_MSG_ERROR([systemd support requested but pkg\-config unable to query systemd package])])
with_systemdsystemunitdir=no],
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
[AC_MSG_ERROR([systemd support requested but pkg\-config unable to query systemd package])])
with_systemdsystemunitdir=no],
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
@ -629,7 +629,7 @@ file in
.\}
.nf
DISTCHECK_CONFIGURE_FLAGS = \e
\-\-with\-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
\-\-with\-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
.fi
.if n \{\
.RE
@ -643,8 +643,8 @@ Finally, unit files should be installed in the system with an automake excerpt l
.nf
if HAVE_SYSTEMD
systemdsystemunit_DATA = \e
foobar\&.socket \e
foobar\&.service
foobar\&.socket \e
foobar\&.service
endif
.fi
.if n \{\
@ -720,7 +720,7 @@ To facilitate upgrades from a package version that shipped only SysV init script
.nf
%triggerun \-\- foobar < 0\&.47\&.11\-1
if /sbin/chkconfig \-\-level 5 foobar ; then
/bin/systemctl \-\-no\-reload enable foobar\&.service foobar\&.socket >/dev/null 2>&1 || :
/bin/systemctl \-\-no\-reload enable foobar\&.service foobar\&.socket >/dev/null 2>&1 || :
fi
.fi
.if n \{\

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
'\" t
.TH "FILE\-HIERARCHY" "7" "" "systemd 218" "file-hierarchy"
.TH "FILE\-HIERARCHY" "7" "" "systemd 219" "file-hierarchy"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -161,7 +161,8 @@ for the primary architecture of the system, invoke:
.RS 4
.\}
.nf
# pkg\-config \-\-variable=libdir systemd
# pkg\-config \-\-variable=libdir
systemd
.fi
.if n \{\
.RE
@ -173,7 +174,8 @@ or
.RS 4
.\}
.nf
# systemd\-path system\-library\-arch
# systemd\-path
system\-library\-arch
.fi
.if n \{\
.RE

View File

@ -19,468 +19,307 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="file-hierarchy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>file-hierarchy — File system hierarchy overview</p></div><div class="refsect1"><a name="idm139812870201712"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>Operating systems using the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
system and service manager are organized based on a
file system hierarchy inspired by UNIX, more
specifically the hierarchy described in the <a class="ulink" href="http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html" target="_top">File
System Hierarchy</a> specification and
<a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>. This
manual page describes a more minimal, modernized
subset of these specifications that defines more
strictly the suggestions and restrictions systemd
makes on the file system hierarchy.</p><p>Many of the paths described here are queriable
with the
<a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>
tool.</p></div><div class="refsect1"><a name="idm139812866414400"></a><h2 id="General Structure">General Structure<a class="headerlink" title="Permalink to this headline" href="#General%20Structure"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/"><span class="term"><code class="filename">/</code></span><a class="headerlink" title="Permalink to this term" href="#/"></a></dt><dd><p>The file system
root. Usually writable, but this is
not required. Possibly a temporary
file system ("<code class="literal">tmpfs</code>"). Not shared with
other hosts (unless read-only).
</p></dd><dt id="/boot"><span class="term"><code class="filename">/boot</code></span><a class="headerlink" title="Permalink to this term" href="#/boot"></a></dt><dd><p>The boot partition
used for bringing up the system. On
EFI systems this is possibly the EFI
System Partition, also see
<a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>. This
directory is usually strictly local
to the host, and should be considered
read-only, except when a new kernel or
boot loader is installed. This
directory only exists on systems that
run on physical or emulated hardware
that requires boot
loaders.</p></dd><dt id="/etc"><span class="term"><code class="filename">/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/etc"></a></dt><dd><p>System-specific
configuration. This directory may or
may not be read-only. Frequently, this
directory is pre-populated with
vendor-supplied configuration files,
but applications should not make
assumptions about this directory
being fully populated or populated at
all, and should fall back to defaults
if configuration is missing.</p></dd><dt id="/home"><span class="term"><code class="filename">/home</code></span><a class="headerlink" title="Permalink to this term" href="#/home"></a></dt><dd><p>The location for
normal user's home
directories. Possibly shared with
other systems, and never
read-only. This directory should only
be used for normal users, never for
system users. This directory and
possibly the directories contained
within it might only become available
or writable in late boot or even only
after user authentication. This directory
might be placed on limited-functionality
network file systems, hence
applications should not assume the
full set of file API is available on
this directory. Applications should
generally not reference this directory
directly, but via the per-user
<code class="varname">$HOME</code> environment
variable, or via the home directory
field of the user
database.</p></dd><dt id="/root"><span class="term"><code class="filename">/root</code></span><a class="headerlink" title="Permalink to this term" href="#/root"></a></dt><dd><p>The home directory of
the root user. The root user's home
directory is located outside of
<code class="filename">/home</code> in order to
make sure the root user may log in
even without <code class="filename">/home</code>
being available and
mounted.</p></dd><dt id="/srv"><span class="term"><code class="filename">/srv</code></span><a class="headerlink" title="Permalink to this term" href="#/srv"></a></dt><dd><p>The place to store
general server payload, managed by the
administrator. No restrictions are
made how this directory is organized
internally. Generally writable, and
possibly shared among systems. This
directory might become available or
writable only very late during
boot.</p></dd><dt id="/tmp"><span class="term"><code class="filename">/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/tmp"></a></dt><dd><p>The place for small
temporary files. This directory is
usually mounted as
a "<code class="literal">tmpfs</code>" instance, and
should hence not be used for larger
files. (Use
<code class="filename">/var/tmp</code> for
larger files.) Since the directory is
accessible to other users of the
system it is essential that this
directory is only written to with the
<a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
and related calls. This directory is
usually flushed at boot-up. Also,
files that are not accessed within a
certain time are usually automatically
deleted. If applications find the
environment variable
<code class="varname">$TMPDIR</code> set they
should prefer using the directory
specified in it over directly
referencing
<code class="filename">/tmp</code> (see <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
and
<a class="ulink" href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03" target="_top">IEEE Std 1003.1</a> for details).</p></dd></dl></div></div><div class="refsect1"><a name="idm139812870278912"></a><h2 id="Runtime Data">Runtime Data<a class="headerlink" title="Permalink to this headline" href="#Runtime%20Data"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run"><span class="term"><code class="filename">/run</code></span><a class="headerlink" title="Permalink to this term" href="#/run"></a></dt><dd><p>A
"<code class="literal">tmpfs</code>" file system
for system packages to place runtime
data in. This directory is flushed on
boot, and generally writable for
privileged programs
only. Always writable.</p></dd><dt id="/run/log"><span class="term"><code class="filename">/run/log</code></span><a class="headerlink" title="Permalink to this term" href="#/run/log"></a></dt><dd><p>Runtime system
logs. System components may place
private logs in this directory. Always
writable, even when
<code class="filename">/var/log</code> might
not be accessible
yet.</p></dd><dt id="/run/user"><span class="term"><code class="filename">/run/user</code></span><a class="headerlink" title="Permalink to this term" href="#/run/user"></a></dt><dd><p>Contains per-user
runtime directories, each usually
individually mounted
"<code class="literal">tmpfs</code>"
instances. Always writable, flushed at
each reboot and when the user logs
out. User code should not reference
this directory directly, but via the
<code class="varname">$XDG_RUNTIME_DIR</code>
environment variable, as documented in
the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
Base Directory
Specification</a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm139812870267984"></a><h2 id="Vendor-supplied Operating System Resources">Vendor-supplied Operating System Resources<a class="headerlink" title="Permalink to this headline" href="#Vendor-supplied%20Operating%20System%20Resources"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/usr"><span class="term"><code class="filename">/usr</code></span><a class="headerlink" title="Permalink to this term" href="#/usr"></a></dt><dd><p>Vendor-supplied
operating system resources. Usually
read-only, but this is not
required. Possibly shared between
multiple hosts. This directory should
not be modified by the administrator,
except when installing or removing
vendor-supplied
packages.</p></dd><dt id="/usr/bin"><span class="term"><code class="filename">/usr/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin"></a></dt><dd><p>Binaries and
executables for user commands, that
shall appear in the
<code class="varname">$PATH</code> search
path. It is recommended not to place
binaries in this directory that are
not useful for invocation from a shell
(such as daemon binaries); these
should be placed in a subdirectory of
<code class="filename">/usr/lib</code>
instead.</p></dd><dt id="/usr/include"><span class="term"><code class="filename">/usr/include</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/include"></a></dt><dd><p>C and C++ API header
files of system
libraries.</p></dd><dt id="/usr/lib"><span class="term"><code class="filename">/usr/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib"></a></dt><dd><p>Static, private vendor
data that is compatible with all
architectures (though not necessarily
architecture-independent). Note that
this includes internal executables or
other binaries that are not regularly
invoked from a shell. Such binaries
may be for any architecture supported
by the system. Do not place public
libraries in this directory, use
<code class="varname">$libdir</code> (see
below), instead.</p></dd><dt id="/usr/lib/arch-id"><span class="term"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/arch-id"></a></dt><dd><p>Location for placing
dynamic libraries, also called <code class="varname">$libdir</code>.
The architecture identifier to use is defined on <a class="ulink" href="https://wiki.debian.org/Multiarch/Tuples" target="_top">Multiarch Architecture Specifiers (Tuples)</a>
list. Legacy locations of <code class="varname">$libdir</code> are
<code class="filename">/usr/lib</code>,
<code class="filename">/usr/lib64</code>.
This directory should not
be used for package-specific data,
unless this data is
architecture-dependent, too. To query
<code class="varname">$libdir</code> for the
primary architecture of the system,
invoke:
</p><pre class="programlisting"># pkg-config --variable=libdir systemd</pre><p> or
</p><pre class="programlisting"># systemd-path system-library-arch</pre><p>
</p></dd><dt id="/usr/share"><span class="term"><code class="filename">/usr/share</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share"></a></dt><dd><p>Resources shared
between multiple packages, such as
documentation, man pages, time zone
information, fonts and other
resources. Usually, the precise
location and format of files stored
below this directory is subject to
specifications that ensure
interoperability.</p></dd><dt id="/usr/share/doc"><span class="term"><code class="filename">/usr/share/doc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/doc"></a></dt><dd><p>Documentation for the
operating system or system
packages.</p></dd><dt id="/usr/share/factory/etc"><span class="term"><code class="filename">/usr/share/factory/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/etc"></a></dt><dd><p>Repository for
vendor-supplied default configuration
files. This directory should be
populated with pristine vendor versions
of all configuration files that may be
placed in
<code class="filename">/etc</code>. This is
useful to compare the local
configuration of a system with vendor
defaults and to populate the local
configuration with
defaults.</p></dd><dt id="/usr/share/factory/var"><span class="term"><code class="filename">/usr/share/factory/var</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/var"></a></dt><dd><p>Similar to
<code class="filename">/usr/share/factory/etc</code>
but for vendor versions of files in
the variable, persistent data
directory
<code class="filename">/var</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm139812865327920"></a><h2 id="Persistent Variable System Data">Persistent Variable System Data<a class="headerlink" title="Permalink to this headline" href="#Persistent%20Variable%20System%20Data"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/var"><span class="term"><code class="filename">/var</code></span><a class="headerlink" title="Permalink to this term" href="#/var"></a></dt><dd><p>Persistent, variable
system data. Must be writable. This
directory might be pre-populated with
vendor-supplied data, but applications
should be able to reconstruct
necessary files and directories in
this subhierarchy should they be
missing, as the system might start up
without this directory being
populated. Persistency is recommended,
but optional, to support ephemeral
systems. This directory might become
available or writable only very late
during boot. Components that are
required to operate during early boot
hence shall not unconditionally rely
on this directory.</p></dd><dt id="/var/cache"><span class="term"><code class="filename">/var/cache</code></span><a class="headerlink" title="Permalink to this term" href="#/var/cache"></a></dt><dd><p>Persistent system
cache data. System components may
place non-essential data in this
directory. Flushing this directory
should have no effect on operation of
programs, except for increased
runtimes necessary to rebuild these
caches.</p></dd><dt id="/var/lib"><span class="term"><code class="filename">/var/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib"></a></dt><dd><p>Persistent system
data. System components may
place private data in this
directory.</p></dd><dt id="/var/log"><span class="term"><code class="filename">/var/log</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log"></a></dt><dd><p>Persistent system
logs. System components may place
private logs in this directory, though
it is recommended to do most logging
via the
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
and
<a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>
calls.</p></dd><dt id="/var/spool"><span class="term"><code class="filename">/var/spool</code></span><a class="headerlink" title="Permalink to this term" href="#/var/spool"></a></dt><dd><p>Persistent system
spool data, such as printer or mail
queues.</p></dd><dt id="/var/tmp"><span class="term"><code class="filename">/var/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/tmp"></a></dt><dd><p>The place for larger
and persistent temporary files. In
contrast to <code class="filename">/tmp</code>
this directory is usually mounted from
a persistent physical file system and
can thus accept larger files. (Use
<code class="filename">/tmp</code> for smaller
files.) This directory is generally
not flushed at boot-up, but time-based
cleanup of files that have not been
accessed for a certain time is
applied. The same security
restrictions as with
<code class="filename">/tmp</code> apply, and
hence only
<a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
or similar calls should be used to
make use of this directory. If
applications find the environment
variable <code class="varname">$TMPDIR</code>
set they should prefer using the
directory specified in it over
directly referencing
<code class="filename">/var/tmp</code> (see <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
for details).
</p></dd></dl></div></div><div class="refsect1"><a name="idm139812865305536"></a><h2 id="Virtual Kernel and API File Systems">Virtual Kernel and API File Systems<a class="headerlink" title="Permalink to this headline" href="#Virtual%20Kernel%20and%20API%20File%20Systems"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/dev"><span class="term"><code class="filename">/dev</code></span><a class="headerlink" title="Permalink to this term" href="#/dev"></a></dt><dd><p>The root directory for
device nodes. Usually this directory
is mounted as a
"<code class="literal">devtmpfs</code>" instance,
but might be of a different type in
sandboxed/containerized setups. This
directory is managed jointly by the
kernel and
<a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a>,
and should not be written to by other
components. A number of special
purpose virtual file systems might be
mounted below this
directory.</p></dd><dt id="/dev/shm"><span class="term"><code class="filename">/dev/shm</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/shm"></a></dt><dd><p>Place for POSIX shared
memory segments, as created via
<a href="shm_open.html"><span class="citerefentry"><span class="refentrytitle">shm_open</span>(3)</span></a>. This
directory is flushed on boot, and is a
"<code class="literal">tmpfs</code>" file
system. Since all users have write
access to this directory, special care
should be taken to avoid name clashes
and vulnerabilities. For normal users,
shared memory segments in this
directory are usually deleted when the
user logs out. Usually it is a better
idea to use memory mapped files in
<code class="filename">/run</code> (for system
programs) or
<code class="varname">$XDG_RUNTIME_DIR</code>
(for user programs) instead of POSIX
shared memory segments, since those
directories are not world-writable and
hence not vulnerable to
security-sensitive name
clashes.</p></dd><dt id="/proc"><span class="term"><code class="filename">/proc</code></span><a class="headerlink" title="Permalink to this term" href="#/proc"></a></dt><dd><p>A virtual kernel file
system exposing the process list and
other functionality. This file system
is mostly an API to interface with the
kernel and not a place where normal
files may be stored. For details, see
<a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>. A
number of special purpose virtual file
systems might be mounted below this
directory.</p></dd><dt id="/proc/sys"><span class="term"><code class="filename">/proc/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys"></a></dt><dd><p>A hierarchy below
<code class="filename">/proc</code> that
exposes a number of kernel
tunables. The primary way to configure
the settings in this API file tree is
via
<a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>
files. In sandboxed/containerized
setups this directory is generally
mounted read-only.</p></dd><dt id="/sys"><span class="term"><code class="filename">/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/sys"></a></dt><dd><p>A virtual kernel file
system exposing discovered devices and
other functionality. This file system
is mostly an API to interface with the
kernel and not a place where normal
files may be stored. In
sandboxed/containerized setups this
directory is generally mounted
read-only. A number of special purpose
virtual file systems might be mounted
below this
directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm139812865285920"></a><h2 id="Compatibility Symlinks">Compatibility Symlinks<a class="headerlink" title="Permalink to this headline" href="#Compatibility%20Symlinks"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/bin"><span class="term"><code class="filename">/bin</code>, </span><span class="term"><code class="filename">/sbin</code>, </span><span class="term"><code class="filename">/usr/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/bin"></a></dt><dd><p>These compatibility
symlinks point to
<code class="filename">/usr/bin</code>,
ensuring that scripts and binaries
referencing these legacy paths
correctly find their binaries.</p></dd><dt id="/lib"><span class="term"><code class="filename">/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/lib"></a></dt><dd><p>This compatibility
symlink points to
<code class="filename">/usr/lib</code>,
ensuring that programs referencing
this legacy path correctly find
their resources.</p></dd><dt id="/lib64"><span class="term"><code class="filename">/lib64</code></span><a class="headerlink" title="Permalink to this term" href="#/lib64"></a></dt><dd><p>On some architecture
ABIs this compatibility symlink points
to <code class="varname">$libdir</code>,
ensuring that binaries referencing
this legacy path correctly find their
dynamic loader. This symlink only
exists on architectures whose ABI
places the dynamic loader in this
path.</p></dd><dt id="/var/run"><span class="term"><code class="filename">/var/run</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run"></a></dt><dd><p>This compatibility
symlink points to
<code class="filename">/run</code>, ensuring
that programs referencing this legacy
path correctly find their runtime
data.</p></dd></dl></div></div><div class="refsect1"><a name="idm139812865272944"></a><h2 id="Home Directory">Home Directory<a class="headerlink" title="Permalink to this headline" href="#Home%20Directory"></a></h2><p>User applications may want to place files and
directories in the user's home directory. They should
follow the following basic structure. Note that some
of these directories are also standardized (though
more weakly) by the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
Base Directory Specification</a>. Additional
locations for high-level user resources are defined by
<a class="ulink" href="http://www.freedesktop.org/wiki/Software/xdg-user-dirs/" target="_top">xdg-user-dirs</a>.</p><div class="variablelist"><dl class="variablelist"><dt id="~/.cache"><span class="term"><code class="filename">~/.cache</code></span><a class="headerlink" title="Permalink to this term" href="#~/.cache"></a></dt><dd><p>Persistent user cache
data. User programs may place
non-essential data in this
directory. Flushing this directory
should have no effect on operation of
programs, except for increased
runtimes necessary to rebuild these
caches. If an application finds
<code class="varname">$XDG_CACHE_HOME</code> set
is should use the directory specified
in it instead of this
directory.</p></dd><dt id="~/.config"><span class="term"><code class="filename">~/.config</code></span><a class="headerlink" title="Permalink to this term" href="#~/.config"></a></dt><dd><p>Application
configuration and state. When a new
user is created this directory will be
empty or not exist at
all. Applications should fall back to
defaults should their configuration or
state in this directory be missing. If
an application finds
<code class="varname">$XDG_CONFIG_HOME</code> set
is should use the directory specified
in it instead of this
directory.</p></dd><dt id="~/.local/bin"><span class="term"><code class="filename">~/.local/bin</code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/bin"></a></dt><dd><p>Executables that shall
appear in the user's
<code class="varname">$PATH</code> search
path. It is recommended not to place
executables in this directory that are
not useful for invocation from a
shell; these should be placed in a
subdirectory of
<code class="filename">~/.local/lib</code>
instead. Care should be taken when
placing architecture-dependent
binaries in this place which might be
problematic if the home directory is
shared between multiple hosts with
different
architectures.</p></dd><dt id="~/.local/lib"><span class="term"><code class="filename">~/.local/lib</code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/lib"></a></dt><dd><p>Static, private vendor
data that is compatible with all
architectures.</p></dd><dt id="~/.local/lib/arch-id"><span class="term"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/lib/arch-id"></a></dt><dd><p>Location for placing
public dynamic libraries. The architecture
identifier to use, is defined on <a class="ulink" href="https://wiki.debian.org/Multiarch/Tuples" target="_top">Multiarch Architecture Specifiers (Tuples)</a>
list.</p></dd><dt id="~/.local/share"><span class="term"><code class="filename">~/.local/share</code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/share"></a></dt><dd><p>Resources shared
between multiple packages, such as
fonts or artwork. Usually, the precise
location and format of files stored
below this directory is subject to
specifications that ensure
interoperability. If
an application finds
<code class="varname">$XDG_DATA_HOME</code> set
is should use the directory specified
in it instead of this
directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm139812865244864"></a><h2 id="Unprivileged Write Access">Unprivileged Write Access<a class="headerlink" title="Permalink to this headline" href="#Unprivileged%20Write%20Access"></a></h2><p>Unprivileged processes generally lack
write access to most of the hierarchy.</p><p>The exceptions for normal users are
<code class="filename">/tmp</code>,
<code class="filename">/var/tmp</code>,
<code class="filename">/dev/shm</code>, as well as the home
directory <code class="varname">$HOME</code> (usually found
below <code class="filename">/home</code>) and the runtime
directory <code class="varname">$XDG_RUNTIME_DIR</code> (found
below <code class="filename">/run/user</code>) of the
user, which are all writable.</p><p>For unprivileged system processes only
<code class="filename">/tmp</code>,
<code class="filename">/var/tmp</code> and
<code class="filename">/dev/shm</code> are writable. If an
unprivileged system process needs a private, writable
directory in <code class="filename">/var</code> or
<code class="filename">/run</code>, it is recommended to either
create it before dropping privileges in the daemon
code, to create it via
<a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
fragments during boot, or via the
<code class="varname">RuntimeDirectory=</code> directive of
service units (see
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
for details).</p></div><div class="refsect1"><a name="idm139812865233424"></a><h2 id="Node Types">Node Types<a class="headerlink" title="Permalink to this headline" href="#Node%20Types"></a></h2><p>Unix file systems support different types of file
nodes, including regular files, directories, symlinks,
character and block device nodes, sockets and FIFOs.</p><p>It is strongly recommended that
<code class="filename">/dev</code> is the only location below
which device nodes shall be placed. Similar,
<code class="filename">/run</code> shall be the only location
to place sockets and FIFOs. Regular files,
directories and symlinks may be used in all
directories.</p></div><div class="refsect1"><a name="idm139812865230112"></a><h2 id="System Packages">System Packages<a class="headerlink" title="Permalink to this headline" href="#System%20Packages"></a></h2><p>Developers of system packages should follow
strict rules when placing their own files in the file
system. The following table lists recommended
locations for specific types of files supplied by the
vendor.</p><div class="table"><a name="idm139812865228800"></a><p class="title"><b>Table 1. System Package Vendor Files Locations</b></p><div class="table-contents"><table summary="System Package Vendor Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/usr/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path, compiled for any of the supported architectures compatible with the operating system. It is not recommended to place internal binaries or binaries that are not commonly invoked from the shell in this directory, such as daemon binaries. As this directory is shared with most other packages of the system special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures. Note that this generally does not include private executables since binaries of a specific architecture may be freely invoked from any other supported system architecture.</td></tr><tr><td align="left"><code class="filename">/usr/include/<em class="replaceable"><code>package</code></em></code></td><td align="left">Public C/C++ APIs of public shared libraries of the package.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed
in the <code class="filename">/usr/share</code> hierarchy, to
the locations defined by the various relevant
specifications.</p><p>During runtime and for local configuration and
state additional directories are defined:</p><div class="table"><a name="idm139812865211008"></a><p class="title"><b>Table 2. System Package Variable Files Locations</b></p><div class="table-contents"><table summary="System Package Variable Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/etc/<em class="replaceable"><code>package</code></em></code></td><td align="left">System-specific configuration for the package. It is recommended to default to safe fallbacks if this configuration is missing, if this is possible. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to copy or symlink the necessary files and directories from <code class="filename">/usr/share/factory</code> during boot, via the "<code class="literal">L</code>" or "<code class="literal">C</code>" directives.</td></tr><tr><td align="left"><code class="filename">/run/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime data for the package. Packages must be able to create the necessary subdirectories in this tree on their own, since the directory is flushed automatically on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot. Alternatively, the <code class="varname">RuntimeDirectory=</code> directive of service units may be used (see <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> for details.)</td></tr><tr><td align="left"><code class="filename">/run/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime log data for the package. As above, the package needs to make sure to create this directory if necessary, as it will be flushed on every boot.</td></tr><tr><td align="left"><code class="filename">/var/cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr><tr><td align="left"><code class="filename">/var/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent private data of the package. This is the primary place to put persistent data that does not fall into the other categories listed. Packages should be able to create the necessary subdirectories in this tree on their own, since the directory might be missing on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot.</td></tr><tr><td align="left"><code class="filename">/var/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent log data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr><tr><td align="left"><code class="filename">/var/spool/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent spool/queue data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm139812865186320"></a><h2 id="User Packages">User Packages<a class="headerlink" title="Permalink to this headline" href="#User%20Packages"></a></h2><p>Programs running in user context should follow
strict rules when placing their own files in the
user's home directory. The following table lists
recommended locations in the home directory for
specific types of files supplied by the vendor if the
application is installed in the home directory. (Note
however, that user applications installed system-wide
should follow the rules outlined above regarding
placing vendor files.)</p><div class="table"><a name="idm139812865184720"></a><p class="title"><b>Table 3. User Package Vendor File Locations</b></p><div class="table-contents"><table summary="User Package Vendor File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.local/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path. It is not recommended to place internal executables or executables that are not commonly invoked from the shell in this directory, such as daemon executables. As this directory is shared with most other packages of the user special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, compatible with any architecture, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed
in the <code class="filename">~/.local/share</code> hierarchy,
to the locations defined by the various relevant
specifications.</p><p>During runtime and for local configuration and
state additional directories are defined:</p><div class="table"><a name="idm139812865169104"></a><p class="title"><b>Table 4. User Package Variable File Locations</b></p><div class="table-contents"><table summary="User Package Variable File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.config/<em class="replaceable"><code>package</code></em></code></td><td align="left">User-specific configuration and state for the package. It is required to default to safe fallbacks if this configuration is missing.</td></tr><tr><td align="left"><code class="filename"><code class="varname">$XDG_RUNTIME_DIR</code>/<em class="replaceable"><code>package</code></em></code></td><td align="left">User runtime data for the package.</td></tr><tr><td align="left"><code class="filename">~/.cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm139812865157904"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>,
<a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>,
<a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>,
<a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>,
<a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="file-hierarchy"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>file-hierarchy — File system hierarchy overview</p></div><div class="refsect1"><a name="idm140711600162992"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>Operating systems using the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
system and service manager are organized based on a file system
hierarchy inspired by UNIX, more specifically the hierarchy
described in the <a class="ulink" href="http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html" target="_top">File
System Hierarchy</a> specification and
<a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>.
This manual page describes a more minimal, modernized subset of
these specifications that defines more strictly the suggestions
and restrictions systemd makes on the file system
hierarchy.</p><p>Many of the paths described here are queriable
with the
<a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>
tool.</p></div><div class="refsect1"><a name="idm140711600157744"></a><h2 id="General Structure">General Structure<a class="headerlink" title="Permalink to this headline" href="#General%20Structure"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/"><span class="term"><code class="filename">/</code></span><a class="headerlink" title="Permalink to this term" href="#/"></a></dt><dd><p>The file system root. Usually writable, but
this is not required. Possibly a temporary file system
("<code class="literal">tmpfs</code>"). Not shared with other hosts
(unless read-only). </p></dd><dt id="/boot"><span class="term"><code class="filename">/boot</code></span><a class="headerlink" title="Permalink to this term" href="#/boot"></a></dt><dd><p>The boot partition used for bringing up the
system. On EFI systems this is possibly the EFI System
Partition, also see
<a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>.
This directory is usually strictly local to the host, and
should be considered read-only, except when a new kernel or
boot loader is installed. This directory only exists on
systems that run on physical or emulated hardware that
requires boot loaders.</p></dd><dt id="/etc"><span class="term"><code class="filename">/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/etc"></a></dt><dd><p>System-specific configuration. This directory
may or may not be read-only. Frequently, this directory is
pre-populated with vendor-supplied configuration files, but
applications should not make assumptions about this directory
being fully populated or populated at all, and should fall
back to defaults if configuration is
missing.</p></dd><dt id="/home"><span class="term"><code class="filename">/home</code></span><a class="headerlink" title="Permalink to this term" href="#/home"></a></dt><dd><p>The location for normal user's home
directories. Possibly shared with other systems, and never
read-only. This directory should only be used for normal
users, never for system users. This directory and possibly the
directories contained within it might only become available or
writable in late boot or even only after user authentication.
This directory might be placed on limited-functionality
network file systems, hence applications should not assume the
full set of file API is available on this directory.
Applications should generally not reference this directory
directly, but via the per-user <code class="varname">$HOME</code>
environment variable, or via the home directory field of the
user database.</p></dd><dt id="/root"><span class="term"><code class="filename">/root</code></span><a class="headerlink" title="Permalink to this term" href="#/root"></a></dt><dd><p>The home directory of the root user. The root
user's home directory is located outside of
<code class="filename">/home</code> in order to make sure the root user
may log in even without <code class="filename">/home</code> being
available and mounted.</p></dd><dt id="/srv"><span class="term"><code class="filename">/srv</code></span><a class="headerlink" title="Permalink to this term" href="#/srv"></a></dt><dd><p>The place to store general server payload,
managed by the administrator. No restrictions are made how
this directory is organized internally. Generally writable,
and possibly shared among systems. This directory might become
available or writable only very late during
boot.</p></dd><dt id="/tmp"><span class="term"><code class="filename">/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/tmp"></a></dt><dd><p>The place for small temporary files. This
directory is usually mounted as a "<code class="literal">tmpfs</code>"
instance, and should hence not be used for larger files. (Use
<code class="filename">/var/tmp</code> for larger files.) Since the
directory is accessible to other users of the system it is
essential that this directory is only written to with the
<a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
and related calls. This directory is usually flushed at
boot-up. Also, files that are not accessed within a certain
time are usually automatically deleted. If applications find
the environment variable <code class="varname">$TMPDIR</code> set they
should prefer using the directory specified in it over
directly referencing <code class="filename">/tmp</code> (see
<a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
and
<a class="ulink" href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03" target="_top">IEEE
Std 1003.1</a> for details).</p></dd></dl></div></div><div class="refsect1"><a name="idm140711604036048"></a><h2 id="Runtime Data">Runtime Data<a class="headerlink" title="Permalink to this headline" href="#Runtime%20Data"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/run"><span class="term"><code class="filename">/run</code></span><a class="headerlink" title="Permalink to this term" href="#/run"></a></dt><dd><p>A "<code class="literal">tmpfs</code>" file system for
system packages to place runtime data in. This directory is
flushed on boot, and generally writable for privileged
programs only. Always writable.</p></dd><dt id="/run/log"><span class="term"><code class="filename">/run/log</code></span><a class="headerlink" title="Permalink to this term" href="#/run/log"></a></dt><dd><p>Runtime system logs. System components may
place private logs in this directory. Always writable, even
when <code class="filename">/var/log</code> might not be accessible
yet.</p></dd><dt id="/run/user"><span class="term"><code class="filename">/run/user</code></span><a class="headerlink" title="Permalink to this term" href="#/run/user"></a></dt><dd><p>Contains per-user runtime directories, each
usually individually mounted "<code class="literal">tmpfs</code>"
instances. Always writable, flushed at each reboot and when
the user logs out. User code should not reference this
directory directly, but via the
<code class="varname">$XDG_RUNTIME_DIR</code> environment variable, as
documented in the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
Base Directory Specification</a>.</p></dd></dl></div></div><div class="refsect1"><a name="idm140711604019568"></a><h2 id="Vendor-supplied Operating System Resources">Vendor-supplied Operating System Resources<a class="headerlink" title="Permalink to this headline" href="#Vendor-supplied%20Operating%20System%20Resources"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/usr"><span class="term"><code class="filename">/usr</code></span><a class="headerlink" title="Permalink to this term" href="#/usr"></a></dt><dd><p>Vendor-supplied operating system resources.
Usually read-only, but this is not required. Possibly shared
between multiple hosts. This directory should not be modified
by the administrator, except when installing or removing
vendor-supplied packages.</p></dd><dt id="/usr/bin"><span class="term"><code class="filename">/usr/bin</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/bin"></a></dt><dd><p>Binaries and executables for user commands,
that shall appear in the <code class="varname">$PATH</code> search path.
It is recommended not to place binaries in this directory that
are not useful for invocation from a shell (such as daemon
binaries); these should be placed in a subdirectory of
<code class="filename">/usr/lib</code> instead.</p></dd><dt id="/usr/include"><span class="term"><code class="filename">/usr/include</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/include"></a></dt><dd><p>C and C++ API header files of system
libraries.</p></dd><dt id="/usr/lib"><span class="term"><code class="filename">/usr/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib"></a></dt><dd><p>Static, private vendor data that is compatible
with all architectures (though not necessarily
architecture-independent). Note that this includes internal
executables or other binaries that are not regularly invoked
from a shell. Such binaries may be for any architecture
supported by the system. Do not place public libraries in this
directory, use <code class="varname">$libdir</code> (see below),
instead.</p></dd><dt id="/usr/lib/arch-id"><span class="term"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#/usr/lib/arch-id"></a></dt><dd><p>Location for placing dynamic libraries, also
called <code class="varname">$libdir</code>. The architecture identifier
to use is defined on <a class="ulink" href="https://wiki.debian.org/Multiarch/Tuples" target="_top">Multiarch
Architecture Specifiers (Tuples)</a> list. Legacy
locations of <code class="varname">$libdir</code> are
<code class="filename">/usr/lib</code>,
<code class="filename">/usr/lib64</code>. This directory should not be
used for package-specific data, unless this data is
architecture-dependent, too. To query
<code class="varname">$libdir</code> for the primary architecture of the
system, invoke: </p><pre class="programlisting"># pkg-config --variable=libdir
systemd</pre><p> or </p><pre class="programlisting"># systemd-path
system-library-arch</pre><p> </p></dd><dt id="/usr/share"><span class="term"><code class="filename">/usr/share</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share"></a></dt><dd><p>Resources shared between multiple packages,
such as documentation, man pages, time zone information, fonts
and other resources. Usually, the precise location and format
of files stored below this directory is subject to
specifications that ensure interoperability.</p></dd><dt id="/usr/share/doc"><span class="term"><code class="filename">/usr/share/doc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/doc"></a></dt><dd><p>Documentation for the operating system or
system packages.</p></dd><dt id="/usr/share/factory/etc"><span class="term"><code class="filename">/usr/share/factory/etc</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/etc"></a></dt><dd><p>Repository for vendor-supplied default
configuration files. This directory should be populated with
pristine vendor versions of all configuration files that may
be placed in <code class="filename">/etc</code>. This is useful to
compare the local configuration of a system with vendor
defaults and to populate the local configuration with
defaults.</p></dd><dt id="/usr/share/factory/var"><span class="term"><code class="filename">/usr/share/factory/var</code></span><a class="headerlink" title="Permalink to this term" href="#/usr/share/factory/var"></a></dt><dd><p>Similar to
<code class="filename">/usr/share/factory/etc</code> but for vendor
versions of files in the variable, persistent data directory
<code class="filename">/var</code>.</p></dd></dl></div></div><div class="refsect1"><a name="idm140711599078976"></a><h2 id="Persistent Variable System Data">Persistent Variable System Data<a class="headerlink" title="Permalink to this headline" href="#Persistent%20Variable%20System%20Data"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/var"><span class="term"><code class="filename">/var</code></span><a class="headerlink" title="Permalink to this term" href="#/var"></a></dt><dd><p>Persistent, variable system data. Must be
writable. This directory might be pre-populated with
vendor-supplied data, but applications should be able to
reconstruct necessary files and directories in this
subhierarchy should they be missing, as the system might start
up without this directory being populated. Persistency is
recommended, but optional, to support ephemeral systems. This
directory might become available or writable only very late
during boot. Components that are required to operate during
early boot hence shall not unconditionally rely on this
directory.</p></dd><dt id="/var/cache"><span class="term"><code class="filename">/var/cache</code></span><a class="headerlink" title="Permalink to this term" href="#/var/cache"></a></dt><dd><p>Persistent system cache data. System
components may place non-essential data in this directory.
Flushing this directory should have no effect on operation of
programs, except for increased runtimes necessary to rebuild
these caches.</p></dd><dt id="/var/lib"><span class="term"><code class="filename">/var/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/var/lib"></a></dt><dd><p>Persistent system data. System components may
place private data in this directory.</p></dd><dt id="/var/log"><span class="term"><code class="filename">/var/log</code></span><a class="headerlink" title="Permalink to this term" href="#/var/log"></a></dt><dd><p>Persistent system logs. System components may
place private logs in this directory, though it is recommended
to do most logging via the
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
and
<a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>
calls.</p></dd><dt id="/var/spool"><span class="term"><code class="filename">/var/spool</code></span><a class="headerlink" title="Permalink to this term" href="#/var/spool"></a></dt><dd><p>Persistent system spool data, such as printer
or mail queues.</p></dd><dt id="/var/tmp"><span class="term"><code class="filename">/var/tmp</code></span><a class="headerlink" title="Permalink to this term" href="#/var/tmp"></a></dt><dd><p>The place for larger and persistent temporary
files. In contrast to <code class="filename">/tmp</code> this directory
is usually mounted from a persistent physical file system and
can thus accept larger files. (Use <code class="filename">/tmp</code>
for smaller files.) This directory is generally not flushed at
boot-up, but time-based cleanup of files that have not been
accessed for a certain time is applied. The same security
restrictions as with <code class="filename">/tmp</code> apply, and
hence only
<a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
<a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
or similar calls should be used to make use of this directory.
If applications find the environment variable
<code class="varname">$TMPDIR</code> set they should prefer using the
directory specified in it over directly referencing
<code class="filename">/var/tmp</code> (see
<a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
for details). </p></dd></dl></div></div><div class="refsect1"><a name="idm140711599058352"></a><h2 id="Virtual Kernel and API File Systems">Virtual Kernel and API File Systems<a class="headerlink" title="Permalink to this headline" href="#Virtual%20Kernel%20and%20API%20File%20Systems"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/dev"><span class="term"><code class="filename">/dev</code></span><a class="headerlink" title="Permalink to this term" href="#/dev"></a></dt><dd><p>The root directory for device nodes. Usually
this directory is mounted as a "<code class="literal">devtmpfs</code>"
instance, but might be of a different type in
sandboxed/containerized setups. This directory is managed
jointly by the kernel and
<a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a>,
and should not be written to by other components. A number of
special purpose virtual file systems might be mounted below
this directory.</p></dd><dt id="/dev/shm"><span class="term"><code class="filename">/dev/shm</code></span><a class="headerlink" title="Permalink to this term" href="#/dev/shm"></a></dt><dd><p>Place for POSIX shared memory segments, as
created via
<a href="shm_open.html"><span class="citerefentry"><span class="refentrytitle">shm_open</span>(3)</span></a>.
This directory is flushed on boot, and is a
"<code class="literal">tmpfs</code>" file system. Since all users have
write access to this directory, special care should be taken
to avoid name clashes and vulnerabilities. For normal users,
shared memory segments in this directory are usually deleted
when the user logs out. Usually it is a better idea to use
memory mapped files in <code class="filename">/run</code> (for system
programs) or <code class="varname">$XDG_RUNTIME_DIR</code> (for user
programs) instead of POSIX shared memory segments, since those
directories are not world-writable and hence not vulnerable to
security-sensitive name clashes.</p></dd><dt id="/proc"><span class="term"><code class="filename">/proc</code></span><a class="headerlink" title="Permalink to this term" href="#/proc"></a></dt><dd><p>A virtual kernel file system exposing the
process list and other functionality. This file system is
mostly an API to interface with the kernel and not a place
where normal files may be stored. For details, see
<a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>.
A number of special purpose virtual file systems might be
mounted below this directory.</p></dd><dt id="/proc/sys"><span class="term"><code class="filename">/proc/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/proc/sys"></a></dt><dd><p>A hierarchy below <code class="filename">/proc</code>
that exposes a number of kernel tunables. The primary way to
configure the settings in this API file tree is via
<a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>
files. In sandboxed/containerized setups this directory is
generally mounted read-only.</p></dd><dt id="/sys"><span class="term"><code class="filename">/sys</code></span><a class="headerlink" title="Permalink to this term" href="#/sys"></a></dt><dd><p>A virtual kernel file system exposing
discovered devices and other functionality. This file system
is mostly an API to interface with the kernel and not a place
where normal files may be stored. In sandboxed/containerized
setups this directory is generally mounted read-only. A number
of special purpose virtual file systems might be mounted below
this directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm140711599040192"></a><h2 id="Compatibility Symlinks">Compatibility Symlinks<a class="headerlink" title="Permalink to this headline" href="#Compatibility%20Symlinks"></a></h2><div class="variablelist"><dl class="variablelist"><dt id="/bin"><span class="term"><code class="filename">/bin</code>, </span><span class="term"><code class="filename">/sbin</code>, </span><span class="term"><code class="filename">/usr/sbin</code></span><a class="headerlink" title="Permalink to this term" href="#/bin"></a></dt><dd><p>These compatibility symlinks point to
<code class="filename">/usr/bin</code>, ensuring that scripts and
binaries referencing these legacy paths correctly find their
binaries.</p></dd><dt id="/lib"><span class="term"><code class="filename">/lib</code></span><a class="headerlink" title="Permalink to this term" href="#/lib"></a></dt><dd><p>This compatibility symlink points to
<code class="filename">/usr/lib</code>, ensuring that programs
referencing this legacy path correctly find their
resources.</p></dd><dt id="/lib64"><span class="term"><code class="filename">/lib64</code></span><a class="headerlink" title="Permalink to this term" href="#/lib64"></a></dt><dd><p>On some architecture ABIs this compatibility
symlink points to <code class="varname">$libdir</code>, ensuring that
binaries referencing this legacy path correctly find their
dynamic loader. This symlink only exists on architectures
whose ABI places the dynamic loader in this
path.</p></dd><dt id="/var/run"><span class="term"><code class="filename">/var/run</code></span><a class="headerlink" title="Permalink to this term" href="#/var/run"></a></dt><dd><p>This compatibility symlink points to
<code class="filename">/run</code>, ensuring that programs referencing
this legacy path correctly find their runtime
data.</p></dd></dl></div></div><div class="refsect1"><a name="idm140711599028016"></a><h2 id="Home Directory">Home Directory<a class="headerlink" title="Permalink to this headline" href="#Home%20Directory"></a></h2><p>User applications may want to place files and directories in
the user's home directory. They should follow the following basic
structure. Note that some of these directories are also
standardized (though more weakly) by the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
Base Directory Specification</a>. Additional locations for
high-level user resources are defined by <a class="ulink" href="http://www.freedesktop.org/wiki/Software/xdg-user-dirs/" target="_top">xdg-user-dirs</a>.</p><div class="variablelist"><dl class="variablelist"><dt id="~/.cache"><span class="term"><code class="filename">~/.cache</code></span><a class="headerlink" title="Permalink to this term" href="#~/.cache"></a></dt><dd><p>Persistent user cache data. User programs may
place non-essential data in this directory. Flushing this
directory should have no effect on operation of programs,
except for increased runtimes necessary to rebuild these
caches. If an application finds
<code class="varname">$XDG_CACHE_HOME</code> set is should use the
directory specified in it instead of this
directory.</p></dd><dt id="~/.config"><span class="term"><code class="filename">~/.config</code></span><a class="headerlink" title="Permalink to this term" href="#~/.config"></a></dt><dd><p>Application configuration and state. When a
new user is created this directory will be empty or not exist
at all. Applications should fall back to defaults should their
configuration or state in this directory be missing. If an
application finds <code class="varname">$XDG_CONFIG_HOME</code> set is
should use the directory specified in it instead of this
directory.</p></dd><dt id="~/.local/bin"><span class="term"><code class="filename">~/.local/bin</code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/bin"></a></dt><dd><p>Executables that shall appear in the user's
<code class="varname">$PATH</code> search path. It is recommended not to
place executables in this directory that are not useful for
invocation from a shell; these should be placed in a
subdirectory of <code class="filename">~/.local/lib</code> instead.
Care should be taken when placing architecture-dependent
binaries in this place which might be problematic if the home
directory is shared between multiple hosts with different
architectures.</p></dd><dt id="~/.local/lib"><span class="term"><code class="filename">~/.local/lib</code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/lib"></a></dt><dd><p>Static, private vendor data that is compatible
with all architectures.</p></dd><dt id="~/.local/lib/arch-id"><span class="term"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/lib/arch-id"></a></dt><dd><p>Location for placing public dynamic libraries.
The architecture identifier to use, is defined on <a class="ulink" href="https://wiki.debian.org/Multiarch/Tuples" target="_top">Multiarch
Architecture Specifiers (Tuples)</a>
list.</p></dd><dt id="~/.local/share"><span class="term"><code class="filename">~/.local/share</code></span><a class="headerlink" title="Permalink to this term" href="#~/.local/share"></a></dt><dd><p>Resources shared between multiple packages,
such as fonts or artwork. Usually, the precise location and
format of files stored below this directory is subject to
specifications that ensure interoperability. If an application
finds <code class="varname">$XDG_DATA_HOME</code> set is should use the
directory specified in it instead of this
directory.</p></dd></dl></div></div><div class="refsect1"><a name="idm140711599009984"></a><h2 id="Unprivileged Write Access">Unprivileged Write Access<a class="headerlink" title="Permalink to this headline" href="#Unprivileged%20Write%20Access"></a></h2><p>Unprivileged processes generally lack write access to most
of the hierarchy.</p><p>The exceptions for normal users are
<code class="filename">/tmp</code>,
<code class="filename">/var/tmp</code>,
<code class="filename">/dev/shm</code>, as well as the home directory
<code class="varname">$HOME</code> (usually found below
<code class="filename">/home</code>) and the runtime directory
<code class="varname">$XDG_RUNTIME_DIR</code> (found below
<code class="filename">/run/user</code>) of the user, which are all
writable.</p><p>For unprivileged system processes only
<code class="filename">/tmp</code>,
<code class="filename">/var/tmp</code> and
<code class="filename">/dev/shm</code> are writable. If an
unprivileged system process needs a private, writable directory in
<code class="filename">/var</code> or <code class="filename">/run</code>, it is
recommended to either create it before dropping privileges in the
daemon code, to create it via
<a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
fragments during boot, or via the
<code class="varname">RuntimeDirectory=</code> directive of service units
(see
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
for details).</p></div><div class="refsect1"><a name="idm140711598998800"></a><h2 id="Node Types">Node Types<a class="headerlink" title="Permalink to this headline" href="#Node%20Types"></a></h2><p>Unix file systems support different types of file nodes,
including regular files, directories, symlinks, character and
block device nodes, sockets and FIFOs.</p><p>It is strongly recommended that <code class="filename">/dev</code> is
the only location below which device nodes shall be placed.
Similar, <code class="filename">/run</code> shall be the only location to
place sockets and FIFOs. Regular files, directories and symlinks
may be used in all directories.</p></div><div class="refsect1"><a name="idm140711598995600"></a><h2 id="System Packages">System Packages<a class="headerlink" title="Permalink to this headline" href="#System%20Packages"></a></h2><p>Developers of system packages should follow strict rules
when placing their own files in the file system. The following
table lists recommended locations for specific types of files
supplied by the vendor.</p><div class="table"><a name="idm140711598994336"></a><p class="title"><b>Table 1. System Package Vendor Files Locations</b></p><div class="table-contents"><table summary="System Package Vendor Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/usr/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path, compiled for any of the supported architectures compatible with the operating system. It is not recommended to place internal binaries or binaries that are not commonly invoked from the shell in this directory, such as daemon binaries. As this directory is shared with most other packages of the system special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, including private binaries and libraries, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">/usr/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures. Note that this generally does not include private executables since binaries of a specific architecture may be freely invoked from any other supported system architecture.</td></tr><tr><td align="left"><code class="filename">/usr/include/<em class="replaceable"><code>package</code></em></code></td><td align="left">Public C/C++ APIs of public shared libraries of the package.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed in the
<code class="filename">/usr/share</code> hierarchy, to the locations
defined by the various relevant specifications.</p><p>During runtime and for local configuration and state
additional directories are defined:</p><div class="table"><a name="idm140711598977056"></a><p class="title"><b>Table 2. System Package Variable Files Locations</b></p><div class="table-contents"><table summary="System Package Variable Files Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">/etc/<em class="replaceable"><code>package</code></em></code></td><td align="left">System-specific configuration for the package. It is recommended to default to safe fallbacks if this configuration is missing, if this is possible. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to copy or symlink the necessary files and directories from <code class="filename">/usr/share/factory</code> during boot, via the "<code class="literal">L</code>" or "<code class="literal">C</code>" directives.</td></tr><tr><td align="left"><code class="filename">/run/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime data for the package. Packages must be able to create the necessary subdirectories in this tree on their own, since the directory is flushed automatically on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot. Alternatively, the <code class="varname">RuntimeDirectory=</code> directive of service units may be used (see <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a> for details.)</td></tr><tr><td align="left"><code class="filename">/run/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Runtime log data for the package. As above, the package needs to make sure to create this directory if necessary, as it will be flushed on every boot.</td></tr><tr><td align="left"><code class="filename">/var/cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr><tr><td align="left"><code class="filename">/var/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent private data of the package. This is the primary place to put persistent data that does not fall into the other categories listed. Packages should be able to create the necessary subdirectories in this tree on their own, since the directory might be missing on boot. Alternatively, a <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a> fragment may be used to create the necessary directories during boot.</td></tr><tr><td align="left"><code class="filename">/var/log/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent log data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr><tr><td align="left"><code class="filename">/var/spool/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent spool/queue data of the package. As above, the package should make sure to create this directory if necessary, as it might be missing.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm140711598952368"></a><h2 id="User Packages">User Packages<a class="headerlink" title="Permalink to this headline" href="#User%20Packages"></a></h2><p>Programs running in user context should follow strict rules
when placing their own files in the user's home directory. The
following table lists recommended locations in the home directory
for specific types of files supplied by the vendor if the
application is installed in the home directory. (Note however,
that user applications installed system-wide should follow the
rules outlined above regarding placing vendor files.)</p><div class="table"><a name="idm140711598950880"></a><p class="title"><b>Table 3. User Package Vendor File Locations</b></p><div class="table-contents"><table summary="User Package Vendor File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.local/bin</code></td><td align="left">Package executables that shall appear in the <code class="varname">$PATH</code> executable search path. It is not recommended to place internal executables or executables that are not commonly invoked from the shell in this directory, such as daemon executables. As this directory is shared with most other packages of the user special care should be taken to pick unique names for files placed here, that are unlikely to clash with other package's files.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em></code></td><td align="left">Public shared libraries of the package. As above, be careful with using too generic names, and pick unique names for your libraries to place here to avoid name clashes.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private, static vendor resources of the package, compatible with any architecture, or any other kind of read-only vendor data.</td></tr><tr><td align="left"><code class="filename">~/.local/lib/<em class="replaceable"><code>arch-id</code></em>/<em class="replaceable"><code>package</code></em></code></td><td align="left">Private other vendor resources of the package that are architecture-specific and cannot be shared between architectures.</td></tr></tbody></table></div></div><br class="table-break"><p>Additional static vendor files may be installed in the
<code class="filename">~/.local/share</code> hierarchy, to the locations
defined by the various relevant specifications.</p><p>During runtime and for local configuration and state
additional directories are defined:</p><div class="table"><a name="idm140711598935680"></a><p class="title"><b>Table 4. User Package Variable File Locations</b></p><div class="table-contents"><table summary="User Package Variable File Locations" border="1"><colgroup><col align="left" class="directory"><col align="left" class="purpose"></colgroup><thead><tr><th align="left">Directory</th><th align="left">Purpose</th></tr></thead><tbody><tr><td align="left"><code class="filename">~/.config/<em class="replaceable"><code>package</code></em></code></td><td align="left">User-specific configuration and state for the package. It is required to default to safe fallbacks if this configuration is missing.</td></tr><tr><td align="left"><code class="filename"><code class="varname">$XDG_RUNTIME_DIR</code>/<em class="replaceable"><code>package</code></em></code></td><td align="left">User runtime data for the package.</td></tr><tr><td align="left"><code class="filename">~/.cache/<em class="replaceable"><code>package</code></em></code></td><td align="left">Persistent cache data of the package. If this directory is flushed the application should work correctly on next invocation, though possibly slowed down due to the need to rebuild any local cache files. The application must be capable of recreating this directory should it be missing and necessary.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idm140711598924480"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>,
<a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>,
<a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>,
<a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>,
<a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>,
<a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
</p></div></div></body></html>

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
'\" t
.TH "HALT" "8" "" "systemd 218" "halt"
.TH "HALT" "8" "" "systemd 219" "halt"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -22,12 +22,12 @@
.SH "NAME"
halt, poweroff, reboot \- Halt, power\-off or reboot the machine
.SH "SYNOPSIS"
.HP \w'\fBhalt\ \fR\fB[OPTIONS...]\fR\ 'u
\fBhalt \fR\fB[OPTIONS...]\fR
.HP \w'\fBpoweroff\ \fR\fB[OPTIONS...]\fR\ 'u
\fBpoweroff \fR\fB[OPTIONS...]\fR
.HP \w'\fBreboot\ \fR\fB[OPTIONS...]\fR\ 'u
\fBreboot \fR\fB[OPTIONS...]\fR
.HP \w'\fBhalt\fR\ 'u
\fBhalt\fR [OPTIONS...]
.HP \w'\fBpoweroff\fR\ 'u
\fBpoweroff\fR [OPTIONS...]
.HP \w'\fBreboot\fR\ 'u
\fBreboot\fR [OPTIONS...]
.SH "DESCRIPTION"
.PP
\fBhalt\fR,

View File

@ -19,28 +19,21 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">poweroff [OPTIONS...]</code> </p></div><div class="cmdsynopsis"><p><code class="command">reboot [OPTIONS...]</code> </p></div></div><div class="refsect1"><a name="idm140244150890256"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>halt</strong></span>,
<span class="command"><strong>poweroff</strong></span>, <span class="command"><strong>reboot</strong></span>
may be used to halt, power-off or reboot the
machine.</p></div><div class="refsect1"><a name="idm140244150887104"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--halt"><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#--halt"></a></dt><dd><p>Halt the machine,
regardless of which one of the three
commands is invoked.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#-p"></a></dt><dd><p>Power-off the machine,
regardless of which one of the three
commands is invoked.</p></dd><dt id="--reboot"><span class="term"><code class="option">--reboot</code></span><a class="headerlink" title="Permalink to this term" href="#--reboot"></a></dt><dd><p>Reboot the machine,
regardless of which one of the three
commands is invoked.</p></dd><dt id="-f"><span class="term"><code class="option">-f</code>, </span><span class="term"><code class="option">--force</code></span><a class="headerlink" title="Permalink to this term" href="#-f"></a></dt><dd><p>Force immediate halt,
power-off, reboot. Do not contact the
init system.</p></dd><dt id="-w"><span class="term"><code class="option">-w</code>, </span><span class="term"><code class="option">--wtmp-only</code></span><a class="headerlink" title="Permalink to this term" href="#-w"></a></dt><dd><p>Only write wtmp
shutdown entry, do not actually halt,
power-off, reboot.</p></dd><dt id="-d"><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--no-wtmp</code></span><a class="headerlink" title="Permalink to this term" href="#-d"></a></dt><dd><p>Do not write wtmp
shutdown entry.</p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall"></a></dt><dd><p>Do not send wall
message before
halt, power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm140244154770432"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure
code otherwise.</p></div><div class="refsect1"><a name="idm140244154769248"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>These are legacy commands available for
compatibility only.</p></div><div class="refsect1"><a name="idm140244154768064"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
<a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="halt"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>halt, poweroff, reboot — Halt, power-off or reboot the machine</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">halt</code> [OPTIONS...]</p></div><div class="cmdsynopsis"><p><code class="command">poweroff</code> [OPTIONS...]</p></div><div class="cmdsynopsis"><p><code class="command">reboot</code> [OPTIONS...]</p></div></div><div class="refsect1"><a name="idm139679172188704"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>halt</strong></span>, <span class="command"><strong>poweroff</strong></span>,
<span class="command"><strong>reboot</strong></span> may be used to halt, power-off or reboot
the machine.</p></div><div class="refsect1"><a name="idm139679172185504"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--help"><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#--help"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--halt"><span class="term"><code class="option">--halt</code></span><a class="headerlink" title="Permalink to this term" href="#--halt"></a></dt><dd><p>Halt the machine, regardless of which one of
the three commands is invoked.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--poweroff</code></span><a class="headerlink" title="Permalink to this term" href="#-p"></a></dt><dd><p>Power-off the machine, regardless of which one
of the three commands is invoked.</p></dd><dt id="--reboot"><span class="term"><code class="option">--reboot</code></span><a class="headerlink" title="Permalink to this term" href="#--reboot"></a></dt><dd><p>Reboot the machine, regardless of which one of
the three commands is invoked.</p></dd><dt id="-f"><span class="term"><code class="option">-f</code>, </span><span class="term"><code class="option">--force</code></span><a class="headerlink" title="Permalink to this term" href="#-f"></a></dt><dd><p>Force immediate halt, power-off, reboot. Do
not contact the init system.</p></dd><dt id="-w"><span class="term"><code class="option">-w</code>, </span><span class="term"><code class="option">--wtmp-only</code></span><a class="headerlink" title="Permalink to this term" href="#-w"></a></dt><dd><p>Only write wtmp shutdown entry, do not
actually halt, power-off, reboot.</p></dd><dt id="-d"><span class="term"><code class="option">-d</code>, </span><span class="term"><code class="option">--no-wtmp</code></span><a class="headerlink" title="Permalink to this term" href="#-d"></a></dt><dd><p>Do not write wtmp shutdown
entry.</p></dd><dt id="--no-wall"><span class="term"><code class="option">--no-wall</code></span><a class="headerlink" title="Permalink to this term" href="#--no-wall"></a></dt><dd><p>Do not send wall message before halt,
power-off, reboot.</p></dd></dl></div></div><div class="refsect1"><a name="idm139679176074656"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure code
otherwise.</p></div><div class="refsect1"><a name="idm139679176073472"></a><h2 id="Notes">Notes<a class="headerlink" title="Permalink to this headline" href="#Notes"></a></h2><p>These are legacy commands available for compatibility
only.</p></div><div class="refsect1"><a name="idm139679176072288"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
<a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>,
<a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -1,6 +1,6 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
@ -22,151 +22,147 @@
-->
<refentry id="halt"
xmlns:xi="http://www.w3.org/2001/XInclude">
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>halt</title>
<productname>systemd</productname>
<refentryinfo>
<title>halt</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>halt</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>halt</refentrytitle>
<manvolnum>8</manvolnum>
</refmeta>
<refnamediv>
<refname>halt</refname>
<refname>poweroff</refname>
<refname>reboot</refname>
<refpurpose>Halt, power-off or reboot the machine</refpurpose>
</refnamediv>
<refnamediv>
<refname>halt</refname>
<refname>poweroff</refname>
<refname>reboot</refname>
<refpurpose>Halt, power-off or reboot the machine</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>halt <arg choice="opt" rep="repeat">OPTIONS</arg></command>
</cmdsynopsis>
<cmdsynopsis>
<command>poweroff <arg choice="opt" rep="repeat">OPTIONS</arg></command>
</cmdsynopsis>
<cmdsynopsis>
<command>reboot <arg choice="opt" rep="repeat">OPTIONS</arg></command>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>halt</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>poweroff</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
</cmdsynopsis>
<cmdsynopsis>
<command>reboot</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para><command>halt</command>,
<command>poweroff</command>, <command>reboot</command>
may be used to halt, power-off or reboot the
machine.</para>
<para><command>halt</command>, <command>poweroff</command>,
<command>reboot</command> may be used to halt, power-off or reboot
the machine.</para>
</refsect1>
</refsect1>
<refsect1>
<title>Options</title>
<refsect1>
<title>Options</title>
<para>The following options are understood:</para>
<para>The following options are understood:</para>
<variablelist>
<varlistentry>
<term><option>--help</option></term>
<variablelist>
<varlistentry>
<term><option>--help</option></term>
<xi:include href="standard-options.xml" xpointer="help-text" />
</varlistentry>
<xi:include href="standard-options.xml" xpointer="help-text" />
</varlistentry>
<varlistentry>
<term><option>--halt</option></term>
<varlistentry>
<term><option>--halt</option></term>
<listitem><para>Halt the machine,
regardless of which one of the three
commands is invoked.</para></listitem>
</varlistentry>
<listitem><para>Halt the machine, regardless of which one of
the three commands is invoked.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-p</option></term>
<term><option>--poweroff</option></term>
<varlistentry>
<term><option>-p</option></term>
<term><option>--poweroff</option></term>
<listitem><para>Power-off the machine,
regardless of which one of the three
commands is invoked.</para></listitem>
</varlistentry>
<listitem><para>Power-off the machine, regardless of which one
of the three commands is invoked.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--reboot</option></term>
<varlistentry>
<term><option>--reboot</option></term>
<listitem><para>Reboot the machine,
regardless of which one of the three
commands is invoked.</para></listitem>
</varlistentry>
<listitem><para>Reboot the machine, regardless of which one of
the three commands is invoked.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-f</option></term>
<term><option>--force</option></term>
<varlistentry>
<term><option>-f</option></term>
<term><option>--force</option></term>
<listitem><para>Force immediate halt,
power-off, reboot. Do not contact the
init system.</para></listitem>
</varlistentry>
<listitem><para>Force immediate halt, power-off, reboot. Do
not contact the init system.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-w</option></term>
<term><option>--wtmp-only</option></term>
<varlistentry>
<term><option>-w</option></term>
<term><option>--wtmp-only</option></term>
<listitem><para>Only write wtmp
shutdown entry, do not actually halt,
power-off, reboot.</para></listitem>
</varlistentry>
<listitem><para>Only write wtmp shutdown entry, do not
actually halt, power-off, reboot.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>-d</option></term>
<term><option>--no-wtmp</option></term>
<varlistentry>
<term><option>-d</option></term>
<term><option>--no-wtmp</option></term>
<listitem><para>Do not write wtmp
shutdown entry.</para></listitem>
</varlistentry>
<listitem><para>Do not write wtmp shutdown
entry.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--no-wall</option></term>
<varlistentry>
<term><option>--no-wall</option></term>
<listitem><para>Do not send wall
message before
halt, power-off, reboot.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<listitem><para>Do not send wall message before halt,
power-off, reboot.</para></listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Exit status</title>
<refsect1>
<title>Exit status</title>
<para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
<para>On success, 0 is returned, a non-zero failure code
otherwise.</para>
</refsect1>
<refsect1>
<title>Notes</title>
<refsect1>
<title>Notes</title>
<para>These are legacy commands available for
compatibility only.</para>
</refsect1>
<para>These are legacy commands available for compatibility
only.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>shutdown</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry project='man-pages'><refentrytitle>wall</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "HOSTNAME" "5" "" "systemd 218" "hostname"
.TH "HOSTNAME" "5" "" "systemd 219" "hostname"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------

View File

@ -19,35 +19,31 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="hostname"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostname — Local hostname configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/hostname</code></p></div><div class="refsect1"><a name="idm140178793752064"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>The <code class="filename">/etc/hostname</code> file
configures the name of the local system that is set
during boot using the
<a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
system call. It should contain a single
newline-terminated hostname string. The
hostname may be a free-form string up to 64 characters
in length; however, it is recommended that it consists
only of 7-bit ASCII lower-case characters and no spaces or dots,
and limits itself to the format allowed for DNS domain
name labels, even though this is not a
strict requirement.</p><p>Depending on the operating system, other
configuration files might be checked for configuration
of the hostname as well, however only as fallback.</p><p>You may use
<a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
to change the value of this file during runtime from
the command line. Use
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
to initialize it on mounted (but not booted) system
images.</p></div><div class="refsect1"><a name="idm140178793746016"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p>The simple configuration file format of
<code class="filename">/etc/hostname</code> originates from
Debian GNU/Linux.</p></div><div class="refsect1"><a name="idm140178793744144"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(7)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
<a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>,
<a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
</p></div></div></body></html>
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="hostname"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostname — Local hostname configuration file</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">/etc/hostname</code></p></div><div class="refsect1"><a name="idm140466949530736"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>The <code class="filename">/etc/hostname</code> file configures the
name of the local system that is set during boot using the
<a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>
system call. It should contain a single newline-terminated
hostname string. The hostname may be a free-form string up to 64
characters in length; however, it is recommended that it consists
only of 7-bit ASCII lower-case characters and no spaces or dots,
and limits itself to the format allowed for DNS domain name
labels, even though this is not a strict requirement.</p><p>Depending on the operating system, other configuration files
might be checked for configuration of the hostname as well,
however only as fallback.</p><p>You may use
<a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
to change the value of this file during runtime from the command
line. Use
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
to initialize it on mounted (but not booted) system images.</p></div><div class="refsect1"><a name="idm140466949524832"></a><h2 id="History">History<a class="headerlink" title="Permalink to this headline" href="#History"></a></h2><p>The simple configuration file format of
<code class="filename">/etc/hostname</code> originates from Debian
GNU/Linux.</p></div><div class="refsect1"><a name="idm140466949522912"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(7)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>,
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
<a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>,
<a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -1,7 +1,6 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
@ -23,84 +22,80 @@
-->
<refentry id="hostname">
<refentryinfo>
<title>hostname</title>
<productname>systemd</productname>
<refentryinfo>
<title>hostname</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>hostname</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>hostname</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>hostname</refname>
<refpurpose>Local hostname configuration file</refpurpose>
</refnamediv>
<refnamediv>
<refname>hostname</refname>
<refpurpose>Local hostname configuration file</refpurpose>
</refnamediv>
<refsynopsisdiv>
<para><filename>/etc/hostname</filename></para>
</refsynopsisdiv>
<refsynopsisdiv>
<para><filename>/etc/hostname</filename></para>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para>The <filename>/etc/hostname</filename> file
configures the name of the local system that is set
during boot using the
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
system call. It should contain a single
newline-terminated hostname string. The
hostname may be a free-form string up to 64 characters
in length; however, it is recommended that it consists
only of 7-bit ASCII lower-case characters and no spaces or dots,
and limits itself to the format allowed for DNS domain
name labels, even though this is not a
strict requirement.</para>
<para>The <filename>/etc/hostname</filename> file configures the
name of the local system that is set during boot using the
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
system call. It should contain a single newline-terminated
hostname string. The hostname may be a free-form string up to 64
characters in length; however, it is recommended that it consists
only of 7-bit ASCII lower-case characters and no spaces or dots,
and limits itself to the format allowed for DNS domain name
labels, even though this is not a strict requirement.</para>
<para>Depending on the operating system, other
configuration files might be checked for configuration
of the hostname as well, however only as fallback.</para>
<para>Depending on the operating system, other configuration files
might be checked for configuration of the hostname as well,
however only as fallback.</para>
<para>You may use
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to change the value of this file during runtime from
the command line. Use
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to initialize it on mounted (but not booted) system
images.</para>
</refsect1>
<para>You may use
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to change the value of this file during runtime from the command
line. Use
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to initialize it on mounted (but not booted) system images.</para>
</refsect1>
<refsect1>
<title>History</title>
<refsect1>
<title>History</title>
<para>The simple configuration file format of
<filename>/etc/hostname</filename> originates from
Debian GNU/Linux.</para>
</refsect1>
<para>The simple configuration file format of
<filename>/etc/hostname</filename> originates from Debian
GNU/Linux.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

View File

@ -1,5 +1,5 @@
'\" t
.TH "HOSTNAMECTL" "1" "" "systemd 218" "hostnamectl"
.TH "HOSTNAMECTL" "1" "" "systemd 219" "hostnamectl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -130,8 +130,7 @@ Set the chassis type to
"tablet",
"handset",
"watch",
"embedded"
as well as the special chassis types
"embedded", as well as the special chassis types
"vm"
and
"container"

View File

@ -19,43 +19,33 @@
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 218</span><hr><div class="refentry"><a name="hostnamectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostnamectl — Control the system hostname</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">hostnamectl</code> [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm140098369737552"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>hostnamectl</strong></span> may be used to
query and change the system hostname and related
settings.</p><p>This tool distinguishes three different
hostnames: the high-level "pretty" hostname which
might include all kinds of special characters
(e.g. "Lennart's Laptop"), the static hostname which
is used to initialize the kernel hostname at boot
(e.g. "lennarts-laptop"), and the transient hostname
which is a default received from network configuration.
If a static hostname is set, and is valid (something other
than localhost), then the transient hostname is not used.</p><p>Note that the pretty hostname has little
restrictions on the characters used, while the static
and transient hostnames are limited to the usually
accepted characters of Internet domain names.</p><p>The static hostname is stored in
<code class="filename">/etc/hostname</code>, see
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>
for more information. The pretty hostname, chassis
type, and icon name are stored in
<code class="filename">/etc/machine-info</code>, see
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>.</p><p>Use
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
to initialize the system host name for mounted (but
not booted) system images.</p></div><div class="refsect1"><a name="idm140098369729088"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password"></a></dt><dd><p>Do not query the user
for authentication for privileged
operations.</p></dd><dt id="--static"><span class="term"><code class="option">--static</code>, </span><span class="term"><code class="option">--transient</code>, </span><span class="term"><code class="option">--pretty</code></span><a class="headerlink" title="Permalink to this term" href="#--static"></a></dt><dd><p>If
<span class="command"><strong>status</strong></span> is used (or
no explicit command is given) and one
of those fields is given,
<span class="command"><strong>hostnamectl</strong></span> will
print out just this selected
hostname.</p><p>If used with
<span class="command"><strong>set-hostname</strong></span>, only
the selected hostname(s) will be
updated. When more than one of those
options is used, all the specified
hostnames will be updated.
</p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#-H"></a></dt><dd><p><a name="host-text"></a>Execute the operation remotely. Specify a hostname, or a
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="hostnamectl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hostnamectl — Control the system hostname</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">hostnamectl</code> [OPTIONS...] {COMMAND}</p></div></div><div class="refsect1"><a name="idm139815306047440"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p><span class="command"><strong>hostnamectl</strong></span> may be used to query and
change the system hostname and related settings.</p><p>This tool distinguishes three different hostnames: the
high-level "pretty" hostname which might include all kinds of
special characters (e.g. "Lennart's Laptop"), the static hostname
which is used to initialize the kernel hostname at boot (e.g.
"lennarts-laptop"), and the transient hostname which is a default
received from network configuration. If a static hostname is set,
and is valid (something other than localhost), then the transient
hostname is not used.</p><p>Note that the pretty hostname has little restrictions on the
characters used, while the static and transient hostnames are
limited to the usually accepted characters of Internet domain
names.</p><p>The static hostname is stored in
<code class="filename">/etc/hostname</code>, see
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>
for more information. The pretty hostname, chassis type, and icon
name are stored in <code class="filename">/etc/machine-info</code>, see
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>.</p><p>Use
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
to initialize the system host name for mounted (but not booted)
system images.</p></div><div class="refsect1"><a name="idm139815306039440"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options"></a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-ask-password"><span class="term"><code class="option">--no-ask-password</code></span><a class="headerlink" title="Permalink to this term" href="#--no-ask-password"></a></dt><dd><p>Do not query the user for authentication for
privileged operations.</p></dd><dt id="--static"><span class="term"><code class="option">--static</code>, </span><span class="term"><code class="option">--transient</code>, </span><span class="term"><code class="option">--pretty</code></span><a class="headerlink" title="Permalink to this term" href="#--static"></a></dt><dd><p>If <span class="command"><strong>status</strong></span> is used (or no
explicit command is given) and one of those fields is given,
<span class="command"><strong>hostnamectl</strong></span> will print out just this
selected hostname.</p><p>If used with <span class="command"><strong>set-hostname</strong></span>, only the
selected hostname(s) will be updated. When more than one of
those options is used, all the specified hostnames will be
updated. </p></dd><dt id="-H"><span class="term"><code class="option">-H</code>, </span><span class="term"><code class="option">--host=</code></span><a class="headerlink" title="Permalink to this term" href="#-H"></a></dt><dd><p><a name="host-text"></a>Execute the operation remotely. Specify a hostname, or a
username and hostname separated by "<code class="literal">@</code>", to
connect to. The hostname may optionally be suffixed by a
container name, separated by "<code class="literal">:</code>", which
@ -66,96 +56,69 @@
<em class="replaceable"><code>HOST</code></em></strong></span>.</p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M"></a></dt><dd><p><a name="machine-text"></a>Execute operation on a local container. Specify a
container name to connect to.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h"></a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
</p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version"></a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd></dl></div><p>The following commands are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="status"><span class="term"><span class="command"><strong>status</strong></span></span><a class="headerlink" title="Permalink to this term" href="#status"></a></dt><dd><p>Show current system
hostname and related
information.</p></dd><dt id="set-hostname NAME"><span class="term"><span class="command"><strong>set-hostname <em class="replaceable"><code>NAME</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-hostname%20NAME"></a></dt><dd><p>Set the system
hostname to
<em class="replaceable"><code>NAME</code></em>. By
default, this will alter the pretty,
the static, and the transient hostname
alike; however, if one or more of
<code class="option">--static</code>,
<code class="option">--transient</code>,
<code class="option">--pretty</code> are used,
only the selected hostnames are
changed. If the pretty hostname is
being set, and static or transient are
being set as well, the specified
hostname will be simplified in regards
to the character set used before the
latter are updated. This is done by
replacing spaces with
"<code class="literal">-</code>" and removing
special characters. This ensures that
the pretty and the static hostname are
always closely related while still
following the validity rules of the
specific name. This simplification of
the hostname string is not done if
only the transient and/or static host
names are set, and the pretty host
name is left untouched.</p><p>Pass the empty string
"<code class="literal"></code>" as the hostname to
reset the selected hostnames to their
default (usually
"<code class="literal">localhost</code>").</p></dd><dt id="set-icon-name NAME"><span class="term"><span class="command"><strong>set-icon-name <em class="replaceable"><code>NAME</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-icon-name%20NAME"></a></dt><dd><p>Set the system icon
name to
<em class="replaceable"><code>NAME</code></em>. The
icon name is used by some graphical
applications to visualize this host.
The icon name should follow the <a class="ulink" href="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" target="_top">Icon
Naming Specification</a>.</p><p>Pass an empty string to reset
the icon name to the default value,
which is determined from chassis type
(see below) and possibly other
parameters.</p></dd><dt id="set-chassis TYPE"><span class="term"><span class="command"><strong>set-chassis <em class="replaceable"><code>TYPE</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-chassis%20TYPE"></a></dt><dd><p>Set the chassis type
to <em class="replaceable"><code>TYPE</code></em>.
The chassis type is used by some
graphical applications to visualize
the host or alter user interaction.
Currently, the following chassis types
are defined:
"<code class="literal">desktop</code>",
"<code class="literal">laptop</code>",
"<code class="literal">server</code>",
"<code class="literal">tablet</code>",
"<code class="literal">handset</code>",
"<code class="literal">watch</code>",
"<code class="literal">embedded</code>" as well as
the special chassis types
"<code class="literal">vm</code>" and
"<code class="literal">container</code>" for
virtualized systems that lack an
immediate physical chassis.</p><p>Pass an empty string to reset
the chassis type to the default value
which is determined from the firmware
and possibly other parameters.</p></dd><dt id="set-deployment ENVIRONMENT"><span class="term"><span class="command"><strong>set-deployment <em class="replaceable"><code>ENVIRONMENT</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-deployment%20ENVIRONMENT"></a></dt><dd><p>Set the deployment
environment
description. <em class="replaceable"><code>ENVIRONMENT</code></em>
must be a single word without any
control characters. One of the
following is suggested:
"<code class="literal">development</code>",
"<code class="literal">integration</code>",
"<code class="literal">staging</code>",
"<code class="literal">production</code>".
</p><p>Pass an empty string to reset to
the default empty value.</p></dd><dt id="set-location LOCATION"><span class="term"><span class="command"><strong>set-location <em class="replaceable"><code>LOCATION</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-location%20LOCATION"></a></dt><dd><p>Set the location
string for the system, if it is
known. <em class="replaceable"><code>LOCATION</code></em>
should be a human-friendly, free-form
string describing the physical
location of the system, if it is known
and applicable. This may be as generic
as "<code class="literal">Berlin, Germany</code>"
or as specific as "<code class="literal">Left Rack,
2nd Shelf</code>".</p><p>Pass an empty string to reset to
the default empty value.</p></dd></dl></div></div><div class="refsect1"><a name="idm140098368654352"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure
code otherwise.</p></div><div class="refsect1"><a name="idm140098368653200"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
<a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
<a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
</p></div></div></body></html>
hostname and related
information.</p></dd><dt id="set-hostname NAME"><span class="term"><span class="command"><strong>set-hostname <em class="replaceable"><code>NAME</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-hostname%20NAME"></a></dt><dd><p>Set the system hostname to
<em class="replaceable"><code>NAME</code></em>. By default, this will alter
the pretty, the static, and the transient hostname alike;
however, if one or more of <code class="option">--static</code>,
<code class="option">--transient</code>, <code class="option">--pretty</code> are
used, only the selected hostnames are changed. If the pretty
hostname is being set, and static or transient are being set
as well, the specified hostname will be simplified in regards
to the character set used before the latter are updated. This
is done by replacing spaces with "<code class="literal">-</code>" and
removing special characters. This ensures that the pretty and
the static hostname are always closely related while still
following the validity rules of the specific name. This
simplification of the hostname string is not done if only the
transient and/or static host names are set, and the pretty
host name is left untouched.</p><p>Pass the empty string "<code class="literal"></code>" as the
hostname to reset the selected hostnames to their default
(usually "<code class="literal">localhost</code>").</p></dd><dt id="set-icon-name NAME"><span class="term"><span class="command"><strong>set-icon-name <em class="replaceable"><code>NAME</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-icon-name%20NAME"></a></dt><dd><p>Set the system icon name to
<em class="replaceable"><code>NAME</code></em>. The icon name is used by some
graphical applications to visualize this host. The icon name
should follow the <a class="ulink" href="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" target="_top">Icon
Naming Specification</a>.</p><p>Pass an empty string to reset the icon name to the
default value, which is determined from chassis type (see
below) and possibly other parameters.</p></dd><dt id="set-chassis TYPE"><span class="term"><span class="command"><strong>set-chassis <em class="replaceable"><code>TYPE</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-chassis%20TYPE"></a></dt><dd><p>Set the chassis type to
<em class="replaceable"><code>TYPE</code></em>. The chassis type is used by
some graphical applications to visualize the host or alter
user interaction. Currently, the following chassis types are
defined:
"<code class="literal">desktop</code>",
"<code class="literal">laptop</code>",
"<code class="literal">server</code>",
"<code class="literal">tablet</code>",
"<code class="literal">handset</code>",
"<code class="literal">watch</code>",
"<code class="literal">embedded</code>",
as well as the special chassis types
"<code class="literal">vm</code>" and
"<code class="literal">container</code>" for virtualized systems that lack
an immediate physical chassis.</p><p>Pass an empty string to reset the chassis type to the
default value which is determined from the firmware and
possibly other parameters.</p></dd><dt id="set-deployment ENVIRONMENT"><span class="term"><span class="command"><strong>set-deployment <em class="replaceable"><code>ENVIRONMENT</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-deployment%20ENVIRONMENT"></a></dt><dd><p>Set the deployment environment description.
<em class="replaceable"><code>ENVIRONMENT</code></em> must be a single word
without any control characters. One of the following is
suggested:
"<code class="literal">development</code>",
"<code class="literal">integration</code>",
"<code class="literal">staging</code>",
"<code class="literal">production</code>".
</p><p>Pass an empty string to reset to the default empty
value.</p></dd><dt id="set-location LOCATION"><span class="term"><span class="command"><strong>set-location <em class="replaceable"><code>LOCATION</code></em></strong></span></span><a class="headerlink" title="Permalink to this term" href="#set-location%20LOCATION"></a></dt><dd><p>Set the location string for the system, if it
is known. <em class="replaceable"><code>LOCATION</code></em> should be a
human-friendly, free-form string describing the physical
location of the system, if it is known and applicable. This
may be as generic as "<code class="literal">Berlin, Germany</code>" or as
specific as "<code class="literal">Left Rack, 2nd Shelf</code>".</p><p>Pass an empty string to reset to the default empty
value.</p></dd></dl></div></div><div class="refsect1"><a name="idm139815304974256"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status"></a></h2><p>On success, 0 is returned, a non-zero failure code
otherwise.</p></div><div class="refsect1"><a name="idm139815304973104"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
<a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
<a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
</p></div></div></body></html>

View File

@ -1,6 +1,6 @@
<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<!--
This file is part of systemd.
@ -22,276 +22,239 @@
-->
<refentry id="hostnamectl" conditional='ENABLE_HOSTNAMED'
xmlns:xi="http://www.w3.org/2001/XInclude">
xmlns:xi="http://www.w3.org/2001/XInclude">
<refentryinfo>
<title>hostnamectl</title>
<productname>systemd</productname>
<refentryinfo>
<title>hostnamectl</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Lennart</firstname>
<surname>Poettering</surname>
<email>lennart@poettering.net</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>hostnamectl</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refmeta>
<refentrytitle>hostnamectl</refentrytitle>
<manvolnum>1</manvolnum>
</refmeta>
<refnamediv>
<refname>hostnamectl</refname>
<refpurpose>Control the system hostname</refpurpose>
</refnamediv>
<refnamediv>
<refname>hostnamectl</refname>
<refpurpose>Control the system hostname</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>hostnamectl</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="req">COMMAND</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsynopsisdiv>
<cmdsynopsis>
<command>hostnamectl</command>
<arg choice="opt" rep="repeat">OPTIONS</arg>
<arg choice="req">COMMAND</arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
<para><command>hostnamectl</command> may be used to
query and change the system hostname and related
settings.</para>
<para><command>hostnamectl</command> may be used to query and
change the system hostname and related settings.</para>
<para>This tool distinguishes three different
hostnames: the high-level "pretty" hostname which
might include all kinds of special characters
(e.g. "Lennart's Laptop"), the static hostname which
is used to initialize the kernel hostname at boot
(e.g. "lennarts-laptop"), and the transient hostname
which is a default received from network configuration.
If a static hostname is set, and is valid (something other
than localhost), then the transient hostname is not used.</para>
<para>This tool distinguishes three different hostnames: the
high-level "pretty" hostname which might include all kinds of
special characters (e.g. "Lennart's Laptop"), the static hostname
which is used to initialize the kernel hostname at boot (e.g.
"lennarts-laptop"), and the transient hostname which is a default
received from network configuration. If a static hostname is set,
and is valid (something other than localhost), then the transient
hostname is not used.</para>
<para>Note that the pretty hostname has little
restrictions on the characters used, while the static
and transient hostnames are limited to the usually
accepted characters of Internet domain names.</para>
<para>Note that the pretty hostname has little restrictions on the
characters used, while the static and transient hostnames are
limited to the usually accepted characters of Internet domain
names.</para>
<para>The static hostname is stored in
<filename>/etc/hostname</filename>, see
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more information. The pretty hostname, chassis
type, and icon name are stored in
<filename>/etc/machine-info</filename>, see
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
<para>The static hostname is stored in
<filename>/etc/hostname</filename>, see
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more information. The pretty hostname, chassis type, and icon
name are stored in <filename>/etc/machine-info</filename>, see
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>.</para>
<para>Use
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to initialize the system host name for mounted (but
not booted) system images.</para>
</refsect1>
<para>Use
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to initialize the system host name for mounted (but not booted)
system images.</para>
</refsect1>
<refsect1>
<title>Options</title>
<refsect1>
<title>Options</title>
<para>The following options are understood:</para>
<para>The following options are understood:</para>
<variablelist>
<varlistentry>
<term><option>--no-ask-password</option></term>
<variablelist>
<varlistentry>
<term><option>--no-ask-password</option></term>
<listitem><para>Do not query the user
for authentication for privileged
operations.</para></listitem>
</varlistentry>
<listitem><para>Do not query the user for authentication for
privileged operations.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--static</option></term>
<term><option>--transient</option></term>
<term><option>--pretty</option></term>
<varlistentry>
<term><option>--static</option></term>
<term><option>--transient</option></term>
<term><option>--pretty</option></term>
<listitem><para>If
<command>status</command> is used (or
no explicit command is given) and one
of those fields is given,
<command>hostnamectl</command> will
print out just this selected
hostname.</para>
<listitem><para>If <command>status</command> is used (or no
explicit command is given) and one of those fields is given,
<command>hostnamectl</command> will print out just this
selected hostname.</para>
<para>If used with
<command>set-hostname</command>, only
the selected hostname(s) will be
updated. When more than one of those
options is used, all the specified
hostnames will be updated.
</para></listitem>
</varlistentry>
<para>If used with <command>set-hostname</command>, only the
selected hostname(s) will be updated. When more than one of
those options is used, all the specified hostnames will be
updated. </para></listitem>
</varlistentry>
<xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="user-system-options.xml" xpointer="host" />
<xi:include href="user-system-options.xml" xpointer="machine" />
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
</variablelist>
<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
</variablelist>
<para>The following commands are understood:</para>
<para>The following commands are understood:</para>
<variablelist>
<varlistentry>
<term><command>status</command></term>
<variablelist>
<varlistentry>
<term><command>status</command></term>
<listitem><para>Show current system
hostname and related
information.</para></listitem>
</varlistentry>
<listitem><para>Show current system
hostname and related
information.</para></listitem>
</varlistentry>
<varlistentry>
<term><command>set-hostname <replaceable>NAME</replaceable></command></term>
<varlistentry>
<term><command>set-hostname <replaceable>NAME</replaceable></command></term>
<listitem><para>Set the system
hostname to
<replaceable>NAME</replaceable>. By
default, this will alter the pretty,
the static, and the transient hostname
alike; however, if one or more of
<option>--static</option>,
<option>--transient</option>,
<option>--pretty</option> are used,
only the selected hostnames are
changed. If the pretty hostname is
being set, and static or transient are
being set as well, the specified
hostname will be simplified in regards
to the character set used before the
latter are updated. This is done by
replacing spaces with
<literal>-</literal> and removing
special characters. This ensures that
the pretty and the static hostname are
always closely related while still
following the validity rules of the
specific name. This simplification of
the hostname string is not done if
only the transient and/or static host
names are set, and the pretty host
name is left untouched.</para>
<listitem><para>Set the system hostname to
<replaceable>NAME</replaceable>. By default, this will alter
the pretty, the static, and the transient hostname alike;
however, if one or more of <option>--static</option>,
<option>--transient</option>, <option>--pretty</option> are
used, only the selected hostnames are changed. If the pretty
hostname is being set, and static or transient are being set
as well, the specified hostname will be simplified in regards
to the character set used before the latter are updated. This
is done by replacing spaces with <literal>-</literal> and
removing special characters. This ensures that the pretty and
the static hostname are always closely related while still
following the validity rules of the specific name. This
simplification of the hostname string is not done if only the
transient and/or static host names are set, and the pretty
host name is left untouched.</para>
<para>Pass the empty string
<literal></literal> as the hostname to
reset the selected hostnames to their
default (usually
<literal>localhost</literal>).</para></listitem>
</varlistentry>
<para>Pass the empty string <literal></literal> as the
hostname to reset the selected hostnames to their default
(usually <literal>localhost</literal>).</para></listitem>
</varlistentry>
<varlistentry>
<term><command>set-icon-name <replaceable>NAME</replaceable></command></term>
<varlistentry>
<term><command>set-icon-name <replaceable>NAME</replaceable></command></term>
<listitem><para>Set the system icon
name to
<replaceable>NAME</replaceable>. The
icon name is used by some graphical
applications to visualize this host.
The icon name should follow the <ulink
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">Icon
Naming Specification</ulink>.</para>
<listitem><para>Set the system icon name to
<replaceable>NAME</replaceable>. The icon name is used by some
graphical applications to visualize this host. The icon name
should follow the <ulink
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">Icon
Naming Specification</ulink>.</para>
<para>Pass an empty string to reset
the icon name to the default value,
which is determined from chassis type
(see below) and possibly other
parameters.</para></listitem>
</varlistentry>
<para>Pass an empty string to reset the icon name to the
default value, which is determined from chassis type (see
below) and possibly other parameters.</para></listitem>
</varlistentry>
<varlistentry>
<term><command>set-chassis <replaceable>TYPE</replaceable></command></term>
<varlistentry>
<term><command>set-chassis <replaceable>TYPE</replaceable></command></term>
<listitem><para>Set the chassis type
to <replaceable>TYPE</replaceable>.
The chassis type is used by some
graphical applications to visualize
the host or alter user interaction.
Currently, the following chassis types
are defined:
<literal>desktop</literal>,
<literal>laptop</literal>,
<literal>server</literal>,
<literal>tablet</literal>,
<literal>handset</literal>,
<literal>watch</literal>,
<literal>embedded</literal> as well as
the special chassis types
<literal>vm</literal> and
<literal>container</literal> for
virtualized systems that lack an
immediate physical chassis.</para>
<listitem><para>Set the chassis type to
<replaceable>TYPE</replaceable>. The chassis type is used by
some graphical applications to visualize the host or alter
user interaction. Currently, the following chassis types are
defined:
<literal>desktop</literal>,
<literal>laptop</literal>,
<literal>server</literal>,
<literal>tablet</literal>,
<literal>handset</literal>,
<literal>watch</literal>,
<literal>embedded</literal>,
as well as the special chassis types
<literal>vm</literal> and
<literal>container</literal> for virtualized systems that lack
an immediate physical chassis.</para>
<para>Pass an empty string to reset
the chassis type to the default value
which is determined from the firmware
and possibly other parameters.</para>
</listitem>
</varlistentry>
<para>Pass an empty string to reset the chassis type to the
default value which is determined from the firmware and
possibly other parameters.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>set-deployment <replaceable>ENVIRONMENT</replaceable></command></term>
<varlistentry>
<term><command>set-deployment <replaceable>ENVIRONMENT</replaceable></command></term>
<listitem><para>Set the deployment
environment
description. <replaceable>ENVIRONMENT</replaceable>
must be a single word without any
control characters. One of the
following is suggested:
<literal>development</literal>,
<literal>integration</literal>,
<literal>staging</literal>,
<literal>production</literal>.
</para>
<listitem><para>Set the deployment environment description.
<replaceable>ENVIRONMENT</replaceable> must be a single word
without any control characters. One of the following is
suggested:
<literal>development</literal>,
<literal>integration</literal>,
<literal>staging</literal>,
<literal>production</literal>.
</para>
<para>Pass an empty string to reset to
the default empty value.</para>
</listitem>
</varlistentry>
<para>Pass an empty string to reset to the default empty
value.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><command>set-location <replaceable>LOCATION</replaceable></command></term>
<varlistentry>
<term><command>set-location <replaceable>LOCATION</replaceable></command></term>
<listitem><para>Set the location
string for the system, if it is
known. <replaceable>LOCATION</replaceable>
should be a human-friendly, free-form
string describing the physical
location of the system, if it is known
and applicable. This may be as generic
as <literal>Berlin, Germany</literal>
or as specific as <literal>Left Rack,
2nd Shelf</literal>.</para>
<listitem><para>Set the location string for the system, if it
is known. <replaceable>LOCATION</replaceable> should be a
human-friendly, free-form string describing the physical
location of the system, if it is known and applicable. This
may be as generic as <literal>Berlin, Germany</literal> or as
specific as <literal>Left Rack, 2nd Shelf</literal>.</para>
<para>Pass an empty string to reset to
the default empty value.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<para>Pass an empty string to reset to the default empty
value.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Exit status</title>
<refsect1>
<title>Exit status</title>
<para>On success, 0 is returned, a non-zero failure
code otherwise.</para>
</refsect1>
<para>On success, 0 is returned, a non-zero failure code
otherwise.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>
</refsect1>
</refentry>

60
man/hwdb.7 Normal file
View File

@ -0,0 +1,60 @@
'\" t
.TH "HWDB" "7" "" "systemd 219" "hwdb"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
hwdb \- Hardware Database
.SH "DESCRIPTION"
.PP
The hardware database is a key\-value store for associating modalias\-like keys to udev\-properties\-like values\&. It is used primarily by udev to add the relevant properties to matching devices, but it can also be queried directly\&.
.SH "HARDWARE DATABASE FILES"
.PP
The hwdb files are read from the files located in the system hwdb directory
/usr/lib/udev/hwdb\&.d, the volatile runtime directory
/run/udev/hwdb\&.d
and the local administration directory
/etc/udev/hwdb\&.d\&. All hwdb files are collectively sorted and processed in lexical order, regardless of the directories in which they live\&. However, files with identical filenames replace each other\&. Files in
/etc
have the highest priority, files in
/run
take precedence over files with the same name in
/usr/lib\&. This can be used to override a system\-supplied hwdb file with a local file if needed; a symlink in
/etc
with the same name as a hwdb file in
/usr/lib, pointing to
/dev/null, disables the hwdb file entirely\&. hwdb files must have the extension
\&.hwdb; other extensions are ignored\&.
.PP
The hwdb file contains data records consisting of matches and associated key\-value pairs\&. Every record in the hwdb starts with one or more match string, specifying a shell glob to compare the database lookup string against\&. Multiple match lines are specified in additional consecutive lines\&. Every match line is compared indivdually, they are combined by OR\&. Every match line must start at the first character of the line\&.
.PP
The match lines are followed by one or more key\-value pair lines, which are recognized by a leading space character\&. The key name and value are separated by
"="\&. An empty line signifies the end of a record\&. Lines beginning with
"#"
are ignored\&.
.PP
The content of all hwdb files is read by
\fBsystemd-hwdb\fR(8)
and compiled to a binary database located at
/etc/udev/hwdb\&.bin, or alternatively
/usr/lib/udev/hwdb\&.bin
if you want ship the compiled database in an immutable image\&. During runtime only the binary database is used\&.
.SH "SEE ALSO"
.PP
\fBsystemd-hwdb\fR(8)

53
man/hwdb.html Normal file
View File

@ -0,0 +1,53 @@
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>hwdb</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
a.headerlink {
color: #c60f0f;
font-size: 0.8em;
padding: 0 4px 0 4px;
text-decoration: none;
visibility: hidden;
}
a.headerlink:hover {
background-color: #c60f0f;
color: white;
}
h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
visibility: visible;
}
</style><a href="index.html">Index </a>·
<a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </a>·
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="hwdb"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>hwdb — Hardware Database</p></div><div class="refsect1"><a name="idm140730111822256"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>The hardware database is a key-value store for associating modalias-like keys to
udev-properties-like values. It is used primarily by udev to add the relevant properties
to matching devices, but it can also be queried directly.</p></div><div class="refsect1"><a name="idm140730111820944"></a><h2 id="Hardware Database Files">Hardware Database Files<a class="headerlink" title="Permalink to this headline" href="#Hardware%20Database%20Files"></a></h2><p>The hwdb files are read from the files located in the
system hwdb directory <code class="filename">/usr/lib/udev/hwdb.d</code>,
the volatile runtime directory <code class="filename">/run/udev/hwdb.d</code>
and the local administration directory <code class="filename">/etc/udev/hwdb.d</code>.
All hwdb files are collectively sorted and processed in lexical order,
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <code class="filename">/etc</code>
have the highest priority, files in <code class="filename">/run</code> take precedence
over files with the same name in <code class="filename">/usr/lib</code>. This can be
used to override a system-supplied hwdb file with a local file if needed;
a symlink in <code class="filename">/etc</code> with the same name as a hwdb file in
<code class="filename">/usr/lib</code>, pointing to <code class="filename">/dev/null</code>,
disables the hwdb file entirely. hwdb files must have the extension
<code class="filename">.hwdb</code>; other extensions are ignored.</p><p>The hwdb file contains data records consisting of matches and
associated key-value pairs. Every record in the hwdb starts with one or
more match string, specifying a shell glob to compare the database
lookup string against. Multiple match lines are specified in additional
consecutive lines. Every match line is compared indivdually, they are
combined by OR. Every match line must start at the first character of
the line.</p><p>The match lines are followed by one or more key-value pair lines, which
are recognized by a leading space character. The key name and value are separated
by "<code class="literal">=</code>". An empty line signifies the end
of a record. Lines beginning with "<code class="literal">#</code>" are ignored.</p><p>The content of all hwdb files is read by
<a href="systemd-hwdb.html"><span class="citerefentry"><span class="refentrytitle">systemd-hwdb</span>(8)</span></a>
and compiled to a binary database located at <code class="filename">/etc/udev/hwdb.bin</code>,
or alternatively <code class="filename">/usr/lib/udev/hwdb.bin</code> if you want ship the compiled
database in an immutable image.
During runtime only the binary database is used.</p></div><div class="refsect1"><a name="idm140730111807056"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p>
<a href="systemd-hwdb.html"><span class="citerefentry"><span class="refentrytitle">systemd-hwdb</span>(8)</span></a>
</p></div></div></body></html>

86
man/hwdb.xml Normal file
View File

@ -0,0 +1,86 @@
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<refentry id="hwdb" conditional="ENABLE_HWDB">
<refentryinfo>
<title>hwdb</title>
<productname>systemd</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Kay</firstname>
<surname>Sievers</surname>
<email>kay@vrfy.org</email>
</author>
<author>
<contrib>Developer</contrib>
<firstname>Tom</firstname>
<surname>Gundersen</surname>
<email>teg@jklm.no</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>hwdb</refentrytitle>
<manvolnum>7</manvolnum>
</refmeta>
<refnamediv>
<refname>hwdb</refname>
<refpurpose>Hardware Database</refpurpose>
</refnamediv>
<refsect1><title>Description</title>
<para>The hardware database is a key-value store for associating modalias-like keys to
udev-properties-like values. It is used primarily by udev to add the relevant properties
to matching devices, but it can also be queried directly.</para>
</refsect1>
<refsect1><title>Hardware Database Files</title>
<para>The hwdb files are read from the files located in the
system hwdb directory <filename>/usr/lib/udev/hwdb.d</filename>,
the volatile runtime directory <filename>/run/udev/hwdb.d</filename>
and the local administration directory <filename>/etc/udev/hwdb.d</filename>.
All hwdb files are collectively sorted and processed in lexical order,
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <filename>/etc</filename>
have the highest priority, files in <filename>/run</filename> take precedence
over files with the same name in <filename>/usr/lib</filename>. This can be
used to override a system-supplied hwdb file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a hwdb file in
<filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
disables the hwdb file entirely. hwdb files must have the extension
<filename>.hwdb</filename>; other extensions are ignored.</para>
<para>The hwdb file contains data records consisting of matches and
associated key-value pairs. Every record in the hwdb starts with one or
more match string, specifying a shell glob to compare the database
lookup string against. Multiple match lines are specified in additional
consecutive lines. Every match line is compared indivdually, they are
combined by OR. Every match line must start at the first character of
the line.</para>
<para>The match lines are followed by one or more key-value pair lines, which
are recognized by a leading space character. The key name and value are separated
by <literal>=</literal>. An empty line signifies the end
of a record. Lines beginning with <literal>#</literal> are ignored.</para>
<para>The content of all hwdb files is read by
<citerefentry><refentrytitle>systemd-hwdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
and compiled to a binary database located at <filename>/etc/udev/hwdb.bin</filename>,
or alternatively <filename>/usr/lib/udev/hwdb.bin</filename> if you want ship the compiled
database in an immutable image.
During runtime only the binary database is used.</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<citerefentry>
<refentrytitle>systemd-hwdb</refentrytitle><manvolnum>8</manvolnum>
</citerefentry>
</para>
</refsect1>
</refentry>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
'\" t
.TH "JOURNALCTL" "1" "" "systemd 218" "journalctl"
.TH "JOURNALCTL" "1" "" "systemd 219" "journalctl"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -61,9 +61,13 @@ The set of journal files which will be used can be modified using the
\fB\-\-file\fR
options, see below\&.
.PP
All users are granted access to their private per\-user journals\&. However, by default, only root and users who are members of the
"systemd\-journal"
group get access to the system journal and the journals of other users\&.
All users are granted access to their private per\-user journals\&. However, by default, only root and users who are members of a few special groups are granted access to the system journal and the journals of other users\&. Members of the the
"systemd\-journal",
"adm", and
"wheel"
groups can read all journal files\&. Note that the two latter groups traditionally have additional privileges specified by the distribution\&. Members of the
"wheel"
group can often perform administrative tasks\&.
.PP
The output is paged through
\fBless\fR
@ -303,22 +307,14 @@ This parameter can be specified multiple times\&.
Filter output by message priorities or priority ranges\&. Takes either a single numeric or textual log level (i\&.e\&. between 0/"emerg"
and 7/"debug"), or a range of numeric/text log levels in the form FROM\&.\&.TO\&. The log levels are the usual syslog log levels as documented in
\fBsyslog\fR(3), i\&.e\&.
"emerg"
(0),
"alert"
(1),
"crit"
(2),
"err"
(3),
"warning"
(4),
"notice"
(5),
"info"
(6),
"debug"
(7)\&. If a single log level is specified, all messages with this log level or a lower (hence more important) log level are shown\&. If a range is specified, all messages within the range are shown, including both the start and the end value of the range\&. This will add
"emerg"\ \&(0),
"alert"\ \&(1),
"crit"\ \&(2),
"err"\ \&(3),
"warning"\ \&(4),
"notice"\ \&(5),
"info"\ \&(6),
"debug"\ \&(7)\&. If a single log level is specified, all messages with this log level or a lower (hence more important) log level are shown\&. If a range is specified, all messages within the range are shown, including both the start and the end value of the range\&. This will add
"PRIORITY="
matches for the specified priorities\&.
.RE
@ -429,7 +425,20 @@ Shows the current disk usage of all journal files\&. This shows the sum of the d
.PP
\fB\-\-vacuum\-size=\fR, \fB\-\-vacuum\-time=\fR
.RS 4
Removes archived journal files until the disk space they use falls below the specified size (specified with the usual K, M, G, T suffixes), or all journal files contain no data older than the specified timespan (specified with the usual s, min, h, days, months, weeks, years suffixes)\&. Note that running
Removes archived journal files until the disk space they use falls below the specified size (specified with the usual
"K",
"M",
"G",
"T"
suffixes), or all journal files contain no data older than the specified timespan (specified with the usual
"s",
"min",
"h",
"days",
"months",
"weeks",
"years"
suffixes)\&. Note that running
\fB\-\-vacuum\-size=\fR
has only indirect effect on the output shown by
\fB\-\-disk\-usage\fR

Some files were not shown because too many files have changed in this diff Show More