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/localtime.5 \
man/machine-id.5 \ man/machine-id.5 \
man/machine-info.5 \ man/machine-info.5 \
man/networkctl.1 \
man/os-release.5 \ man/os-release.5 \
man/sd-daemon.3 \ man/sd-daemon.3 \
man/sd-id128.3 \ man/sd-id128.3 \
@ -64,7 +65,6 @@ MANPAGES += \
man/systemd-detect-virt.1 \ man/systemd-detect-virt.1 \
man/systemd-efi-boot-generator.8 \ man/systemd-efi-boot-generator.8 \
man/systemd-escape.1 \ man/systemd-escape.1 \
man/systemd-firstboot.1 \
man/systemd-fsck@.service.8 \ man/systemd-fsck@.service.8 \
man/systemd-fstab-generator.8 \ man/systemd-fstab-generator.8 \
man/systemd-getty-generator.8 \ man/systemd-getty-generator.8 \
@ -99,6 +99,7 @@ MANPAGES += \
man/systemd.automount.5 \ man/systemd.automount.5 \
man/systemd.device.5 \ man/systemd.device.5 \
man/systemd.exec.5 \ man/systemd.exec.5 \
man/systemd.generator.7 \
man/systemd.journal-fields.7 \ man/systemd.journal-fields.7 \
man/systemd.kill.5 \ man/systemd.kill.5 \
man/systemd.link.5 \ man/systemd.link.5 \
@ -198,12 +199,14 @@ MANPAGES_ALIAS += \
man/sd_journal_wait.3 \ man/sd_journal_wait.3 \
man/sd_machine_get_ifindices.3 \ man/sd_machine_get_ifindices.3 \
man/sd_notifyf.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/sleep.conf.d.5 \
man/system.conf.d.5 \ man/system.conf.d.5 \
man/systemd-ask-password-console.path.8 \ man/systemd-ask-password-console.path.8 \
man/systemd-ask-password-wall.path.8 \ man/systemd-ask-password-wall.path.8 \
man/systemd-ask-password-wall.service.8 \ man/systemd-ask-password-wall.service.8 \
man/systemd-firstboot.service.1 \
man/systemd-fsck-root.service.8 \ man/systemd-fsck-root.service.8 \
man/systemd-fsck.8 \ man/systemd-fsck.8 \
man/systemd-hibernate-resume.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_journal_wait.3: man/sd_journal_get_fd.3
man/sd_machine_get_ifindices.3: man/sd_machine_get_class.3 man/sd_machine_get_ifindices.3: man/sd_machine_get_class.3
man/sd_notifyf.3: man/sd_notify.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/sleep.conf.d.5: man/systemd-sleep.conf.5
man/system.conf.d.5: man/systemd-system.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-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.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-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-root.service.8: man/systemd-fsck@.service.8
man/systemd-fsck.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 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 man/sd_notifyf.html: man/sd_notify.html
$(html-alias) $(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 man/sleep.conf.d.html: man/systemd-sleep.conf.html
$(html-alias) $(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 man/systemd-ask-password-wall.service.html: man/systemd-ask-password-console.service.html
$(html-alias) $(html-alias)
man/systemd-firstboot.service.html: man/systemd-firstboot.html
$(html-alias)
man/systemd-fsck-root.service.html: man/systemd-fsck@.service.html man/systemd-fsck-root.service.html: man/systemd-fsck@.service.html
$(html-alias) $(html-alias)
@ -732,6 +743,17 @@ MANPAGES_ALIAS += \
endif 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 if ENABLE_HOSTNAMED
MANPAGES += \ MANPAGES += \
man/hostnamectl.1 \ man/hostnamectl.1 \
@ -744,6 +766,16 @@ man/systemd-hostnamed.html: man/systemd-hostnamed.service.html
endif endif
if ENABLE_HWDB
MANPAGES += \
man/hwdb.7 \
man/systemd-hwdb.8
MANPAGES_ALIAS += \
#
endif
if ENABLE_KDBUS if ENABLE_KDBUS
MANPAGES += \ MANPAGES += \
man/sd_bus_creds_get_pid.3 \ man/sd_bus_creds_get_pid.3 \
@ -1146,10 +1178,16 @@ endif
if ENABLE_MACHINED if ENABLE_MACHINED
MANPAGES += \ MANPAGES += \
man/machinectl.1 \ man/machinectl.1 \
man/nss-mymachines.8 \
man/systemd-machined.service.8 man/systemd-machined.service.8
MANPAGES_ALIAS += \ MANPAGES_ALIAS += \
man/libnss_mymachines.so.2.8 \
man/systemd-machined.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/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 man/systemd-machined.html: man/systemd-machined.service.html
$(html-alias) $(html-alias)
@ -1312,8 +1350,10 @@ if HAVE_MYHOSTNAME
MANPAGES += \ MANPAGES += \
man/nss-myhostname.8 man/nss-myhostname.8
MANPAGES_ALIAS += \ 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 endif
@ -1593,6 +1633,7 @@ EXTRA_DIST += \
man/halt.xml \ man/halt.xml \
man/hostname.xml \ man/hostname.xml \
man/hostnamectl.xml \ man/hostnamectl.xml \
man/hwdb.xml \
man/journalctl.xml \ man/journalctl.xml \
man/journald.conf.xml \ man/journald.conf.xml \
man/kernel-command-line.xml \ man/kernel-command-line.xml \
@ -1608,7 +1649,9 @@ EXTRA_DIST += \
man/machine-info.xml \ man/machine-info.xml \
man/machinectl.xml \ man/machinectl.xml \
man/modules-load.d.xml \ man/modules-load.d.xml \
man/networkctl.xml \
man/nss-myhostname.xml \ man/nss-myhostname.xml \
man/nss-mymachines.xml \
man/os-release.xml \ man/os-release.xml \
man/pam_systemd.xml \ man/pam_systemd.xml \
man/resolved.conf.xml \ man/resolved.conf.xml \
@ -1702,6 +1745,7 @@ EXTRA_DIST += \
man/systemd-hibernate-resume-generator.xml \ man/systemd-hibernate-resume-generator.xml \
man/systemd-hibernate-resume@.service.xml \ man/systemd-hibernate-resume@.service.xml \
man/systemd-hostnamed.service.xml \ man/systemd-hostnamed.service.xml \
man/systemd-hwdb.xml \
man/systemd-inhibit.xml \ man/systemd-inhibit.xml \
man/systemd-initctl.service.xml \ man/systemd-initctl.service.xml \
man/systemd-journal-gatewayd.service.xml \ man/systemd-journal-gatewayd.service.xml \
@ -1748,6 +1792,7 @@ EXTRA_DIST += \
man/systemd.device.xml \ man/systemd.device.xml \
man/systemd.directives.xml \ man/systemd.directives.xml \
man/systemd.exec.xml \ man/systemd.exec.xml \
man/systemd.generator.xml \
man/systemd.index.xml \ man/systemd.index.xml \
man/systemd.journal-fields.xml \ man/systemd.journal-fields.xml \
man/systemd.kill.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 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: CHANGES WITH 218:
* When querying unit file enablement status (for example via * 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 fact that many distributions only ship a very small number
of LSB/SysV init scripts nowadays. 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 virtualization anymore by the virtualization detection
logic. After all, they generally have unrestricted access to logic. After all, they generally have unrestricted access to
the hardware and usually are used to manage the unprivileged 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 * The memory.use_hierarchy cgroup attribute is now enabled for
all cgroups systemd creates in the memory cgroup all cgroups systemd creates in the memory cgroup
hierarchy. This option is likely to be come the built-in hierarchy. This option is likely to be come the built-in
default in the kernel anyway, and the non-hierarchial mode default in the kernel anyway, and the non-hierarchical mode
never made much sense in the intrinsically hierarchial never made much sense in the intrinsically hierarchical
cgroup system. cgroup system.
* A new field _SYSTEMD_SLICE= is logged along with all journal * 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. together, or apply resource limits on them.
Slice units may be used to partition system resources in an 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 default there are now three slices: system.slice (for all
system services), user.slice (for all user sessions), system services), user.slice (for all user sessions),
machine.slice (for VMs and containers). machine.slice (for VMs and containers).
@ -3555,7 +3879,7 @@ CHANGES WITH 190:
keys all the time, even in graphical sessions. If DEs want keys all the time, even in graphical sessions. If DEs want
to handle these events on their own they should take the new to handle these events on their own they should take the new
handle-power-key, handle-sleep-key and handle-lid-switch 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: that is to invoke the DE wrapped in an invocation of:
systemd-inhibit --what=handle-power-key:handle-sleep-key:handle-lid-switch ... 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: create additional symlinks in /dev/disk/ and /dev/tape:
CONFIG_BLK_DEV_BSG CONFIG_BLK_DEV_BSG
Required for PrivateNetwork in service units: Required for PrivateNetwork and PrivateDevices in service units:
CONFIG_NET_NS 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: Optional but strongly recommended:
CONFIG_IPV6 CONFIG_IPV6
@ -111,7 +114,7 @@ REQUIREMENTS:
libcap libcap
libmount >= 2.20 (from util-linux) libmount >= 2.20 (from util-linux)
libseccomp >= 1.0.0 (optional) libseccomp >= 1.0.0 (optional)
libblkid >= 2.20 (from util-linux) (optional) libblkid >= 2.24 (from util-linux) (optional)
libkmod >= 15 (optional) libkmod >= 15 (optional)
PAM >= 1.1.2 (optional) PAM >= 1.1.2 (optional)
libcryptsetup (optional) libcryptsetup (optional)
@ -175,14 +178,9 @@ USERS AND GROUPS:
During runtime, the journal daemon requires the During runtime, the journal daemon requires the
"systemd-journal" system group to exist. New journal files will "systemd-journal" system group to exist. New journal files will
be readable by this group (but not writable), which may be used be readable by this group (but not writable), which may be used
to grant specific users read access. to grant specific users read access. In addition, system
groups "wheel" and "adm" will be given read-only access to
It is also recommended to grant read access to all journal journal files using systemd-tmpfiles.service.
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/
The journal gateway daemon requires the The journal gateway daemon requires the
"systemd-journal-gateway" system user and group to "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 automount points even when the original .automount file did not exist
anymore. Only the .mount unit was still around. 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: * ExecStart with unicode characters fails in strv_split_quoted:
[Service] [Service]
@ -18,12 +16,13 @@ Bugfixes:
str_split_quoted() should return a real return code, so spawn_child can str_split_quoted() should return a real return code, so spawn_child can
report the failure properly. report the failure properly.
* When systemctl --host is used, underlying ssh connection can remain open.
bus_close does not kill children?
External: External:
* Fedora: add an rpmlint check that verifies that all unit files in the RPM are listed in %systemd_post macros. * 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: move kernel image to /usr/lib/modules/, kernel-install will take care of populating /boot
* Fedora: remove /etc/resolv.conf tmpfiles hack * Fedora: remove /etc/resolv.conf tmpfiles hack
@ -35,14 +34,141 @@ External:
Features: 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 * 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 * "systemctl preset-all" should probably order the unit files it
operates on lexicographically before starting to work, in order to operates on lexicographically before starting to work, in order to
ensure deterministic behaviour if two unit files conflict (like DMs 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 * systemd-journal-upload (or a new, related tool): allow pushing out
journal messages onto the network in BSD syslog protocol, 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. useful as a one-stop debugging tool.
* synchronize console access with BSD locks: * synchronize console access with BSD locks:
@ -74,10 +200,6 @@ Features:
* timedated should compensate on SetTime for the time spent in polkit * 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 * figure out when we can use the coarse timers
* sd-resolve: drop res_query wrapping, people should call via the bus to resolved instead * 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 * 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 * 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 * 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 * 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 * 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? * 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: 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 * refcounting in sd-resolve is borked
@ -164,6 +285,7 @@ Features:
for all routes to it. possibly a second default for DHCP routes. for all routes to it. possibly a second default for DHCP routes.
- allow Name= to be specified repeatedly in the [Match] section. Maybe also - allow Name= to be specified repeatedly in the [Match] section. Maybe also
support Name=foo*|bar*|baz ? support Name=foo*|bar*|baz ?
- duplicate address check for static IPs (like ARPCHECK in network-scripts)
* resolved: * resolved:
- put networkd events and rtnl events at a higher priority, so that - 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 desktop UIs such as gnome-shell to freeze apps that are not visible
on screen, not unlike how job control works on the shell on screen, not unlike how job control works on the shell
* completions:
- manager property enumeration was broken when systemd moved to /usr/lib/
* cgroups: * cgroups:
- implement per-slice CPUFairScheduling=1 switch - implement per-slice CPUFairScheduling=1 switch
- handle jointly mounted controllers correctly - handle jointly mounted controllers correctly
@ -300,21 +419,12 @@ Features:
ReadOnlyDirectories=... for whitelisting files for a service. ReadOnlyDirectories=... for whitelisting files for a service.
* sd-bus: * sd-bus:
- GetAllProperties() on a non-existing object does not result in a failure currently
- kdbus: process fd=-1 for incoming msgs - 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 - 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 - 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 - 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 - see if we can drop more message validation on the sending side
- add API to clone sd_bus_message objects - add API to clone sd_bus_message objects
- make AddMatch calls on dbus1 transports async? - 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}) * 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 * BootLoaderSpec: Clarify that the kernel has to be in $BOOT. Clarify
that the boot loader should be installed to the ESP. Define a way 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 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 - 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", - journactl: support negative filtering, i.e. FOOBAR!="waldo",
and !FOOBAR for events without FOOBAR. 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-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: find a way to allow dropping history early, based on priority, other rules
- journal: When used on NFS, check payload hashes - 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 - journald: add kernel cmdline option to disable ratelimiting for debug purposes
- refuse taking lower-case variable names in sd_journal_send() and friends. - refuse taking lower-case variable names in sd_journal_send() and friends.
- journald: we currently rotate only after MaxUse+MaxFilesize has been reached. - 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 * currently x-systemd.timeout is lost in the initrd, since crypttab is copied into dracut, but fstab is not
* nspawn: * 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). - 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:
- cryptsetup-generator: allow specification of passwords in crypttab itself - cryptsetup-generator: allow specification of passwords in crypttab itself
@ -629,6 +731,7 @@ Features:
- kill scsi_id - kill scsi_id
- add trigger --subsystem-match=usb/usb_device device - add trigger --subsystem-match=usb/usb_device device
- reimport udev db after MOVE events for devices without dev_t - 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 * 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: * tmpfiles:
- apply "x" on "D" too (see patch from William Douglas) - 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 * for services: do not set $HOME in services unless requested
@ -763,7 +868,6 @@ Features:
- write more test cases - write more test cases
- implement and do duplicate address detection, see rfc 4862, 5.4. - implement and do duplicate address detection, see rfc 4862, 5.4.
- implement reconfigure support, see 5.3., 15.11. and 22.20. - 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 support for temporary adressess (IA_TA)
- implement dhcpv6 authentication - implement dhcpv6 authentication
- investigate the usefulness of Confirm messages; i.e. are there any - 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/ # For an explanation why we do all this, see https://xkcd.com/1024/
-- f77379a8490b408bbe5f6940505a777b -- f77379a8490b408bbe5f6940505a777b
Subject: The Journal has been started Subject: The journal has been started
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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. files for writing and is now ready to process requests.
-- d93fb3c9c24d451a97cea615ce59c00b -- d93fb3c9c24d451a97cea615ce59c00b
Subject: The Journal has been stopped Subject: The journal has been stopped
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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 Note that only messages from the service in question have been
dropped, other services' messages are unaffected. dropped, other services' messages are unaffected.
The limits when messages are dropped may be configured with The limits controlling when messages are dropped may be configured
RateLimitInterval= and RateLimitBurst= in with RateLimitInterval= and RateLimitBurst= in
/etc/systemd/journald.conf. See journald.conf(5) for details. /etc/systemd/journald.conf. See journald.conf(5) for details.
-- e9bf28e6e834481bb6f48f548ad13606 -- 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@. The leading process of the session is @LEADER@.
-- 3354939424b4456d9802ca8333ed424a -- 3354939424b4456d9802ca8333ed424a
Subject: A session @SESSION_ID@ has been terminated Subject: Session @SESSION_ID@ has been terminated
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat 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. A new seat @SEAT_ID@ has been configured and is now available.
-- e7852bfe46784ed0accde04bc864c2d5 -- e7852bfe46784ed0accde04bc864c2d5
Subject: A seat @SEAT_ID@ has now been removed Subject: Seat @SEAT_ID@ has now been removed
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat 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. all system services are terminated and all file systems unmounted.
-- 7d4958e842da4a758f6c1cdc7b36dcc5 -- 7d4958e842da4a758f6c1cdc7b36dcc5
Subject: Unit @UNIT@ has begun with start-up Subject: Unit @UNIT@ has begun start-up
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@ -217,11 +217,11 @@ Unit @UNIT@ has failed.
The result is @RESULT@. The result is @RESULT@.
-- d34d037fff1847e6ae669a370e694725 -- d34d037fff1847e6ae669a370e694725
Subject: Unit @UNIT@ has begun with reloading its configuration Subject: Unit @UNIT@ has begun reloading its configuration
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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 -- 7b05ebc668384222baa8881179cfda54
Subject: Unit @UNIT@ has finished reloading its configuration 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 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 -- 0027229ca0644181a76c4e92458afa2e
Subject: One or more messages could not be forwarded to syslog Subject: One or more messages could not be forwarded to syslog

View File

@ -1,7 +1,7 @@
# This file is part of systemd. # This file is part of systemd.
# #
# Copyright 2012 Lennart Poettering # 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 # 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 # 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 # http://www.freedesktop.org/wiki/Software/systemd/catalog
-- f77379a8490b408bbe5f6940505a777b -- f77379a8490b408bbe5f6940505a777b
Subject: Le Journal a été démarré Subject: Le journal a été démarré
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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. et est prêt à traiter les requêtes.
-- d93fb3c9c24d451a97cea615ce59c00b -- d93fb3c9c24d451a97cea615ce59c00b
Subject: Le Journal a été arrêté Subject: Le journal a été arrêté
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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. /etc/systemd/journald.conf. Voir journald.conf(5) pour plus de détails.
-- e9bf28e6e834481bb6f48f548ad13606 -- e9bf28e6e834481bb6f48f548ad13606
Subject: Des messages du Journal ont été manqués Subject: Des messages du journal ont été manqués
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

View File

