Skip to main content

ManagerProxy

Struct ManagerProxy 

pub struct ManagerProxy<'p>(Proxy<'p>);
Expand description

Client for the org.freedesktop.systemd1.Manager interface of systemd.

The manager object is at /org/freedesktop/systemd1. It manages units and unit files and lists units and jobs. Unit and job objects have their own proxies. See UnitProxy and JobProxy.

Many calls need privileges. An unprivileged caller can read most state. The service checks other calls with polkit. Calls do not set the flag for interactive polkit authentication.

§Signals and subscriptions

The service tracks subscriptions per bus connection. This connection must call ManagerProxy::subscribe itself. The signals of this interface and the PropertiesChanged signals of all objects of the manager are sent only to subscribed connections. Subscribe before the first property read, because the proxy caches the properties that the service reports through PropertiesChanged on their first read. Keep the subscription for the lifetime of the proxy. To track a job without a race, subscribe first, then start the job and match its path in JobRemoved.

§Properties without a signal

The proxy never caches the properties that can change without a PropertiesChanged signal. It reads them from the bus on each call. These are the counters, the log settings, the environment, the watchdog values and the load timestamps. Tainted is also in this group because the service computes it on each read. FinishTimestamp and the shutdown timestamps start at 0 and get a value later.

ManagerProxy::reload reads system.conf again. Upstream marks the properties that come from that file as constant, but they can change on each reload. These are the Default* properties, TimerSlackNSec, ConfirmSpawn, CtrlAltDelBurstAction and EventLoopRateLimit*. The generator, security policy and unit load timestamps, UnitPath and WatchdogDevice also change on reload. The proxy does not cache them.

Only values that do not change while the process runs are cached as constants. These are the boot timestamps, Version, Features, Virtualization, ConfidentialVirtualization, Architecture and the soft reboot and kexec counters. They can change after ManagerProxy::reexecute, so build a new proxy after that call.

Cached properties of unit and job proxies can also miss changes across a reload or reexecution. See ManagerProxy::reload and ManagerProxy::reexecute.

Upstream documentation: https://www.freedesktop.org/software/systemd/man/latest/org.freedesktop.systemd1.html.

Tuple Fields§

§0: Proxy<'p>

Implementations§

§

impl<'p> ManagerProxy<'p>

pub async fn new(conn: &Connection) -> Result<ManagerProxy<'p>>

Creates a new proxy with the default service and path.

pub fn builder(conn: &Connection) -> Builder<'p, Self>

Returns a customizable builder for this proxy.

pub fn into_inner(self) -> Proxy<'p>

Consumes self, returning the underlying zbus::Proxy.

pub fn inner(&self) -> &Proxy<'p>

The reference to the underlying zbus::Proxy.

pub fn inner_mut(&mut self) -> &mut Proxy<'p>

The mutable reference to the underlying zbus::Proxy.

pub async fn get_unit(&self, name: &str) -> Result<OwnedObjectPath>

Returns the object path of a loaded unit.

The call fails if the unit is not loaded. Use ManagerProxy::load_unit to load it from disk.

pub async fn get_unit_by_pid(&self, pid: u32) -> Result<OwnedObjectPath>

Returns the object path of the unit that a process belongs to.

The process must exist.

pub async fn get_unit_by_invocation_id( &self, invocation_id: &[u8], ) -> Result<OwnedObjectPath>

Returns the object path of the unit with an invocation ID.

The ID is 16 bytes long.

pub async fn get_unit_by_control_group( &self, cgroup: &str, ) -> Result<OwnedObjectPath>

Returns the object path of the unit that owns a control group.

The path is relative to the root of the control group tree of the manager.