@ -1,7 +1,7 @@
# This file is part of systemd. # This file is part of systemd.
# #
# Copyright 2012 Lennart Poettering # 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 # 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 # 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/ # For an explanation why we do all this, see https://xkcd.com/1024/
-- f77379a8490b408bbe5f6940505a777b -- f77379a8490b408bbe5f6940505a777b
Subject: Uruchomiono Journal Subject: Uruchomiono dziennik
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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ń. zapisu i jest gotowy do przetwarzania żądań.
-- d93fb3c9c24d451a97cea615ce59c00b -- d93fb3c9c24d451a97cea615ce59c00b
Subject: Zatrzymano Journal Subject: Zatrzymano dziennik
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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 Proszę zauważyć, że tylko komunikaty z danej usługi zostały pominięte. Nie ma
to wpływu na komunikaty innych usług. to wpływu na komunikaty innych usług.
Ograniczenia komunikatów mogą być konfigurowane za pomocą opcji Ograniczenia kontrolujące pomijanie komunikatów mogą być konfigurowane
RateLimitInterval= i RateLimitBurst= w pliku za pomocą opcji RateLimitInterval= i RateLimitBurst= w pliku
/etc/systemd/journald.conf. Strona journald.conf(5) zawiera więcej informacji. /etc/systemd/journald.conf. Strona journald.conf(5) zawiera więcej informacji.
-- e9bf28e6e834481bb6f48f548ad13606 -- e9bf28e6e834481bb6f48f548ad13606
Subject: Utracono komunikaty Journal Subject: Utracono komunikaty dziennika
Defined-By: systemd Defined-By: systemd
Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 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ł. 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 -- 0027229ca0644181a76c4e92458afa2e
Subject: Nie można przekazać jednego lub więcej komunikatów do syslog 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. */ /* Canonical host string. */
#undef CANONICAL_HOST #undef CANONICAL_HOST
/* Default index URL to use for image downloads */
#undef DEFAULT_DKR_INDEX_URL
/* Default DNS Servers */ /* Default DNS Servers */
#undef 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 */ /* Define if EFI support is to be enabled */
#undef ENABLE_EFI #undef ENABLE_EFI
/* Define if hashmap debugging is to be enabled */
#undef ENABLE_HASHMAP_DEBUG
/* Define if kdbus support is to be enabled */ /* Define if kdbus support is to be enabled */
#undef ENABLE_KDBUS #undef ENABLE_KDBUS
@ -45,6 +51,12 @@
/* Define if blkid is available */ /* Define if blkid is available */
#undef HAVE_BLKID #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 */ /* Define if CHKCONFIG is available */
#undef HAVE_CHKCONFIG #undef HAVE_CHKCONFIG
@ -71,10 +83,18 @@
to 0 if you don't. */ to 0 if you don't. */
#undef HAVE_DECL_IFLA_BRPORT_UNICAST_FLOOD #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 /* Define to 1 if you have the declaration of
`IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */ `IFLA_IPTUN_6RD_RELAY_PREFIXLEN', and to 0 if you don't. */
#undef HAVE_DECL_IFLA_IPTUN_6RD_RELAY_PREFIXLEN #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 /* Define to 1 if you have the declaration of `IFLA_MACVLAN_FLAGS', and to 0
if you don't. */ if you don't. */
#undef HAVE_DECL_IFLA_MACVLAN_FLAGS #undef HAVE_DECL_IFLA_MACVLAN_FLAGS
@ -95,6 +115,10 @@
you don't. */ you don't. */
#undef HAVE_DECL_IFLA_VXLAN_LOCAL6 #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 /* Define to 1 if you have the declaration of `LO_FLAGS_PARTSCAN', and to 0 if
you don't. */ you don't. */
#undef HAVE_DECL_LO_FLAGS_PARTSCAN #undef HAVE_DECL_LO_FLAGS_PARTSCAN
@ -107,6 +131,10 @@
don't. */ don't. */
#undef HAVE_DECL_PIVOT_ROOT #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. /* Define to 1 if you have the declaration of `setns', and to 0 if you don't.
*/ */
#undef HAVE_DECL_SETNS #undef HAVE_DECL_SETNS
@ -144,6 +172,9 @@
/* Define if IMA is available */ /* Define if IMA is available */
#undef HAVE_IMA #undef HAVE_IMA
/* Importd support available */
#undef HAVE_IMPORTD
/* Define to 1 if you have the `inet_ntoa' function. */ /* Define to 1 if you have the `inet_ntoa' function. */
#undef HAVE_INET_NTOA #undef HAVE_INET_NTOA
@ -168,6 +199,9 @@
/* Define if libidn is available */ /* Define if libidn is available */
#undef HAVE_LIBIDN #undef HAVE_LIBIDN
/* Define if libiptc is available */
#undef HAVE_LIBIPTC
/* Define if libmount is available */ /* Define if libmount is available */
#undef HAVE_LIBMOUNT #undef HAVE_LIBMOUNT
@ -328,6 +362,9 @@
/* Define if XZ is available */ /* Define if XZ is available */
#undef HAVE_XZ #undef HAVE_XZ
/* Define if ZLIB is available */
#undef HAVE_ZLIB
/* Define to 1 if you have the `__secure_getenv' function. */ /* Define to 1 if you have the `__secure_getenv' function. */
#undef HAVE___SECURE_GETENV #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_PREREQ([2.64])
AC_INIT([systemd], AC_INIT([systemd],
[218], [219],
[http://bugs.freedesktop.org/enter_bug.cgi?product=systemd], [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
[systemd], [systemd],
[http://www.freedesktop.org/wiki/Software/systemd]) [http://www.freedesktop.org/wiki/Software/systemd])
@ -34,7 +34,7 @@ AC_USE_SYSTEM_EXTENSIONS
AC_SYS_LARGEFILE AC_SYS_LARGEFILE
AC_PREFIX_DEFAULT([/usr]) AC_PREFIX_DEFAULT([/usr])
AM_MAINTAINER_MODE([enable]) 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]) AM_SILENT_RULES([yes])
AC_CANONICAL_HOST AC_CANONICAL_HOST
AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [Canonical host string.]) 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([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 ***])]) AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
M4_DEFINES= M4_DEFINES=
@ -310,7 +312,7 @@ LIBS="$save_LIBS"
AC_CHECK_FUNCS([memfd_create]) AC_CHECK_FUNCS([memfd_create])
AC_CHECK_FUNCS([__secure_getenv secure_getenv]) 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 <sys/types.h>
#include <unistd.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> #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_VTI_REMOTE,
IFLA_PHYS_PORT_ID, IFLA_PHYS_PORT_ID,
IFLA_BOND_AD_INFO, IFLA_BOND_AD_INFO,
@ -432,7 +436,7 @@ AM_CONDITIONAL(HAVE_XKBCOMMON, [test "$have_xkbcommon" = "yes"])
have_blkid=no have_blkid=no
AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support])) AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [disable blkid support]))
if test "x$enable_blkid" != "xno"; then 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) [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 if test "x$have_blkid" = xno -a "x$enable_blkid" = xyes; then
AC_MSG_ERROR([*** blkid support requested but libraries not found]) 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])) AC_ARG_ENABLE(xz, AS_HELP_STRING([--disable-xz], [Disable optional XZ support]))
if test "x$enable_xz" != "xno"; then if test "x$enable_xz" != "xno"; then
PKG_CHECK_MODULES(XZ, [ liblzma ], 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 if test "x$have_xz" = xno -a "x$enable_xz" = xyes; then
AC_MSG_ERROR([*** XZ support requested but libraries not found]) AC_MSG_ERROR([*** XZ support requested but libraries not found])
fi fi
fi fi
AM_CONDITIONAL(HAVE_XZ, [test "$have_xz" = "yes"]) 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 have_lz4=no
AC_ARG_ENABLE(lz4, AS_HELP_STRING([--enable-lz4], [Enable optional LZ4 support])) 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_CHECK_HEADERS(lz4.h,
[AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes], [AC_DEFINE(HAVE_LZ4, 1, [Define in LZ4 is available]) have_lz4=yes],
[AC_MSG_ERROR([*** LZ4 support requested but headers not found])]) [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 if test "x$have_acl" = xyes ; then
ACL_LIBS="-lacl" ACL_LIBS="-lacl"
AC_DEFINE(HAVE_ACL, 1, [ACL available]) AC_DEFINE(HAVE_ACL, 1, [ACL available])
M4_DEFINES="$M4_DEFINES -DHAVE_ACL"
else else
have_acl=no have_acl=no
fi fi
@ -869,6 +898,21 @@ if test "x$enable_libidn" != "xno"; then
fi fi
AM_CONDITIONAL(HAVE_LIBIDN, [test "$have_libidn" = "yes"]) 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 have_binfmt=no
AC_ARG_ENABLE(binfmt, AS_HELP_STRING([--disable-binfmt], [disable binfmt tool])) 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"]) AM_CONDITIONAL(ENABLE_MACHINED, [test "$have_machined" = "yes"])
AS_IF([test "$have_machined" = "yes"], [ AC_DEFINE(HAVE_MACHINED, [1], [Machined support available]) ]) 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 have_hostnamed=no
AC_ARG_ENABLE(hostnamed, AS_HELP_STRING([--disable-hostnamed], [disable hostname daemon])) 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"]) 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_terminal=no
have_unifont=no
AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support])) AC_ARG_ENABLE(terminal, AS_HELP_STRING([--enable-terminal], [enable terminal support]))
if test "x$enable_terminal" = "xyes"; then if test "x$enable_terminal" = "xyes"; then
PKG_CHECK_MODULES([TERMINAL], [ libevdev >= 1.2 xkbcommon >= 0.5 libdrm >= 2.4], [have_terminal=yes]) 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])], [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])]) [AC_DEFINE(ENABLE_TERMINAL, 1, [Define if terminal support is to be enabled])])
fi 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 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"]) 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]) ]) 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 have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages])) AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-manpages], [disable manpages]))
@ -1253,22 +1320,17 @@ AC_SUBST(TTY_GID)
AC_ARG_WITH([dbuspolicydir], AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]), 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], AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]), 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], AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]), 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)]) [with_dbussystemservicedir=${datadir}/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)])
AC_ARG_WITH([bashcompletiondir], AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
@ -1311,6 +1373,14 @@ AC_ARG_ENABLE([split-usr],
enable_split_usr=no 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"], [ AS_IF([test "x${enable_split_usr}" = "xyes"], [
AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr]) 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_ARG_ENABLE(tests,
[AC_HELP_STRING([--disable-tests], [disable tests])], [AC_HELP_STRING([--disable-tests], [disable tests])],
enable_tests=$enableval, enable_tests=yes) enable_tests=$enableval, enable_tests=yes)
AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes]) AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
AC_ARG_ENABLE(hashmap-debug, AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-hashmap-debug], [enable hashmap debugging])], [AC_HELP_STRING([--enable-debug@<:@=LIST@:>@], [enable extra debugging (hashmap,mmap-cache)])],
enable_hashmap_debug=$enableval, enable_hashmap_debug=no) [if test "x$enableval" = "xyes"; then
AS_IF([test x$enable_hashmap_debug = xyes], [ enableval="hashmap,mmap-cache"
AC_DEFINE(ENABLE_HASHMAP_DEBUG, 1, [Define if hashmap debugging is to be enabled]) 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([dbuspolicydir], [$with_dbuspolicydir])
AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir]) AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir]) AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
AC_SUBST([bashcompletiondir], [$with_bashcompletiondir]) AC_SUBST([bashcompletiondir], [$with_bashcompletiondir])
AC_SUBST([zshcompletiondir], [$with_zshcompletiondir]) AC_SUBST([zshcompletiondir], [$with_zshcompletiondir])
AC_SUBST([pamlibdir], [$with_pamlibdir]) AC_SUBST([pamlibdir], [$with_pamlibdir])
@ -1365,8 +1457,10 @@ AC_MSG_RESULT([
SELinux: ${have_selinux} SELinux: ${have_selinux}
SECCOMP: ${have_seccomp} SECCOMP: ${have_seccomp}
SMACK: ${have_smack} SMACK: ${have_smack}
ZLIB: ${have_zlib}
XZ: ${have_xz} XZ: ${have_xz}
LZ4: ${have_lz4} LZ4: ${have_lz4}
BZIP2: ${have_bzip2}
ACL: ${have_acl} ACL: ${have_acl}
GCRYPT: ${have_gcrypt} GCRYPT: ${have_gcrypt}
QRENCODE: ${have_qrencode} QRENCODE: ${have_qrencode}
@ -1375,6 +1469,7 @@ AC_MSG_RESULT([
GNUTLS: ${have_gnutls} GNUTLS: ${have_gnutls}
libcurl: ${have_libcurl} libcurl: ${have_libcurl}
libidn: ${have_libidn} libidn: ${have_libidn}
libiptc: ${have_libiptc}
ELFUTILS: ${have_elfutils} ELFUTILS: ${have_elfutils}
binfmt: ${have_binfmt} binfmt: ${have_binfmt}
vconsole: ${have_vconsole} vconsole: ${have_vconsole}
@ -1388,6 +1483,7 @@ AC_MSG_RESULT([
rfkill: ${have_rfkill} rfkill: ${have_rfkill}
logind: ${have_logind} logind: ${have_logind}
machined: ${have_machined} machined: ${have_machined}
importd: ${have_importd}
hostnamed: ${have_hostnamed} hostnamed: ${have_hostnamed}
timedated: ${have_timedated} timedated: ${have_timedated}
timesyncd: ${have_timesyncd} timesyncd: ${have_timesyncd}
@ -1407,6 +1503,7 @@ AC_MSG_RESULT([
dbus: ${have_dbus} dbus: ${have_dbus}
nss-myhostname: ${have_myhostname} nss-myhostname: ${have_myhostname}
gudev: ${enable_gudev} gudev: ${enable_gudev}
hwdb: ${enable_hwdb}
gintrospection: ${enable_introspection} gintrospection: ${enable_introspection}
terminal: ${have_terminal} terminal: ${have_terminal}
kdbus: ${have_kdbus} kdbus: ${have_kdbus}
@ -1419,6 +1516,9 @@ AC_MSG_RESULT([
SysV compatibility: ${SYSTEM_SYSV_COMPAT} SysV compatibility: ${SYSTEM_SYSV_COMPAT}
compatibility libraries: ${have_compat_libs} compatibility libraries: ${have_compat_libs}
utmp/wtmp support: ${have_utmp} utmp/wtmp support: ${have_utmp}
ldconfig support: ${enable_ldconfig}
hibernate support: ${enable_hibernate}
extra debugging: ${enable_debug}
prefix: ${prefix} prefix: ${prefix}
rootprefix: ${with_rootprefix} rootprefix: ${with_rootprefix}
@ -1438,7 +1538,6 @@ AC_MSG_RESULT([
D-Bus policy dir: ${with_dbuspolicydir} D-Bus policy dir: ${with_dbuspolicydir}
D-Bus session dir: ${with_dbussessionservicedir} D-Bus session dir: ${with_dbussessionservicedir}
D-Bus system dir: ${with_dbussystemservicedir} D-Bus system dir: ${with_dbussystemservicedir}
D-Bus interfaces dir: ${with_dbusinterfacedir}
Bash completions dir: ${with_bashcompletiondir} Bash completions dir: ${with_bashcompletiondir}
Zsh completions dir: ${with_zshcompletiondir} Zsh completions dir: ${with_zshcompletiondir}
Extra start script: ${RC_LOCAL_SCRIPT_PATH_START} Extra start script: ${RC_LOCAL_SCRIPT_PATH_START}
@ -1448,6 +1547,7 @@ AC_MSG_RESULT([
Maximum System UID: ${SYSTEM_UID_MAX} Maximum System UID: ${SYSTEM_UID_MAX}
Maximum System GID: ${SYSTEM_GID_MAX} Maximum System GID: ${SYSTEM_GID_MAX}
Certificate root: ${CERTIFICATEROOT} Certificate root: ${CERTIFICATEROOT}
Default dkr Index ${DEFAULT_DKR_INDEX_URL}
CFLAGS: ${OUR_CFLAGS} ${CFLAGS} CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS} CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}

View File

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

View File

@ -15,7 +15,7 @@
<div> <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><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"> <div><p class="releaseinfo">
For version 218 For version 219
— the latest version of this — the latest version of this
documentation can be found at documentation can be found at
<a class="ulink" href="http://www.freedesktop.org/software/systemd/gudev/" target="_top"> <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 # Header files to ignore when scanning. Use base file name, no paths
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h # 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. # Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png # 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_CFLAGS = @DBUS_CFLAGS@
DBUS_LIBS = @DBUS_LIBS@ DBUS_LIBS = @DBUS_LIBS@
DEBUGTTY = @DEBUGTTY@ DEBUGTTY = @DEBUGTTY@
DEFAULT_DKR_INDEX_URL = @DEFAULT_DKR_INDEX_URL@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@ DLLTOOL = @DLLTOOL@
@ -216,6 +217,8 @@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@
LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@
LIBIDN_CFLAGS = @LIBIDN_CFLAGS@ LIBIDN_CFLAGS = @LIBIDN_CFLAGS@
LIBIDN_LIBS = @LIBIDN_LIBS@ LIBIDN_LIBS = @LIBIDN_LIBS@
LIBIPTC_CFLAGS = @LIBIPTC_CFLAGS@
LIBIPTC_LIBS = @LIBIPTC_LIBS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
@ -283,6 +286,7 @@ SHELL = @SHELL@
SPHINX_BUILD = @SPHINX_BUILD@ SPHINX_BUILD = @SPHINX_BUILD@
STRINGS = @STRINGS@ STRINGS = @STRINGS@
STRIP = @STRIP@ STRIP = @STRIP@
SULOGIN = @SULOGIN@
SUSHELL = @SUSHELL@ SUSHELL = @SUSHELL@
SYSTEM_GID_MAX = @SYSTEM_GID_MAX@ SYSTEM_GID_MAX = @SYSTEM_GID_MAX@
SYSTEM_SYSVINIT_PATH = @SYSTEM_SYSVINIT_PATH@ SYSTEM_SYSVINIT_PATH = @SYSTEM_SYSVINIT_PATH@
@ -292,6 +296,7 @@ TELINIT = @TELINIT@
TERMINAL_CFLAGS = @TERMINAL_CFLAGS@ TERMINAL_CFLAGS = @TERMINAL_CFLAGS@
TERMINAL_LIBS = @TERMINAL_LIBS@ TERMINAL_LIBS = @TERMINAL_LIBS@
TTY_GID = @TTY_GID@ TTY_GID = @TTY_GID@
UNIFONT = @UNIFONT@
USE_NLS = @USE_NLS@ USE_NLS = @USE_NLS@
VERSION = @VERSION@ VERSION = @VERSION@
XGETTEXT = @XGETTEXT@ XGETTEXT = @XGETTEXT@
@ -300,6 +305,8 @@ XKBCOMMON_LIBS = @XKBCOMMON_LIBS@
XSLTPROC = @XSLTPROC@ XSLTPROC = @XSLTPROC@
XZ_CFLAGS = @XZ_CFLAGS@ XZ_CFLAGS = @XZ_CFLAGS@
XZ_LIBS = @XZ_LIBS@ XZ_LIBS = @XZ_LIBS@
ZLIB_CFLAGS = @ZLIB_CFLAGS@
ZLIB_LIBS = @ZLIB_LIBS@
abs_builddir = @abs_builddir@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@ abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@ abs_top_builddir = @abs_top_builddir@
@ -322,7 +329,6 @@ build_vendor = @build_vendor@
builddir = @builddir@ builddir = @builddir@
datadir = @datadir@ datadir = @datadir@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
dbusinterfacedir = @dbusinterfacedir@
dbuspolicydir = @dbuspolicydir@ dbuspolicydir = @dbuspolicydir@
dbussessionservicedir = @dbussessionservicedir@ dbussessionservicedir = @dbussessionservicedir@
dbussystemservicedir = @dbussystemservicedir@ dbussystemservicedir = @dbussystemservicedir@
@ -428,7 +434,7 @@ EXTRA_HFILES =
# Header files to ignore when scanning. Use base file name, no paths # Header files to ignore when scanning. Use base file name, no paths
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h # 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. # Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png

View File

@ -15,7 +15,7 @@
<div> <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><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"> <div><p class="releaseinfo">
For version 218 For version 219
— the latest version of this — the latest version of this
documentation can be found at documentation can be found at
<a class="ulink" href="http://www.freedesktop.org/software/systemd/libudev/" target="_top"> <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. ID_VENDOR_FROM_DATABASE=Eclipse (HQ Espana) S.L.
bluetooth:v0036* bluetooth:v0036*
ID_VENDOR_FROM_DATABASE=Renesas Technology Corp. ID_VENDOR_FROM_DATABASE=Renesas Electronics Corporation
bluetooth:v0037* bluetooth:v0037*
ID_VENDOR_FROM_DATABASE=Mobilian Corporation ID_VENDOR_FROM_DATABASE=Mobilian Corporation
@ -937,7 +937,7 @@ bluetooth:v0135*
ID_VENDOR_FROM_DATABASE=Airewear LLC ID_VENDOR_FROM_DATABASE=Airewear LLC
bluetooth:v0136* 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* bluetooth:v0137*
ID_VENDOR_FROM_DATABASE=Prestigio Plaza Ltd. ID_VENDOR_FROM_DATABASE=Prestigio Plaza Ltd.
@ -1277,3 +1277,156 @@ bluetooth:v01A6*
bluetooth:v01A7* bluetooth:v01A7*
ID_VENDOR_FROM_DATABASE=ENERGOUS CORPORATION 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)) ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC H730 Mini (for blades))
pci:v00001000d0000005Dsv00001028sd00001F4D* 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* pci:v00001000d0000005Dsv00001028sd00001F4F*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC H730P Slim) ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (PERC H730P Slim)
pci:v00001000d0000005Dsv00001028sd00001F54* 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* pci:v00001000d0000005Dsv000017AAsd00001052*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3108 [Invader] (ThinkServer RAID 720i) 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) ID_MODEL_FROM_DATABASE=SAS3008 PCI-Express Fusion-MPT SAS-3 (12GB/s HBA internal)
pci:v00001000d00000097sv00001028sd00001F46* 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* pci:v00001000d00000407*
ID_MODEL_FROM_DATABASE=MegaRAID ID_MODEL_FROM_DATABASE=MegaRAID
@ -5834,6 +5834,9 @@ pci:v00001002d0000678Asv00001002sd00000420*
pci:v00001002d0000678Asv00001002sd00000422* pci:v00001002d0000678Asv00001002sd00000422*
ID_MODEL_FROM_DATABASE=Tahiti PRO GL [FirePro Series] (Radeon Sky 900) 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* pci:v00001002d0000678Asv00001002sd00000B0E*
ID_MODEL_FROM_DATABASE=Tahiti PRO GL [FirePro Series] (FirePro S10000 Passive) ID_MODEL_FROM_DATABASE=Tahiti PRO GL [FirePro Series] (FirePro S10000 Passive)
@ -5897,6 +5900,9 @@ pci:v00001002d00006798sv00001092sd00003000*
pci:v00001002d00006798sv00001458sd00002261* pci:v00001002d00006798sv00001458sd00002261*
ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (Tahiti XT2 [Radeon HD 7970 GHz Edition OC]) 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* pci:v00001002d00006798sv00001462sd00002774*
ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (MSI R7970 TF 3GD5/OC BE) 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* pci:v00001002d0000692F*
ID_MODEL_FROM_DATABASE=Tonga XT GL [FirePro W8100] ID_MODEL_FROM_DATABASE=Tonga XT GL [FirePro W8100]
pci:v00001002d00006938*
ID_MODEL_FROM_DATABASE=Amethyst XT [Radeon R9 M295X Mac Edition]
pci:v00001002d00006939* pci:v00001002d00006939*
ID_MODEL_FROM_DATABASE=Tonga PRO [Radeon R9 285] ID_MODEL_FROM_DATABASE=Tonga PRO [Radeon R9 285]
@ -10313,6 +10322,9 @@ pci:v00001014d0000016E*
pci:v00001014d00000170* pci:v00001014d00000170*
ID_MODEL_FROM_DATABASE=GXT6000P Graphics Adapter ID_MODEL_FROM_DATABASE=GXT6000P Graphics Adapter
pci:v00001014d00000170sv00001092sd00000172*
ID_MODEL_FROM_DATABASE=GXT6000P Graphics Adapter (Fire GL2)
pci:v00001014d0000017D* pci:v00001014d0000017D*
ID_MODEL_FROM_DATABASE=GXT300P Graphics Adapter ID_MODEL_FROM_DATABASE=GXT300P Graphics Adapter
@ -11903,6 +11915,9 @@ pci:v00001028d00000016*
pci:v00001028d00000016sv00001028sd00001F24* pci:v00001028d00000016sv00001028sd00001F24*
ID_MODEL_FROM_DATABASE=PowerEdge Expandable RAID controller S300 (PERC S300 Controller) ID_MODEL_FROM_DATABASE=PowerEdge Expandable RAID controller S300 (PERC S300 Controller)
pci:v00001028d00000073*
ID_MODEL_FROM_DATABASE=NV-RAM Adapter
pci:v00001029* pci:v00001029*
ID_VENDOR_FROM_DATABASE=Siemens Nixdorf IS ID_VENDOR_FROM_DATABASE=Siemens Nixdorf IS
@ -21011,6 +21026,9 @@ pci:v000010B5d00009056sv00001369sd0000C201*
pci:v000010B5d00009056sv000014B4sd0000D10A* pci:v000010B5d00009056sv000014B4sd0000D10A*
ID_MODEL_FROM_DATABASE=PCI9056 32-bit 66MHz PCI <-> IOBus Bridge (DekTec DTA-110T) 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* pci:v000010B5d00009056sv000014B4sd0000D140*
ID_MODEL_FROM_DATABASE=PCI9056 32-bit 66MHz PCI <-> IOBus Bridge (Dektec DTA-140) ID_MODEL_FROM_DATABASE=PCI9056 32-bit 66MHz PCI <-> IOBus Bridge (Dektec DTA-140)
@ -27992,6 +28010,12 @@ pci:v000010DEd00000E0C*
pci:v000010DEd00000E0F* pci:v000010DEd00000E0F*
ID_MODEL_FROM_DATABASE=GK208 HDMI/DP Audio Controller 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* pci:v000010DEd00000E1A*
ID_MODEL_FROM_DATABASE=GK110 HDMI Audio ID_MODEL_FROM_DATABASE=GK110 HDMI Audio
@ -28520,6 +28544,9 @@ pci:v000010DEd000010D8*
pci:v000010DEd00001140* pci:v000010DEd00001140*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] 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* pci:v000010DEd00001140sv00001025sd00000600*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 620M) 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* pci:v000010DEd00001140sv00001025sd00000830*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv00001025sd00000837*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv00001025sd0000088A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) 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* pci:v000010DEd00001140sv00001025sd0000090F*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001025sd00000921* pci:v000010DEd00001140sv00001025sd00000921*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) 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* pci:v000010DEd00001140sv00001028sd0000054D*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 630M) 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* pci:v000010DEd00001140sv00001028sd000005F4*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv00001028sd0000064E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
pci:v000010DEd00001140sv00001028sd00000652* pci:v000010DEd00001140sv00001028sd00000652*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) 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* pci:v000010DEd00001140sv00001028sd00000662*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M)
@ -28778,6 +28850,12 @@ pci:v000010DEd00001140sv0000103Csd000018FD*
pci:v000010DEd00001140sv0000103Csd000018FF* pci:v000010DEd00001140sv0000103Csd000018FF*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 630M) 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* pci:v000010DEd00001140sv0000103Csd00002AEF*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720A) 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* pci:v000010DEd00001140sv00001043sd0000228A*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) 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* pci:v000010DEd00001140sv00001043sd00008595*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv00001072sd0000152D*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv0000144Dsd0000C0E4*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (NVS 5200M) 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* pci:v000010DEd00001140sv0000144Dsd0000C652*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 620M) 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* pci:v000010DEd00001140sv0000144Dsd0000C736*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 710M) 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* pci:v000010DEd00001140sv00001462sd000010B8*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 710M) 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* pci:v000010DEd00001140sv00001462sd0000AAA3*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) 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* pci:v000010DEd00001140sv00001462sd0000AE71*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv0000152Dsd00000926*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 620M) ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 620M)
@ -29042,6 +29207,9 @@ pci:v000010DEd00001140sv0000152Dsd00001072*
pci:v000010DEd00001140sv0000152Dsd00001086* pci:v000010DEd00001140sv0000152Dsd00001086*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) 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* pci:v000010DEd00001140sv000017AAsd00002200*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (NVS 5200M) ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (NVS 5200M)
@ -29093,6 +29261,9 @@ pci:v000010DEd00001140sv000017AAsd0000369D*
pci:v000010DEd00001140sv000017AAsd0000369E* pci:v000010DEd00001140sv000017AAsd0000369E*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820A) 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* pci:v000010DEd00001140sv000017AAsd00003800*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv000017AAsd00003818*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 820M) 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* pci:v000010DEd00001140sv000017AAsd00003901*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 610M / GT 620M) 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* pci:v000010DEd00001140sv000017AAsd00003905*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv000017AAsd00003910*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 720M) ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 720M)
pci:v000010DEd00001140sv000017AAsd00003912* pci:v000010DEd00001140sv000017AAsd00003912*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce 720M) 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* pci:v000010DEd00001140sv000017AAsd00003977*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001140sv00001B0Asd000020DF*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 620M) 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* pci:v000010DEd00001140sv00001B0Asd00002202*
ID_MODEL_FROM_DATABASE=GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (GeForce GT 720M) 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* pci:v000010DEd00001180*
ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 680] ID_MODEL_FROM_DATABASE=GK104 [GeForce GTX 680]
@ -29678,6 +29873,9 @@ pci:v000010DEd00001296*
pci:v000010DEd00001298* pci:v000010DEd00001298*
ID_MODEL_FROM_DATABASE=GK208M [GeForce GT 720M] ID_MODEL_FROM_DATABASE=GK208M [GeForce GT 720M]
pci:v000010DEd00001299*
ID_MODEL_FROM_DATABASE=GK208M [GeForce 920M]
pci:v000010DEd000012A0* pci:v000010DEd000012A0*
ID_MODEL_FROM_DATABASE=GK208 ID_MODEL_FROM_DATABASE=GK208
@ -29705,6 +29903,12 @@ pci:v000010DEd00001341sv000017AAsd00003699*
pci:v000010DEd00001341sv000017AAsd0000369C* pci:v000010DEd00001341sv000017AAsd0000369C*
ID_MODEL_FROM_DATABASE=GM108M [GeForce 840M] (GeForce 840A) 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* pci:v000010DEd00001380*
ID_MODEL_FROM_DATABASE=GM107 [GeForce GTX 750 Ti] ID_MODEL_FROM_DATABASE=GM107 [GeForce GTX 750 Ti]
@ -29715,7 +29919,7 @@ pci:v000010DEd00001382*
ID_MODEL_FROM_DATABASE=GM107 [GeForce GTX 745] ID_MODEL_FROM_DATABASE=GM107 [GeForce GTX 745]
pci:v000010DEd00001389* pci:v000010DEd00001389*
ID_MODEL_FROM_DATABASE=GM107GL [GRID M3] ID_MODEL_FROM_DATABASE=GM107GL [GRID M30]
pci:v000010DEd00001390* pci:v000010DEd00001390*
ID_MODEL_FROM_DATABASE=GM107M [GeForce 845M] ID_MODEL_FROM_DATABASE=GM107M [GeForce 845M]
@ -29735,6 +29939,21 @@ pci:v000010DEd00001392*
pci:v000010DEd00001393* pci:v000010DEd00001393*
ID_MODEL_FROM_DATABASE=GM107M [GeForce 840M] 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* pci:v000010DEd000013B3*
ID_MODEL_FROM_DATABASE=GM107GLM [Quadro K2200M] ID_MODEL_FROM_DATABASE=GM107GLM [Quadro K2200M]
@ -29744,8 +29963,11 @@ pci:v000010DEd000013BA*
pci:v000010DEd000013BB* pci:v000010DEd000013BB*
ID_MODEL_FROM_DATABASE=GM107GL [Quadro K620] ID_MODEL_FROM_DATABASE=GM107GL [Quadro K620]
pci:v000010DEd000013BC*
ID_MODEL_FROM_DATABASE=GM107GL [Quadro K1200]
pci:v000010DEd000013BD* pci:v000010DEd000013BD*
ID_MODEL_FROM_DATABASE=GM107GL [Tesla M40] ID_MODEL_FROM_DATABASE=GM107GL [GRID M40]
pci:v000010DEd000013C0* pci:v000010DEd000013C0*
ID_MODEL_FROM_DATABASE=GM204 [GeForce GTX 980] ID_MODEL_FROM_DATABASE=GM204 [GeForce GTX 980]
@ -29771,6 +29993,12 @@ pci:v000010DEd000013D8*
pci:v000010DEd000013D9* pci:v000010DEd000013D9*
ID_MODEL_FROM_DATABASE=GM204M [GeForce GTX 965M] 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* pci:v000010DF*
ID_VENDOR_FROM_DATABASE=Emulex Corporation ID_VENDOR_FROM_DATABASE=Emulex Corporation
@ -30236,6 +30464,12 @@ pci:v000010ECd00005249sv0000103Csd00001909*
pci:v000010ECd00005288* pci:v000010ECd00005288*
ID_MODEL_FROM_DATABASE=RTS5288 PCI Express Card Reader 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* pci:v000010ECd00008029*
ID_MODEL_FROM_DATABASE=RTL-8029(AS) ID_MODEL_FROM_DATABASE=RTL-8029(AS)
@ -31532,6 +31766,24 @@ pci:v00001106d00000693*
pci:v00001106d00000698* pci:v00001106d00000698*
ID_MODEL_FROM_DATABASE=VT82C693A [Apollo Pro133 AGP] 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* pci:v00001106d00000926*
ID_MODEL_FROM_DATABASE=VT82C926 [Amazon] ID_MODEL_FROM_DATABASE=VT82C926 [Amazon]
@ -32273,6 +32525,30 @@ pci:v00001106d00003189sv00001458sd00005000*
pci:v00001106d00003189sv00001849sd00003189* pci:v00001106d00003189sv00001849sd00003189*
ID_MODEL_FROM_DATABASE=VT8377 [KT400/KT600 AGP] Host Bridge (K7VT series Motherboards) 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* pci:v00001106d00003204*
ID_MODEL_FROM_DATABASE=K8M800 Host Bridge ID_MODEL_FROM_DATABASE=K8M800 Host Bridge
@ -32429,6 +32705,15 @@ pci:v00001106d00003410sv000019DAsd0000A179*
pci:v00001106d00003432* pci:v00001106d00003432*
ID_MODEL_FROM_DATABASE=VL80x xHCI USB 3.0 Controller 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* pci:v00001106d00004149*
ID_MODEL_FROM_DATABASE=VIA VT6420 (ATA133) Controller ID_MODEL_FROM_DATABASE=VIA VT6420 (ATA133) Controller
@ -32729,6 +33014,15 @@ pci:v00001106d00008D04*
pci:v00001106d00009001* pci:v00001106d00009001*
ID_MODEL_FROM_DATABASE=VX900 Serial ATA Controller 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* pci:v00001106d00009530*
ID_MODEL_FROM_DATABASE=Secure Digital Memory Card Controller ID_MODEL_FROM_DATABASE=Secure Digital Memory Card Controller
@ -34295,6 +34589,9 @@ pci:v00001131d00007146sv00001894sd00000020*
pci:v00001131d00007146sv00001894sd00000023* pci:v00001131d00007146sv00001894sd00000023*
ID_MODEL_FROM_DATABASE=SAA7146 (TVStation DVB-C plus) ID_MODEL_FROM_DATABASE=SAA7146 (TVStation DVB-C plus)
pci:v00001131d00007146sv00001894sd00000054*
ID_MODEL_FROM_DATABASE=SAA7146 (TV-Station DVB-S)
pci:v00001131d00007160* pci:v00001131d00007160*
ID_MODEL_FROM_DATABASE=SAA7160 ID_MODEL_FROM_DATABASE=SAA7160
@ -34367,6 +34664,9 @@ pci:v00001131d00007164sv00000070sd000089A0*
pci:v00001131d00007164sv00000070sd000089A1* pci:v00001131d00007164sv00000070sd000089A1*
ID_MODEL_FROM_DATABASE=SAA7164 (WinTV HVR-2200) ID_MODEL_FROM_DATABASE=SAA7164 (WinTV HVR-2200)
pci:v00001131d00007164sv00000070sd0000F123*
ID_MODEL_FROM_DATABASE=SAA7164 (WinTV HVR-2205)
pci:v00001131d00007231* pci:v00001131d00007231*
ID_MODEL_FROM_DATABASE=SAA7231 ID_MODEL_FROM_DATABASE=SAA7231
@ -36102,7 +36402,10 @@ pci:v0000117C*
ID_VENDOR_FROM_DATABASE=ATTO Technology, Inc. ID_VENDOR_FROM_DATABASE=ATTO Technology, Inc.
pci:v0000117Cd0000002C* 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* pci:v0000117Cd00000030*
ID_MODEL_FROM_DATABASE=Ultra320 SCSI Host Adapter ID_MODEL_FROM_DATABASE=Ultra320 SCSI Host Adapter
@ -36122,6 +36425,18 @@ pci:v0000117Cd00000030sv0000117Csd0000802F*
pci:v0000117Cd00000033* pci:v0000117Cd00000033*
ID_MODEL_FROM_DATABASE=SAS Adapter 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* pci:v0000117D*
ID_VENDOR_FROM_DATABASE=Becton & Dickinson ID_VENDOR_FROM_DATABASE=Becton & Dickinson
@ -37505,6 +37820,9 @@ pci:v000011ABd00007820*
pci:v000011ABd00007823* pci:v000011ABd00007823*
ID_MODEL_FROM_DATABASE=MV78230 [Armada XP] ARM SoC ID_MODEL_FROM_DATABASE=MV78230 [Armada XP] ARM SoC
pci:v000011ABd00007846*
ID_MODEL_FROM_DATABASE=88F6820 [Armada 385] ARM SoC
pci:v000011ABd0000F003* pci:v000011ABd0000F003*
ID_MODEL_FROM_DATABASE=GT-64010 Primary Image Piranha Image Generator ID_MODEL_FROM_DATABASE=GT-64010 Primary Image Piranha Image Generator
@ -44885,6 +45203,9 @@ pci:v00001425d00005087*
pci:v00001425d00005088* pci:v00001425d00005088*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller
pci:v00001425d00005089*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Ethernet Controller
pci:v00001425d00005401* pci:v00001425d00005401*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller
@ -44975,6 +45296,9 @@ pci:v00001425d00005487*
pci:v00001425d00005488* pci:v00001425d00005488*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller
pci:v00001425d00005489*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Ethernet Controller
pci:v00001425d00005501* pci:v00001425d00005501*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller
@ -45065,6 +45389,9 @@ pci:v00001425d00005587*
pci:v00001425d00005588* pci:v00001425d00005588*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Storage Controller ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Storage Controller
pci:v00001425d00005589*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Storage Controller
pci:v00001425d00005601* pci:v00001425d00005601*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Storage Controller
@ -45155,6 +45482,9 @@ pci:v00001425d00005687*
pci:v00001425d00005688* pci:v00001425d00005688*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Storage Controller ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Storage Controller
pci:v00001425d00005689*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Storage Controller
pci:v00001425d00005701* pci:v00001425d00005701*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller
@ -45245,6 +45575,9 @@ pci:v00001425d00005787*
pci:v00001425d00005788* pci:v00001425d00005788*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller
pci:v00001425d00005789*
ID_MODEL_FROM_DATABASE=T520-5089 Unified Wire Ethernet Controller
pci:v00001425d00005801* pci:v00001425d00005801*
ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller [VF] ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller [VF]
@ -45335,6 +45668,9 @@ pci:v00001425d00005887*
pci:v00001425d00005888* pci:v00001425d00005888*
ID_MODEL_FROM_DATABASE=T570-5088 Unified Wire Ethernet Controller [VF] 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* pci:v00001425d0000A000*
ID_MODEL_FROM_DATABASE=PE10K Unified Wire Ethernet Controller ID_MODEL_FROM_DATABASE=PE10K Unified Wire Ethernet Controller
@ -46058,6 +46394,9 @@ pci:v000014C3*
pci:v000014C3d00007630* pci:v000014C3d00007630*
ID_MODEL_FROM_DATABASE=MT7630e 802.11bgn Wireless Network Adapter 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* pci:v000014C4*
ID_VENDOR_FROM_DATABASE=IWASAKI Information Systems Co Ltd ID_VENDOR_FROM_DATABASE=IWASAKI Information Systems Co Ltd
@ -46304,6 +46643,9 @@ pci:v000014E4d00000811*
pci:v000014E4d00000816* pci:v000014E4d00000816*
ID_MODEL_FROM_DATABASE=BCM3302 Sentry5 MIPS32 CPU ID_MODEL_FROM_DATABASE=BCM3302 Sentry5 MIPS32 CPU
pci:v000014E4d00001570*
ID_MODEL_FROM_DATABASE=720p FaceTime HD Camera
pci:v000014E4d00001600* pci:v000014E4d00001600*
ID_MODEL_FROM_DATABASE=NetXtreme BCM5752 Gigabit Ethernet PCI Express ID_MODEL_FROM_DATABASE=NetXtreme BCM5752 Gigabit Ethernet PCI Express
@ -47930,6 +48272,9 @@ pci:v000014E4d00004344*
pci:v000014E4d00004350* pci:v000014E4d00004350*
ID_MODEL_FROM_DATABASE=BCM43222 Wireless Network Adapter ID_MODEL_FROM_DATABASE=BCM43222 Wireless Network Adapter
pci:v000014E4d00004351*
ID_MODEL_FROM_DATABASE=BCM43222 802.11abgn Wireless Network Adapter
pci:v000014E4d00004353* pci:v000014E4d00004353*
ID_MODEL_FROM_DATABASE=BCM43224 802.11a/b/g/n ID_MODEL_FROM_DATABASE=BCM43224 802.11a/b/g/n
@ -47978,6 +48323,12 @@ pci:v000014E4d00004365sv00001028sd00000016*
pci:v000014E4d000043A0* pci:v000014E4d000043A0*
ID_MODEL_FROM_DATABASE=BCM4360 802.11ac Wireless Network Adapter 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* pci:v000014E4d000043A9*
ID_MODEL_FROM_DATABASE=BCM43217 802.11b/g/n 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 ID_MODEL_FROM_DATABASE=BCM43602 802.11ac Wireless LAN SoC
pci:v000014E4d000043D3* pci:v000014E4d000043D3*
ID_MODEL_FROM_DATABASE=BCM43567 ID_MODEL_FROM_DATABASE=BCM43567 802.11ac Wireless Network Adapter
pci:v000014E4d000043D9* pci:v000014E4d000043D9*
ID_MODEL_FROM_DATABASE=BCM43570 ID_MODEL_FROM_DATABASE=BCM43570 802.11ac Wireless Network Adapter
pci:v000014E4d000043DF* pci:v000014E4d000043DF*
ID_MODEL_FROM_DATABASE=BCM4354 802.11ac Wireless LAN SoC ID_MODEL_FROM_DATABASE=BCM4354 802.11ac Wireless LAN SoC
pci:v000014E4d000043EC* pci:v000014E4d000043EC*
ID_MODEL_FROM_DATABASE=BCM4356 ID_MODEL_FROM_DATABASE=BCM4356 802.11ac Wireless Network Adapter
pci:v000014E4d00004401* pci:v000014E4d00004401*
ID_MODEL_FROM_DATABASE=BCM4401 100Base-T ID_MODEL_FROM_DATABASE=BCM4401 100Base-T
@ -48989,6 +49340,9 @@ pci:v000014F1d00008852*
pci:v000014F1d00008852sv00000070sd00008010* pci:v000014F1d00008852sv00000070sd00008010*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinTV HVR-1400 ExpressCard) 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* pci:v000014F1d00008852sv0000107Dsd00006F22*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinFast PxTV1200) ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (WinFast PxTV1200)
@ -49004,6 +49358,15 @@ pci:v000014F1d00008852sv0000153Bsd0000117E*
pci:v000014F1d00008852sv000018ACsd0000DB78* pci:v000014F1d00008852sv000018ACsd0000DB78*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (FusionHDTV DVB-T Dual Express) 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* pci:v000014F1d00008852sv00004254sd00009580*
ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (T9580) ID_MODEL_FROM_DATABASE=CX23885 PCI Video and Audio Decoder (T9580)
@ -49550,6 +49913,9 @@ pci:v00001542*
pci:v00001542d00009260* pci:v00001542d00009260*
ID_MODEL_FROM_DATABASE=RCIM-II Real-Time Clock & Interrupt Module 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* pci:v00001542d00009272*
ID_MODEL_FROM_DATABASE=Pulse Width Modulator Card ID_MODEL_FROM_DATABASE=Pulse Width Modulator Card
@ -51539,6 +51905,9 @@ pci:v0000168Cd00000032*
pci:v0000168Cd00000032sv0000103Csd00001838* pci:v0000168Cd00000032sv0000103Csd00001838*
ID_MODEL_FROM_DATABASE=AR9485 Wireless Network Adapter (AR9485/HB125 802.11bgn 1×1 Wi-Fi Adapter) 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* pci:v0000168Cd00000033*
ID_MODEL_FROM_DATABASE=AR9580 Wireless Network Adapter ID_MODEL_FROM_DATABASE=AR9580 Wireless Network Adapter
@ -51560,6 +51929,9 @@ pci:v0000168Cd00000037sv00001A3Bsd00002100*
pci:v0000168Cd0000003C* pci:v0000168Cd0000003C*
ID_MODEL_FROM_DATABASE=QCA988x 802.11ac Wireless Network Adapter ID_MODEL_FROM_DATABASE=QCA988x 802.11ac Wireless Network Adapter
pci:v0000168Cd0000003E*
ID_MODEL_FROM_DATABASE=Killer N1525 Wireless-AC
pci:v0000168Cd00000207* pci:v0000168Cd00000207*
ID_MODEL_FROM_DATABASE=AR5210 Wireless Network Adapter [AR5000 802.11a] ID_MODEL_FROM_DATABASE=AR5210 Wireless Network Adapter [AR5000 802.11a]
@ -51872,6 +52244,24 @@ pci:v000016D5d00006303*
pci:v000016D5d00006304* pci:v000016D5d00006304*
ID_MODEL_FROM_DATABASE=XMC Module with user-configurable Virtex-6 FPGA, 365k logic cells, no front I/O 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* pci:v000016DA*
ID_VENDOR_FROM_DATABASE=Advantech Co., Ltd. ID_VENDOR_FROM_DATABASE=Advantech Co., Ltd.
@ -52325,6 +52715,9 @@ pci:v00001796d00000011*
pci:v00001796d00000012* pci:v00001796d00000012*
ID_MODEL_FROM_DATABASE=SIS1100-e quad link ID_MODEL_FROM_DATABASE=SIS1100-e quad link
pci:v00001796d00000015*
ID_MODEL_FROM_DATABASE=SIS8100 [Gigabit link, MicroTCA]
pci:v00001797* pci:v00001797*
ID_VENDOR_FROM_DATABASE=Techwell Inc. ID_VENDOR_FROM_DATABASE=Techwell Inc.
@ -55154,6 +55547,12 @@ pci:v00001AE9d00000201*
pci:v00001AE9d00000301* pci:v00001AE9d00000301*
ID_MODEL_FROM_DATABASE=Wil6200 802.11ad Wireless Network Adapter 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* pci:v00001AEC*
ID_VENDOR_FROM_DATABASE=Wolfson Microelectronics ID_VENDOR_FROM_DATABASE=Wolfson Microelectronics
@ -55349,6 +55748,12 @@ pci:v00001B37*
pci:v00001B37d00000014* pci:v00001B37d00000014*
ID_MODEL_FROM_DATABASE=ADQ412 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* pci:v00001B3A*
ID_VENDOR_FROM_DATABASE=Westar Display Technologies ID_VENDOR_FROM_DATABASE=Westar Display Technologies
@ -55463,6 +55868,9 @@ pci:v00001B55d0000F1C4*
pci:v00001B66* pci:v00001B66*
ID_VENDOR_FROM_DATABASE=Deltacast ID_VENDOR_FROM_DATABASE=Deltacast
pci:v00001B66d00000007*
ID_MODEL_FROM_DATABASE=Delta-3G-elp-11 SDI I/O Board
pci:v00001B6F* pci:v00001B6F*
ID_VENDOR_FROM_DATABASE=Etron Technology, Inc. ID_VENDOR_FROM_DATABASE=Etron Technology, Inc.
@ -55511,6 +55919,9 @@ pci:v00001B85*
pci:v00001B85d00001041* pci:v00001B85d00001041*
ID_MODEL_FROM_DATABASE=RevoDrive 3 X2 PCI-Express SSD 240 GB (Marvell Controller) ID_MODEL_FROM_DATABASE=RevoDrive 3 X2 PCI-Express SSD 240 GB (Marvell Controller)
pci:v00001B85d00008788*
ID_MODEL_FROM_DATABASE=RevoDrive Hybrid
pci:v00001B96* pci:v00001B96*
ID_VENDOR_FROM_DATABASE=Western Digital ID_VENDOR_FROM_DATABASE=Western Digital
@ -55592,6 +56003,12 @@ pci:v00001C1C*
pci:v00001C1Cd00000001* pci:v00001C1Cd00000001*
ID_MODEL_FROM_DATABASE=82C101 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* pci:v00001C2C*
ID_VENDOR_FROM_DATABASE=Fiberblaze ID_VENDOR_FROM_DATABASE=Fiberblaze
@ -55691,6 +56108,15 @@ pci:v00001CF7*
pci:v00001D21* pci:v00001D21*
ID_VENDOR_FROM_DATABASE=Allo 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* pci:v00001D44*
ID_VENDOR_FROM_DATABASE=DPT ID_VENDOR_FROM_DATABASE=DPT
@ -55994,6 +56420,12 @@ pci:v000037D9*
pci:v000037D9d00001138* pci:v000037D9d00001138*
ID_MODEL_FROM_DATABASE=SCHD-PH-8 Phase detector 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* pci:v00003842*
ID_VENDOR_FROM_DATABASE=eVga.com. Corp. ID_VENDOR_FROM_DATABASE=eVga.com. Corp.
@ -58874,6 +59306,9 @@ pci:v00008086d00000A26*
pci:v00008086d00000A2A* pci:v00008086d00000A2A*
ID_MODEL_FROM_DATABASE=Haswell-ULT Integrated Graphics Controller ID_MODEL_FROM_DATABASE=Haswell-ULT Integrated Graphics Controller
pci:v00008086d00000A2E*
ID_MODEL_FROM_DATABASE=Haswell-ULT Integrated Graphics Controller
pci:v00008086d00000BE0* pci:v00008086d00000BE0*
ID_MODEL_FROM_DATABASE=Atom Processor D2xxx/N2xxx Integrated Graphics Controller ID_MODEL_FROM_DATABASE=Atom Processor D2xxx/N2xxx Integrated Graphics Controller
@ -59534,6 +59969,9 @@ pci:v00008086d00000F0C*
pci:v00008086d00000F0E* pci:v00008086d00000F0E*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series LPIO1 SPI Controller 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* pci:v00008086d00000F14*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series SDIO Controller ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series SDIO Controller
@ -59549,6 +59987,18 @@ pci:v00008086d00000F18*
pci:v00008086d00000F1C* pci:v00008086d00000F1C*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series Power Control Unit 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* pci:v00008086d00000F28*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series LPE Audio Controller ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series LPE Audio Controller
@ -59591,6 +60041,21 @@ pci:v00008086d00000F46*
pci:v00008086d00000F47* pci:v00008086d00000F47*
ID_MODEL_FROM_DATABASE=Atom Processor Z36xxx/Z37xxx Series LPIO2 I2C Controller #7 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* pci:v00008086d00001000*
ID_MODEL_FROM_DATABASE=82542 Gigabit Ethernet Controller (Fiber) ID_MODEL_FROM_DATABASE=82542 Gigabit Ethernet Controller (Fiber)
@ -62213,6 +62678,21 @@ pci:v00008086d000015A2*
pci:v00008086d000015A3* pci:v00008086d000015A3*
ID_MODEL_FROM_DATABASE=Ethernet Connection (3) I218-V 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* pci:v00008086d000015B7*
ID_MODEL_FROM_DATABASE=Ethernet Connection (2) I219-LM ID_MODEL_FROM_DATABASE=Ethernet Connection (2) I219-LM

View File

@ -5,9 +5,6 @@
usb:v0001* usb:v0001*
ID_VENDOR_FROM_DATABASE=Fry's Electronics ID_VENDOR_FROM_DATABASE=Fry's Electronics
usb:v0001p142B*
ID_MODEL_FROM_DATABASE=Arbiter Systems, Inc.
usb:v0001p7778* usb:v0001p7778*
ID_MODEL_FROM_DATABASE=Counterfeit flash drive [Kingston] ID_MODEL_FROM_DATABASE=Counterfeit flash drive [Kingston]
@ -10565,6 +10562,9 @@ usb:v04A9p26DA*
usb:v04A9p26E6* usb:v04A9p26E6*
ID_MODEL_FROM_DATABASE=iR1024 ID_MODEL_FROM_DATABASE=iR1024
usb:v04A9p2736*
ID_MODEL_FROM_DATABASE=I-SENSYS MF4550d
usb:v04A9p2737* usb:v04A9p2737*
ID_MODEL_FROM_DATABASE=MF4410 ID_MODEL_FROM_DATABASE=MF4410
@ -11402,6 +11402,18 @@ usb:v04A9p3289*
usb:v04A9p328A* usb:v04A9p328A*
ID_MODEL_FROM_DATABASE=PowerShot ELPH 150 IS / IXUS 155 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* usb:v04AA*
ID_VENDOR_FROM_DATABASE=DaeWoo Telecom, Ltd ID_VENDOR_FROM_DATABASE=DaeWoo Telecom, Ltd
@ -21701,6 +21713,9 @@ usb:v05E3p0608*
usb:v05E3p0610* usb:v05E3p0610*
ID_MODEL_FROM_DATABASE=4-port hub ID_MODEL_FROM_DATABASE=4-port hub
usb:v05E3p0616*
ID_MODEL_FROM_DATABASE=hub
usb:v05E3p0660* usb:v05E3p0660*
ID_MODEL_FROM_DATABASE=USB 2.0 Hub ID_MODEL_FROM_DATABASE=USB 2.0 Hub
@ -30254,6 +30269,9 @@ usb:v0924p3CE8*
usb:v0924p3D5B* usb:v0924p3D5B*
ID_MODEL_FROM_DATABASE=Phaser 6115MFP TWAIN Scanner ID_MODEL_FROM_DATABASE=Phaser 6115MFP TWAIN Scanner
usb:v0924p3D6D*
ID_MODEL_FROM_DATABASE=WorkCentre 6015N/NI
usb:v0924p420F* usb:v0924p420F*
ID_MODEL_FROM_DATABASE=WorkCentre PE220 Series ID_MODEL_FROM_DATABASE=WorkCentre PE220 Series
@ -30561,7 +30579,7 @@ usb:v0930p6540*
ID_MODEL_FROM_DATABASE=TransMemory Flash Memory ID_MODEL_FROM_DATABASE=TransMemory Flash Memory
usb:v0930p6544* 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* usb:v0930p6545*
ID_MODEL_FROM_DATABASE=Kingston DataTraveler 102/2.0 / HEMA Flash Drive 2 GB / PNY Attache 4GB Stick 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* usb:v0951p1665*
ID_MODEL_FROM_DATABASE=Digital DataTraveler SE9 64GB ID_MODEL_FROM_DATABASE=Digital DataTraveler SE9 64GB
usb:v0951p1666*
ID_MODEL_FROM_DATABASE=DataTraveler G4
usb:v0951p1689* usb:v0951p1689*
ID_MODEL_FROM_DATABASE=DataTraveler SE9 ID_MODEL_FROM_DATABASE=DataTraveler SE9
@ -30903,7 +30924,7 @@ usb:v0955p7030*
ID_MODEL_FROM_DATABASE=Tegra 3 (recovery mode) ID_MODEL_FROM_DATABASE=Tegra 3 (recovery mode)
usb:v0955p7100* usb:v0955p7100*
ID_MODEL_FROM_DATABASE=Notion Ink Adam ID_MODEL_FROM_DATABASE=Tegra Device
usb:v0955p7820* usb:v0955p7820*
ID_MODEL_FROM_DATABASE=Tegra 2 AC100 developer mode ID_MODEL_FROM_DATABASE=Tegra 2 AC100 developer mode
@ -34532,6 +34553,12 @@ usb:v0BC2p2300*
usb:v0BC2p2320* usb:v0BC2p2320*
ID_MODEL_FROM_DATABASE=USB 3.0 bridge [Portable Expansion Drive] 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* usb:v0BC2p3000*
ID_MODEL_FROM_DATABASE=FreeAgent Desktop ID_MODEL_FROM_DATABASE=FreeAgent Desktop
@ -35735,6 +35762,15 @@ usb:v0C4Bp0100*
usb:v0C4Bp0300* usb:v0C4Bp0300*
ID_MODEL_FROM_DATABASE=cyberJack pinpad(a) 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* usb:v0C4Bp0501*
ID_MODEL_FROM_DATABASE=cyberJack RFID comfort dual interface smartcard reader ID_MODEL_FROM_DATABASE=cyberJack RFID comfort dual interface smartcard reader
@ -48560,6 +48596,15 @@ usb:v1C26*
usb:v1C27* usb:v1C27*
ID_VENDOR_FROM_DATABASE=HuiYang D & S Cable Co., Ltd. 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* usb:v1C31*
ID_VENDOR_FROM_DATABASE=LS Cable Ltd. ID_VENDOR_FROM_DATABASE=LS Cable Ltd.
@ -50475,7 +50520,25 @@ usb:v2639p0013*
ID_MODEL_FROM_DATABASE=MTi-300 AHRS ID_MODEL_FROM_DATABASE=MTi-300 AHRS
usb:v2639p0017* 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* usb:v2650*
ID_VENDOR_FROM_DATABASE=Electronics For Imaging, Inc. [hex] ID_VENDOR_FROM_DATABASE=Electronics For Imaging, Inc. [hex]
@ -50735,15 +50798,36 @@ usb:v3125*
usb:v3125p0001* usb:v3125p0001*
ID_MODEL_FROM_DATABASE=TrackerPod Camera Stand ID_MODEL_FROM_DATABASE=TrackerPod Camera Stand
usb:v3136*
ID_VENDOR_FROM_DATABASE=Navini Networks
usb:v3176* usb:v3176*
ID_VENDOR_FROM_DATABASE=Whanam Electronics Co., Ltd 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* usb:v3275*
ID_VENDOR_FROM_DATABASE=VidzMedia Pte Ltd ID_VENDOR_FROM_DATABASE=VidzMedia Pte Ltd
usb:v3275p4FB1* usb:v3275p4FB1*
ID_MODEL_FROM_DATABASE=MonsterTV P2H 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* usb:v3334*
ID_VENDOR_FROM_DATABASE=AEI ID_VENDOR_FROM_DATABASE=AEI
@ -50762,6 +50846,12 @@ usb:v3340p0E3A*
usb:v3340pA0A3* usb:v3340pA0A3*
ID_MODEL_FROM_DATABASE=deltaX 5 BT (D) PDA 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* usb:v3504*
ID_VENDOR_FROM_DATABASE=Micro Star ID_VENDOR_FROM_DATABASE=Micro Star
@ -51308,6 +51398,12 @@ usb:v4146p9281*
usb:v4146pBA01* usb:v4146pBA01*
ID_MODEL_FROM_DATABASE=Intuix Flash Drive 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* usb:v4242*
ID_VENDOR_FROM_DATABASE=USB Design by Example ID_VENDOR_FROM_DATABASE=USB Design by Example
@ -51317,6 +51413,15 @@ usb:v4242p4201*
usb:v4242p4220* usb:v4242p4220*
ID_MODEL_FROM_DATABASE=Echo 1 Camera 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* usb:v4317*
ID_VENDOR_FROM_DATABASE=Broadcom Corp. ID_VENDOR_FROM_DATABASE=Broadcom Corp.
@ -51455,6 +51560,18 @@ usb:v5345*
usb:v5345p1234* usb:v5345p1234*
ID_MODEL_FROM_DATABASE=PDS6062T Oscilloscope 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* usb:v544D*
ID_VENDOR_FROM_DATABASE=Transmeta Corp. ID_VENDOR_FROM_DATABASE=Transmeta Corp.
@ -51605,6 +51722,9 @@ usb:v5986p02D0*
usb:v5986p03D0* usb:v5986p03D0*
ID_MODEL_FROM_DATABASE=Lenovo Integrated Webcam [R5U877] ID_MODEL_FROM_DATABASE=Lenovo Integrated Webcam [R5U877]
usb:v59E3*
ID_VENDOR_FROM_DATABASE=Nonolith Labs
usb:v5A57* usb:v5A57*
ID_VENDOR_FROM_DATABASE=Zinwell ID_VENDOR_FROM_DATABASE=Zinwell
@ -51653,6 +51773,93 @@ usb:v6189p182D*
usb:v6189p2068* usb:v6189p2068*
ID_MODEL_FROM_DATABASE=USB to serial cable (v2) 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* usb:v6253*
ID_VENDOR_FROM_DATABASE=TwinHan Technology Co., Ltd ID_VENDOR_FROM_DATABASE=TwinHan Technology Co., Ltd
@ -51926,6 +52133,30 @@ usb:v8341*
usb:v8341p2000* usb:v8341p2000*
ID_MODEL_FROM_DATABASE=Flashdisk 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* usb:v9016*
ID_VENDOR_FROM_DATABASE=Sitecom ID_VENDOR_FROM_DATABASE=Sitecom
@ -51983,6 +52214,18 @@ usb:v9710p7832*
usb:v9710p7840* usb:v9710p7840*
ID_MODEL_FROM_DATABASE=MCS7820/MCS7840 2/4 port serial adapter 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* usb:v99FA*
ID_VENDOR_FROM_DATABASE=Grandtec ID_VENDOR_FROM_DATABASE=Grandtec
@ -52067,12 +52310,30 @@ usb:vA727p6895*
usb:vA727p6897* usb:vA727p6897*
ID_MODEL_FROM_DATABASE=AR5523 ID_MODEL_FROM_DATABASE=AR5523
usb:vAAAA*
ID_VENDOR_FROM_DATABASE=MXT
usb:vAAAAp8815*
ID_MODEL_FROM_DATABASE=microSD CardReader
usb:vABCD* usb:vABCD*
ID_VENDOR_FROM_DATABASE=Unknown ID_VENDOR_FROM_DATABASE=Unknown
usb:vABCDpCDEE* usb:vABCDpCDEE*
ID_MODEL_FROM_DATABASE=Petcam 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* usb:vC251*
ID_VENDOR_FROM_DATABASE=Keil Software, Inc. ID_VENDOR_FROM_DATABASE=Keil Software, Inc.
@ -52088,6 +52349,15 @@ usb:vCACEp0002*
usb:vCACEp0300* usb:vCACEp0300*
ID_MODEL_FROM_DATABASE=AirPcap NX [Atheros AR9001U-(2)NG] 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* usb:vD209*
ID_VENDOR_FROM_DATABASE=Ultimarc ID_VENDOR_FROM_DATABASE=Ultimarc
@ -52097,6 +52367,12 @@ usb:vD209p0301*
usb:vD209p0501* usb:vD209p0501*
ID_MODEL_FROM_DATABASE=Ultra-Stik Ultimarc Ultra-Stik Player 1 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* usb:vE4E4*
ID_VENDOR_FROM_DATABASE=Xorcom Ltd. ID_VENDOR_FROM_DATABASE=Xorcom Ltd.
@ -52193,14 +52469,50 @@ usb:vEB1ApE355*
usb:vEB2A* usb:vEB2A*
ID_VENDOR_FROM_DATABASE=KWorld ID_VENDOR_FROM_DATABASE=KWorld
usb:vEF18*
ID_VENDOR_FROM_DATABASE=SMART TECHNOLOGY INDUSTRIAL LTD.
usb:vF003* usb:vF003*
ID_VENDOR_FROM_DATABASE=Hewlett Packard ID_VENDOR_FROM_DATABASE=Hewlett Packard
usb:vF003p6002* usb:vF003p6002*
ID_MODEL_FROM_DATABASE=PhotoSmart C500 ID_MODEL_FROM_DATABASE=PhotoSmart C500
usb:vF182*
ID_VENDOR_FROM_DATABASE=Leap Motion
usb:vF182p0003*
ID_MODEL_FROM_DATABASE=Controller
usb:vF4EC* usb:vF4EC*
ID_VENDOR_FROM_DATABASE=Atten Electronics / Siglent Technologies ID_VENDOR_FROM_DATABASE=Atten Electronics / Siglent Technologies
usb:vF4ECpEE38* usb:vF4ECpEE38*
ID_MODEL_FROM_DATABASE=Digital Storage Oscilloscope 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 # 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 # IBM
########################################################### ###########################################################
@ -562,6 +570,10 @@ keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*3000*:pvr*
KEYBOARD_KEY_98=suspend # Fn+F12 hibernate KEYBOARD_KEY_98=suspend # Fn+F12 hibernate
KEYBOARD_KEY_b4=prog1 # Lenovo Care 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 # lenovo-ideapad
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn*IdeaPad*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnS10-*: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 # ThinkPad X6 Tablet
keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X6*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnLENOVO*:pnThinkPad*X6*:pvr*
KEYBOARD_KEY_6c=direction # rotate KEYBOARD_KEY_6c=direction # rotate
KEYBOARD_KEY_68=f13 # toolbox KEYBOARD_KEY_68=leftmeta # toolbox
KEYBOARD_KEY_6b=esc # escape KEYBOARD_KEY_6b=esc # escape
KEYBOARD_KEY_6d=right # right on d-pad KEYBOARD_KEY_6d=right # right on d-pad
KEYBOARD_KEY_6e=left # left 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 # ThinkPad X41 Tablet
keyboard:dmi:bvn*:bvr*:bd*:svnIBM*:pn18666TU:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnIBM*:pn18666TU:pvr*
KEYBOARD_KEY_6c=direction # rotate KEYBOARD_KEY_6c=direction # rotate
KEYBOARD_KEY_68=f13 # toolbox KEYBOARD_KEY_68=leftmeta # toolbox
KEYBOARD_KEY_6b=esc # escape KEYBOARD_KEY_6b=esc # escape
KEYBOARD_KEY_69=enter # enter on d-pad 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:dmi:bvn*:bvr*:bd*:svnMicro-Star*:pn*:pvr*
KEYBOARD_KEY_c2=ejectcd 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*U-100*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U100*:pvr* keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*U100*:pvr*
keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*N033:* keyboard:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pn*N033:*
KEYBOARD_KEY_f7=reserved KEYBOARD_KEY_f7=reserved
KEYBOARD_KEY_f8=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:dmi:bvn*:bvr*:bd*:svnMICRO-STAR*:pnU90/U100:*
KEYBOARD_KEY_e4=reserved KEYBOARD_KEY_e4=reserved