pub async fn get_unit_by_pidfd(&self, pidfd: Fd<'_>) -> Result<UnitByPidFd>

Returns the unit that a process belongs to, found through a pidfd.

A pidfd is safer than a process ID because process IDs can be reused. The result also has the unit ID and the invocation ID.

Added in systemd 253.

pub async fn load_unit(&self, name: &str) -> Result<OwnedObjectPath>

Returns the object path of a unit and loads the unit from disk if needed.

pub async fn start_unit( &self, name: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Queues a job that starts a unit and its dependencies.

Returns the object path of the job.

The call returns when the service queued the job. It does not wait for the job to finish. To track the result, subscribe to JobRemoved before the call, then match the returned job path.

pub async fn start_unit_with_flags( &self, name: &str, mode: &JobMode, flags: u64, ) -> Result<OwnedObjectPath>

Like ManagerProxy::start_unit with an extra flags argument.

Upstream defines no flags yet. Pass 0.

Added in systemd 250.

pub async fn start_unit_replace( &self, old_unit: &str, new_unit: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Replaces the queued job of one unit with a start job of another unit.

Returns the object path of the new job.

pub async fn stop_unit( &self, name: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Queues a job that stops a unit.

The mode JobMode::Isolate is not valid here. Returns the object path of the job.

pub async fn reload_unit( &self, name: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Queues a job that reloads a unit.

The job fails if the unit does not run. Returns the object path of the job.

pub async fn restart_unit( &self, name: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Queues a job that restarts a unit.

A unit that does not run is started. Returns the object path of the job.

pub async fn try_restart_unit( &self, name: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Queues a job that restarts a unit only if it runs.

Returns the object path of the job.

pub async fn reload_or_restart_unit( &self, name: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Queues a job that reloads a unit if it supports reload and restarts it otherwise.

Returns the object path of the job.

pub async fn reload_or_try_restart_unit( &self, name: &str, mode: &JobMode, ) -> Result<OwnedObjectPath>

Like ManagerProxy::reload_or_restart_unit, but a unit that does not run stays as it is.

Returns the object path of the job.

pub async fn enqueue_unit_job( &self, name: &str, job_type: &JobType, job_mode: &JobMode, ) -> Result<EnqueueUnitJobReply>

Queues a job of any type for one unit.

The reply has the anchor job, the unit, the job type that the service queued after it resolved the request, and the other jobs of the transaction. Valid types are start, stop, reload, restart, try-restart, reload-or-restart and reload-or-try-restart.

pub async fn enqueue_unit_job_many( &self, units: &[&str], job_type: &JobType, job_mode: &JobMode, flags: u64, ) -> Result<Vec<EnqueuedJob>>

Queues a job of one type for several units in one transaction.

One transaction lets the service honor After= and Before= between the units, whatever their order in the list. The reply has the anchor job of each unit in an unspecified order. Upstream defines no flags yet. Pass 0.

Added in systemd 262.

pub async fn kill_unit( &self, name: &str, whom: &KillWhom, signal: i32, ) -> Result<()>

Sends a signal to processes of a unit.

pub async fn kill_unit_subgroup( &self, name: &str, whom: &KillWhom, subgroup: &str, signal: i32, ) -> Result<()>

Sends a signal to the processes in a sub control group of a unit.

The subgroup path is relative to the control group of the unit. An empty path or / works like ManagerProxy::kill_unit. Any other path needs KillWhom::Cgroup or KillWhom::CgroupFail.

Added in systemd 258.

pub async fn queue_signal_unit( &self, name: &str, whom: &KillWhom, signal: i32, value: i32, ) -> Result<()>

Queues a real-time signal with an integer value for processes of a unit.

It works like ManagerProxy::kill_unit, but the signal has value as its sival_int.

Added in systemd 254.

pub async fn clean_unit(&self, name: &str, mask: &[CleanResource]) -> Result<()>

Deletes data of a unit, such as its state, cache or log directories.

pub async fn freeze_unit(&self, name: &str) -> Result<()>

Freezes the processes of a unit.

pub async fn thaw_unit(&self, name: &str) -> Result<()>

Thaws the processes of a unit.

pub async fn reset_failed_unit(&self, name: &str) -> Result<()>

Clears the failed state of a unit.

pub async fn set_unit_properties( &self, name: &str, runtime: bool, properties: &[(&str, Value<'_>)], ) -> Result<()>

Changes properties of a unit at run time.

Only some properties can change, mostly resource control settings. The change lasts until the next reboot if runtime is true. Otherwise the service also stores it on disk. The properties are a list of name and value pairs. Setting an array property usually appends to the configured values. To reset it, set it to an empty array first.

pub async fn bind_mount_unit( &self, name: &str, source: &str, destination: &str, read_only: bool, mkdir: bool, ) -> Result<()>

Bind mounts a file or directory into the mount namespace of a running unit.

A kernel that supports it replaces an earlier mount on the destination. Otherwise the new mount covers the old one.

pub async fn mount_image_unit( &self, name: &str, source: &str, destination: &str, read_only: bool, mkdir: bool, options: &[(&str, &str)], ) -> Result<()>

Mounts an image into the mount namespace of a running unit.

Each option is a pair of a partition designator and mount options.

pub async fn ref_unit(&self, name: &str) -> Result<()>

Adds a reference to a unit for this client.

The manager keeps a referenced unit loaded.

pub async fn unref_unit(&self, name: &str) -> Result<()>

Removes a reference of this client to a unit.

pub async fn start_transient_unit( &self, name: &str, mode: &JobMode, properties: &[(&str, Value<'_>)], aux: &[(&str, Vec<(&str, Value<'_>)>)], ) -> Result<OwnedObjectPath>

Creates and starts a transient unit.

The name needs a unit type suffix and must be unique. The manager releases the unit when it is no longer running or referenced. properties works as in ManagerProxy::set_unit_properties. aux creates more transient units in the same call. Each entry is a unit name and the properties of that unit. Pass an empty list for none. Returns the object path of the start job.

pub async fn get_unit_processes(&self, name: &str) -> Result<Vec<UnitProcess>>

Lists the processes in the control group of a unit.

pub async fn attach_processes_to_unit( &self, unit_name: &str, subcgroup: &str, pids: &[u32], ) -> Result<()>

Moves processes into the control group of a unit or one of its subgroups.

pub async fn remove_subgroup_from_unit( &self, unit_name: &str, subcgroup: &str, flags: u64, ) -> Result<()>

Removes a sub control group of a unit.

The path starts with / and is relative to the control group of the unit. An empty unit name means the unit of the caller. Pass 0 as flags. A service manager of a user can use this to remove groups that it delegated to other users.

Added in systemd 258.

pub async fn abandon_scope(&self, name: &str) -> Result<()>

Marks a scope unit as abandoned.

The manager stops tracking its processes.

pub async fn get_job(&self, id: u32) -> Result<OwnedObjectPath>

Returns the object path of a job.

pub async fn get_job_after(&self, id: u32) -> Result<Vec<JobStatus>>

Lists the queued jobs that run after a job.

pub async fn get_job_before(&self, id: u32) -> Result<Vec<JobStatus>>

Lists the queued jobs that run before a job.

pub async fn cancel_job(&self, id: u32) -> Result<()>

Cancels a queued job.

A job that already runs is not stopped.

pub async fn clear_jobs(&self) -> Result<()>

Removes all queued jobs that did not start yet.

pub async fn reset_failed(&self) -> Result<()>

Clears the failed state of all units.

pub async fn set_show_status(&self, mode: &str) -> Result<()>

Sets whether the manager shows status messages during boot and shutdown.

The mode takes the values of the systemd.show_status kernel parameter. An empty string restores the original value.

pub async fn list_units(&self) -> Result<Vec<UnitStatus>>

Lists all loaded units.

A unit with several names appears once.

pub async fn list_units_filtered( &self, states: &[&str], ) -> Result<Vec<UnitStatus>>

Lists loaded units that match one of the listed states.

A state is a load, active or sub state.

pub async fn list_units_by_patterns( &self, states: &[&str], patterns: &[&str], ) -> Result<Vec<UnitStatus>>

Lists loaded units by state and by name pattern.

An empty list does not filter. Patterns are shell globs.

pub async fn list_units_by_names( &self, names: &[&str], ) -> Result<Vec<UnitStatus>>

Lists loaded units that have one of the listed names.

pub async fn list_jobs(&self) -> Result<Vec<JobStatus>>

Lists all queued jobs.

pub async fn subscribe(&self) -> Result<()>

Asks the service to send signals to this connection.

The service tracks subscriptions per bus sender, so every connection must call this itself. A subscription covers the signals of this interface and the PropertiesChanged signals of all objects of the manager. Call it before the first property read and keep it for the lifetime of the proxies. The service drops the subscription when the connection closes. The error AlreadySubscribed means that the subscription is already in place.

pub async fn unsubscribe(&self) -> Result<()>

Cancels the subscription of ManagerProxy::subscribe.

It affects every proxy on this connection. The call fails with NotSubscribed if the connection is not subscribed. Calling it is optional.

pub async fn dump(&self) -> Result<String>

Returns a text dump of the internal state of the manager.

The text is for developers. Its format is not stable. Large dumps can exceed the limits of a D-Bus message. Prefer ManagerProxy::dump_by_file_descriptor.

pub async fn dump_units_matching_patterns( &self, patterns: &[&str], ) -> Result<String>

Like ManagerProxy::dump, but only for units whose names match a glob.

Added in systemd 252.

pub async fn dump_by_file_descriptor(&self) -> Result<OwnedFd>

Like ManagerProxy::dump, but returns a file descriptor.

Read the text from it until the end of the file. It does not work over a remote connection.

pub async fn dump_units_matching_patterns_by_file_descriptor( &self, patterns: &[&str], ) -> Result<OwnedFd>

Like ManagerProxy::dump_units_matching_patterns, but returns a file descriptor.

Added in systemd 252.

pub async fn reload(&self) -> Result<()>

Reloads all unit files and runs the generators again.

The manager also reads system.conf again. Cached properties of unit and job proxies can miss changes across a reload. Read them again or build new proxies after the Reloading signal reports false.

pub async fn reexecute(&self) -> Result<()>

Serializes the state, runs the manager binary again and restores the state.

Use it after an upgrade. It is a fuller version of ManagerProxy::reload.

This is a no-reply call. Errors such as a polkit denial or rate limiting never reach the caller. Build new proxies afterwards, because cached values can be outdated.

pub async fn exit(&self) -> Result<()>

Asks the manager to exit.

Every manager supports it. A user manager or a container manager exits. The system manager on a host falls back to a reboot in systemd-shutdown, because PID 1 cannot exit. The call needs privileges.

pub async fn reboot(&self) -> Result<()>

Reboots the system at once without stopping services.

Normally only the shutdown logic calls it. To reboot the machine, use the org.freedesktop.login1 service. Only the system manager supports it. A user manager returns a NotSupported error. The call needs privileges.

pub async fn soft_reboot(&self, new_root: &str) -> Result<()>

Soft reboots the system into a new root file system.

An empty path means /run/nextroot if it exists. Only the system manager supports it. A user manager returns a NotSupported error. The call needs privileges.

Added in systemd 254.

pub async fn power_off(&self) -> Result<()>

Powers the system off at once without stopping services.

Normally only the shutdown logic calls it. Only the system manager supports it. A user manager returns a NotSupported error. The call needs privileges.

pub async fn halt(&self) -> Result<()>

Halts the system at once without stopping services.

Normally only the shutdown logic calls it. Only the system manager supports it. A user manager returns a NotSupported error. The call needs privileges.

pub async fn k_exec(&self) -> Result<()>

Reboots the system into a new kernel with kexec at once.

Normally only the shutdown logic calls it. Only the system manager supports it. A user manager returns a NotSupported error. The call needs privileges.

pub async fn switch_root(&self, new_root: &str, init: &str) -> Result<()>

Switches to a new root directory.

It serves the initrd and the switch from the host system to a shutdown initrd. The manager serializes its state, and the init binary of the new root replaces PID 1. An empty init makes the manager search for it. Only the system manager supports it. A user manager returns a NotSupported error. The call needs privileges.

pub async fn set_environment(&self, assignments: &[&str]) -> Result<()>

Sets variables in the environment of all processes that the manager starts.

Each entry has the form NAME=value. It overrides an earlier value.

pub async fn unset_environment(&self, names: &[&str]) -> Result<()>

Removes variables from the environment of all processes that the manager starts.

A name that is not set is not an error.

pub async fn unset_and_set_environment( &self, names: &[&str], assignments: &[&str], ) -> Result<()>

Removes and sets environment variables in one step.

A variable in both lists ends up set.

pub async fn enqueue_marked_jobs(&self) -> Result<Vec<OwnedObjectPath>>

Queues reload and restart jobs for units that have a marker.

See UnitMarker. It works like calling ManagerProxy::try_restart_unit or ManagerProxy::reload_or_try_restart_unit for the marked units. Returns the object paths of the jobs.

pub async fn list_unit_files(&self) -> Result<Vec<UnitFileInfo>>

Lists the unit files that exist on disk.

Unlike ManagerProxy::list_units, it includes units that are not loaded. Templates are in the list. Some units have no file.

pub async fn list_unit_files_by_patterns( &self, states: &[UnitFileState], patterns: &[&str], ) -> Result<Vec<UnitFileInfo>>

Lists unit files by install state and by name pattern.

An empty list does not filter.

pub async fn get_unit_file_state(&self, file: &str) -> Result<UnitFileState>

Returns the install state of a unit file.

pub async fn enable_unit_files( &self, files: &[&str], runtime: bool, force: bool, ) -> Result<InstallChanges>

Enables unit files by creating symbolic links.

A file is a plain name or an absolute path. With runtime the links go to /run and end at reboot. Otherwise they go to /etc. With force the service replaces links that point to other units.

pub async fn disable_unit_files( &self, files: &[&str], runtime: bool, ) -> Result<Vec<UnitFileChange>>

Disables unit files by removing their symbolic links in /etc and /run.

pub async fn enable_unit_files_with_flags( &self, files: &[&str], flags: UnitFileFlags, ) -> Result<InstallChanges>

Like ManagerProxy::enable_unit_files, with flags instead of booleans.

pub async fn disable_unit_files_with_flags( &self, files: &[&str], flags: UnitFileFlags, ) -> Result<Vec<UnitFileChange>>

Like ManagerProxy::disable_unit_files, with flags instead of booleans.

pub async fn disable_unit_files_with_flags_and_install_info( &self, files: &[&str], flags: UnitFileFlags, ) -> Result<InstallChanges>

Like ManagerProxy::disable_unit_files_with_flags, and also reports whether the unit files have install information.

Added in systemd 253.

pub async fn reenable_unit_files( &self, files: &[&str], runtime: bool, force: bool, ) -> Result<InstallChanges>

Disables and then enables unit files in one step.

Use it to apply new [Install] data.

Links unit files from outside the search path into it.

pub async fn preset_unit_files( &self, files: &[&str], runtime: bool, force: bool, ) -> Result<InstallChanges>

Enables or disables unit files as the preset policy says.

pub async fn preset_unit_files_with_mode( &self, files: &[&str], mode: &PresetMode, runtime: bool, force: bool, ) -> Result<InstallChanges>

Like ManagerProxy::preset_unit_files, with a mode that limits the changes.

pub async fn mask_unit_files( &self, files: &[&str], runtime: bool, force: bool, ) -> Result<Vec<UnitFileChange>>

Masks unit files.

pub async fn unmask_unit_files( &self, files: &[&str], runtime: bool, ) -> Result<Vec<UnitFileChange>>

Unmasks unit files.

pub async fn revert_unit_files( &self, files: &[&str], ) -> Result<Vec<UnitFileChange>>

Reverts unit files to their vendor version.

It removes local overrides and drop-ins.

pub async fn set_default_target( &self, name: &str, force: bool, ) -> Result<Vec<UnitFileChange>>

Changes the default.target link.

pub async fn get_default_target(&self) -> Result<String>

Returns the name of the unit that default.target points to.

pub async fn preset_all_unit_files( &self, mode: &PresetMode, runtime: bool, force: bool, ) -> Result<Vec<UnitFileChange>>

Applies the preset policy to all unit files.

pub async fn add_dependency_unit_files( &self, files: &[&str], target: &str, dependency_type: &DependencyType, runtime: bool, force: bool, ) -> Result<Vec<UnitFileChange>>

Adds a Wants or Requires dependency from a target to unit files.

Returns the paths of the symbolic links that point to a unit file.

pub async fn set_exit_code(&self, number: u8) -> Result<()>

Sets the exit code that the user manager returns when it exits.

pub async fn lookup_dynamic_user_by_name(&self, name: &str) -> Result<u32>

Returns the user ID of a user that the manager allocated for DynamicUser=.

pub async fn lookup_dynamic_user_by_uid(&self, uid: u32) -> Result<String>

Returns the name of a user that the manager allocated for DynamicUser=.

pub async fn get_dynamic_users(&self) -> Result<Vec<DynamicUser>>

Lists the users that the manager allocated for DynamicUser=.

pub async fn dump_unit_file_descriptor_store( &self, name: &str, ) -> Result<Vec<FileDescriptorStoreEntry>>

Lists the file descriptors in the store of a service.

It does the same as DumpFileDescriptorStore of the service interface.

Added in systemd 254.

pub async fn receive_unit_new(&self) -> Result<UnitNewStream>

Create a stream that receives UnitNew signals.

This a convenient wrapper around zbus::Proxy::receive_signal. The manager loaded a unit.

This says nothing about unit files on disk. It reports the units in memory. The client needs a subscription.

pub async fn receive_unit_new_with_args( &self, args: &[(u8, &str)], ) -> Result<UnitNewStream>

Create a stream that receives UnitNew signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. The manager loaded a unit.

This says nothing about unit files on disk. It reports the units in memory. The client needs a subscription.

pub async fn receive_unit_removed(&self) -> Result<UnitRemovedStream>

Create a stream that receives UnitRemoved signals.

This a convenient wrapper around zbus::Proxy::receive_signal. The manager unloaded a unit.

The client needs a subscription.

pub async fn receive_unit_removed_with_args( &self, args: &[(u8, &str)], ) -> Result<UnitRemovedStream>

Create a stream that receives UnitRemoved signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. The manager unloaded a unit.

The client needs a subscription.

pub async fn receive_job_new(&self) -> Result<JobNewStream>

Create a stream that receives JobNew signals.

This a convenient wrapper around zbus::Proxy::receive_signal. The manager queued a job.

The client needs a subscription.

pub async fn receive_job_new_with_args( &self, args: &[(u8, &str)], ) -> Result<JobNewStream>

Create a stream that receives JobNew signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. The manager queued a job.

The client needs a subscription.

pub async fn receive_job_removed(&self) -> Result<JobRemovedStream>

Create a stream that receives JobRemoved signals.

This a convenient wrapper around zbus::Proxy::receive_signal. A job left the queue.

The result tells how it ended. The client needs a subscription.

pub async fn receive_job_removed_with_args( &self, args: &[(u8, &str)], ) -> Result<JobRemovedStream>

Create a stream that receives JobRemoved signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. A job left the queue.

The result tells how it ended. The client needs a subscription.

pub async fn receive_startup_finished(&self) -> Result<StartupFinishedStream>

Create a stream that receives StartupFinished signals.

This a convenient wrapper around zbus::Proxy::receive_signal. The startup finished.

The arguments are the microseconds that boot spent in the firmware, the boot loader, the kernel, the initrd, userspace and in total. A value is 0 if the time is unknown. The client needs a subscription.

pub async fn receive_startup_finished_with_args( &self, args: &[(u8, &str)], ) -> Result<StartupFinishedStream>

Create a stream that receives StartupFinished signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. The startup finished.

The arguments are the microseconds that boot spent in the firmware, the boot loader, the kernel, the initrd, userspace and in total. A value is 0 if the time is unknown. The client needs a subscription.

pub async fn receive_unit_files_changed(&self) -> Result<UnitFilesChangedStream>

Create a stream that receives UnitFilesChanged signals.

This a convenient wrapper around zbus::Proxy::receive_signal. The enabled or masked unit files on disk changed.

The client needs a subscription.

pub async fn receive_reloading(&self) -> Result<ReloadingStream>

Create a stream that receives Reloading signals.

This a convenient wrapper around zbus::Proxy::receive_signal. A reload of the manager starts or ends.

The argument is true just before the reload and false after it. Clients can use it to batch updates. The client needs a subscription.

pub async fn receive_reloading_with_args( &self, args: &[(u8, &str)], ) -> Result<ReloadingStream>

Create a stream that receives Reloading signals.

This a convenient wrapper around zbus::Proxy::receive_signal_with_args. A reload of the manager starts or ends.

The argument is true just before the reload and false after it. Clients can use it to batch updates. The client needs a subscription.

pub async fn version(&self) -> Result<String>

The version of the running systemd. The string is for display only. Don’t parse it.

pub fn cached_version( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The version of the running systemd. The string is for display only. Don’t parse it. Get the cached value of the Version property, or None if the property is not cached.

pub async fn features(&self) -> Result<String>

The build features. Enabled ones start with + and disabled ones with -.

pub fn cached_features( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The build features. Enabled ones start with + and disabled ones with -. Get the cached value of the Features property, or None if the property is not cached.

pub async fn virtualization(&self) -> Result<String>

The virtualization technology, for example kvm. It is empty on bare metal. Only the innermost one counts.

pub fn cached_virtualization( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The virtualization technology, for example kvm. It is empty on bare metal. Only the innermost one counts. Get the cached value of the Virtualization property, or None if the property is not cached.

pub async fn confidential_virtualization(&self) -> Result<String>

The confidential virtualization technology, for example sev or tdx. It is empty if there is none.

Added in systemd 254.

pub fn cached_confidential_virtualization( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The confidential virtualization technology, for example sev or tdx. It is empty if there is none.

Added in systemd 254. Get the cached value of the ConfidentialVirtualization property, or None if the property is not cached.

pub async fn architecture(&self) -> Result<String>

The architecture of the manager, in the vocabulary of ConditionArchitectures=.

pub fn cached_architecture( &self, ) -> Result<Option<<Result<String> as ResultAdapter>::Ok>, <Result<String> as ResultAdapter>::Err>

The architecture of the manager, in the vocabulary of ConditionArchitectures=. Get the cached value of the Architecture property, or None if the property is not cached.

pub async fn tainted(&self) -> Result<String>

The taint flags as a colon-separated list, for example unmerged-usr:cgroupsv1. The service computes them on each read.

pub async fn firmware_timestamp(&self) -> Result<u64>

The time when the firmware started, in microseconds since the UNIX epoch. Both values are 0 if unknown.

pub fn cached_firmware_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the firmware started, in microseconds since the UNIX epoch. Both values are 0 if unknown. Get the cached value of the FirmwareTimestamp property, or None if the property is not cached.

pub async fn firmware_timestamp_monotonic(&self) -> Result<u64>

How long before the kernel started the firmware started, in microseconds. The value is 0 if unknown.

The monotonic clock starts at 0 with the kernel, so the real monotonic time of this event is negative. The service stores it as the positive distance to the kernel start. Read the value as -value. Do not read it as an unsigned point in time or as a wrapped two’s complement number.

pub fn cached_firmware_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

How long before the kernel started the firmware started, in microseconds. The value is 0 if unknown.

The monotonic clock starts at 0 with the kernel, so the real monotonic time of this event is negative. The service stores it as the positive distance to the kernel start. Read the value as -value. Do not read it as an unsigned point in time or as a wrapped two’s complement number. Get the cached value of the FirmwareTimestampMonotonic property, or None if the property is not cached.

pub async fn loader_timestamp(&self) -> Result<u64>

The time when the boot loader started, in microseconds since the UNIX epoch. Both values are 0 if unknown.

pub fn cached_loader_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the boot loader started, in microseconds since the UNIX epoch. Both values are 0 if unknown. Get the cached value of the LoaderTimestamp property, or None if the property is not cached.

pub async fn loader_timestamp_monotonic(&self) -> Result<u64>

How long before the kernel started the boot loader started, in microseconds. The value is 0 if unknown.

The monotonic clock starts at 0 with the kernel, so the real monotonic time of this event is negative. The service stores it as the positive distance to the kernel start. Read the value as -value. Do not read it as an unsigned point in time or as a wrapped two’s complement number.

pub fn cached_loader_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

How long before the kernel started the boot loader started, in microseconds. The value is 0 if unknown.

The monotonic clock starts at 0 with the kernel, so the real monotonic time of this event is negative. The service stores it as the positive distance to the kernel start. Read the value as -value. Do not read it as an unsigned point in time or as a wrapped two’s complement number. Get the cached value of the LoaderTimestampMonotonic property, or None if the property is not cached.

pub async fn kernel_timestamp(&self) -> Result<u64>

The time when the kernel started, in microseconds since the UNIX epoch.

pub fn cached_kernel_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the kernel started, in microseconds since the UNIX epoch. Get the cached value of the KernelTimestamp property, or None if the property is not cached.

pub async fn kernel_timestamp_monotonic(&self) -> Result<u64>

The time when the kernel started on the monotonic clock, in microseconds. It is always 0.

pub fn cached_kernel_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the kernel started on the monotonic clock, in microseconds. It is always 0. Get the cached value of the KernelTimestampMonotonic property, or None if the property is not cached.

pub async fn init_rd_timestamp(&self) -> Result<u64>

The time when the initrd started, in microseconds since the UNIX epoch. Both values are 0 if there was no initrd.

pub fn cached_init_rd_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the initrd started, in microseconds since the UNIX epoch. Both values are 0 if there was no initrd. Get the cached value of the InitRDTimestamp property, or None if the property is not cached.

pub async fn init_rd_timestamp_monotonic(&self) -> Result<u64>

The time when the initrd started on the monotonic clock, in microseconds. Both values are 0 if there was no initrd.

pub fn cached_init_rd_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the initrd started on the monotonic clock, in microseconds. Both values are 0 if there was no initrd. Get the cached value of the InitRDTimestampMonotonic property, or None if the property is not cached.

pub async fn userspace_timestamp(&self) -> Result<u64>

The time when the manager started, in microseconds since the UNIX epoch.

pub fn cached_userspace_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the manager started, in microseconds since the UNIX epoch. Get the cached value of the UserspaceTimestamp property, or None if the property is not cached.

pub async fn userspace_timestamp_monotonic(&self) -> Result<u64>

The time when the manager started on the monotonic clock, in microseconds.

pub fn cached_userspace_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the manager started on the monotonic clock, in microseconds. Get the cached value of the UserspaceTimestampMonotonic property, or None if the property is not cached.

pub async fn finish_timestamp(&self) -> Result<u64>

The time when all startup jobs finished, in microseconds since the UNIX epoch. Both values are 0 until startup finishes.

pub async fn finish_timestamp_monotonic(&self) -> Result<u64>

The time when all startup jobs finished on the monotonic clock, in microseconds. Both values are 0 until startup finishes.

pub async fn shutdown_start_timestamp(&self) -> Result<u64>

The time when unit stopping began during shutdown, in microseconds since the UNIX epoch. Both values are 0 before a shutdown.

Added in systemd 256.

pub async fn shutdown_start_timestamp_monotonic(&self) -> Result<u64>

The time when unit stopping began during shutdown on the monotonic clock, in microseconds. Both values are 0 before a shutdown.

Added in systemd 256.

pub async fn shutdown_finish_timestamp(&self) -> Result<u64>

The time when all units finished stopping during shutdown, in microseconds since the UNIX epoch. Both values are 0 before a shutdown.

Added in systemd 262.

pub async fn shutdown_finish_timestamp_monotonic(&self) -> Result<u64>

The time when all units finished stopping during shutdown on the monotonic clock, in microseconds. Both values are 0 before a shutdown.

Added in systemd 262.

pub async fn previous_shutdown_start_timestamp(&self) -> Result<u64>

The time when unit stopping began in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_start_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when unit stopping began in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownStartTimestamp property, or None if the property is not cached.

pub async fn previous_shutdown_start_timestamp_monotonic(&self) -> Result<u64>

The time when unit stopping began in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_start_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when unit stopping began in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownStartTimestampMonotonic property, or None if the property is not cached.

pub async fn previous_shutdown_finish_timestamp(&self) -> Result<u64>

The time when unit stopping ended in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_finish_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when unit stopping ended in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownFinishTimestamp property, or None if the property is not cached.

pub async fn previous_shutdown_finish_timestamp_monotonic(&self) -> Result<u64>

The time when unit stopping ended in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_finish_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when unit stopping ended in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownFinishTimestampMonotonic property, or None if the property is not cached.

pub async fn previous_shutdown_late_start_timestamp(&self) -> Result<u64>

The time when systemd-shutdown started in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_late_start_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when systemd-shutdown started in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownLateStartTimestamp property, or None if the property is not cached.

pub async fn previous_shutdown_late_start_timestamp_monotonic( &self, ) -> Result<u64>

The time when systemd-shutdown started in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_late_start_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when systemd-shutdown started in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownLateStartTimestampMonotonic property, or None if the property is not cached.

pub async fn previous_shutdown_late_finish_timestamp(&self) -> Result<u64>

The time when systemd-shutdown was about to run kexec in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_late_finish_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when systemd-shutdown was about to run kexec in the previous boot, in microseconds since the UNIX epoch. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownLateFinishTimestamp property, or None if the property is not cached.

pub async fn previous_shutdown_late_finish_timestamp_monotonic( &self, ) -> Result<u64>

The time when systemd-shutdown was about to run kexec in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262.

pub fn cached_previous_shutdown_late_finish_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when systemd-shutdown was about to run kexec in the previous boot on the monotonic clock, in microseconds. The value comes from a live update and is 0 otherwise.

Added in systemd 262. Get the cached value of the PreviousShutdownLateFinishTimestampMonotonic property, or None if the property is not cached.

pub async fn security_start_timestamp(&self) -> Result<u64>

The time when the load of security policies began, in microseconds since the UNIX epoch.

pub fn cached_security_start_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies began, in microseconds since the UNIX epoch. Get the cached value of the SecurityStartTimestamp property, or None if the property is not cached.

pub async fn security_start_timestamp_monotonic(&self) -> Result<u64>

The time when the load of security policies began on the monotonic clock, in microseconds.

pub fn cached_security_start_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies began on the monotonic clock, in microseconds. Get the cached value of the SecurityStartTimestampMonotonic property, or None if the property is not cached.

pub async fn security_finish_timestamp(&self) -> Result<u64>

The time when the load of security policies ended, in microseconds since the UNIX epoch.

pub fn cached_security_finish_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies ended, in microseconds since the UNIX epoch. Get the cached value of the SecurityFinishTimestamp property, or None if the property is not cached.

pub async fn security_finish_timestamp_monotonic(&self) -> Result<u64>

The time when the load of security policies ended on the monotonic clock, in microseconds.

pub fn cached_security_finish_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies ended on the monotonic clock, in microseconds. Get the cached value of the SecurityFinishTimestampMonotonic property, or None if the property is not cached.

pub async fn generators_start_timestamp(&self) -> Result<u64>

The time when the generators started, in microseconds since the UNIX epoch. The manager updates it on each reload.

pub async fn generators_start_timestamp_monotonic(&self) -> Result<u64>

The time when the generators started on the monotonic clock, in microseconds. The manager updates it on each reload.

pub async fn generators_finish_timestamp(&self) -> Result<u64>

The time when the generators ended, in microseconds since the UNIX epoch. The manager updates it on each reload.

pub async fn generators_finish_timestamp_monotonic(&self) -> Result<u64>

The time when the generators ended on the monotonic clock, in microseconds. The manager updates it on each reload.

pub async fn units_load_start_timestamp(&self) -> Result<u64>

The time when the load of unit files began, in microseconds since the UNIX epoch. The manager updates it on each reload.

pub async fn units_load_start_timestamp_monotonic(&self) -> Result<u64>

The time when the load of unit files began on the monotonic clock, in microseconds. The manager updates it on each reload.

pub async fn units_load_finish_timestamp(&self) -> Result<u64>

The time when the load of unit files ended, in microseconds since the UNIX epoch. The manager updates it on each reload.

pub async fn units_load_finish_timestamp_monotonic(&self) -> Result<u64>

The time when the load of unit files ended on the monotonic clock, in microseconds. The manager updates it on each reload.

pub async fn units_load_timestamp(&self) -> Result<u64>

The time when the manager last started to load unit files, in microseconds since the UNIX epoch.

Added in systemd 250.

pub async fn units_load_timestamp_monotonic(&self) -> Result<u64>

The time when the manager last started to load unit files on the monotonic clock, in microseconds.

Added in systemd 250.

pub async fn init_rd_security_start_timestamp(&self) -> Result<u64>

The time when the load of security policies began in the initrd, in microseconds since the UNIX epoch.

pub fn cached_init_rd_security_start_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies began in the initrd, in microseconds since the UNIX epoch. Get the cached value of the InitRDSecurityStartTimestamp property, or None if the property is not cached.

pub async fn init_rd_security_start_timestamp_monotonic(&self) -> Result<u64>

The time when the load of security policies began in the initrd on the monotonic clock, in microseconds.

pub fn cached_init_rd_security_start_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies began in the initrd on the monotonic clock, in microseconds. Get the cached value of the InitRDSecurityStartTimestampMonotonic property, or None if the property is not cached.

pub async fn init_rd_security_finish_timestamp(&self) -> Result<u64>

The time when the load of security policies ended in the initrd, in microseconds since the UNIX epoch.

pub fn cached_init_rd_security_finish_timestamp( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies ended in the initrd, in microseconds since the UNIX epoch. Get the cached value of the InitRDSecurityFinishTimestamp property, or None if the property is not cached.

pub async fn init_rd_security_finish_timestamp_monotonic(&self) -> Result<u64>

The time when the load of security policies ended in the initrd on the monotonic clock, in microseconds.

pub fn cached_init_rd_security_finish_timestamp_monotonic( &self, ) -> Result<Option<<Result<u64> as ResultAdapter>::Ok>, <Result<u64> as ResultAdapter>::Err>

The time when the load of security policies ended in the initrd on the monotonic clock, in microseconds. Get the cached value of the InitRDSecurityFinishTimestampMonotonic property, or None if the property is not cached.

pub async fn init_rd_generators_start_timestamp(&self) -> Result<u64>

The time when the generators started in the initrd, in microseconds since the UNIX epoch.

pub async fn init_rd_generators_start_timestamp_monotonic(&self) -> Result<u64>

The time when the generators started in the initrd on the monotonic clock, in microseconds.

pub async fn init_rd_generators_finish_timestamp(&self) -> Result<u64>

The time when the generators ended in the initrd, in microseconds since the UNIX epoch.

pub async fn init_rd_generators_finish_timestamp_monotonic(&self) -> Result<u64>

The time when the generators ended in the initrd on the monotonic clock, in microseconds.

pub async fn init_rd_units_load_start_timestamp(&self) -> Result<u64>

The time when the load of unit files began in the initrd, in microseconds since the UNIX epoch.

pub async fn init_rd_units_load_start_timestamp_monotonic(&self) -> Result<u64>

The time when the load of unit files began in the initrd on the monotonic clock, in microseconds.

pub async fn init_rd_units_load_finish_timestamp(&self) -> Result<u64>

The time when the load of unit files ended in the initrd, in microseconds since the UNIX epoch.

pub async fn init_rd_units_load_finish_timestamp_monotonic(&self) -> Result<u64>

The time when the load of unit files ended in the initrd on the monotonic clock, in microseconds.

pub async fn log_level(&self) -> Result<String>

The log level of the manager, for example info or debug. Changing it needs privileges.

pub async fn set_log_level(&self, value: &str) -> Result<()>

Sets the LogLevel property.

pub async fn log_target(&self) -> Result<String>

The log target of the manager, for example journal or kmsg. Changing it needs privileges.

pub async fn set_log_target(&self, value: &str) -> Result<()>

Sets the LogTarget property.

pub async fn n_names(&self) -> Result<u32>

The number of unit names that are loaded. A unit with several names counts several times.

pub async fn n_failed_units(&self) -> Result<u32>

The number of units in the failed state.

pub fn cached_n_failed_units( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>

The number of units in the failed state. Get the cached value of the NFailedUnits property, or None if the property is not cached.

pub async fn receive_n_failed_units_changed( &self, ) -> PropertyStream<'p, <Result<u32> as ResultAdapter>::Ok>

The number of units in the failed state. Create a stream for the NFailedUnits property changes. This is a convenient wrapper around [zbus::Proxy::receive_property_changed].

pub async fn n_jobs(&self) -> Result<u32>

The number of queued jobs.

pub async fn n_installed_jobs(&self) -> Result<u32>

The number of jobs that were queued in total.

pub async fn n_failed_jobs(&self) -> Result<u32>

The number of jobs that failed in total.

pub async fn transactions_with_ordering_cycle(&self) -> Result<Vec<u64>>

The IDs of the transactions that hit an ordering cycle.

Added in systemd 259.

pub async fn progress(&self) -> Result<f64>

The boot progress from 0.0 to 1.0. It stays at 1.0 after the boot.

pub async fn environment(&self) -> Result<Vec<String>>

The environment that the manager passes to the processes that it starts. Each entry has the form NAME=value.

pub async fn confirm_spawn(&self) -> Result<bool>

Whether the manager requires confirmation before it starts a process.

pub async fn show_status(&self) -> Result<bool>

Whether the manager shows status messages during boot and shutdown. See ManagerProxy::set_show_status.

pub async fn unit_path(&self) -> Result<Vec<String>>

The directories that the manager searches for unit files.

pub async fn default_standard_output(&self) -> Result<String>

The default StandardOutput= of units.

pub async fn default_standard_error(&self) -> Result<String>

The default StandardError= of units.

pub async fn watchdog_device(&self) -> Result<String>

The path of the hardware watchdog device.

Added in systemd 252.

pub async fn watchdog_last_ping_timestamp(&self) -> Result<u64>

The time of the last watchdog ping, in microseconds since the UNIX epoch.

Added in systemd 252.

pub async fn watchdog_last_ping_timestamp_monotonic(&self) -> Result<u64>

The time of the last watchdog ping on the monotonic clock, in microseconds.

Added in systemd 252.

pub async fn runtime_watchdog_usec(&self) -> Result<u64>

The watchdog timeout while the system runs, in microseconds. 0 means off. Changing it needs privileges.

pub async fn set_runtime_watchdog_usec(&self, value: u64) -> Result<()>

Sets the RuntimeWatchdogUSec property.

pub async fn runtime_watchdog_pre_usec(&self) -> Result<u64>

The time before the watchdog timeout when the pretimeout governor acts, in microseconds. Changing it needs privileges.

Added in systemd 251.

pub async fn set_runtime_watchdog_pre_usec(&self, value: u64) -> Result<()>

Sets the RuntimeWatchdogPreUSec property.

pub async fn runtime_watchdog_pre_governor(&self) -> Result<String>

The watchdog pretimeout governor. Changing it needs privileges.

Added in systemd 251.

pub async fn set_runtime_watchdog_pre_governor(&self, value: &str) -> Result<()>

Sets the RuntimeWatchdogPreGovernor property.

pub async fn reboot_watchdog_usec(&self) -> Result<u64>

The watchdog timeout during a reboot, in microseconds. Changing it needs privileges.

pub async fn set_reboot_watchdog_usec(&self, value: u64) -> Result<()>

Sets the RebootWatchdogUSec property.

pub async fn k_exec_watchdog_usec(&self) -> Result<u64>

The watchdog timeout during a kexec reboot, in microseconds. Changing it needs privileges.

pub async fn set_k_exec_watchdog_usec(&self, value: u64) -> Result<()>

Sets the KExecWatchdogUSec property.

pub async fn service_watchdogs(&self) -> Result<bool>

Whether the manager honors the watchdog settings of services. Changing it needs privileges.

pub async fn set_service_watchdogs(&self, value: bool) -> Result<()>

Sets the ServiceWatchdogs property.

pub async fn control_group(&self) -> Result<String>

The root control group of the manager. The root is an empty string, not /. It is empty for the host and non-empty in a container.

pub async fn system_state(&self) -> Result<SystemState>

The state of the manager.

pub async fn exit_code(&self) -> Result<u8>

The exit code that the manager returns when it exits. See ManagerProxy::set_exit_code.

pub async fn default_timer_accuracy_usec(&self) -> Result<u64>

The default AccuracySec= of timers, in microseconds.

pub async fn default_timeout_start_usec(&self) -> Result<u64>

The default TimeoutStartSec= of units, in microseconds.

pub async fn default_timeout_stop_usec(&self) -> Result<u64>

The default TimeoutStopSec= of units, in microseconds.

pub async fn default_timeout_abort_usec(&self) -> Result<u64>

The default TimeoutAbortSec= of units, in microseconds.

pub async fn default_device_timeout_usec(&self) -> Result<u64>

The default JobTimeoutSec= of device units, in microseconds.

Added in systemd 252.

pub async fn default_restart_usec(&self) -> Result<u64>

The default RestartSec= of services, in microseconds.

pub async fn default_start_limit_interval_usec(&self) -> Result<u64>

The default StartLimitIntervalSec= of units, in microseconds.

pub async fn default_start_limit_burst(&self) -> Result<u32>

The default StartLimitBurst= of units.

pub async fn event_loop_rate_limit_interval_usec(&self) -> Result<u64>

The interval of the rate limit of the event loop, in microseconds.

Added in systemd 261.

pub async fn event_loop_rate_limit_burst(&self) -> Result<u32>

The burst of the rate limit of the event loop.

Added in systemd 261.

pub async fn default_io_accounting(&self) -> Result<bool>

The default IOAccounting= of units.

Added in systemd 254.

pub async fn default_ip_accounting(&self) -> Result<bool>

The default IPAccounting= of units.

Added in systemd 254.

pub async fn default_memory_accounting(&self) -> Result<bool>

The default MemoryAccounting= of units.

pub async fn default_tasks_accounting(&self) -> Result<bool>

The default TasksAccounting= of units.

pub async fn default_limit_cpu(&self) -> Result<u64>

The default hard limit LimitCPU= of units. The value is u64::MAX for no limit.

pub async fn default_limit_cpu_soft(&self) -> Result<u64>

The default soft limit LimitCPU= of units. The value is u64::MAX for no limit.

pub async fn default_limit_fsize(&self) -> Result<u64>

The default hard limit LimitFSIZE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_fsize_soft(&self) -> Result<u64>

The default soft limit LimitFSIZE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_data(&self) -> Result<u64>

The default hard limit LimitDATA= of units. The value is u64::MAX for no limit.

pub async fn default_limit_data_soft(&self) -> Result<u64>

The default soft limit LimitDATA= of units. The value is u64::MAX for no limit.

pub async fn default_limit_stack(&self) -> Result<u64>

The default hard limit LimitSTACK= of units. The value is u64::MAX for no limit.

pub async fn default_limit_stack_soft(&self) -> Result<u64>

The default soft limit LimitSTACK= of units. The value is u64::MAX for no limit.

pub async fn default_limit_core(&self) -> Result<u64>

The default hard limit LimitCORE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_core_soft(&self) -> Result<u64>

The default soft limit LimitCORE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_rss(&self) -> Result<u64>

The default hard limit LimitRSS= of units. The value is u64::MAX for no limit.

pub async fn default_limit_rss_soft(&self) -> Result<u64>

The default soft limit LimitRSS= of units. The value is u64::MAX for no limit.

pub async fn default_limit_nofile(&self) -> Result<u64>

The default hard limit LimitNOFILE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_nofile_soft(&self) -> Result<u64>

The default soft limit LimitNOFILE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_as(&self) -> Result<u64>

The default hard limit LimitAS= of units. The value is u64::MAX for no limit.

pub async fn default_limit_as_soft(&self) -> Result<u64>

The default soft limit LimitAS= of units. The value is u64::MAX for no limit.

pub async fn default_limit_nproc(&self) -> Result<u64>

The default hard limit LimitNPROC= of units. The value is u64::MAX for no limit.

pub async fn default_limit_nproc_soft(&self) -> Result<u64>

The default soft limit LimitNPROC= of units. The value is u64::MAX for no limit.

pub async fn default_limit_memlock(&self) -> Result<u64>

The default hard limit LimitMEMLOCK= of units. The value is u64::MAX for no limit.

pub async fn default_limit_memlock_soft(&self) -> Result<u64>

The default soft limit LimitMEMLOCK= of units. The value is u64::MAX for no limit.

pub async fn default_limit_locks(&self) -> Result<u64>

The default hard limit LimitLOCKS= of units. The value is u64::MAX for no limit.

pub async fn default_limit_locks_soft(&self) -> Result<u64>

The default soft limit LimitLOCKS= of units. The value is u64::MAX for no limit.

pub async fn default_limit_sigpending(&self) -> Result<u64>

The default hard limit LimitSIGPENDING= of units. The value is u64::MAX for no limit.

pub async fn default_limit_sigpending_soft(&self) -> Result<u64>

The default soft limit LimitSIGPENDING= of units. The value is u64::MAX for no limit.

pub async fn default_limit_msgqueue(&self) -> Result<u64>

The default hard limit LimitMSGQUEUE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_msgqueue_soft(&self) -> Result<u64>

The default soft limit LimitMSGQUEUE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_nice(&self) -> Result<u64>

The default hard limit LimitNICE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_nice_soft(&self) -> Result<u64>

The default soft limit LimitNICE= of units. The value is u64::MAX for no limit.

pub async fn default_limit_rtprio(&self) -> Result<u64>

The default hard limit LimitRTPRIO= of units. The value is u64::MAX for no limit.

pub async fn default_limit_rtprio_soft(&self) -> Result<u64>

The default soft limit LimitRTPRIO= of units. The value is u64::MAX for no limit.

pub async fn default_limit_rttime(&self) -> Result<u64>

The default hard limit LimitRTTIME= of units. The value is u64::MAX for no limit.

pub async fn default_limit_rttime_soft(&self) -> Result<u64>

The default soft limit LimitRTTIME= of units. The value is u64::MAX for no limit.

pub async fn default_tasks_max(&self) -> Result<u64>

The default TasksMax= of units. The value is u64::MAX for no limit.

pub async fn default_memory_pressure_threshold_usec(&self) -> Result<u64>

The default MemoryPressureThresholdSec= of units, in microseconds.

Added in systemd 254.

pub async fn default_memory_pressure_watch(&self) -> Result<PressureWatch>

The default MemoryPressureWatch= of units.

Added in systemd 254.

pub async fn default_cpu_pressure_threshold_usec(&self) -> Result<u64>

The default CPUPressureThresholdSec= of units, in microseconds.

Added in systemd 261.

pub async fn default_cpu_pressure_watch(&self) -> Result<PressureWatch>

The default CPUPressureWatch= of units.

Added in systemd 261.

pub async fn default_io_pressure_threshold_usec(&self) -> Result<u64>

The default IOPressureThresholdSec= of units, in microseconds.

Added in systemd 261.

pub async fn default_io_pressure_watch(&self) -> Result<PressureWatch>

The default IOPressureWatch= of units.

Added in systemd 261.

pub async fn timer_slack_nsec(&self) -> Result<u64>

The timer slack of the manager, in nanoseconds.

pub async fn default_oom_policy(&self) -> Result<OomPolicy>

The default OOMPolicy= of services.

pub async fn default_oom_score_adjust(&self) -> Result<i32>

The default OOMScoreAdjust= of units.

Added in systemd 250.

pub async fn default_restrict_suidsgid(&self) -> Result<bool>

The default RestrictSUIDSGID= of units.

Added in systemd 258.

pub async fn ctrl_alt_del_burst_action(&self) -> Result<EmergencyAction>

The action when the user presses Ctrl-Alt-Del too often.

pub async fn soft_reboots_count(&self) -> Result<u32>

The number of soft reboots since the last full boot.

Added in systemd 256.

pub fn cached_soft_reboots_count( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>

The number of soft reboots since the last full boot.

Added in systemd 256. Get the cached value of the SoftRebootsCount property, or None if the property is not cached.

pub async fn k_exec_count(&self) -> Result<u32>

The number of kexec live updates since the last full boot.

Added in systemd 262.

pub fn cached_k_exec_count( &self, ) -> Result<Option<<Result<u32> as ResultAdapter>::Ok>, <Result<u32> as ResultAdapter>::Err>

The number of kexec live updates since the last full boot.

Added in systemd 262. Get the cached value of the KExecCount property, or None if the property is not cached.

pub async fn reload_count(&self) -> Result<u64>

The number of finished reloads. It resets to 0 when the manager runs again.

Added in systemd 261.

pub async fn default_memory_z_swap_writeback(&self) -> Result<bool>

The default MemoryZSwapWriteback= of units.

Added in systemd 261.

Trait Implementations§

§

impl<'p> AsMut<Proxy<'p>> for ManagerProxy<'p>

§

fn as_mut(&mut self) -> &mut Proxy<'p>

Converts this type into a mutable reference of the (usually inferred) input type.
§

impl<'p> AsRef<Proxy<'p>> for ManagerProxy<'p>

§

fn as_ref(&self) -> &Proxy<'p>

Converts this type into a shared reference of the (usually inferred) input type.
§

impl<'p> Clone for ManagerProxy<'p>

§

fn clone(&self) -> ManagerProxy<'p>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<'p> Debug for ManagerProxy<'p>

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl<'a> Defaults for ManagerProxy<'a>

§

const INTERFACE: &'static Option<InterfaceName<'static>>

§

const DESTINATION: &'static Option<BusName<'static>>

§

const PATH: &'static Option<ObjectPath<'static>>

§

impl<'p> From<Proxy<'p>> for ManagerProxy<'p>

§

fn from(proxy: Proxy<'p>) -> Self

Converts to this type from the input type.
§

impl<'p> ProxyImpl<'p> for ManagerProxy<'p>

§

fn builder(conn: &Connection) -> Builder<'p, Self>

Return a customizable builder for this proxy.
§

fn into_inner(self) -> Proxy<'p>

Consume self, returning the underlying zbus::Proxy.
§

fn inner(&self) -> &Proxy<'p>

The reference to the underlying zbus::Proxy.
§

impl<'p> Serialize for ManagerProxy<'p>

§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
§

impl<'p> Type for ManagerProxy<'p>

§

const SIGNATURE: &'static Signature

The signature for the implementing type, in parsed format. Read more

Auto Trait Implementations§

§

impl<'p> !RefUnwindSafe for ManagerProxy<'p>

§

impl<'p> !UnwindSafe for ManagerProxy<'p>

§

impl<'p> Freeze for ManagerProxy<'p>

§

impl<'p> Send for ManagerProxy<'p>

§

impl<'p> Sync for ManagerProxy<'p>

§

impl<'p> Unpin for ManagerProxy<'p>

§

impl<'p> UnsafeUnpin for ManagerProxy<'p>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> DynamicType for T
where T: Type + ?Sized,

§

fn signature(&self) -> Signature

The type signature for self. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more