View File

@ -28,11 +28,36 @@
# mouse:usb:v17efp6019:* # mouse:usb:v17efp6019:*
# mouse:*:name:Lenovo Optical USB Mouse: # 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 # DPI settings are specified as
# MOUSE_DPI=<dpi>[@<frequency>] # MOUSE_DPI=<dpi>[@<frequency>]
# #
# Where <dpi> is the resolution in dots per inch, and <frequency> the # 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: # The value of MOUSE_DPI is:
# - a single integer for single-resolution mice, e.g. # - a single integer for single-resolution mice, e.g.
@ -48,7 +73,7 @@
# ascending order, whichever appropriate. # ascending order, whichever appropriate.
# #
# The frequency must be given to either none or all resolutions. If the # 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 # 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 # 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 # third-party software) must not be entered into this file, use a local
# hwdb instead. # hwdb instead.
# #
# To add local entries, create a new file #########################################
# /etc/udev/hwdb.d/71-mouse-local.hwdb # MOUSE_WHEEL_CLICK_ANGLE #
# 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 # The angle in degrees per mouse wheel 'click', specified as
# http://bugs.freedesktop.org/enter_bug.cgi?product=systemd # MOUSE_WHEEL_CLICK_ANGLE=<degrees>
# and include your new rules, a description of the device, and the #
# output of # Most mice have a 15 degree click stop (24 clicks per full rotation).
# udevadm info /dev/input/eventXX #
# (or /dev/input/event*).
#
# 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 # Dell
@ -85,6 +117,13 @@
mouse:usb:v046dpc063:name:DELL DELL USB Laser Mouse: mouse:usb:v046dpc063:name:DELL DELL USB Laser Mouse:
MOUSE_DPI=1000@125 MOUSE_DPI=1000@125
##########################################
# Fujitsu Siemens
##########################################
mouse:usb:v0461p4d16:name:USB Optical Mouse:
MOUSE_DPI=500@125
########################################## ##########################################
# Lenovo # 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. # 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. # Until 3.19 is available, this list just has the Wireless PID entry.
# Logitech B605 Wireless Mouse (also M505) # Logitech M-BJ58 Optical Mouse
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:101d: mouse:usb:v046dpc00e:name:Logitech USB-PS/2 Optical Mouse:
MOUSE_DPI=900@166 # 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 # Logitech Cordless Click! Plus
mouse:usb:v046dpc50e:name:Logitech USB Receiver: 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 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 # Logitech G500s Laser Gaming Mouse
mouse:usb:v046dpc24e:name:Logitech G500s Laser Gaming Mouse: mouse:usb:v046dpc24e:name:Logitech G500s Laser Gaming Mouse:
MOUSE_DPI=400@500 *800@500 2000@500 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) # Logitech G700 Laser Mouse (Wired)
mouse:usb:v046dpc06b:name:Logitech G700 Laser Mouse: mouse:usb:v046dpc06b:name:Logitech G700 Laser Mouse:
# Logitech G700 Laser Mouse (Wireless) # Logitech G700 Laser Mouse (Wireless)
mouse:usb:v046dpc531:name:Logitech USB Receiver: mouse:usb:v046dpc531:name:Logitech USB Receiver:
MOUSE_DPI=*1000@500 3800@500 500@1000 1500@1000 2000@1000 MOUSE_DPI=*1000@500 3800@500 500@1000 1500@1000 2000@1000
# Logitech Wireless Mouse M185 # Logitech USB Laser Mouse M-UAS144 [LS1 Laser Mouse]
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4008: mouse:usb:v046dpc062:name:Logitech USB Laser Mouse:
MOUSE_DPI=800@166 # Logitech USB Laser Mouse M-U0007
mouse:usb:v046dpc069:name:Logitech USB Laser Mouse:
# Logitech M705 (marathon mouse) MOUSE_DPI=1200@125
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 T620 (or, the soap) # Logitech T620 (or, the soap)
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4027: mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4027:
MOUSE_DPI=1200@250 MOUSE_DPI=1200@250
# Logitech Wirless Mouse M325 # Logitech ZoneTouch Mouse T400
mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:400a: mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:4026:
MOUSE_DPI=600@166 MOUSE_DPI=1300@166
# Logitech Ultrathin Touch Mouse # Logitech Ultrathin Touch Mouse
mouse:bluetooth:v046dpb00d:name:Ultrathin Touch Mouse: mouse:bluetooth:v046dpb00d:name:Ultrathin Touch Mouse:
MOUSE_DPI=1000@1000 MOUSE_DPI=1000@1000
# Logitech USB Optical Mouse # ImExPS/2 Logitech Wheel Mouse
mouse:usb:v046dpc05a:name:Logitech USB Optical Mouse: mouse:ps2:*:name:ImExPS/2 Logitech Wheel Mouse:
MOUSE_DPI=1000@125 MOUSE_DPI=400@250
# 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
########################################## ##########################################
# Microsoft # 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 # Microsoft Arc Touch Mouse USB
mouse:usb:v045ep07b1:name:Microsoft Microsoft® Nano Transceiver v1.0: mouse:usb:v045ep07b1:name:Microsoft Microsoft® Nano Transceiver v1.0:
MOUSE_DPI=1400@142 MOUSE_DPI=1400@142
# Microsoft Wireless Laser Mouse 8000
mouse:bluetooth:v045ep0702:name:Microsoft Wireless Laser Mouse 8000:
MOUSE_DPI=1000@1000
########################################## ##########################################
# Oklick # Oklick
########################################## ##########################################
# Oklick 406S Bluetooth Laster Mouse # Oklick 406S Bluetooth Laser Mouse
mouse:bluetooth:v056ep0061:name:Laser BTmouse: mouse:bluetooth:v056ep0061:name:Laser BTmouse:
MOUSE_DPI=*800@333 1600@333 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="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
process and generate 128-bit ID values. The 128-bit ID generate 128-bit ID values. The 128-bit ID values processed and
values processed and generated by these APIs are a generated by these APIs are a generalization of OSF UUIDs as
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string 4122</a> but use a simpler string format. These functions
format. These functions impose no structure on the impose no structure on the used IDs, much unlike OSF UUIDs or
used IDs, much unlike OSF UUIDs or Microsoft GUIDs, Microsoft GUIDs, but are fully compatible with those types of IDs.
but are fully compatible with those types of IDs. </p><p>See
</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_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_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</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>
for more information about the implemented for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
functions.</p><p>A 128-bit ID is implemented as the following union type:</p><pre class="programlisting">typedef union sd_id128 {
union type:</p><pre class="programlisting">typedef union sd_id128 { uint8_t bytes[16];
uint8_t bytes[16]; uint64_t qwords[2];
uint64_t qwords[2]; } sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID separate bytes or two 64-bit words. It is generally safer to
as 16 separate bytes or two 64-bit words. It is generally access the ID components by their 8-bit array to avoid endianness
safer to access the ID components by their 8-bit array issues. This union is intended to be passed call-by-value (as
to avoid endianness issues. This union is intended to opposed to call-by-reference) and may be directly manipulated by
be passed call-by-value (as opposed to clients.</p><p>A couple of macros are defined to denote and decode 128-bit
call-by-reference) and may be directly manipulated by IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
clients.</p><p>A couple of macros are defined to denote and constant 128-bit ID in source code. A commonly used idiom is to
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used 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
to denote a constant 128-bit ID in source code. A convert constant 128-bit IDs into constant strings for output. The
commonly used idiom is to assign a name to a 128-bit following example code will output the string
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 "fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
used to convert constant 128-bit IDs into constant puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
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 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used <code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
to format a 128-bit ID in 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> <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 format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
example:</p><pre class="programlisting">int main(int argc, char *argv[]) { sd_id128_t id;
sd_id128_t id; id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
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));
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id)); return 0;
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[]) { }</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; 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); 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); b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a; c = a;
assert(sd_id128_equal(a, c)); assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b)); assert(!sd_id128_equal(a, b));
return 0; return 0;
}</pre><p>Note that new, randomized IDs may be generated }</pre><p>Note that new, randomized IDs may be generated with
with <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<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
<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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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="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="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="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="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="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> <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html> </p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
process and generate 128-bit ID values. The 128-bit ID generate 128-bit ID values. The 128-bit ID values processed and
values processed and generated by these APIs are a generated by these APIs are a generalization of OSF UUIDs as
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string 4122</a> but use a simpler string format. These functions
format. These functions impose no structure on the impose no structure on the used IDs, much unlike OSF UUIDs or
used IDs, much unlike OSF UUIDs or Microsoft GUIDs, Microsoft GUIDs, but are fully compatible with those types of IDs.
but are fully compatible with those types of IDs. </p><p>See
</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_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_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</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>
for more information about the implemented for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
functions.</p><p>A 128-bit ID is implemented as the following union type:</p><pre class="programlisting">typedef union sd_id128 {
union type:</p><pre class="programlisting">typedef union sd_id128 { uint8_t bytes[16];
uint8_t bytes[16]; uint64_t qwords[2];
uint64_t qwords[2]; } sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID separate bytes or two 64-bit words. It is generally safer to
as 16 separate bytes or two 64-bit words. It is generally access the ID components by their 8-bit array to avoid endianness
safer to access the ID components by their 8-bit array issues. This union is intended to be passed call-by-value (as
to avoid endianness issues. This union is intended to opposed to call-by-reference) and may be directly manipulated by
be passed call-by-value (as opposed to clients.</p><p>A couple of macros are defined to denote and decode 128-bit
call-by-reference) and may be directly manipulated by IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
clients.</p><p>A couple of macros are defined to denote and constant 128-bit ID in source code. A commonly used idiom is to
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used 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
to denote a constant 128-bit ID in source code. A convert constant 128-bit IDs into constant strings for output. The
commonly used idiom is to assign a name to a 128-bit following example code will output the string
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 "fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
used to convert constant 128-bit IDs into constant puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
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 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used <code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
to format a 128-bit ID in 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> <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 format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
example:</p><pre class="programlisting">int main(int argc, char *argv[]) { sd_id128_t id;
sd_id128_t id; id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
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));
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id)); return 0;
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[]) { }</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; 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); 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); b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a; c = a;
assert(sd_id128_equal(a, c)); assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b)); assert(!sd_id128_equal(a, b));
return 0; return 0;
}</pre><p>Note that new, randomized IDs may be generated }</pre><p>Note that new, randomized IDs may be generated with
with <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<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
<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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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="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="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="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="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="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> <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html> </p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
process and generate 128-bit ID values. The 128-bit ID generate 128-bit ID values. The 128-bit ID values processed and
values processed and generated by these APIs are a generated by these APIs are a generalization of OSF UUIDs as
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string 4122</a> but use a simpler string format. These functions
format. These functions impose no structure on the impose no structure on the used IDs, much unlike OSF UUIDs or
used IDs, much unlike OSF UUIDs or Microsoft GUIDs, Microsoft GUIDs, but are fully compatible with those types of IDs.
but are fully compatible with those types of IDs. </p><p>See
</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_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_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</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>
for more information about the implemented for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
functions.</p><p>A 128-bit ID is implemented as the following union type:</p><pre class="programlisting">typedef union sd_id128 {
union type:</p><pre class="programlisting">typedef union sd_id128 { uint8_t bytes[16];
uint8_t bytes[16]; uint64_t qwords[2];
uint64_t qwords[2]; } sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID separate bytes or two 64-bit words. It is generally safer to
as 16 separate bytes or two 64-bit words. It is generally access the ID components by their 8-bit array to avoid endianness
safer to access the ID components by their 8-bit array issues. This union is intended to be passed call-by-value (as
to avoid endianness issues. This union is intended to opposed to call-by-reference) and may be directly manipulated by
be passed call-by-value (as opposed to clients.</p><p>A couple of macros are defined to denote and decode 128-bit
call-by-reference) and may be directly manipulated by IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
clients.</p><p>A couple of macros are defined to denote and constant 128-bit ID in source code. A commonly used idiom is to
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used 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
to denote a constant 128-bit ID in source code. A convert constant 128-bit IDs into constant strings for output. The
commonly used idiom is to assign a name to a 128-bit following example code will output the string
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 "fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
used to convert constant 128-bit IDs into constant puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
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 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used <code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
to format a 128-bit ID in 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> <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 format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
example:</p><pre class="programlisting">int main(int argc, char *argv[]) { sd_id128_t id;
sd_id128_t id; id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
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));
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id)); return 0;
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[]) { }</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; 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); 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); b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a; c = a;
assert(sd_id128_equal(a, c)); assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b)); assert(!sd_id128_equal(a, b));
return 0; return 0;
}</pre><p>Note that new, randomized IDs may be generated }</pre><p>Note that new, randomized IDs may be generated with
with <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<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
<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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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="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="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="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="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="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> <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html> </p></div></div></body></html>

View File

@ -19,71 +19,65 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
process and generate 128-bit ID values. The 128-bit ID generate 128-bit ID values. The 128-bit ID values processed and
values processed and generated by these APIs are a generated by these APIs are a generalization of OSF UUIDs as
generalization of OSF UUIDs as defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC defined by <a class="ulink" href="https://tools.ietf.org/html/rfc4122" target="_top">RFC
4122</a> but use a simpler string 4122</a> but use a simpler string format. These functions
format. These functions impose no structure on the impose no structure on the used IDs, much unlike OSF UUIDs or
used IDs, much unlike OSF UUIDs or Microsoft GUIDs, Microsoft GUIDs, but are fully compatible with those types of IDs.
but are fully compatible with those types of IDs. </p><p>See
</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_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_randomize.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_randomize</span>(3)</span></a> and and
<a href="sd_id128_get_machine.html"><span class="citerefentry"><span class="refentrytitle">sd_id128_get_machine</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>
for more information about the implemented for more information about the implemented functions.</p><p>A 128-bit ID is implemented as the following
functions.</p><p>A 128-bit ID is implemented as the following union type:</p><pre class="programlisting">typedef union sd_id128 {
union type:</p><pre class="programlisting">typedef union sd_id128 { uint8_t bytes[16];
uint8_t bytes[16]; uint64_t qwords[2];
uint64_t qwords[2]; } sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID as 16
} sd_id128_t;</pre><p>This union type allows accessing the 128-bit ID separate bytes or two 64-bit words. It is generally safer to
as 16 separate bytes or two 64-bit words. It is generally access the ID components by their 8-bit array to avoid endianness
safer to access the ID components by their 8-bit array issues. This union is intended to be passed call-by-value (as
to avoid endianness issues. This union is intended to opposed to call-by-reference) and may be directly manipulated by
be passed call-by-value (as opposed to clients.</p><p>A couple of macros are defined to denote and decode 128-bit
call-by-reference) and may be directly manipulated by IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used to denote a
clients.</p><p>A couple of macros are defined to denote and constant 128-bit ID in source code. A commonly used idiom is to
decode 128-bit IDs:</p><p><code class="function">SD_ID128_MAKE()</code> may be used 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
to denote a constant 128-bit ID in source code. A convert constant 128-bit IDs into constant strings for output. The
commonly used idiom is to assign a name to a 128-bit following example code will output the string
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 "fc2e22bc6ee647b6b90729ab34a250b1":</p><pre class="programlisting">int main(int argc, char *argv[]) {
used to convert constant 128-bit IDs into constant puts(SD_ID128_CONST_STR(SD_MESSAGE_COREDUMP));
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 }</pre><p><code class="function">SD_ID128_FORMAT_STR</code> and
<code class="function">SD_ID128_FORMAT_VAL()</code> may be used <code class="function">SD_ID128_FORMAT_VAL()</code> may be used to format a
to format a 128-bit ID in 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> <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 format string, as shown in the following example:</p><pre class="programlisting">int main(int argc, char *argv[]) {
example:</p><pre class="programlisting">int main(int argc, char *argv[]) { sd_id128_t id;
sd_id128_t id; id = SD_ID128_MAKE(ee,89,be,71,bd,6e,43,d6,91,e6,c5,5d,eb,03,02,07);
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));
printf("The ID encoded in this C file is " SD_ID128_FORMAT_STR ".\n", SD_ID128_FORMAT_VAL(id)); return 0;
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[]) { }</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; 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); 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); b = SD_ID128_MAKE(f2,28,88,9c,5f,09,44,15,9d,d7,04,77,58,cb,e7,3e);
c = a; c = a;
assert(sd_id128_equal(a, c)); assert(sd_id128_equal(a, c));
assert(!sd_id128_equal(a, b)); assert(!sd_id128_equal(a, b));
return 0; return 0;
}</pre><p>Note that new, randomized IDs may be generated }</pre><p>Note that new, randomized IDs may be generated with
with <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>'s
<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
<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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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="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="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="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="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="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> <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>
</p></div></div></body></html> </p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

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

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
the log journal for reading. It will find all journal for reading. It will find all journal files automatically and
files automatically and interleave them automatically interleave them automatically when reading. As first argument it
when reading. As first argument it takes a pointer to takes a pointer to a <code class="varname">sd_journal</code> pointer, which
a <code class="varname">sd_journal</code> pointer, which on on success will contain a journal context object. The second
success will contain a journal context object. The argument is a flags field, which may consist of the following
second argument is a flags field, which may consist of flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
the following flags ORed together: makes sure only journal files generated on the local machine will
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only journal files generated on the local machine will only volatile journal files will be opened, excluding those which
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> are stored on persistent storage.
makes sure only volatile journal files will be opened, <code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
excluding those which are stored on persistent system services and the kernel (in opposition to user session
storage. <code class="constant">SD_JOURNAL_SYSTEM</code> processes) to be opened.
will cause journal files of system services and the <code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
kernel (in opposition to user session processes) to files of the current user to be opened. If neither
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code> <code class="constant">SD_JOURNAL_SYSTEM</code> nor
will cause journal files of the current user to be <code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code> journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are to <code class="function">sd_journal_open()</code> but takes an absolute
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> directory path as argument. All journal files in this directory
is similar to <code class="function">sd_journal_open()</code> will be opened and interleaved automatically. This call also takes
but takes an absolute directory path as argument. All a flags argument, but it must be passed as 0 as no flags are
journal files in this directory will be opened and currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
interleaved automatically. This call also takes a <code class="function">sd_journal_open()</code> but takes a
flags argument, but it must be passed as 0 as no flags <code class="constant">NULL</code>-terminated list of file paths to open.
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> All files will be opened and interleaved automatically. This call
is similar to <code class="function">sd_journal_open()</code> also takes a flags argument, but it must be passed as 0 as no
but takes a <code class="constant">NULL</code>-terminated list flags are currently understood for this call. Please note that in
of file paths to open. All files will be opened and the case of a live journal, this function is only useful for
interleaved automatically. This call also takes a debugging, because individual journal files can be rotated at any
flags argument, but it must be passed as 0 as no flags moment, and the opening of specific files is inherently
are currently understood for this call. Please note racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
that in the case of a live journal, this function is only to <code class="function">sd_journal_open()</code> but opens the journal
useful for debugging, because individual journal files files of a running OS container. The specified machine name refers
can be rotated at any moment, and the opening of to a container that is registered with
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code> <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
is similar to <code class="function">sd_journal_open()</code> child after a fork. Functions which take a journal object as an
but opens the journal files of a running argument (<code class="function">sd_journal_next()</code> and others) will
OS container. The specified machine name refers to a return <code class="constant">-ECHILD</code> after a fork.
container that is registered with </p><p><code class="function">sd_journal_close()</code> will close the
<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 journal context allocated with
used in the child after a fork. Functions which take a <code class="function">sd_journal_open()</code> or
journal object as an argument <code class="function">sd_journal_open_directory()</code> and free its
(<code class="function">sd_journal_next()</code> and others) resources.</p><p>When opening the journal only journal files accessible to
will return <code class="constant">-ECHILD</code> after a fork. the calling user will be opened. If journal files are not
</p><p><code class="function">sd_journal_close()</code> will accessible to the caller, this will be silently ignored.</p><p>See
close the journal context allocated with <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
<code class="function">sd_journal_open()</code> or for an example of how to iterate through the journal after opening
<code class="function">sd_journal_open_directory()</code> and it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
free its resources.</p><p>When opening the journal only journal files <code class="function">sd_journal_open()</code> references a specific
accessible to the calling user will be opened. If journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
journal files are not accessible to the caller, this file seek index in a classic file system file, but without
will be silently ignored.</p><p>See 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> <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 and
after opening it with <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by and related calls. The current entry position may be exported in
<code class="function">sd_journal_open()</code> references a <span class="emphasis"><em>cursor</em></span> strings, as accessible via
specific journal entry as <span class="emphasis"><em>current</em></span> entry, <a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
similar to a file seek index in a classic file system Cursor strings may be used to globally identify a specific journal
file, but without absolute positions. It may be entry in a stable way and then later to seek to it (or if the
altered with specific entry is not available locally, to its closest entry in
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> time)
and <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
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> <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>,
and related calls. The current entry position may be <code class="function">sd_journal_open_directory()</code>, and
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible <code class="function">sd_journal_open_files()</code> calls return 0 on
via success or a negative errno-style error code.
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor <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>,
strings may be used to globally identify a specific <code class="function">sd_journal_open_directory()</code> and
journal entry in a stable way and then later to seek <code class="function">sd_journal_close()</code> interfaces are available
to it (or if the specific entry is not available as a shared library, which can be compiled and linked to with the
locally, to its closest entry in time) <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>
<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 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_get_fd()</code> and related <code class="function">sd_journal_close()</code>,
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="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="function">sd_journal_open_directory()</code>, and <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="function">sd_journal_open_files()</code> calls <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
return 0 on success or a negative errno-style error systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
code. <code class="function">sd_journal_close()</code> returns in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
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="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_directory()</code> and <code class="function">sd_journal_open_files()</code> were added in
<code class="function">sd_journal_close()</code> interfaces are systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
available as a shared library, which can be compiled and 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>
linked to with the <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<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> <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</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>, <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<code class="function">sd_journal_close()</code>, <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>, <a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>, </p></div></div></body></html>
<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>

View File

@ -19,81 +19,75 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
the read pointer into the journal by one entry. The pointer into the journal by one entry. The only argument taken is
only argument taken is a journal context object as a journal context object as allocated via
allocated via <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>.
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>. After After successful invocation the entry may be read with functions
successful invocation the entry may be read with such as
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
<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
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
<code class="function">sd_journal_previous_skip()</code> the read pointer by multiple entries at once, as specified in the
advance/set back the read pointer by multiple entries <code class="varname">skip</code> parameter.</p><p>The journal is strictly ordered by reception time, and hence
at once, as specified in the <code class="varname">skip</code> advancing to the next entry guarantees that the entry then
parameter.</p><p>The journal is strictly ordered by reception pointing to is later in time than then previous one, or has the
time, and hence advancing to the next entry guarantees same timestamp.</p><p>Note that
that the entry then pointing to is later in time than <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
then previous one, or has the same timestamp.</p><p>Note that and related calls will fail unless
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a> <code class="function">sd_journal_next()</code> has been invoked at least
and related calls will fail unless once in order to position the read pointer on a journal
<code class="function">sd_journal_next()</code> has been entry.</p><p>Note that the <code class="function">SD_JOURNAL_FOREACH()</code>
invoked at least once in order to position the read macro may be used as a wrapper around
pointer on a journal entry.</p><p>Note that the <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
<code class="function">SD_JOURNAL_FOREACH()</code> macro may be used and <code class="function">sd_journal_next()</code> in order to make
as a wrapper around iterating through the journal easier. See below for an example.
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> Similarly, <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code> may
and <code class="function">sd_journal_next()</code> in order to 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
make iterating through the journal easier. See below back on success or a negative errno-style error code. When the end
for an example. Similarly, or beginning of the journal is reached, a number smaller than
<code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code> requested is returned. More specifically, if
may be used for iterating the journal in reverse <code class="function">sd_journal_next()</code> or
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 <code class="function">sd_journal_previous()</code> reach the end/beginning
advanced/set back on success or a negative errno-style of the journal they will return 0, instead of 1 when they are
error code. When the end or beginning of the journal 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>,
is reached, a number smaller than requested is <code class="function">sd_journal_previous()</code>,
returned. More specifically, if <code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_next()</code> or <code class="function">sd_journal_previous_skip()</code> interfaces are
<code class="function">sd_journal_previous()</code> reach the available as a shared library, which can be compiled and linked to
end/beginning of the journal they will return 0, with the
instead of 1 when they are successful. This should be <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>
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>, 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;
<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;
#include &lt;string.h&gt; #include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt; #include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
int r; int r;
sd_journal *j; sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY); r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) { if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r)); fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1; return 1;
} }
SD_JOURNAL_FOREACH(j) { SD_JOURNAL_FOREACH(j) {
const char *d; const char *d;
size_t l; size_t l;
r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l); r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l);
if (r &lt; 0) { if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r)); fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue; continue;
} }
printf("%.*s\n", (int) l, d); printf("%.*s\n", (int) l, d);
} }
sd_journal_close(j); sd_journal_close(j);
return 0; 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> }</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="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.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_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_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_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> <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> </p></div></div></body></html>

View File

@ -19,81 +19,75 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
the read pointer into the journal by one entry. The pointer into the journal by one entry. The only argument taken is
only argument taken is a journal context object as a journal context object as allocated via
allocated via <a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>.
<a href="sd_journal_open.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_open</span>(3)</span></a>. After After successful invocation the entry may be read with functions
successful invocation the entry may be read with such as
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
<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
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
<code class="function">sd_journal_previous_skip()</code> the read pointer by multiple entries at once, as specified in the
advance/set back the read pointer by multiple entries <code class="varname">skip</code> parameter.</p><p>The journal is strictly ordered by reception time, and hence
at once, as specified in the <code class="varname">skip</code> advancing to the next entry guarantees that the entry then
parameter.</p><p>The journal is strictly ordered by reception pointing to is later in time than then previous one, or has the
time, and hence advancing to the next entry guarantees same timestamp.</p><p>Note that
that the entry then pointing to is later in time than <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>
then previous one, or has the same timestamp.</p><p>Note that and related calls will fail unless
<a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a> <code class="function">sd_journal_next()</code> has been invoked at least
and related calls will fail unless once in order to position the read pointer on a journal
<code class="function">sd_journal_next()</code> has been entry.</p><p>Note that the <code class="function">SD_JOURNAL_FOREACH()</code>
invoked at least once in order to position the read macro may be used as a wrapper around
pointer on a journal entry.</p><p>Note that the <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
<code class="function">SD_JOURNAL_FOREACH()</code> macro may be used and <code class="function">sd_journal_next()</code> in order to make
as a wrapper around iterating through the journal easier. See below for an example.
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> Similarly, <code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code> may
and <code class="function">sd_journal_next()</code> in order to 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
make iterating through the journal easier. See below back on success or a negative errno-style error code. When the end
for an example. Similarly, or beginning of the journal is reached, a number smaller than
<code class="function">SD_JOURNAL_FOREACH_BACKWARDS()</code> requested is returned. More specifically, if
may be used for iterating the journal in reverse <code class="function">sd_journal_next()</code> or
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 <code class="function">sd_journal_previous()</code> reach the end/beginning
advanced/set back on success or a negative errno-style of the journal they will return 0, instead of 1 when they are
error code. When the end or beginning of the journal 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>,
is reached, a number smaller than requested is <code class="function">sd_journal_previous()</code>,
returned. More specifically, if <code class="function">sd_journal_next_skip()</code> and
<code class="function">sd_journal_next()</code> or <code class="function">sd_journal_previous_skip()</code> interfaces are
<code class="function">sd_journal_previous()</code> reach the available as a shared library, which can be compiled and linked to
end/beginning of the journal they will return 0, with the
instead of 1 when they are successful. This should be <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>
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>, 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;
<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;
#include &lt;string.h&gt; #include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt; #include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
int r; int r;
sd_journal *j; sd_journal *j;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY); r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) { if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r)); fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1; return 1;
} }
SD_JOURNAL_FOREACH(j) { SD_JOURNAL_FOREACH(j) {
const char *d; const char *d;
size_t l; size_t l;
r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l); r = sd_journal_get_data(j, "MESSAGE", (const void **)&amp;d, &amp;l);
if (r &lt; 0) { if (r &lt; 0) {
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r)); fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
continue; continue;
} }
printf("%.*s\n", (int) l, d); printf("%.*s\n", (int) l, d);
} }
sd_journal_close(j); sd_journal_close(j);
return 0; 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> }</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="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.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_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_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_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> <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> </p></div></div></body></html>

View File

@ -19,107 +19,92 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
the data object associated with a specific field from object associated with a specific field from the current journal
the current journal entry. It takes four arguments: entry. It takes four arguments: the journal context object, a
the journal context object, a string with the field string with the field name to request, plus a pair of pointers to
name to request, plus a pair of pointers to pointer/size variables where the data object and its size shall be
pointer/size variables where the data object and its stored in. The field name should be an entry field name.
size shall be stored in. The field name should be an Well-known field names are listed in
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>.
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>. The The returned data is in a read-only memory map and is only valid
returned data is in a read-only memory map and is only until the next invocation of
valid until the next invocation of <code class="function">sd_journal_get_data()</code> or
<code class="function">sd_journal_get_data()</code> or <code class="function">sd_journal_enumerate_data()</code>, or the read
<code class="function">sd_journal_enumerate_data()</code>, or pointer is altered. Note that the data returned will be prefixed
the read pointer is altered. Note that the data with the field name and '='. Also note that by default data fields
returned will be prefixed with the field name and larger than 64K might get truncated to 64K. This threshold may be
'='. Also note that by default data fields larger than changed and turned off with
64K might get truncated to 64K. This threshold may be <code class="function">sd_journal_set_data_threshold()</code> (see
changed and turned off with below).</p><p><code class="function">sd_journal_enumerate_data()</code> may be used
<code class="function">sd_journal_set_data_threshold()</code> (see to iterate through all fields of the current entry. On each
below).</p><p><code class="function">sd_journal_enumerate_data()</code> invocation the data for the next field is returned. The order of
may be used to iterate through all fields of the these fields is not defined. The data returned is in the same
current entry. On each invocation the data for the format as with <code class="function">sd_journal_get_data()</code> and also
next field is returned. The order of these fields is follows the same life-time semantics.</p><p><code class="function">sd_journal_restart_data()</code> resets the
not defined. The data returned is in the same format data enumeration index to the beginning of the entry. The next
as with <code class="function">sd_journal_get_data()</code> and invocation of <code class="function">sd_journal_enumerate_data()</code>
also follows the same life-time semantics.</p><p><code class="function">sd_journal_restart_data()</code> will return the first field of the entry again.</p><p>Note that the <code class="function">SD_JOURNAL_FOREACH_DATA()</code>
resets the data enumeration index to the beginning of macro may be used as a handy wrapper around
the entry. The next invocation of <code class="function">sd_journal_restart_data()</code> and
<code class="function">sd_journal_enumerate_data()</code> will return the first <code class="function">sd_journal_enumerate_data()</code>.</p><p>Note that these functions will not work before
field of the entry again.</p><p>Note that the <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
<code class="function">SD_JOURNAL_FOREACH_DATA()</code> macro (or related call) has been called at least once, in order to
may be used as a handy wrapper around position the read pointer at a valid entry.</p><p><code class="function">sd_journal_set_data_threshold()</code> may be
<code class="function">sd_journal_restart_data()</code> and used to change the data field size threshold for data returned by
<code class="function">sd_journal_enumerate_data()</code>.</p><p>Note that these functions will not work before <code class="function">sd_journal_get_data()</code>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> <code class="function">sd_journal_enumerate_data()</code> and
(or related call) has been called at least <code class="function">sd_journal_enumerate_unique()</code>. This threshold
once, in order to position the read pointer at a valid entry.</p><p><code class="function">sd_journal_set_data_threshold()</code> is a hint only: it indicates that the client program is interested
may be used to change the data field size threshold only in the initial parts of the data fields, up to the threshold
for data returned by in size -- but the library might still return larger data objects.
<code class="function">sd_journal_get_data()</code>, That means applications should not rely exclusively on this
<code class="function">sd_journal_enumerate_data()</code> and setting to limit the size of the data fields returned, but need to
<code class="function">sd_journal_enumerate_unique()</code>. This apply a explicit size limit on the returned data as well. This
threshold is a hint only: it indicates that the client threshold defaults to 64K by default. To retrieve the complete
program is interested only in the initial parts of the data fields this threshold should be turned off by setting it to
data fields, up to the threshold in size -- but the 0, so that the library always returns the complete data objects.
library might still return larger data objects. That It is recommended to set this threshold as low as possible since
means applications should not rely exclusively on this this relieves the library from having to decompress large
setting to limit the size of the data fields returned, compressed data objects in full.</p><p><code class="function">sd_journal_get_data_threshold()</code> returns
but need to apply a explicit size limit on the 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
returned data as well. This threshold defaults to 64K success or a negative errno-style error code. If the current entry
by default. To retrieve the complete data fields this does not include the specified field, -ENOENT is returned. If
threshold should be turned off by setting it to 0, so <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
that the library always returns the complete data has not been called at least once, -EADDRNOTAVAIL is returned.
objects. It is recommended to set this threshold as <code class="function">sd_journal_enumerate_data()</code> returns a
low as possible since this relieves the library from positive integer if the next field has been read, 0 when no more
having to decompress large compressed data objects in fields are known, or a negative errno-style error code.
full.</p><p><code class="function">sd_journal_get_data_threshold()</code> <code class="function">sd_journal_restart_data()</code> returns nothing.
returns the currently configured data field size <code class="function">sd_journal_set_data_threshold()</code> and
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> <code class="function">sd_journal_get_threshold()</code> return 0 on
returns 0 on success or a negative errno-style error 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. If the current entry does not include the <code class="function">sd_journal_enumerate_data()</code>,
specified field, -ENOENT is returned. If <code class="function">sd_journal_restart_data()</code>,
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> <code class="function">sd_journal_set_data_threshold()</code> and
has not been called at least once, -EADDRNOTAVAIL is <code class="function">sd_journal_get_data_threshold()</code> interfaces
returned. <code class="function">sd_journal_enumerate_data()</code> are available as a shared library, which can be compiled and
returns a positive integer if the next field has been linked to with the
read, 0 when no more fields are known, or a negative <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>
errno-style error 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
code. <code class="function">sd_journal_restart_data()</code> <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
returns for a complete example how to use
nothing. <code class="function">sd_journal_set_data_threshold()</code> <code class="function">sd_journal_get_data()</code>.</p><p>Use the
and <code class="function">sd_journal_get_threshold()</code> <code class="function">SD_JOURNAL_FOREACH_DATA</code> macro to
return 0 on success or a negative errno-style error iterate through all fields of the current journal
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>, entry:</p><pre class="programlisting">...
<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">...
int print_fields(sd_journal *j) { int print_fields(sd_journal *j) {
const void *data; const void *data;
size_t length; size_t length;
SD_JOURNAL_FOREACH_DATA(j, data, length) SD_JOURNAL_FOREACH_DATA(j, data, length)
printf("%.*s\n", (int) length, data); 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> ...</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.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="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.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_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_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_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> <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> </p></div></div></body></html>

View File

@ -19,93 +19,84 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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> <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
queries the journal for all unique values the journal for all unique values the specified field can take. It
specified field can take. It takes two arguments: the takes two arguments: the journal to query and the field name to
journal to query and the field name to look look for. Well-known field names are listed on
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>.
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>. Field Field names must be specified without a trailing '='. After this
names must be specified without a trailing '='. After function has been executed successfully the field values may be
this function has been executed successfully the field queried using <code class="function">sd_journal_enumerate_unique()</code>.
values may be queried using Invoking this call a second time will change the field name being
<code class="function">sd_journal_enumerate_unique()</code>. Invoking queried and reset the enumeration index to the first field value
this call a second time will change the field name that matches.</p><p><code class="function">sd_journal_enumerate_unique()</code> may be
being queried and reset the enumeration index to the used to iterate through all data fields which match the previously
first field value that matches.</p><p><code class="function">sd_journal_enumerate_unique()</code> selected field name as set with
may be used to iterate through all data fields which <code class="function">sd_journal_query_unique()</code>. On each invocation
match the previously selected field name as set with the next field data matching the field name is returned. The order
<code class="function">sd_journal_query_unique()</code>. On of the returned data fields is not defined. It takes three
each invocation the next field data matching the field arguments: the journal context object, plus a pair of pointers to
name is returned. The order of the returned data pointer/size variables where the data object and its size shall be
fields is not defined. It takes three arguments: the stored in. The returned data is in a read-only memory map and is
journal context object, plus a pair of pointers to only valid until the next invocation of
pointer/size variables where the data object and its <code class="function">sd_journal_enumerate_unique()</code>. Note that the
size shall be stored in. The returned data is in a data returned will be prefixed with the field name and '='. Note
read-only memory map and is only valid until the next that this call is subject to the data field size threshold as
invocation of controlled by
<code class="function">sd_journal_enumerate_unique()</code>. Note <code class="function">sd_journal_set_data_threshold()</code>.</p><p><code class="function">sd_journal_restart_unique()</code> resets the
that the data returned will be prefixed with the field data enumeration index to the beginning of the list. The next
name and '='. Note that this call is subject to the invocation of <code class="function">sd_journal_enumerate_unique()</code>
data field size threshold as controlled by will return the first field data matching the field name
<code class="function">sd_journal_set_data_threshold()</code>.</p><p><code class="function">sd_journal_restart_unique()</code> again.</p><p>Note that the
resets the data enumeration index to the beginning of <code class="function">SD_JOURNAL_FOREACH_UNIQUE()</code> macro may be used
the list. The next invocation of as a handy wrapper around
<code class="function">sd_journal_enumerate_unique()</code> <code class="function">sd_journal_restart_unique()</code> and
will return the first field data matching the field <code class="function">sd_journal_enumerate_unique()</code>.</p><p>Note that these functions currently are not influenced by
name again.</p><p>Note that the matches set with <code class="function">sd_journal_add_match()</code> but
<code class="function">SD_JOURNAL_FOREACH_UNIQUE()</code> macro 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
may be used as a handy wrapper around success or a negative errno-style error code.
<code class="function">sd_journal_restart_unique()</code> and <code class="function">sd_journal_enumerate_unique()</code> returns a
<code class="function">sd_journal_enumerate_unique()</code>.</p><p>Note that these functions currently are not positive integer if the next field data has been read, 0 when no
influenced by matches set with more fields are known, or a negative errno-style error code.
<code class="function">sd_journal_add_match()</code> but this <code class="function">sd_journal_restart_unique()</code> returns
might change in a later version of this 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>,
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> <code class="function">sd_journal_enumerate_unique()</code> and
returns 0 on success or a negative errno-style error <code class="function">sd_journal_restart_unique()</code> interfaces are
code. <code class="function">sd_journal_enumerate_unique()</code> available as a shared library, which can be compiled and linked to
returns a positive integer if the next field data has with the
been read, 0 when no more fields are known, or a <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>
negative errno-style error 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
code. <code class="function">sd_journal_restart_unique()</code> to iterate through all values a field of the journal can take. The
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>, following example lists all unit names referenced in the
<code class="function">sd_journal_enumerate_unique()</code> and journal:</p><pre class="programlisting">#include &lt;stdio.h&gt;
<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;
#include &lt;string.h&gt; #include &lt;string.h&gt;
#include &lt;systemd/sd-journal.h&gt; #include &lt;systemd/sd-journal.h&gt;
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
sd_journal *j; sd_journal *j;
const void *d; const void *d;
size_t l; size_t l;
int r; int r;
r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY); r = sd_journal_open(&amp;j, SD_JOURNAL_LOCAL_ONLY);
if (r &lt; 0) { if (r &lt; 0) {
fprintf(stderr, "Failed to open journal: %s\n", strerror(-r)); fprintf(stderr, "Failed to open journal: %s\n", strerror(-r));
return 1; return 1;
} }
r = sd_journal_query_unique(j, "_SYSTEMD_UNIT"); r = sd_journal_query_unique(j, "_SYSTEMD_UNIT");
if (r &lt; 0) { if (r &lt; 0) {
fprintf(stderr, "Failed to query journal: %s\n", strerror(-r)); fprintf(stderr, "Failed to query journal: %s\n", strerror(-r));
return 1; return 1;
} }
SD_JOURNAL_FOREACH_UNIQUE(j, d, l) SD_JOURNAL_FOREACH_UNIQUE(j, d, l)
printf("%.*s\n", (int) l, (const char*) d); printf("%.*s\n", (int) l, (const char*) d);
sd_journal_close(j); sd_journal_close(j);
return 0; 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> }</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.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="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.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_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_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> <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> </p></div></div></body></html>

View File

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

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
the log journal for reading. It will find all journal for reading. It will find all journal files automatically and
files automatically and interleave them automatically interleave them automatically when reading. As first argument it
when reading. As first argument it takes a pointer to takes a pointer to a <code class="varname">sd_journal</code> pointer, which
a <code class="varname">sd_journal</code> pointer, which on on success will contain a journal context object. The second
success will contain a journal context object. The argument is a flags field, which may consist of the following
second argument is a flags field, which may consist of flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
the following flags ORed together: makes sure only journal files generated on the local machine will
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only journal files generated on the local machine will only volatile journal files will be opened, excluding those which
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> are stored on persistent storage.
makes sure only volatile journal files will be opened, <code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
excluding those which are stored on persistent system services and the kernel (in opposition to user session
storage. <code class="constant">SD_JOURNAL_SYSTEM</code> processes) to be opened.
will cause journal files of system services and the <code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
kernel (in opposition to user session processes) to files of the current user to be opened. If neither
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code> <code class="constant">SD_JOURNAL_SYSTEM</code> nor
will cause journal files of the current user to be <code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code> journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are to <code class="function">sd_journal_open()</code> but takes an absolute
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> directory path as argument. All journal files in this directory
is similar to <code class="function">sd_journal_open()</code> will be opened and interleaved automatically. This call also takes
but takes an absolute directory path as argument. All a flags argument, but it must be passed as 0 as no flags are
journal files in this directory will be opened and currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
interleaved automatically. This call also takes a <code class="function">sd_journal_open()</code> but takes a
flags argument, but it must be passed as 0 as no flags <code class="constant">NULL</code>-terminated list of file paths to open.
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> All files will be opened and interleaved automatically. This call
is similar to <code class="function">sd_journal_open()</code> also takes a flags argument, but it must be passed as 0 as no
but takes a <code class="constant">NULL</code>-terminated list flags are currently understood for this call. Please note that in
of file paths to open. All files will be opened and the case of a live journal, this function is only useful for
interleaved automatically. This call also takes a debugging, because individual journal files can be rotated at any
flags argument, but it must be passed as 0 as no flags moment, and the opening of specific files is inherently
are currently understood for this call. Please note racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
that in the case of a live journal, this function is only to <code class="function">sd_journal_open()</code> but opens the journal
useful for debugging, because individual journal files files of a running OS container. The specified machine name refers
can be rotated at any moment, and the opening of to a container that is registered with
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code> <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
is similar to <code class="function">sd_journal_open()</code> child after a fork. Functions which take a journal object as an
but opens the journal files of a running argument (<code class="function">sd_journal_next()</code> and others) will
OS container. The specified machine name refers to a return <code class="constant">-ECHILD</code> after a fork.
container that is registered with </p><p><code class="function">sd_journal_close()</code> will close the
<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 journal context allocated with
used in the child after a fork. Functions which take a <code class="function">sd_journal_open()</code> or
journal object as an argument <code class="function">sd_journal_open_directory()</code> and free its
(<code class="function">sd_journal_next()</code> and others) resources.</p><p>When opening the journal only journal files accessible to
will return <code class="constant">-ECHILD</code> after a fork. the calling user will be opened. If journal files are not
</p><p><code class="function">sd_journal_close()</code> will accessible to the caller, this will be silently ignored.</p><p>See
close the journal context allocated with <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
<code class="function">sd_journal_open()</code> or for an example of how to iterate through the journal after opening
<code class="function">sd_journal_open_directory()</code> and it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
free its resources.</p><p>When opening the journal only journal files <code class="function">sd_journal_open()</code> references a specific
accessible to the calling user will be opened. If journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
journal files are not accessible to the caller, this file seek index in a classic file system file, but without
will be silently ignored.</p><p>See 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> <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 and
after opening it with <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by and related calls. The current entry position may be exported in
<code class="function">sd_journal_open()</code> references a <span class="emphasis"><em>cursor</em></span> strings, as accessible via
specific journal entry as <span class="emphasis"><em>current</em></span> entry, <a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
similar to a file seek index in a classic file system Cursor strings may be used to globally identify a specific journal
file, but without absolute positions. It may be entry in a stable way and then later to seek to it (or if the
altered with specific entry is not available locally, to its closest entry in
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> time)
and <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
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> <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>,
and related calls. The current entry position may be <code class="function">sd_journal_open_directory()</code>, and
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible <code class="function">sd_journal_open_files()</code> calls return 0 on
via success or a negative errno-style error code.
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor <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>,
strings may be used to globally identify a specific <code class="function">sd_journal_open_directory()</code> and
journal entry in a stable way and then later to seek <code class="function">sd_journal_close()</code> interfaces are available
to it (or if the specific entry is not available as a shared library, which can be compiled and linked to with the
locally, to its closest entry in time) <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>
<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 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_get_fd()</code> and related <code class="function">sd_journal_close()</code>,
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="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="function">sd_journal_open_directory()</code>, and <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="function">sd_journal_open_files()</code> calls <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
return 0 on success or a negative errno-style error systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
code. <code class="function">sd_journal_close()</code> returns in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
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="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_directory()</code> and <code class="function">sd_journal_open_files()</code> were added in
<code class="function">sd_journal_close()</code> interfaces are systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
available as a shared library, which can be compiled and 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>
linked to with the <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<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> <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</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>, <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<code class="function">sd_journal_close()</code>, <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>, <a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>, </p></div></div></body></html>
<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>

View File

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

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
the log journal for reading. It will find all journal for reading. It will find all journal files automatically and
files automatically and interleave them automatically interleave them automatically when reading. As first argument it
when reading. As first argument it takes a pointer to takes a pointer to a <code class="varname">sd_journal</code> pointer, which
a <code class="varname">sd_journal</code> pointer, which on on success will contain a journal context object. The second
success will contain a journal context object. The argument is a flags field, which may consist of the following
second argument is a flags field, which may consist of flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
the following flags ORed together: makes sure only journal files generated on the local machine will
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only journal files generated on the local machine will only volatile journal files will be opened, excluding those which
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> are stored on persistent storage.
makes sure only volatile journal files will be opened, <code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
excluding those which are stored on persistent system services and the kernel (in opposition to user session
storage. <code class="constant">SD_JOURNAL_SYSTEM</code> processes) to be opened.
will cause journal files of system services and the <code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
kernel (in opposition to user session processes) to files of the current user to be opened. If neither
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code> <code class="constant">SD_JOURNAL_SYSTEM</code> nor
will cause journal files of the current user to be <code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code> journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are to <code class="function">sd_journal_open()</code> but takes an absolute
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> directory path as argument. All journal files in this directory
is similar to <code class="function">sd_journal_open()</code> will be opened and interleaved automatically. This call also takes
but takes an absolute directory path as argument. All a flags argument, but it must be passed as 0 as no flags are
journal files in this directory will be opened and currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
interleaved automatically. This call also takes a <code class="function">sd_journal_open()</code> but takes a
flags argument, but it must be passed as 0 as no flags <code class="constant">NULL</code>-terminated list of file paths to open.
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> All files will be opened and interleaved automatically. This call
is similar to <code class="function">sd_journal_open()</code> also takes a flags argument, but it must be passed as 0 as no
but takes a <code class="constant">NULL</code>-terminated list flags are currently understood for this call. Please note that in
of file paths to open. All files will be opened and the case of a live journal, this function is only useful for
interleaved automatically. This call also takes a debugging, because individual journal files can be rotated at any
flags argument, but it must be passed as 0 as no flags moment, and the opening of specific files is inherently
are currently understood for this call. Please note racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
that in the case of a live journal, this function is only to <code class="function">sd_journal_open()</code> but opens the journal
useful for debugging, because individual journal files files of a running OS container. The specified machine name refers
can be rotated at any moment, and the opening of to a container that is registered with
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code> <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
is similar to <code class="function">sd_journal_open()</code> child after a fork. Functions which take a journal object as an
but opens the journal files of a running argument (<code class="function">sd_journal_next()</code> and others) will
OS container. The specified machine name refers to a return <code class="constant">-ECHILD</code> after a fork.
container that is registered with </p><p><code class="function">sd_journal_close()</code> will close the
<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 journal context allocated with
used in the child after a fork. Functions which take a <code class="function">sd_journal_open()</code> or
journal object as an argument <code class="function">sd_journal_open_directory()</code> and free its
(<code class="function">sd_journal_next()</code> and others) resources.</p><p>When opening the journal only journal files accessible to
will return <code class="constant">-ECHILD</code> after a fork. the calling user will be opened. If journal files are not
</p><p><code class="function">sd_journal_close()</code> will accessible to the caller, this will be silently ignored.</p><p>See
close the journal context allocated with <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
<code class="function">sd_journal_open()</code> or for an example of how to iterate through the journal after opening
<code class="function">sd_journal_open_directory()</code> and it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
free its resources.</p><p>When opening the journal only journal files <code class="function">sd_journal_open()</code> references a specific
accessible to the calling user will be opened. If journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
journal files are not accessible to the caller, this file seek index in a classic file system file, but without
will be silently ignored.</p><p>See 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> <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 and
after opening it with <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by and related calls. The current entry position may be exported in
<code class="function">sd_journal_open()</code> references a <span class="emphasis"><em>cursor</em></span> strings, as accessible via
specific journal entry as <span class="emphasis"><em>current</em></span> entry, <a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
similar to a file seek index in a classic file system Cursor strings may be used to globally identify a specific journal
file, but without absolute positions. It may be entry in a stable way and then later to seek to it (or if the
altered with specific entry is not available locally, to its closest entry in
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> time)
and <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
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> <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>,
and related calls. The current entry position may be <code class="function">sd_journal_open_directory()</code>, and
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible <code class="function">sd_journal_open_files()</code> calls return 0 on
via success or a negative errno-style error code.
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor <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>,
strings may be used to globally identify a specific <code class="function">sd_journal_open_directory()</code> and
journal entry in a stable way and then later to seek <code class="function">sd_journal_close()</code> interfaces are available
to it (or if the specific entry is not available as a shared library, which can be compiled and linked to with the
locally, to its closest entry in time) <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>
<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 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_get_fd()</code> and related <code class="function">sd_journal_close()</code>,
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="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="function">sd_journal_open_directory()</code>, and <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="function">sd_journal_open_files()</code> calls <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
return 0 on success or a negative errno-style error systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
code. <code class="function">sd_journal_close()</code> returns in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
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="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_directory()</code> and <code class="function">sd_journal_open_files()</code> were added in
<code class="function">sd_journal_close()</code> interfaces are systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
available as a shared library, which can be compiled and 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>
linked to with the <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<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> <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</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>, <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<code class="function">sd_journal_close()</code>, <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>, <a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>, </p></div></div></body></html>
<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>

View File

@ -19,132 +19,122 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
used to submit simple, plain text log entries to the submit simple, plain text log entries to the system journal. The
system journal. The first argument is a priority first argument is a priority value. This is followed by a format
value. This is followed by a format string and its string and its parameters, similar to
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>
<a href="http://man7.org/linux/man-pages/man3/printf.3.html"><span class="citerefentry"><span class="refentrytitle">printf</span>(3)</span></a> or
or <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="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>. The The priority value is one of
priority value is one of <code class="constant">LOG_EMERG</code>,
<code class="constant">LOG_EMERG</code>, <code class="constant">LOG_ALERT</code>,
<code class="constant">LOG_ALERT</code>, <code class="constant">LOG_CRIT</code>,
<code class="constant">LOG_CRIT</code>, <code class="constant">LOG_ERR</code>,
<code class="constant">LOG_ERR</code>, <code class="constant">LOG_WARNING</code>,
<code class="constant">LOG_WARNING</code>, <code class="constant">LOG_NOTICE</code>,
<code class="constant">LOG_NOTICE</code>, <code class="constant">LOG_INFO</code>,
<code class="constant">LOG_INFO</code>, <code class="constant">LOG_DEBUG</code>, as defined in
<code class="constant">LOG_DEBUG</code>, as defined in <code class="filename">syslog.h</code>, see
<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>
<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
for details. It is recommended to use this call to messages in the application locale or system locale and in UTF-8
submit log messages in the application locale or system format, but no such restrictions are enforced.</p><p><code class="function">sd_journal_printv()</code> is similar to
locale and in UTF-8 format, but no such restrictions <code class="function">sd_journal_print()</code> but takes a variable
are enforced.</p><p><code class="function">sd_journal_printv()</code> is argument list encapsulated in an object of type
similar to <code class="function">sd_journal_print()</code> but <code class="varname">va_list</code> (see
takes a variable argument list encapsulated in an <a href="stdarg.html"><span class="citerefentry"><span class="refentrytitle">stdarg</span>(3)</span></a>
object of type <code class="varname">va_list</code> (see for more information) instead of the format string. It is
<a href="stdarg.html"><span class="citerefentry"><span class="refentrytitle">stdarg</span>(3)</span></a> otherwise equivalent in behavior.</p><p><code class="function">sd_journal_send()</code> may be used to submit
for more information) instead of the format string. It structured log entries to the system journal. It takes a series of
is otherwise equivalent in behavior.</p><p><code class="function">sd_journal_send()</code> may be format strings, each immediately followed by their associated
used to submit structured log entries to the system parameters, terminated by <code class="constant">NULL</code>. The strings
journal. It takes a series of format strings, each passed should be of the format "<code class="literal">VARIABLE=value</code>".
immediately followed by their associated parameters, The variable name must be in uppercase and consist only of
terminated by <code class="constant">NULL</code>. The strings passed should be of characters, numbers and underscores, and may not begin with an
the format "<code class="literal">VARIABLE=value</code>". The underscore. (All assignments that do not follow this syntax will
variable name must be in uppercase and consist only of be ignored.) The value can be of any size and format. It is highly
characters, numbers and underscores, and may not begin recommended to submit text strings formatted in the UTF-8
with an underscore. (All assignments that do not character encoding only, and submit binary fields only when
follow this syntax will be ignored.) The value can be formatting in UTF-8 strings is not sensible. A number of well
of any size and format. It is highly recommended to known fields are defined, see
submit text strings formatted in the UTF-8 character <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>
encoding only, and submit binary fields only when for details, but additional application defined fields may be
formatting in UTF-8 strings is not sensible. A number used. A variable may be assigned more than one value per
of well known fields are defined, see entry.</p><p><code class="function">sd_journal_sendv()</code> is similar to
<a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a> <code class="function">sd_journal_send()</code> but takes an array of
for details, but additional application defined fields <code class="varname">struct iovec</code> (as defined in
may be used. A variable may be assigned more than one <code class="filename">uio.h</code>, see
value per entry.</p><p><code class="function">sd_journal_sendv()</code> is <a href="readv.html"><span class="citerefentry"><span class="refentrytitle">readv</span>(3)</span></a>
similar to <code class="function">sd_journal_send()</code> but for details) instead of the format string. Each structure should
takes an array of <code class="varname">struct iovec</code> (as reference one field of the entry to submit. The second argument
defined in <code class="filename">uio.h</code>, see specifies the number of structures in the array.
<a href="readv.html"><span class="citerefentry"><span class="refentrytitle">readv</span>(3)</span></a> <code class="function">sd_journal_sendv()</code> is particularly useful to
for details) instead of the format string. Each submit binary objects to the journal where that is
structure should reference one field of the entry to necessary.</p><p><code class="function">sd_journal_perror()</code> is a similar to
submit. The second argument specifies the number of <a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a>
structures in the array. and writes a message to the journal that consists of the passed
<code class="function">sd_journal_sendv()</code> is string, suffixed with ": " and a human readable representation of
particularly useful to submit binary objects to the the current error code stored in
journal where that is necessary.</p><p><code class="function">sd_journal_perror()</code> is a <a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>.
similar to If the message string is passed as <code class="constant">NULL</code> or
<a href="perror.html"><span class="citerefentry"><span class="refentrytitle">perror</span>(3)</span></a> empty string, only the error string representation will be
and writes a message to the journal that consists of written, prefixed with nothing. An additional journal field ERRNO=
the passed string, suffixed with ": " and a human is included in the entry containing the numeric error code
readable representation of the current error code formatted as decimal string. The log priority used is
stored in <code class="constant">LOG_ERR</code> (3).</p><p>Note that <code class="function">sd_journal_send()</code> is a
<a href="http://man7.org/linux/man-pages/man3/errno.3.html"><span class="citerefentry"><span class="refentrytitle">errno</span>(3)</span></a>. If wrapper around <code class="function">sd_journal_sendv()</code> to make it
the message string is passed as <code class="constant">NULL</code> or empty string, easier to use when only text strings shall be submitted. Also, the
only the error string representation will be written, following two calls are mostly equivalent:</p><pre class="programlisting">sd_journal_print(LOG_INFO, "Hello World, this is PID %lu!", (unsigned long) getpid());
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(), sd_journal_send("MESSAGE=Hello World, this is PID %lu!", (unsigned long) getpid(),
"PRIORITY=%i", LOG_INFO, "PRIORITY=%i", LOG_INFO,
NULL);</pre><p>Note that these calls implicitly add fields for NULL);</pre><p>Note that these calls implicitly add fields for the source
the source file, function name and code line where file, function name and code line where invoked. This is
invoked. This is implemented with macros. If this is implemented with macros. If this is not desired, it can be turned
not desired, it can be turned off by defining off by defining SD_JOURNAL_SUPPRESS_LOCATION before including
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>
<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
and <code class="function">sd_journal_print()</code> may largely be used interchangeably
largely be used interchangeably functionality-wise. However, note that log messages
functionality-wise. However, note that log messages logged via the former take a different path to the
logged via the former take a different path to the journal server than the later, and hence global
journal server than the later, and hence global chronological ordering between the two streams cannot
chronological ordering between the two streams cannot be guaranteed. Using
be guaranteed. Using <code class="function">sd_journal_print()</code> has the
<code class="function">sd_journal_print()</code> has the benefit of logging source code line, filenames, and
benefit of logging source code line, filenames, and functions as metadata along all entries, and
functions as metadata along all entries, and guaranteeing chronological ordering with structured
guaranteeing chronological ordering with structured log entries that are generated via
log entries that are generated via <code class="function">sd_journal_send()</code>. Using
<code class="function">sd_journal_send()</code>. Using <code class="function">syslog()</code> has the benefit of being
<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
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 error code. The
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>
<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
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>
<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
is not running (the socket is not present), those 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
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
safe" in the meaning of <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>. <a href="signal.html"><span class="citerefentry"><span class="refentrytitle">signal</span>(7)</span></a>.
</p><p><code class="function">sd_journal_print</code>, </p><p><code class="function">sd_journal_print</code>,
<code class="function">sd_journal_printv</code>, <code class="function">sd_journal_printv</code>,
<code class="function">sd_journal_send</code>, and <code class="function">sd_journal_send</code>, and
<code class="function">sd_journal_perror</code> are <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>, 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_printv()</code>,
<code class="function">sd_journal_send()</code> and <code class="function">sd_journal_send()</code> and
<code class="function">sd_journal_sendv()</code> interfaces <code class="function">sd_journal_sendv()</code> interfaces are available
are available as a shared library, which can be compiled as a shared library, which can be compiled and linked to with the
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>
<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>
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="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.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="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="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="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="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="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="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>
<a href="socket.html"><span class="citerefentry"><span class="refentrytitle">socket</span>(7)</span></a> </p></div></div></body></html>
</p></div></div></body></html>

View File

@ -19,108 +19,94 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
the log journal for reading. It will find all journal for reading. It will find all journal files automatically and
files automatically and interleave them automatically interleave them automatically when reading. As first argument it
when reading. As first argument it takes a pointer to takes a pointer to a <code class="varname">sd_journal</code> pointer, which
a <code class="varname">sd_journal</code> pointer, which on on success will contain a journal context object. The second
success will contain a journal context object. The argument is a flags field, which may consist of the following
second argument is a flags field, which may consist of flags ORed together: <code class="constant">SD_JOURNAL_LOCAL_ONLY</code>
the following flags ORed together: makes sure only journal files generated on the local machine will
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code> makes sure be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> makes sure
only journal files generated on the local machine will only volatile journal files will be opened, excluding those which
be opened. <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code> are stored on persistent storage.
makes sure only volatile journal files will be opened, <code class="constant">SD_JOURNAL_SYSTEM</code> will cause journal files of
excluding those which are stored on persistent system services and the kernel (in opposition to user session
storage. <code class="constant">SD_JOURNAL_SYSTEM</code> processes) to be opened.
will cause journal files of system services and the <code class="constant">SD_JOURNAL_CURRENT_USER</code> will cause journal
kernel (in opposition to user session processes) to files of the current user to be opened. If neither
be opened. <code class="constant">SD_JOURNAL_CURRENT_USER</code> <code class="constant">SD_JOURNAL_SYSTEM</code> nor
will cause journal files of the current user to be <code class="constant">SD_JOURNAL_CURRENT_USER</code> are specified, all
opened. If neither <code class="constant">SD_JOURNAL_SYSTEM</code> journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> is similar
nor <code class="constant">SD_JOURNAL_CURRENT_USER</code> are to <code class="function">sd_journal_open()</code> but takes an absolute
specified, all journal file types will be opened.</p><p><code class="function">sd_journal_open_directory()</code> directory path as argument. All journal files in this directory
is similar to <code class="function">sd_journal_open()</code> will be opened and interleaved automatically. This call also takes
but takes an absolute directory path as argument. All a flags argument, but it must be passed as 0 as no flags are
journal files in this directory will be opened and currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> is similar to
interleaved automatically. This call also takes a <code class="function">sd_journal_open()</code> but takes a
flags argument, but it must be passed as 0 as no flags <code class="constant">NULL</code>-terminated list of file paths to open.
are currently understood for this call.</p><p><code class="function">sd_journal_open_files()</code> All files will be opened and interleaved automatically. This call
is similar to <code class="function">sd_journal_open()</code> also takes a flags argument, but it must be passed as 0 as no
but takes a <code class="constant">NULL</code>-terminated list flags are currently understood for this call. Please note that in
of file paths to open. All files will be opened and the case of a live journal, this function is only useful for
interleaved automatically. This call also takes a debugging, because individual journal files can be rotated at any
flags argument, but it must be passed as 0 as no flags moment, and the opening of specific files is inherently
are currently understood for this call. Please note racy.</p><p><code class="function">sd_journal_open_container()</code> is similar
that in the case of a live journal, this function is only to <code class="function">sd_journal_open()</code> but opens the journal
useful for debugging, because individual journal files files of a running OS container. The specified machine name refers
can be rotated at any moment, and the opening of to a container that is registered with
specific files is inherently racy.</p><p><code class="function">sd_journal_open_container()</code> <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
is similar to <code class="function">sd_journal_open()</code> child after a fork. Functions which take a journal object as an
but opens the journal files of a running argument (<code class="function">sd_journal_next()</code> and others) will
OS container. The specified machine name refers to a return <code class="constant">-ECHILD</code> after a fork.
container that is registered with </p><p><code class="function">sd_journal_close()</code> will close the
<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 journal context allocated with
used in the child after a fork. Functions which take a <code class="function">sd_journal_open()</code> or
journal object as an argument <code class="function">sd_journal_open_directory()</code> and free its
(<code class="function">sd_journal_next()</code> and others) resources.</p><p>When opening the journal only journal files accessible to
will return <code class="constant">-ECHILD</code> after a fork. the calling user will be opened. If journal files are not
</p><p><code class="function">sd_journal_close()</code> will accessible to the caller, this will be silently ignored.</p><p>See
close the journal context allocated with <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>
<code class="function">sd_journal_open()</code> or for an example of how to iterate through the journal after opening
<code class="function">sd_journal_open_directory()</code> and it with <code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by
free its resources.</p><p>When opening the journal only journal files <code class="function">sd_journal_open()</code> references a specific
accessible to the calling user will be opened. If journal entry as <span class="emphasis"><em>current</em></span> entry, similar to a
journal files are not accessible to the caller, this file seek index in a classic file system file, but without
will be silently ignored.</p><p>See 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> <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 and
after opening it with <a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a>
<code class="function">sd_journal_open()</code>.</p><p>A journal context object returned by and related calls. The current entry position may be exported in
<code class="function">sd_journal_open()</code> references a <span class="emphasis"><em>cursor</em></span> strings, as accessible via
specific journal entry as <span class="emphasis"><em>current</em></span> entry, <a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>.
similar to a file seek index in a classic file system Cursor strings may be used to globally identify a specific journal
file, but without absolute positions. It may be entry in a stable way and then later to seek to it (or if the
altered with specific entry is not available locally, to its closest entry in
<a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a> time)
and <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
<a href="sd_journal_seek_head.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_seek_head</span>(3)</span></a> <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>,
and related calls. The current entry position may be <code class="function">sd_journal_open_directory()</code>, and
exported in <span class="emphasis"><em>cursor</em></span> strings, as accessible <code class="function">sd_journal_open_files()</code> calls return 0 on
via success or a negative errno-style error code.
<a href="sd_journal_get_cursor.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_cursor</span>(3)</span></a>. Cursor <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>,
strings may be used to globally identify a specific <code class="function">sd_journal_open_directory()</code> and
journal entry in a stable way and then later to seek <code class="function">sd_journal_close()</code> interfaces are available
to it (or if the specific entry is not available as a shared library, which can be compiled and linked to with the
locally, to its closest entry in time) <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>
<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 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_get_fd()</code> and related <code class="function">sd_journal_close()</code>,
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="constant">SD_JOURNAL_LOCAL_ONLY</code>,
<code class="function">sd_journal_open_directory()</code>, and <code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>,
<code class="function">sd_journal_open_files()</code> calls <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> were added in
return 0 on success or a negative errno-style error systemd-38.</p><p><code class="function">sd_journal_open_directory()</code> was added
code. <code class="function">sd_journal_close()</code> returns in systemd-187.</p><p><code class="constant">SD_JOURNAL_SYSTEM</code>,
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="constant">SD_JOURNAL_CURRENT_USER</code>, and
<code class="function">sd_journal_open_directory()</code> and <code class="function">sd_journal_open_files()</code> were added in
<code class="function">sd_journal_close()</code> interfaces are systemd-205. <code class="constant">SD_JOURNAL_SYSTEM_ONLY</code> was
available as a shared library, which can be compiled and 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>
linked to with the <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
<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> <a href="sd-journal.html"><span class="citerefentry"><span class="refentrytitle">sd-journal</span>(3)</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>, <a href="sd_journal_next.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_next</span>(3)</span></a>,
<code class="function">sd_journal_close()</code>, <a href="sd_journal_get_data.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_get_data</span>(3)</span></a>,
<code class="constant">SD_JOURNAL_LOCAL_ONLY</code>, <a href="systemd-machined.html"><span class="citerefentry"><span class="refentrytitle">systemd-machined</span>(8)</span></a>
<code class="constant">SD_JOURNAL_RUNTIME_ONLY</code>, </p></div></div></body></html>
<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>

View File

@ -19,71 +19,71 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
called by a daemon to check for file descriptors daemon to check for file descriptors passed by the init system as
passed by the init system as part of the socket-based part of the socket-based activation logic.</p><p>If the <em class="parameter"><code>unset_environment</code></em> parameter is
activation logic.</p><p>If the <em class="parameter"><code>unset_environment</code></em> non-zero, <code class="function">sd_listen_fds()</code> will unset the
parameter is non-zero, <code class="varname">$LISTEN_FDS</code> and <code class="varname">$LISTEN_PID</code>
<code class="function">sd_listen_fds()</code> will unset the environment variables before returning (regardless of whether the
<code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code> function call itself succeeded or not). Further calls to
environment variables before returning (regardless of <code class="function">sd_listen_fds()</code> will then fail, but the
whether the function call itself succeeded or variables are no longer inherited by child processes.</p><p>If a daemon receives more than one file descriptor, they
not). Further calls to will be passed in the same order as configured in the systemd
<code class="function">sd_listen_fds()</code> will then fail, socket unit file (see
but the variables are no longer inherited by child <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>
processes.</p><p>If a daemon receives more than one file for details). Nonetheless, it is recommended to verify the correct
descriptor, they will be passed in the same order as socket types before using them. To simplify this checking, the
configured in the systemd socket definition functions
file. Nonetheless, it is recommended to verify the <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
correct socket types before using them. To simplify <a href="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a>,
this checking, the functions <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_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</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="sd_is_socket.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</span>(3)</span></a>, are provided. In order to maximize flexibility, it is recommended
<a href="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a>, to make these checks as loose as possible without allowing
<a href="sd_is_socket_unix.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_unix</span>(3)</span></a> incorrect setups. i.e. often, the actual port number a socket is
are provided. In order to maximize flexibility, it is bound to matters little for the service to work, hence it should
recommended to make these checks as loose as possible not be verified. On the other hand, whether a socket is a datagram
without allowing incorrect setups. i.e. often, the or stream socket matters a lot for the most common program logics
actual port number a socket is bound to matters little and should be checked.</p><p>This function call will set the FD_CLOEXEC flag for all
for the service to work, hence it should not be passed file descriptors to avoid further inheritance to children
verified. On the other hand, whether a socket is a of the calling process.</p><p>If multiple socket units activate the same service the order
datagram or stream socket matters a lot for the most of the file descriptors passed to its main process is undefined.
common program logics and should be checked.</p><p>This function call will set the FD_CLOEXEC flag If additional file descriptors have been passed to the service
for all passed file descriptors to avoid further manager using
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 <a href="sd_pid_notify_with_fds.html"><span class="citerefentry"><span class="refentrytitle">sd_pid_notify_with_fds</span>(3)</span></a>'s
errno-style error code. If "<code class="literal">FDSTORE=1</code>" messages, these file descriptors are
<code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code> passed last, in arbitrary order, and with duplicates
was not set or was not correctly set for this daemon and 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
hence no file descriptors were received, 0 is code. If
returned. Otherwise, the number of file descriptors <code class="varname">$LISTEN_FDS</code>/<code class="varname">$LISTEN_PID</code> was
passed is returned. The application may find them not set or was not correctly set for this daemon and hence no file
starting with file descriptor SD_LISTEN_FDS_START, descriptors were received, 0 is returned. Otherwise, the number of
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 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 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> <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 file.</p><p>Internally, this function checks whether the
<code class="varname">$LISTEN_PID</code> environment variable <code class="varname">$LISTEN_PID</code> environment variable equals the
equals the daemon PID. If not, it returns daemon PID. If not, it returns immediately. Otherwise, it parses
immediately. Otherwise, it parses the number passed in the number passed in the <code class="varname">$LISTEN_FDS</code>
the <code class="varname">$LISTEN_FDS</code> environment environment variable, then sets the FD_CLOEXEC flag for the parsed
variable, then sets the FD_CLOEXEC flag for the parsed number of file descriptors starting from SD_LISTEN_FDS_START.
number of file descriptors starting from 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
SD_LISTEN_FDS_START. Finally, it returns the parsed for supervised processes that use
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 socket-based activation. This
for supervised processes that use environment variable specifies the
socket-based activation. This data
environment variable specifies the <code class="function">sd_listen_fds()</code>
data parses. See above for
<code class="function">sd_listen_fds()</code> 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>
parses. See above for <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
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="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</span>(3)</span></a>,
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="sd_is_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</span>(3)</span></a>,
<a href="sd-daemon.html"><span class="citerefentry"><span class="refentrytitle">sd-daemon</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_fifo.html"><span class="citerefentry"><span class="refentrytitle">sd_is_fifo</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.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket</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="sd_is_socket_inet.html"><span class="citerefentry"><span class="refentrytitle">sd_is_socket_inet</span>(3)</span></a>, <a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</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="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
<a href="daemon.html"><span class="citerefentry"><span class="refentrytitle">daemon</span>(7)</span></a>, <a href="systemd.socket.html"><span class="citerefentry"><span class="refentrytitle">systemd.socket</span>(5)</span></a>
<a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>, </p></div></div></body></html>
<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="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

@ -19,55 +19,52 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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
for new-style daemons, as implemented by the daemons, as implemented by the
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
init system.</p><p>See 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_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_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_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_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="sd_watchdog_enabled.html"><span class="citerefentry"><span class="refentrytitle">sd_watchdog_enabled</span>(3)</span></a>
for more information about the functions for more information about the functions implemented. In addition
implemented. In addition to these functions, a couple to these functions, a couple of logging prefixes are defined as
of logging prefixes are defined as macros:</p><pre class="programlisting">#define SD_EMERG "&lt;0&gt;" /* system is unusable */ 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_ALERT "&lt;1&gt;" /* action must be taken immediately */
#define SD_CRIT "&lt;2&gt;" /* critical conditions */ #define SD_CRIT "&lt;2&gt;" /* critical conditions */
#define SD_ERR "&lt;3&gt;" /* error conditions */ #define SD_ERR "&lt;3&gt;" /* error conditions */
#define SD_WARNING "&lt;4&gt;" /* warning conditions */ #define SD_WARNING "&lt;4&gt;" /* warning conditions */
#define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */ #define SD_NOTICE "&lt;5&gt;" /* normal but significant condition */
#define SD_INFO "&lt;6&gt;" /* informational */ #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 #define SD_DEBUG "&lt;7&gt;" /* debug-level messages */</pre><p>These prefixes are intended to be used in conjunction with
conjunction with stderr-based logging as implemented stderr-based logging as implemented by systemd. If a systemd
by systemd. If a systemd service definition file is service definition file is configured with
configured with <code class="varname">StandardError=journal</code>,
<code class="varname">StandardError=journal</code>, <code class="varname">StandardError=syslog</code> or
<code class="varname">StandardError=syslog</code> or <code class="varname">StandardError=kmsg</code>, these prefixes can be used
<code class="varname">StandardError=kmsg</code>, these prefixes to encode a log level in lines printed. This is similar to the
can be used to encode a log level in lines kernel <code class="function">printk()</code>-style logging. See
printed. This is similar to the kernel <a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</span></a>
<code class="function">printk()</code>-style logging. See for more information.</p><p>The log levels are identical to
<a href="http://man7.org/linux/man-pages/man2/klogctl.2.html"><span class="citerefentry"><span class="refentrytitle">klogctl</span>(2)</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>'s
for more information.</p><p>The log levels are identical to log level system. To use these prefixes simply prefix every line
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>'s with one of these strings. A line that is not prefixed will be
log level system. To use these prefixes simply prefix 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
every line with one of these strings. A line that is 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
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
library, which can be compiled and linked to with the 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> <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> 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="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_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_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_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_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="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="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.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="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://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> <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> </p></div></div></body></html>

View File

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

View File

@ -19,17 +19,16 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="idm140552302860096"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description"></a></h2><p>At boot, 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> <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 reads configuration files from the above directories to register
to register in the kernel additional binary 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
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 format rules. Consult <a class="ulink" href="https://www.kernel.org/doc/Documentation/binfmt_misc.txt" target="_top">binfmt_misc.txt</a>
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
for more information on registration of additional and how to write rules.</p><p>Empty lines and lines beginning with ; and # are ignored.
binary formats and how to write rules.</p><p>Empty lines and lines beginning with ; and # are Note that this means you may not use ; and # as delimiter in
ignored. Note that this means you may not use ; and # 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
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">/etc/</code>, <code class="filename">/run/</code>, and
<code class="filename">/usr/lib/</code>, in order of precedence. <code class="filename">/usr/lib/</code>, in order of precedence.
Each configuration file in these configuration directories shall be named in 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 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">/dev/null</code> in the configuration directory in
<code class="filename">/etc/</code>, with the same filename as the vendor <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 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="idm140552302851936"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also"></a></h2><p> :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.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-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="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> <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> </p></div></div></body></html>

View File

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

View File

@ -1,5 +1,5 @@
'\" t '\" t
.TH "BOOTCHART\&.CONF" "5" "" "systemd 218" "bootchart.conf" .TH "BOOTCHART\&.CONF" "5" "" "systemd 219" "bootchart.conf"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -97,7 +97,7 @@ Configures the output directory for writing the graphs\&. By default, bootchart
\fIInit=[path]\fR \fIInit=[path]\fR
.RS 4 .RS 4
Configures bootchart to run a non\-standard binary instead of 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 .RE
.PP .PP
\fIPlotMemoryUsage=no\fR \fIPlotMemoryUsage=no\fR

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
'\" t '\" t
.TH "BUSCTL" "1" "" "systemd 218" "busctl" .TH "BUSCTL" "1" "" "systemd 219" "busctl"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -73,11 +73,6 @@ When showing messages being exchanged, show only the subset matching
\fIMATCH\fR\&. \fIMATCH\fR\&.
.RE .RE
.PP .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 \fB\-\-size=\fR
.RS 4 .RS 4
When used with the 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\&. Execute operation on a local container\&. Specify a container name to connect to\&.
.RE .RE
.PP .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 \fB\-h\fR, \fB\-\-help\fR
.RS 4 .RS 4
Print a short help text and exit\&. Print a short help text and exit\&.
@ -194,11 +199,6 @@ Print a short help text and exit\&.
.RS 4 .RS 4
Print a short version string and exit\&. Print a short version string and exit\&.
.RE .RE
.PP
\fB\-\-no\-pager\fR
.RS 4
Do not pipe output into a pager\&.
.RE
.SH "COMMANDS" .SH "COMMANDS"
.PP .PP
The following commands are understood: 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\&. 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 .RE
.PP .PP
\fBintrospect\fR \fISERVICE\fR \fIOBJECT\fR \fBintrospect\fR \fISERVICE\fR \fIOBJECT\fR [\fIINTERFACE\fR]
.RS 4 .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 .RE
.PP .PP
\fBcall\fR \fISERVICE\fR \fIOBJECT\fR \fIINTERFACE\fR \fIMETHOD\fR [\fISIGNATURE\fR\ [\fIARGUMENT\fR...]] \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="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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="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 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 <em class="replaceable"><code>ADDRESS</code></em> instead of using suitable
defaults for either the system or user bus (see defaults for either the system or user bus (see
<code class="option">--system</code> and <code class="option">--user</code> <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 "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, 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 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, 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
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
specifies the maximum bus message size to capture 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 ("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 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 instance. Container names may be enumerated with
<span class="command"><strong>machinectl -H <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 <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. 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
</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 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 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 bus service (if one is specified by its unique or well-known
name), a process (if one is specified by its numeric PID), or 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, services. If <em class="replaceable"><code>SERVICE</code></em> is specified,
show object tree of the specified services only. Otherwise, show object tree of the specified services only. Otherwise,
show all object trees of all services on the bus that acquired 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 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 service name, object path, interface name and method name. If
parameters shall be passed to the method call a signature parameters shall be passed to the method call a signature
string is required, followed by the arguments, individually 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 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. Takes a service name, object path, interface name,
property name, property signature, followed by a list of 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 <span class="command"><strong>set-property</strong></span> commands take a signature string
followed by a list of parameters formatted as string (for details 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 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 understood, the <span class="command"><strong>call</strong></span> and
<span class="command"><strong>get-property</strong></span> commands may generate a more <span class="command"><strong>get-property</strong></span> commands may generate a more
verbose, multi-line output when passed the 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 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>" object of the
"<code class="literal">org.freedesktop.systemd1</code>" service. The name of "<code class="literal">org.freedesktop.systemd1</code>" service. The name of
@ -169,7 +170,7 @@
"<code class="literal">org.freedesktop.systemd1.Manager</code>" "<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 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 # 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 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 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" 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" { ARRAY "s" {
STRING "LANG=en_US.UTF-8"; STRING "LANG=en_US.UTF-8";
STRING "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"; 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">StartUnit</code>" method on the
"<code class="literal">org.freedesktop.systemd1.Manager</code>" "<code class="literal">org.freedesktop.systemd1.Manager</code>"
interface of the interface of the
@ -188,7 +189,7 @@ ARRAY "s" {
"<code class="literal">replace</code>". As result of the method "<code class="literal">replace</code>". As result of the method
call a single object path parameter is received and 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" 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 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="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>, <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"> "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 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 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 the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version. (at your option) any later version.
systemd is distributed in the hope that it will be useful, but systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details. Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>. along with systemd; If not, see <http://www.gnu.org/licenses/>.
--> -->
<refentry id="busctl" <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? --> <!-- TODO: link to sd_bus_add_match when it is written? -->
</varlistentry> </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> <varlistentry>
<term><option>--size=</option></term> <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="host" />
<xi:include href="user-system-options.xml" xpointer="machine" /> <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="help" />
<xi:include href="standard-options.xml" xpointer="version" /> <xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="no-pager" />
</variablelist> </variablelist>
</refsect1> </refsect1>
@ -313,11 +304,13 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>.
</varlistentry> </varlistentry>
<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 <listitem><para>Show interfaces, methods, properties and
signals of the specified object (identified by its path) on 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>
<varlistentry> <varlistentry>

View File

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

View File

@ -19,7 +19,7 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 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 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 <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 <code class="filename">/etc/</code>. This file is read before any of the
configuration directories, and has the lowest precedence; entries in a file configuration directories, and has the lowest precedence; entries in a file
in any configuration directory override entries in the single configuration 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">[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">none</code>", "<code class="literal">external</code>",
"<code class="literal">journal</code>", and "<code class="literal">both</code>". When "<code class="literal">journal</code>", and "<code class="literal">both</code>". When
@ -75,7 +75,7 @@
by coredumps might temporarily exceed these limits while by coredumps might temporarily exceed these limits while
coredumps are processed. Note that old coredumps are also coredumps are processed. Note that old coredumps are also
removed based on time via 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="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="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> <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="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 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 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 <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 <code class="filename">/etc/</code>. This file is read before any of the
configuration directories, and has the lowest precedence; entries in a file configuration directories, and has the lowest precedence; entries in a file
in any configuration directory override entries in the single configuration 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">[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">none</code>", "<code class="literal">external</code>",
"<code class="literal">journal</code>", and "<code class="literal">both</code>". When "<code class="literal">journal</code>", and "<code class="literal">both</code>". When
@ -75,7 +75,7 @@
by coredumps might temporarily exceed these limits while by coredumps might temporarily exceed these limits while
coredumps are processed. Note that old coredumps are also coredumps are processed. Note that old coredumps are also
removed based on time via 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="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="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> <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 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" <!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">

View File

@ -1,5 +1,5 @@
'\" t '\" t
.TH "COREDUMPCTL" "1" "" "systemd 218" "coredumpctl" .TH "COREDUMPCTL" "1" "" "systemd 219" "coredumpctl"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -35,7 +35,7 @@ The following options are understood:
.PP .PP
\fB\-\-no\-legend\fR \fB\-\-no\-legend\fR
.RS 4 .RS 4
Do not print the column headers\&. Do not print column headers\&.
.RE .RE
.PP .PP
\fB\-1\fR \fB\-1\fR
@ -158,7 +158,7 @@ On success, 0 is returned; otherwise, a non\-zero failure code is returned\&. No
.RE .RE
.\} .\}
.PP .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 .sp
.if n \{\ .if n \{\
.RS 4 .RS 4

View File

@ -19,48 +19,37 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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 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. <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 </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,
single coredump only, instead of 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
listing all known coredumps. field takes in matching coredump entries of the
</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 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>.
data values the specified field </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.
takes in matching coredump entries of the </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
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 matching specified characteristics. If no command is
<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. 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
</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.</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
captured in the journal matching characteristics. The coredump will be written on standard
specified characteristics. If no output, unless an output file is specified with
command is specified, this is the <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
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 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
information about coredumps captured process that dumped
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 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
matching specified characteristics. <code class="option">COREDUMP_COMM=</code>). Must not contain slashes.
The coredump will be written on standard output, </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
unless an output file is specified with <code class="option">COREDUMP_EXE=</code>). Must contain at least one
<code class="option">-o/--output</code>. 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
</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 <a href="journalctl.html"><span class="citerefentry"><span class="refentrytitle">journalctl</span>(1)</span></a>).
debugger on the last coredump matching 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
specified characteristics. code is returned. Not finding any matching coredumps is treated as
</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 failure.
process that dumped </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,
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 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
(matches <code class="option">COREDUMP_COMM=</code>). <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>
Must not contain slashes. <a href="systemd-coredump.html"><span class="citerefentry"><span class="refentrytitle">systemd-coredump</span>(8)</span></a>,
</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 <a href="coredump.conf.html"><span class="citerefentry"><span class="refentrytitle">coredump.conf</span>(5)</span></a>,
(matches <code class="option">COREDUMP_EXE=</code>). <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
Must contain at least one slash. <a href="http://man7.org/linux/man-pages/man1/gdb.1.html"><span class="citerefentry"><span class="refentrytitle">gdb</span>(1)</span></a>
</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 </p></div></div></body></html>
(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>

View File

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

View File

@ -1,5 +1,5 @@
'\" t '\" t
.TH "CRYPTTAB" "5" "" "systemd 218" "crypttab" .TH "CRYPTTAB" "5" "" "systemd 219" "crypttab"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * 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\&. for possible values and the default value of this option\&.
.RE .RE
.PP .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 \fBkeyfile\-offset=\fR
.RS 4 .RS 4
Specifies the number of bytes to skip at the start of the key file\&. See 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 .PP
\fBx\-systemd\&.device\-timeout=\fR \fBx\-systemd\&.device\-timeout=\fR
.RS 4 .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", "s",
"min", "min",
"h", "h",
@ -240,9 +247,9 @@ Set up four encrypted block devices\&. One using LUKS for normal storage, anothe
.\} .\}
.nf .nf
luks UUID=2505567a\-9e27\-4efe\-a4d5\-15ad146c258b 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 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 .fi
.if n \{\ .if n \{\
.RE .RE

View File

@ -19,160 +19,143 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
describes encrypted block devices that are set up encrypted block devices that are set up during system boot.</p><p>Empty lines and lines starting with the "<code class="literal">#</code>"
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
character are ignored. Each of the remaining lines encrypted block device, fields on the line are delimited by white
describes one encrypted block device, fields on the space. The first two fields are mandatory, the remaining two are
line are delimited by white space. The first two optional.</p><p>Setting up encrypted block devices using this file supports
fields are mandatory, the remaining two are three encryption modes: LUKS, TrueCrypt and plain. See
optional.</p><p>Setting up encrypted block devices using this file <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
supports three encryption modes: LUKS, TrueCrypt and plain. for more information about each mode. When no mode is specified in
See <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> the options field and the block device contains a LUKS signature,
for more information about each mode. When no mode is specified it is opened as a LUKS device; otherwise, it is assumed to be in
in the options field and the block device contains a LUKS raw dm-crypt (plain mode) format.</p><p>The first field contains the name of the resulting encrypted
signature, it is opened as a LUKS device; otherwise, it is block device; the device is set up within
assumed to be in raw dm-crypt (plain mode) format.</p><p>The first field contains the name of the <code class="filename">/dev/mapper/</code>.</p><p>The second field contains a path to the underlying block
resulting encrypted block device; the device is set up device or file, or a specification of a block device via
within <code class="filename">/dev/mapper/</code>.</p><p>The second field contains a path to the "<code class="literal">UUID=</code>" followed by the UUID.</p><p>The third field specifies the encryption password. If the
underlying block device or file, or a specification of a block field is not present or the password is set to
device via "<code class="literal">UUID=</code>" followed by the "<code class="literal">none</code>" or "<code class="literal">-</code>", the password has
UUID.</p><p>The third field specifies the encryption to be manually entered during system boot. Otherwise, the field is
password. If the field is not present or the password interpreted as a absolute path to a file containing the encryption
is set to "<code class="literal">none</code>" or "<code class="literal">-</code>", password. For swap encryption, <code class="filename">/dev/urandom</code>
the password has to be manually entered during system boot. or the hardware device <code class="filename">/dev/hw_random</code> can be
Otherwise, the field is interpreted as a absolute path to used as the password file; using <code class="filename">/dev/random</code>
a file containing the encryption password. For swap encryption, may prevent boot completion if the system does not have enough
<code class="filename">/dev/urandom</code> or the hardware entropy to generate a truly random encryption key.</p><p>The fourth field, if present, is a comma-delimited list of
device <code class="filename">/dev/hw_random</code> can be used 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
as the password file; using the encrypted block device. This improves performance on SSD
<code class="filename">/dev/random</code> may prevent boot 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
completion if the system does not have enough entropy <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
to generate a truly random encryption key.</p><p>The fourth field, if present, is a for possible values and the default value of this option. A
comma-delimited list of options. The following cipher with unpredictable IV values, such as
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 "<code class="literal">aes-cbc-essiv:sha256</code>", is
passed through the encrypted block device. This 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
improves performance on SSD storage but has hashing. See
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>
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> for possible values and the default value of this
for possible values and the default value of 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
this option. A cipher with unpredictable IV file where the LUKS header is stored. This option is only
values, such as "<code class="literal">aes-cbc-essiv:sha256</code>", relevant for LUKS devices. See
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 <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
password hashing. See for possible values and the default value of this
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> 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
for possible values and the default value of start of the key file. See
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 <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
skip at the start of the key file. See for possible values and the default value of this
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> 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
for possible values and the default value of from the key file. See
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 <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
of bytes to read from the key file. See for possible values and the default value of this option. This
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> option is ignored in plain encryption mode, as the key file
for possible values and the default value of 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
this option. This option is ignored in plain passphrase or key against. If the key slot does not match the
encryption mode, as the key file size is then given passphrase or key, but another would, the setup of the
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 device will fail regardless. This option implies
compare the passphrase or key against. <code class="option">luks</code>. See
If the key slot does not match the given <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
passphrase or key, but another would, the for possible values. The default is to try all key slots in
setup of the device will fail regardless. 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
This option implies <code class="option">luks</code>. See following options are ignored since they are provided by the
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> LUKS header on the device: <code class="option">cipher=</code>,
for possible values. The default is to try <code class="option">hash=</code>,
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 <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
is used, the following options are ignored since 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
they are provided by the LUKS header on the show up and be unlocked at boot, and not fail the boot if it
device: <code class="option">cipher=</code>, 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
<code class="option">hash=</code>, 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
<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 <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
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 for possible values and the default value of this
device to show up and be unlocked at boot, and 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
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 swap device, and will be formatted accordingly after setting
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 up the encrypted block device, with
in bits. See <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="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">swap</code> option will
for possible values and the default value of destroy the contents of the named partition during every boot,
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 so make sure the underlying block device is specified
be used as a swap device, and will be formatted 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
accordingly after setting up the encrypted is used, the following options are ignored since they are
block device, with provided by the TrueCrypt header on the device or do not
<a href="http://man7.org/linux/man-pages/man8/mkswap.8.html"><span class="citerefentry"><span class="refentrytitle">mkswap</span>(8)</span></a>. apply:
This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">swap</code> <code class="option">cipher=</code>,
option will destroy the contents of the named <code class="option">hash=</code>,
partition during every boot, so make sure the <code class="option">keyfile-offset=</code>,
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. <code class="option">keyfile-size=</code>,
When this mode is used, the following options are <code class="option">size=</code>.</p><p>When this mode is used, the passphrase is read from the
ignored since they are provided by the TrueCrypt key file given in the third field. Only the first line of this
header on the device or do not apply: file is read, excluding the new line character.</p><p>Note that the TrueCrypt format uses both passphrase and
<code class="option">cipher=</code>, key files to derive a password for the volume. Therefore, the
<code class="option">hash=</code>, passphrase and all key files need to be provided. Use
<code class="option">keyfile-offset=</code>, <code class="option">tcrypt-keyfile=</code> to provide the absolute path
<code class="option">keyfile-size=</code>, to all key files. When using an empty passphrase in
<code class="option">size=</code>.</p><p>When this mode is used, the passphrase is combination with one or more key files, use
read from the key file given in the third field. "<code class="literal">/dev/null</code>" as the password file in the third
Only the first line of this file is read, 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
excluding the new line character.</p><p>Note that the TrueCrypt format uses both implies <code class="option">tcrypt</code>.</p><p>This will map the hidden volume that is inside of the
passphrase and key files to derive a password volume provided in the second field. Please note that there is
for the volume. Therefore, the passphrase and no protection for the hidden volume if the outer volume is
all key files need to be provided. Use mounted instead. See
<code class="option">tcrypt-keyfile=</code> to provide <a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a>
the absolute path to all key files. When using 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
an empty passphrase in combination with one or use for a TrueCrypt volume. This implies
more key files, use "<code class="literal">/dev/null</code>" <code class="option">tcrypt</code> and can be used more than once to
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. provide several key files.</p><p>See the entry for <code class="option">tcrypt</code> on the
This option implies <code class="option">tcrypt</code>.</p><p>This will map the hidden volume that is behavior of the passphrase and key files when using TrueCrypt
inside of the volume provided in the second 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
field. Please note that there is no protection 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
for the hidden volume if the outer volume is password. If no unit is specified, seconds is used. Supported
mounted instead. See units are s, ms, us, min, h, d. A timeout of 0 waits
<a href="cryptsetup.html"><span class="citerefentry"><span class="refentrytitle">cryptsetup</span>(8)</span></a> 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
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 device to show up before giving up on the entry. The argument
key file to use for a TrueCrypt volume. This is a time in seconds or explicitly specified units of
implies <code class="option">tcrypt</code> and can be "<code class="literal">s</code>",
used more than once to provide several key "<code class="literal">min</code>",
files.</p><p>See the entry for <code class="option">tcrypt</code> "<code class="literal">h</code>",
on the behavior of the passphrase and key files "<code class="literal">ms</code>".
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 </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
encryption mode. This option implies for using it as <code class="filename">/tmp</code>; it will be
<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 formatted using
querying for a password. If no unit is <a href="http://man7.org/linux/man-pages/man8/mke2fs.8.html"><span class="citerefentry"><span class="refentrytitle">mke2fs</span>(8)</span></a>.
specified, seconds is used. Supported units are This option implies <code class="option">plain</code>.</p><p>WARNING: Using the <code class="option">tmp</code> option will
s, ms, us, min, h, d. A timeout of 0 waits destroy the contents of the named partition during every boot,
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 so make sure the underlying block device is specified
systemd should wait for a device to 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
show up before giving up on the is queried for a password. The default is 3. If set to 0, the
entry. The argument is a time in 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
seconds or explicitly specifified console, it has to be entered twice to prevent
units of "<code class="literal">s</code>", typos.</p></dd></dl></div><p>At early boot and when the system manager configuration is
"<code class="literal">min</code>", reloaded, this file is translated into native systemd units by
"<code class="literal">h</code>", <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
"<code class="literal">ms</code>". normal storage, another one for usage as a swap device and two
</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 TrueCrypt volumes.</p><pre class="programlisting">luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
be prepared for using it as <code class="filename">/tmp</code>; swap /dev/sda7 /dev/urandom swap
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
truecrypt /dev/sda2 /etc/container_password tcrypt 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> 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.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@.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="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="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/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> <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> </p></div></div></body></html>

View File

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

View File

@ -60,6 +60,18 @@
</a> </a>
</xsl:template> </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']"> <xsl:template match="citerefentry[@project='archlinux']">
<a> <a>
<xsl:attribute name="href"> <xsl:attribute name="href">

View File

@ -1,5 +1,5 @@
'\" t '\" t
.TH "DAEMON" "7" "" "systemd 218" "daemon" .TH "DAEMON" "7" "" "systemd 219" "daemon"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * 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) def_systemdsystemunitdir=$($PKG_CONFIG \-\-variable=systemdsystemunitdir systemd)
AS_IF([test "x$def_systemdsystemunitdir" = "x"], AS_IF([test "x$def_systemdsystemunitdir" = "x"],
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"], [AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
[AC_MSG_ERROR([systemd support requested but pkg\-config unable to query systemd package])]) [AC_MSG_ERROR([systemd support requested but pkg\-config unable to query systemd package])])
with_systemdsystemunitdir=no], with_systemdsystemunitdir=no],
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])]) [with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
AS_IF([test "x$with_systemdsystemunitdir" != "xno"], AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"]) AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])
@ -629,7 +629,7 @@ file in
.\} .\}
.nf .nf
DISTCHECK_CONFIGURE_FLAGS = \e DISTCHECK_CONFIGURE_FLAGS = \e
\-\-with\-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \-\-with\-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
.fi .fi
.if n \{\ .if n \{\
.RE .RE
@ -643,8 +643,8 @@ Finally, unit files should be installed in the system with an automake excerpt l
.nf .nf
if HAVE_SYSTEMD if HAVE_SYSTEMD
systemdsystemunit_DATA = \e systemdsystemunit_DATA = \e
foobar\&.socket \e foobar\&.socket \e
foobar\&.service foobar\&.service
endif endif
.fi .fi
.if n \{\ .if n \{\
@ -720,7 +720,7 @@ To facilitate upgrades from a package version that shipped only SysV init script
.nf .nf
%triggerun \-\- foobar < 0\&.47\&.11\-1 %triggerun \-\- foobar < 0\&.47\&.11\-1
if /sbin/chkconfig \-\-level 5 foobar ; then 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
.fi .fi
.if n \{\ .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 '\" t
.TH "FILE\-HIERARCHY" "7" "" "systemd 218" "file-hierarchy" .TH "FILE\-HIERARCHY" "7" "" "systemd 219" "file-hierarchy"
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
.\" * Define some portability stuff .\" * Define some portability stuff
.\" ----------------------------------------------------------------- .\" -----------------------------------------------------------------
@ -161,7 +161,8 @@ for the primary architecture of the system, invoke:
.RS 4 .RS 4
.\} .\}
.nf .nf
# pkg\-config \-\-variable=libdir systemd # pkg\-config \-\-variable=libdir
systemd
.fi .fi
.if n \{\ .if n \{\
.RE .RE
@ -173,7 +174,8 @@ or
.RS 4 .RS 4
.\} .\}
.nf .nf
# systemd\-path system\-library\-arch # systemd\-path
system\-library\-arch
.fi .fi
.if n \{\ .if n \{\
.RE .RE

View File

@ -19,468 +19,307 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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="../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> <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
system and service manager are organized based on a system and service manager are organized based on a file system
file system hierarchy inspired by UNIX, more hierarchy inspired by UNIX, more specifically the hierarchy
specifically the hierarchy described in the <a class="ulink" href="http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html" target="_top">File 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 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 <a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>.
manual page describes a more minimal, modernized This manual page describes a more minimal, modernized subset of
subset of these specifications that defines more these specifications that defines more strictly the suggestions
strictly the suggestions and restrictions systemd and restrictions systemd makes on the file system
makes on the file system hierarchy.</p><p>Many of the paths described here are queriable hierarchy.</p><p>Many of the paths described here are queriable
with the with the
<a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a> <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 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
root. Usually writable, but this is this is not required. Possibly a temporary file system
not required. Possibly a temporary ("<code class="literal">tmpfs</code>"). Not shared with other hosts
file system ("<code class="literal">tmpfs</code>"). Not shared with (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
other hosts (unless read-only). system. On EFI systems this is possibly the EFI System
</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 Partition, also see
used for bringing up the system. On <a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>.
EFI systems this is possibly the EFI This directory is usually strictly local to the host, and
System Partition, also see should be considered read-only, except when a new kernel or
<a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>. This boot loader is installed. This directory only exists on
directory is usually strictly local systems that run on physical or emulated hardware that
to the host, and should be considered 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
read-only, except when a new kernel or may or may not be read-only. Frequently, this directory is
boot loader is installed. This pre-populated with vendor-supplied configuration files, but
directory only exists on systems that applications should not make assumptions about this directory
run on physical or emulated hardware being fully populated or populated at all, and should fall
that requires boot back to defaults if configuration is
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 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
configuration. This directory may or directories. Possibly shared with other systems, and never
may not be read-only. Frequently, this read-only. This directory should only be used for normal
directory is pre-populated with users, never for system users. This directory and possibly the
vendor-supplied configuration files, directories contained within it might only become available or
but applications should not make writable in late boot or even only after user authentication.
assumptions about this directory This directory might be placed on limited-functionality
being fully populated or populated at network file systems, hence applications should not assume the
all, and should fall back to defaults full set of file API is available on this directory.
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 Applications should generally not reference this directory
normal user's home directly, but via the per-user <code class="varname">$HOME</code>
directories. Possibly shared with environment variable, or via the home directory field of the
other systems, and never 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
read-only. This directory should only user's home directory is located outside of
be used for normal users, never for <code class="filename">/home</code> in order to make sure the root user
system users. This directory and may log in even without <code class="filename">/home</code> being
possibly the directories contained 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,
within it might only become available managed by the administrator. No restrictions are made how
or writable in late boot or even only this directory is organized internally. Generally writable,
after user authentication. This directory and possibly shared among systems. This directory might become
might be placed on limited-functionality available or writable only very late during
network file systems, hence 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
applications should not assume the directory is usually mounted as a "<code class="literal">tmpfs</code>"
full set of file API is available on instance, and should hence not be used for larger files. (Use
this directory. Applications should <code class="filename">/var/tmp</code> for larger files.) Since the
generally not reference this directory directory is accessible to other users of the system it is
directly, but via the per-user essential that this directory is only written to with the
<code class="varname">$HOME</code> environment <a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
variable, or via the home directory <a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
field of the user and related calls. This directory is usually flushed at
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 boot-up. Also, files that are not accessed within a certain
the root user. The root user's home time are usually automatically deleted. If applications find
directory is located outside of the environment variable <code class="varname">$TMPDIR</code> set they
<code class="filename">/home</code> in order to should prefer using the directory specified in it over
make sure the root user may log in directly referencing <code class="filename">/tmp</code> (see
even without <code class="filename">/home</code> <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
being available and 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 <a class="ulink" href="http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html#tag_08_03" target="_top">IEEE
general server payload, managed by the 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
administrator. No restrictions are system packages to place runtime data in. This directory is
made how this directory is organized flushed on boot, and generally writable for privileged
internally. Generally writable, and 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
possibly shared among systems. This place private logs in this directory. Always writable, even
directory might become available or when <code class="filename">/var/log</code> might not be accessible
writable only very late during 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
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 usually individually mounted "<code class="literal">tmpfs</code>"
temporary files. This directory is instances. Always writable, flushed at each reboot and when
usually mounted as the user logs out. User code should not reference this
a "<code class="literal">tmpfs</code>" instance, and directory directly, but via the
should hence not be used for larger <code class="varname">$XDG_RUNTIME_DIR</code> environment variable, as
files. (Use documented in the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
<code class="filename">/var/tmp</code> for 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.
larger files.) Since the directory is Usually read-only, but this is not required. Possibly shared
accessible to other users of the between multiple hosts. This directory should not be modified
system it is essential that this by the administrator, except when installing or removing
directory is only written to with the 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,
<a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>, that shall appear in the <code class="varname">$PATH</code> search path.
<a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a> It is recommended not to place binaries in this directory that
and related calls. This directory is are not useful for invocation from a shell (such as daemon
usually flushed at boot-up. Also, binaries); these should be placed in a subdirectory of
files that are not accessed within a <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
certain time are usually automatically 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
deleted. If applications find the with all architectures (though not necessarily
environment variable architecture-independent). Note that this includes internal
<code class="varname">$TMPDIR</code> set they executables or other binaries that are not regularly invoked
should prefer using the directory from a shell. Such binaries may be for any architecture
specified in it over directly supported by the system. Do not place public libraries in this
referencing directory, use <code class="varname">$libdir</code> (see below),
<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> 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
and called <code class="varname">$libdir</code>. The architecture identifier
<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 to use is defined on <a class="ulink" href="https://wiki.debian.org/Multiarch/Tuples" target="_top">Multiarch
"<code class="literal">tmpfs</code>" file system Architecture Specifiers (Tuples)</a> list. Legacy
for system packages to place runtime locations of <code class="varname">$libdir</code> are
data in. This directory is flushed on <code class="filename">/usr/lib</code>,
boot, and generally writable for <code class="filename">/usr/lib64</code>. This directory should not be
privileged programs used for package-specific data, unless this data is
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 architecture-dependent, too. To query
logs. System components may place <code class="varname">$libdir</code> for the primary architecture of the
private logs in this directory. Always system, invoke: </p><pre class="programlisting"># pkg-config --variable=libdir
writable, even when systemd</pre><p> or </p><pre class="programlisting"># systemd-path
<code class="filename">/var/log</code> might 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,
not be accessible such as documentation, man pages, time zone information, fonts
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 and other resources. Usually, the precise location and format
runtime directories, each usually of files stored below this directory is subject to
individually mounted 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
"<code class="literal">tmpfs</code>" 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
instances. Always writable, flushed at configuration files. This directory should be populated with
each reboot and when the user logs pristine vendor versions of all configuration files that may
out. User code should not reference be placed in <code class="filename">/etc</code>. This is useful to
this directory directly, but via the compare the local configuration of a system with vendor
<code class="varname">$XDG_RUNTIME_DIR</code> defaults and to populate the local configuration with
environment variable, as documented in 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
the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG <code class="filename">/usr/share/factory/etc</code> but for vendor
Base Directory versions of files in the variable, persistent data 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 <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
operating system resources. Usually writable. This directory might be pre-populated with
read-only, but this is not vendor-supplied data, but applications should be able to
required. Possibly shared between reconstruct necessary files and directories in this
multiple hosts. This directory should subhierarchy should they be missing, as the system might start
not be modified by the administrator, up without this directory being populated. Persistency is
except when installing or removing recommended, but optional, to support ephemeral systems. This
vendor-supplied directory might become available or writable only very late
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 during boot. Components that are required to operate during
executables for user commands, that early boot hence shall not unconditionally rely on this
shall appear in the 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
<code class="varname">$PATH</code> search components may place non-essential data in this directory.
path. It is recommended not to place Flushing this directory should have no effect on operation of
binaries in this directory that are programs, except for increased runtimes necessary to rebuild
not useful for invocation from a shell 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
(such as daemon binaries); these 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
should be placed in a subdirectory of place private logs in this directory, though it is recommended
<code class="filename">/usr/lib</code> to do most logging via the
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 <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>
files of system and
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 <a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a>
data that is compatible with all 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
architectures (though not necessarily 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
architecture-independent). Note that files. In contrast to <code class="filename">/tmp</code> this directory
this includes internal executables or is usually mounted from a persistent physical file system and
other binaries that are not regularly can thus accept larger files. (Use <code class="filename">/tmp</code>
invoked from a shell. Such binaries for smaller files.) This directory is generally not flushed at
may be for any architecture supported boot-up, but time-based cleanup of files that have not been
by the system. Do not place public accessed for a certain time is applied. The same security
libraries in this directory, use restrictions as with <code class="filename">/tmp</code> apply, and
<code class="varname">$libdir</code> (see hence only
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 <a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>,
dynamic libraries, also called <code class="varname">$libdir</code>. <a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a>
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> or similar calls should be used to make use of this directory.
list. Legacy locations of <code class="varname">$libdir</code> are If applications find the environment variable
<code class="filename">/usr/lib</code>, <code class="varname">$TMPDIR</code> set they should prefer using the
<code class="filename">/usr/lib64</code>. directory specified in it over directly referencing
This directory should not <code class="filename">/var/tmp</code> (see
be used for package-specific data, <a href="http://man7.org/linux/man-pages/man7/environ.7.html"><span class="citerefentry"><span class="refentrytitle">environ</span>(7)</span></a>
unless this data is 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
architecture-dependent, too. To query this directory is mounted as a "<code class="literal">devtmpfs</code>"
<code class="varname">$libdir</code> for the instance, but might be of a different type in
primary architecture of the system, sandboxed/containerized setups. This directory is managed
invoke: jointly by the kernel and
</p><pre class="programlisting"># pkg-config --variable=libdir systemd</pre><p> or <a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a>,
</p><pre class="programlisting"># systemd-path system-library-arch</pre><p> and should not be written to by other components. A number of
</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 special purpose virtual file systems might be mounted below
between multiple packages, such as 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
documentation, man pages, time zone created via
information, fonts and other <a href="shm_open.html"><span class="citerefentry"><span class="refentrytitle">shm_open</span>(3)</span></a>.
resources. Usually, the precise This directory is flushed on boot, and is a
location and format of files stored "<code class="literal">tmpfs</code>" file system. Since all users have
below this directory is subject to write access to this directory, special care should be taken
specifications that ensure to avoid name clashes and vulnerabilities. For normal users,
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 shared memory segments in this directory are usually deleted
operating system or system when the user logs out. Usually it is a better idea to use
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 memory mapped files in <code class="filename">/run</code> (for system
vendor-supplied default configuration programs) or <code class="varname">$XDG_RUNTIME_DIR</code> (for user
files. This directory should be programs) instead of POSIX shared memory segments, since those
populated with pristine vendor versions directories are not world-writable and hence not vulnerable to
of all configuration files that may be 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
placed in process list and other functionality. This file system is
<code class="filename">/etc</code>. This is mostly an API to interface with the kernel and not a place
useful to compare the local where normal files may be stored. For details, see
configuration of a system with vendor <a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>.
defaults and to populate the local A number of special purpose virtual file systems might be
configuration with 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>
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 that exposes a number of kernel tunables. The primary way to
<code class="filename">/usr/share/factory/etc</code> configure the settings in this API file tree is via
but for vendor versions of files in <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>
the variable, persistent data files. In sandboxed/containerized setups this directory is
directory 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
<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 discovered devices and other functionality. This file system
system data. Must be writable. This is mostly an API to interface with the kernel and not a place
directory might be pre-populated with where normal files may be stored. In sandboxed/containerized
vendor-supplied data, but applications setups this directory is generally mounted read-only. A number
should be able to reconstruct of special purpose virtual file systems might be mounted below
necessary files and directories in 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
this subhierarchy should they be <code class="filename">/usr/bin</code>, ensuring that scripts and
missing, as the system might start up binaries referencing these legacy paths correctly find their
without this directory being 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
populated. Persistency is recommended, <code class="filename">/usr/lib</code>, ensuring that programs
but optional, to support ephemeral referencing this legacy path correctly find their
systems. This directory might become 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
available or writable only very late symlink points to <code class="varname">$libdir</code>, ensuring that
during boot. Components that are binaries referencing this legacy path correctly find their
required to operate during early boot dynamic loader. This symlink only exists on architectures
hence shall not unconditionally rely whose ABI places the dynamic loader in this
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 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
cache data. System components may <code class="filename">/run</code>, ensuring that programs referencing
place non-essential data in this this legacy path correctly find their runtime
directory. Flushing this directory 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
should have no effect on operation of the user's home directory. They should follow the following basic
programs, except for increased structure. Note that some of these directories are also
runtimes necessary to rebuild these standardized (though more weakly) by the <a class="ulink" href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html" target="_top">XDG
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 Base Directory Specification</a>. Additional locations for
data. System components may 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 private data in this place non-essential data in this directory. Flushing 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 directory should have no effect on operation of programs,
logs. System components may place except for increased runtimes necessary to rebuild these
private logs in this directory, though caches. If an application finds
it is recommended to do most logging <code class="varname">$XDG_CACHE_HOME</code> set is should use the
via the directory specified in it instead of this
<a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a> 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
and new user is created this directory will be empty or not exist
<a href="sd_journal_print.html"><span class="citerefentry"><span class="refentrytitle">sd_journal_print</span>(3)</span></a> at all. Applications should fall back to defaults should their
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 configuration or state in this directory be missing. If an
spool data, such as printer or mail application finds <code class="varname">$XDG_CONFIG_HOME</code> set is
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 should use the directory specified in it instead of this
and persistent temporary files. In 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
contrast to <code class="filename">/tmp</code> <code class="varname">$PATH</code> search path. It is recommended not to
this directory is usually mounted from place executables in this directory that are not useful for
a persistent physical file system and invocation from a shell; these should be placed in a
can thus accept larger files. (Use subdirectory of <code class="filename">~/.local/lib</code> instead.
<code class="filename">/tmp</code> for smaller Care should be taken when placing architecture-dependent
files.) This directory is generally binaries in this place which might be problematic if the home
not flushed at boot-up, but time-based directory is shared between multiple hosts with different
cleanup of files that have not been 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
accessed for a certain time is 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.
applied. The same security The architecture identifier to use, is defined on <a class="ulink" href="https://wiki.debian.org/Multiarch/Tuples" target="_top">Multiarch
restrictions as with Architecture Specifiers (Tuples)</a>
<code class="filename">/tmp</code> apply, and 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,
hence only such as fonts or artwork. Usually, the precise location and
<a href="http://man7.org/linux/man-pages/man3/mkstemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkstemp</span>(3)</span></a>, format of files stored below this directory is subject to
<a href="http://man7.org/linux/man-pages/man3/mkdtemp.3.html"><span class="citerefentry"><span class="refentrytitle">mkdtemp</span>(3)</span></a> specifications that ensure interoperability. If an application
or similar calls should be used to finds <code class="varname">$XDG_DATA_HOME</code> set is should use the
make use of this directory. If directory specified in it instead of this
applications find the environment 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
variable <code class="varname">$TMPDIR</code> of the hierarchy.</p><p>The exceptions for normal users are
set they should prefer using the <code class="filename">/tmp</code>,
directory specified in it over <code class="filename">/var/tmp</code>,
directly referencing <code class="filename">/dev/shm</code>, as well as the home directory
<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> <code class="varname">$HOME</code> (usually found below
for details). <code class="filename">/home</code>) and the runtime directory
</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 <code class="varname">$XDG_RUNTIME_DIR</code> (found below
device nodes. Usually this directory <code class="filename">/run/user</code>) of the user, which are all
is mounted as a writable.</p><p>For unprivileged system processes only
"<code class="literal">devtmpfs</code>" instance, <code class="filename">/tmp</code>,
but might be of a different type in <code class="filename">/var/tmp</code> and
sandboxed/containerized setups. This <code class="filename">/dev/shm</code> are writable. If an
directory is managed jointly by the unprivileged system process needs a private, writable directory in
kernel and <code class="filename">/var</code> or <code class="filename">/run</code>, it is
<a href="systemd-udevd.html"><span class="citerefentry"><span class="refentrytitle">systemd-udevd</span>(8)</span></a>, recommended to either create it before dropping privileges in the
and should not be written to by other daemon code, to create it via
components. A number of special <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>
purpose virtual file systems might be fragments during boot, or via the
mounted below this <code class="varname">RuntimeDirectory=</code> directive of service units
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 (see
memory segments, as created via <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
<a href="shm_open.html"><span class="citerefentry"><span class="refentrytitle">shm_open</span>(3)</span></a>. This 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,
directory is flushed on boot, and is a including regular files, directories, symlinks, character and
"<code class="literal">tmpfs</code>" file block device nodes, sockets and FIFOs.</p><p>It is strongly recommended that <code class="filename">/dev</code> is
system. Since all users have write the only location below which device nodes shall be placed.
access to this directory, special care Similar, <code class="filename">/run</code> shall be the only location to
should be taken to avoid name clashes place sockets and FIFOs. Regular files, directories and symlinks
and vulnerabilities. For normal users, 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
shared memory segments in this when placing their own files in the file system. The following
directory are usually deleted when the table lists recommended locations for specific types of files
user logs out. Usually it is a better 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
idea to use memory mapped files in <code class="filename">/usr/share</code> hierarchy, to the locations
<code class="filename">/run</code> (for system defined by the various relevant specifications.</p><p>During runtime and for local configuration and state
programs) or 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
<code class="varname">$XDG_RUNTIME_DIR</code> when placing their own files in the user's home directory. The
(for user programs) instead of POSIX following table lists recommended locations in the home directory
shared memory segments, since those for specific types of files supplied by the vendor if the
directories are not world-writable and application is installed in the home directory. (Note however,
hence not vulnerable to that user applications installed system-wide should follow the
security-sensitive name 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
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 <code class="filename">~/.local/share</code> hierarchy, to the locations
system exposing the process list and defined by the various relevant specifications.</p><p>During runtime and for local configuration and state
other functionality. This file system 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>
is mostly an API to interface with the <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
kernel and not a place where normal <a href="http://man7.org/linux/man-pages/man7/hier.7.html"><span class="citerefentry"><span class="refentrytitle">hier</span>(7)</span></a>,
files may be stored. For details, see <a href="systemd-path.html"><span class="citerefentry"><span class="refentrytitle">systemd-path</span>(1)</span></a>,
<a href="http://man7.org/linux/man-pages/man5/proc.5.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>. A <a href="systemd-efi-boot-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-efi-boot-generator</span>(8)</span></a>,
number of special purpose virtual file <a href="sysctl.d.html"><span class="citerefentry"><span class="refentrytitle">sysctl.d</span>(5)</span></a>,
systems might be mounted below this <a href="tmpfiles.d.html"><span class="citerefentry"><span class="refentrytitle">tmpfiles.d</span>(5)</span></a>,
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 <a href="http://linux.die.net/man/1/pkg-config"><span class="citerefentry"><span class="refentrytitle">pkg-config</span>(1)</span></a>,
<code class="filename">/proc</code> that <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
exposes a number of kernel </p></div></div></body></html>
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>

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -19,28 +19,21 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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>, <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>poweroff</strong></span>, <span class="command"><strong>reboot</strong></span> <span class="command"><strong>reboot</strong></span> may be used to halt, power-off or reboot
may be used to halt, power-off or reboot the 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.
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
</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, 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
regardless of which one of the three 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
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, 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
regardless of which one of the three 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
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, 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
regardless of which one of the three 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,
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.</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
power-off, reboot. Do not contact the 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
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 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>
shutdown entry, do not actually halt, <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
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 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
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 <a href="shutdown.html"><span class="citerefentry"><span class="refentrytitle">shutdown</span>(8)</span></a>,
message before <a href="http://man7.org/linux/man-pages/man1/wall.1.html"><span class="citerefentry"><span class="refentrytitle">wall</span>(1)</span></a>
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 </p></div></div></body></html>
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>

View File

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

View File

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

View File

@ -19,35 +19,31 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
configures the name of the local system that is set name of the local system that is set during boot using the
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>
<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
system call. It should contain a single hostname string. The hostname may be a free-form string up to 64
newline-terminated hostname string. The characters in length; however, it is recommended that it consists
hostname may be a free-form string up to 64 characters only of 7-bit ASCII lower-case characters and no spaces or dots,
in length; however, it is recommended that it consists and limits itself to the format allowed for DNS domain name
only of 7-bit ASCII lower-case characters and no spaces or dots, labels, even though this is not a strict requirement.</p><p>Depending on the operating system, other configuration files
and limits itself to the format allowed for DNS domain might be checked for configuration of the hostname as well,
name labels, even though this is not a however only as fallback.</p><p>You may use
strict requirement.</p><p>Depending on the operating system, other <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>
configuration files might be checked for configuration to change the value of this file during runtime from the command
of the hostname as well, however only as fallback.</p><p>You may use line. Use
<a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a> <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
to change the value of this file during runtime from 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
the command line. Use <code class="filename">/etc/hostname</code> originates from Debian
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a> 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>
to initialize it on mounted (but not booted) system <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
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 <a href="http://man7.org/linux/man-pages/man2/sethostname.2.html"><span class="citerefentry"><span class="refentrytitle">sethostname</span>(2)</span></a>,
<code class="filename">/etc/hostname</code> originates from <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
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="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(7)</span></a>,
<a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>, <a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</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="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>, <a href="hostnamectl.html"><span class="citerefentry"><span class="refentrytitle">hostnamectl</span>(1)</span></a>,
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(7)</span></a>, <a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
<a href="machine-id.html"><span class="citerefentry"><span class="refentrytitle">machine-id</span>(5)</span></a>, <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>, </p></div></div></body></html>
<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 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" <!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. This file is part of systemd.
@ -23,84 +22,80 @@
--> -->
<refentry id="hostname"> <refentry id="hostname">
<refentryinfo> <refentryinfo>
<title>hostname</title> <title>hostname</title>
<productname>systemd</productname> <productname>systemd</productname>
<authorgroup> <authorgroup>
<author> <author>
<contrib>Developer</contrib> <contrib>Developer</contrib>
<firstname>Lennart</firstname> <firstname>Lennart</firstname>
<surname>Poettering</surname> <surname>Poettering</surname>
<email>lennart@poettering.net</email> <email>lennart@poettering.net</email>
</author> </author>
</authorgroup> </authorgroup>
</refentryinfo> </refentryinfo>
<refmeta> <refmeta>
<refentrytitle>hostname</refentrytitle> <refentrytitle>hostname</refentrytitle>
<manvolnum>5</manvolnum> <manvolnum>5</manvolnum>
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>hostname</refname> <refname>hostname</refname>
<refpurpose>Local hostname configuration file</refpurpose> <refpurpose>Local hostname configuration file</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
<para><filename>/etc/hostname</filename></para> <para><filename>/etc/hostname</filename></para>
</refsynopsisdiv> </refsynopsisdiv>
<refsect1> <refsect1>
<title>Description</title> <title>Description</title>
<para>The <filename>/etc/hostname</filename> file <para>The <filename>/etc/hostname</filename> file configures the
configures the name of the local system that is set name of the local system that is set during boot using the
during boot using the <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry> system call. It should contain a single newline-terminated
system call. It should contain a single hostname string. The hostname may be a free-form string up to 64
newline-terminated hostname string. The characters in length; however, it is recommended that it consists
hostname may be a free-form string up to 64 characters only of 7-bit ASCII lower-case characters and no spaces or dots,
in length; however, it is recommended that it consists and limits itself to the format allowed for DNS domain name
only of 7-bit ASCII lower-case characters and no spaces or dots, labels, even though this is not a strict requirement.</para>
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 <para>Depending on the operating system, other configuration files
configuration files might be checked for configuration might be checked for configuration of the hostname as well,
of the hostname as well, however only as fallback.</para> however only as fallback.</para>
<para>You may use <para>You may use
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry> <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to change the value of this file during runtime from to change the value of this file during runtime from the command
the command line. Use line. Use
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
to initialize it on mounted (but not booted) system to initialize it on mounted (but not booted) system images.</para>
images.</para> </refsect1>
</refsect1>
<refsect1> <refsect1>
<title>History</title> <title>History</title>
<para>The simple configuration file format of <para>The simple configuration file format of
<filename>/etc/hostname</filename> originates from <filename>/etc/hostname</filename> originates from Debian
Debian GNU/Linux.</para> GNU/Linux.</para>
</refsect1> </refsect1>
<refsect1> <refsect1>
<title>See Also</title> <title>See Also</title>
<para> <para>
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>, <citerefentry><refentrytitle>sethostname</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostname</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>machine-id</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>, <citerefentry><refentrytitle>machine-info</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>hostnamectl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, <citerefentry><refentrytitle>systemd-hostnamed.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry> <citerefentry><refentrytitle>systemd-firstboot</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para> </para>
</refsect1> </refsect1>
</refentry> </refentry>

View File

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

View File

@ -19,43 +19,33 @@
<a href="systemd.directives.html">Directives </a>· <a href="systemd.directives.html">Directives </a>·
<a href="../python-systemd/index.html">Python </a>· <a href="../python-systemd/index.html">Python </a>·
<a href="../libudev/index.html">libudev </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 <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
query and change the system hostname and related change the system hostname and related settings.</p><p>This tool distinguishes three different hostnames: the
settings.</p><p>This tool distinguishes three different high-level "pretty" hostname which might include all kinds of
hostnames: the high-level "pretty" hostname which special characters (e.g. "Lennart's Laptop"), the static hostname
might include all kinds of special characters which is used to initialize the kernel hostname at boot (e.g.
(e.g. "Lennart's Laptop"), the static hostname which "lennarts-laptop"), and the transient hostname which is a default
is used to initialize the kernel hostname at boot received from network configuration. If a static hostname is set,
(e.g. "lennarts-laptop"), and the transient hostname and is valid (something other than localhost), then the transient
which is a default received from network configuration. hostname is not used.</p><p>Note that the pretty hostname has little restrictions on the
If a static hostname is set, and is valid (something other characters used, while the static and transient hostnames are
than localhost), then the transient hostname is not used.</p><p>Note that the pretty hostname has little limited to the usually accepted characters of Internet domain
restrictions on the characters used, while the static names.</p><p>The static hostname is stored in
and transient hostnames are limited to the usually <code class="filename">/etc/hostname</code>, see
accepted characters of Internet domain names.</p><p>The static hostname is stored in <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>
<code class="filename">/etc/hostname</code>, see for more information. The pretty hostname, chassis type, and icon
<a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a> name are stored in <code class="filename">/etc/machine-info</code>, see
for more information. The pretty hostname, chassis <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>.</p><p>Use
type, and icon name are stored in <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
<code class="filename">/etc/machine-info</code>, see to initialize the system host name for mounted (but not booted)
<a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>.</p><p>Use 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
<a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a> 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
to initialize the system host name for mounted (but explicit command is given) and one of those fields is given,
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 <span class="command"><strong>hostnamectl</strong></span> will print out just this
for authentication for privileged selected hostname.</p><p>If used with <span class="command"><strong>set-hostname</strong></span>, only the
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 selected hostname(s) will be updated. When more than one of
<span class="command"><strong>status</strong></span> is used (or those options is used, all the specified hostnames will be
no explicit command is given) and one 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
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 username and hostname separated by "<code class="literal">@</code>", to
connect to. The hostname may optionally be suffixed by a connect to. The hostname may optionally be suffixed by a
container name, separated by "<code class="literal">:</code>", which 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 <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. 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 </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 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 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
hostname to <em class="replaceable"><code>NAME</code></em>. By default, this will alter
<em class="replaceable"><code>NAME</code></em>. By the pretty, the static, and the transient hostname alike;
default, this will alter the pretty, however, if one or more of <code class="option">--static</code>,
the static, and the transient hostname <code class="option">--transient</code>, <code class="option">--pretty</code> are
alike; however, if one or more of used, only the selected hostnames are changed. If the pretty
<code class="option">--static</code>, hostname is being set, and static or transient are being set
<code class="option">--transient</code>, as well, the specified hostname will be simplified in regards
<code class="option">--pretty</code> are used, to the character set used before the latter are updated. This
only the selected hostnames are is done by replacing spaces with "<code class="literal">-</code>" and
changed. If the pretty hostname is removing special characters. This ensures that the pretty and
being set, and static or transient are the static hostname are always closely related while still
being set as well, the specified following the validity rules of the specific name. This
hostname will be simplified in regards simplification of the hostname string is not done if only the
to the character set used before the transient and/or static host names are set, and the pretty
latter are updated. This is done by host name is left untouched.</p><p>Pass the empty string "<code class="literal"></code>" as the
replacing spaces with hostname to reset the selected hostnames to their default
"<code class="literal">-</code>" and removing (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
special characters. This ensures that <em class="replaceable"><code>NAME</code></em>. The icon name is used by some
the pretty and the static hostname are graphical applications to visualize this host. The icon name
always closely related while still should follow the <a class="ulink" href="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html" target="_top">Icon
following the validity rules of the Naming Specification</a>.</p><p>Pass an empty string to reset the icon name to the
specific name. This simplification of default value, which is determined from chassis type (see
the hostname string is not done if 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
only the transient and/or static host <em class="replaceable"><code>TYPE</code></em>. The chassis type is used by
names are set, and the pretty host some graphical applications to visualize the host or alter
name is left untouched.</p><p>Pass the empty string user interaction. Currently, the following chassis types are
"<code class="literal"></code>" as the hostname to defined:
reset the selected hostnames to their "<code class="literal">desktop</code>",
default (usually "<code class="literal">laptop</code>",
"<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 "<code class="literal">server</code>",
name to "<code class="literal">tablet</code>",
<em class="replaceable"><code>NAME</code></em>. The "<code class="literal">handset</code>",
icon name is used by some graphical "<code class="literal">watch</code>",
applications to visualize this host. "<code class="literal">embedded</code>",
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 as well as the special chassis types
Naming Specification</a>.</p><p>Pass an empty string to reset "<code class="literal">vm</code>" and
the icon name to the default value, "<code class="literal">container</code>" for virtualized systems that lack
which is determined from chassis type an immediate physical chassis.</p><p>Pass an empty string to reset the chassis type to the
(see below) and possibly other default value which is determined from the firmware and
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 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.
to <em class="replaceable"><code>TYPE</code></em>. <em class="replaceable"><code>ENVIRONMENT</code></em> must be a single word
The chassis type is used by some without any control characters. One of the following is
graphical applications to visualize suggested:
the host or alter user interaction. "<code class="literal">development</code>",
Currently, the following chassis types "<code class="literal">integration</code>",
are defined: "<code class="literal">staging</code>",
"<code class="literal">desktop</code>", "<code class="literal">production</code>".
"<code class="literal">laptop</code>", </p><p>Pass an empty string to reset to the default empty
"<code class="literal">server</code>", 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
"<code class="literal">tablet</code>", is known. <em class="replaceable"><code>LOCATION</code></em> should be a
"<code class="literal">handset</code>", human-friendly, free-form string describing the physical
"<code class="literal">watch</code>", location of the system, if it is known and applicable. This
"<code class="literal">embedded</code>" as well as may be as generic as "<code class="literal">Berlin, Germany</code>" or as
the special chassis types specific as "<code class="literal">Left Rack, 2nd Shelf</code>".</p><p>Pass an empty string to reset to the default empty
"<code class="literal">vm</code>" and 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
"<code class="literal">container</code>" for 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>
virtualized systems that lack an <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
immediate physical chassis.</p><p>Pass an empty string to reset <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(1)</span></a>,
the chassis type to the default value <a href="hostname.html"><span class="citerefentry"><span class="refentrytitle">hostname</span>(5)</span></a>,
which is determined from the firmware <a href="machine-info.html"><span class="citerefentry"><span class="refentrytitle">machine-info</span>(5)</span></a>,
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 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
environment <a href="systemd-hostnamed.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-hostnamed.service</span>(8)</span></a>,
description. <em class="replaceable"><code>ENVIRONMENT</code></em> <a href="systemd-firstboot.html"><span class="citerefentry"><span class="refentrytitle">systemd-firstboot</span>(1)</span></a>
must be a single word without any </p></div></div></body></html>
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>

View File

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

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