Systemd Ui Binäre Optionen


Starten von Synchronisierung automatisch. Es gibt derzeit kein offizielles Installationsprogramm für Windows Es gibt jedoch eine Reihe von einfachen Lösungen. Task Scheduler. Create ein neues Task Action-Menü - Erstellen Task. General Tab. Name die Aufgabe zum Beispiel Syncthing. Check Führen Sie, ob Benutzer Ist angemeldet oder nicht. Triggers Tab. Set Beginne die Aufgabe bei der Inbetriebnahme. Optional wählen Sie eine delay. Make sure Enabled is checked. Actions Tab. Aktion sollte als Start eines Programms eingestellt werden. Geben Sie den Pfad in Programm-Skript ein. Optional Enter - no-console - no-browser für Add Argumente optional. Setings Tab. Empfohlen Halten Sie das Kontrollkästchen auf Zulassen Aufgabe auf Anfrage ausgeführt werden. Clear Checkbox aus Stop-Aufgabe, wenn es länger läuft als. Empfohlen Halten Sie nicht eine neue Instanz für Wenn die Aufgabe bereits ausgeführt wird, dann die folgende Regel gilt. Enter Passwort für den Benutzer. Third-Party-Tools. Es gibt eine Reihe von Drittanbieter-Dienstprogramme, die darauf abzielen, dieses Problem Diese in der Regel Stellen Sie einen Installateur bereit, lassen Sie Synchronisation automatisch starten und eine mehr polierte Benutzererfahrung zB indem Sie sich als eine ordnungsgemäße Windows-Anwendung verhalten, anstatt Sie zu zwingen, Ihren Browser zu starten, um mit Syncthing zu interagieren. Starten Sie auf Login. Starting Synchronisation bei der Anmeldung ohne Konsolenfenster Oder Browser-Eröffnung bei Start, ist relativ einfach. Finden Sie die korrekte Link der Windows-Binärdatei von der Syncthing-Website wählen Sie amd64, wenn Sie eine 64-Bit-Version von Windows. Extract die Dateien in den Ordner syncthing-windows - in der zip an die Ordner C syncthing. Go in den C-Synchronisierungsordner, machen Sie eine Datei namens. Right-Klick auf die Datei und wählen Sie Bearbeiten Die Datei sollte in Editor oder Ihrem Standard-Text-Editor öffnen. Fügen Sie den folgenden Befehl in die Datei und speichern Sie die Chang Es startet Synchronisation - no-console - no-browser. Right-Klick auf und drücken Sie Create Shortcut. Right-Klick auf die Shortcut-Datei - Shortcut und klicken Sie auf Copy. Click Start klicken Sie auf Alle Programme und klicken Sie dann auf Startup Klicken Sie mit der rechten Maustaste auf Start und klicken Sie dann auf Öffnen. Fügen Sie die Verknüpfung mit der rechten Maustaste in den Ordner und wählen Sie Einfügen oder drücken Sie CTRL V. Syncthing wird nun automatisch starten, wenn Sie das nächste Mal eine neue Windows-Sitzung öffnen Keine Konsole oder Browser-Fenster wird Pop-up Zugriff auf die Schnittstelle, indem Sie zu. Wenn Sie es vorziehen Langsameres Indexieren, aber ein reaktionsfähigeres System während der Scans, kopiere den folgenden Befehl anstelle des Befehls in Schritt 5.Run als ein Service unabhängig von Benutzer login. Es gibt wichtige Sicherheitsüberlegungen mit diesem Ansatz Wenn Sie nicht sichern Syncthing s GUI und REST API , Dann kann jeder Prozess, der mit irgendwelchen Berechtigungen ausgeführt wird, jede Datei in dein Dateisystem schreiben, indem du eine Verbindung mit Syncthing bekommst. Daher müssen Sie sicherstellen, dass Sie ein GUI-Passwort festlegen oder Synchronisieren als unprivilegierter Benutzer ausführen Konfiguration, Synchronisierung startet nur, wenn sich ein Benutzer an der Maschine anmeldet. Dies ist bei Servern nicht optimal, wenn ein Computer nach einem Neustart nach dem Neustart laufen kann, ohne dass jemand angemeldet ist. In diesem Fall ist es am besten, einen Service zu erstellen, der läuft, sobald Windows startet Dies kann mit NSSM, dem Non-Sucking Service Manager, erreicht werden. Hinweis, dass das Starten von Synchronisieren bei der Anmeldung der bevorzugte Ansatz für fast jedes Endbenutzerszenario ist Das einzige Szenario, bei dem die Synchronisierung als Dienstleistung sinnvoll ist, ist für meist kopflose Server, die von verwaltet werden Ein Sysadmin, der genug weiß, um die Sicherheitsimplikationen zu verstehen. Download und extrahieren nssm zu einem Ordner, wo es bleiben kann Die NSSM-ausführbare Datei führt die Verwaltung sowie die Ausführung als Windows-Service, so muss es in einem geeigneten Ort gehalten werden. Von einem Administrator Befehlsaufforderung, CD in den NSSM-Ordner und führen Sie den Installations-Synchronisierungs-Dienstnamen aus. Application Tab. Set Pfad zu Ihrem und geben Sie - no-restart - no-browser - home Pfad zu Ihrem Synchronisierungsordner ein S Argumente Anmerkung Logging wird später gesetzt - logfile hier wird nicht angewendet. Details Tab. Optional Set Startup-Typ auf Automatische verzögert Start, um den Beginn der Synchronisierung zu verzögern, wenn das System zuerst bootet, um die Boot-Geschwindigkeit zu verbessern. Geben Sie das Benutzerkonto zu laufen Synchronisieren als dieser Benutzer muss vollen Zugriff auf die ausführbare Synchronisierungsdatei und den übergeordneten Ordner, den Konfigurationsdatei-Datenbankordner und die synchronisierten Ordner haben. Sie können dies als lokales System verlassen, aber dies stellt Sicherheitsrisiken dar. Wenn Sie dies auf Ihrem Windows-Benutzerkonto festlegen, wird dies ideal erstellt Ein dediziertes Benutzerkonto mit minimalen Berechtigungen. Process Tab. Optional Ändern Sie die Priorität auf Low, wenn Sie ein reaktionsfähigeres System auf Kosten einer etwas längeren Synchronisierungszeit wünschen, wenn das System besetzt ist. Optional Um die Protokollierung zu aktivieren, aktivieren Sie das Konsolenfenster. Shutdown Tab. To sicherzustellen Die Synchronisierung wird ordnungsgemäß ausgeschaltet und markiert alle Kontrollkästchen und setzt alle Timeouts auf 10000ms. Exit Actions Tab. Set Restart Action to Stop Service oneshot Modus Spezielle Einstellungen sind Verwendet später für die Bearbeitung von Synchronisierungs-Exits, Neustarts und Upgrades. Optional Um das Protokollierungs-Set zu aktivieren Output Stdout in die gewünschte Datei für die Protokollierung Das Feld Error wird automatisch auf die gleiche Datei gesetzt. File Rotation Tab. Optional Legen Sie die Rotationseinstellungen auf Ihre Einstellungen fest Die Installations-Service-Schaltfläche. Um sicherzustellen, dass Syncthing-Exits, Neustarts und Upgrades vom Windows-Service-Manager korrekt abgewickelt werden, sind einige endgültige Einstellungen erforderlich. Führen Sie diese im selben Commant aus. Prompt. nssm set syncthing AppExit Default Exit. nssm set syncthing AppExit 0 Exit. Nssm set syncthing AppExit 3 Restart. nssm set syncthing AppExit 4 Neustart. Starten Sie den Dienst über sc Start Synchronisation in der Befehlszeile. Connect an die Synchronisierungs-Benutzeroberfläche, aktivieren und setzen Sie einen sicheren Benutzernamen und Passwort. Using homebrew. brew installieren syncthing. Follow the Informationen präsentiert von brauen zu autostart Synchronisation mit launchctl. Without homebrew. Copy die Synchronisierung binär die Datei, die Sie öffnen würde, um Synchronisierung in ein Verzeichnis calle starten D bin in Ihrem Home-Verzeichnis i e in home username bin Wenn bin nicht existiert, erstellen it. Open befindet sich in etc macosx-launchd Ersetzen Sie die vier Vorkommen von Benutzer USERNAME mit Ihrem tatsächlichen Home-Verzeichnis location. Copy die Datei zu. Bibliothek LaunchAgents Wenn Sie Schwierigkeiten haben, diesen Standort zu finden, wählen Sie das Menü Gehen im Finder und wählen Sie Gehe zu Ordner und geben Sie dann ein. Bibliothek LaunchAgents Kopieren auf. Bibliothek LaunchAgents benötigen admin Passwort in den meisten Fällen. Log aus und wieder in wieder Oder, wenn Sie sich nicht abmelden wollen, können Sie diesen Befehl in Terminal launchctl load. Note Sie möchten wahrscheinlich deaktivieren Start Browser in der Web-GUI Einstellungen, um zu vermeiden, dass es ein Browser-Fenster bei jeder Anmeldung öffnet, um dann auf den GUI-Typ 127 0 0 1 8384 standardmäßig in Safari. On Ubuntu-like systems. Launch das Programm Startup Applications. Füllen Sie die Form. Name Syncthingmand Pfad zum Synchronisieren Binary - no-browser - home. Using Supervisord. Add die folgenden zu Ihrem Supervisor-Konfigurationsdatei. Die Datei befindet sich bei Debian Ubuntu oder. Using systemd. systemd ist eine Suite von System-Management-Daemons, Bibliotheken und Dienstprogramme als zentrale Verwaltung entwickelt Und Konfigurationsplattform für das Linux-Computer-Betriebssystem Es bietet auch Benutzern die Möglichkeit, Dienste unter der Steuerung des Benutzers mit einer pro-user Systemd-Instanz zu verwalten, so dass Benutzer zu starten, zu stoppen, zu aktivieren und zu deaktivieren ihre eigenen Einheiten Service-Dateien für Systemd werden von Syncthing bereitgestellt und können in etc gefunden werden linux-systemd. You haben zwei primäre Optionen Sie können Syncthing als Systemdienst oder einen Benutzer service. Running Syncthing als Systemdienst sicherstellen, dass Syncthing beim Start ausgeführt wird, auch wenn Der Synchronisierungsbenutzer hat keine aktive Sitzung Da der Systemdienst die Synchronisierung auch ohne aktive Benutzersitzung beibehält, ist es beabsichtigt, auf einem Server verwendet zu werden. Das Ausführen von Synchronisierung als Benutzerdienst stellt sicher, dass Synchronisierung erst nach dem Anmelden des Benutzers gestartet wird Z. B. über den grafischen Anmeldebildschirm oder ssh So soll der Benutzerdienst auf einem Mehrbenutzer-Desktop-Computer verwendet werden. Es vermeidet unnötig laufende Synchronisierungsinstanzen. Several distros einschließlich bogen-linux liefern die benötigten Dienstdateien mit dem Synchronisierungspaket Wenn Ihre Distribution eine Systemd Service-Datei für Syncthing, können Sie Schritt 2 überspringen, wenn Sie entweder den Systemdienst oder den Benutzerdienst einrichten, wie unten beschrieben. Wie kann ich einen Systemdienst einrichten Aßen Sie den Benutzer, der den Dienst ausführen soll, oder wählen Sie eine vorhandene one. Copy die Synchronisierung etc System Synchronisation Datei in den Ladepfad der Systeminstanz. Enable und starten Sie den Service Ersetzen Sie myuser mit dem tatsächlichen Synchronisieren Benutzer nach dem. How zum Einrichten Ein Benutzer service. Create der Benutzer, der den Dienst ausführen sollte, oder wählen Sie eine bestehende Wahrscheinlich ist dies Ihr eigenes Benutzerkonto. Copy die Datei in den Load-Pfad der Benutzer-Instanz Um dies ohne Root-Berechtigungen können Sie nur diesen Ordner verwenden Unter Ihrem Home-Verzeichnis. Enable und starten Sie den Service. Checking der Service-Status. Um zu überprüfen, ob Syncthing läuft ordnungsgemäß können Sie den Status Unterbefehl verwenden, um den Status eines Systems zu überprüfen service. systemd ist eine Suite von grundlegenden Bausteine ​​für ein Linux-System Es Bietet einen System - und Service-Manager, der als PID 1 läuft und den Rest des Systems systemd startet, bietet aggressive Parallelisierungsmöglichkeiten, nutzt Socket - und D-Bus-Aktivierung für Startdienste und bietet On-Demand-Start von Daemons an , Verfolgt Prozesse mit Linux-Kontrollgruppen unterhält Mount - und Automount-Punkte und implementiert eine aufwändige, transaktionsabhängige Dienstleistungs-Steuerungslogik systemd unterstützt SysV - und LSB-Init-Skripte und arbeitet als Ersatz für sysvinit Andere Teile beinhalten einen Protokollierungs-Daemon, Dienstprogramme zu steuern Grundlegende Systemkonfiguration wie Hostname, Datum, Gebietsschema, pflegen eine Liste der angemeldeten Benutzer und das Ausführen von Containern und virtuellen Maschinen, Systemkonten, Laufzeitverzeichnissen und Einstellungen sowie Dämonen zur Verwaltung einfacher Netzwerkkonfiguration, Netzwerkzeitsynchronisation, Protokollweiterleitung und Name resolution. Note Für eine ausführliche Erklärung, warum Arch hat sich zu systemd sehen Sie dieses Forum post. Basic systemctl Nutzung. Der Hauptbefehl verwendet, um introspect und steuern systemd ist systemctl Einige seiner Verwendungen untersuchen den Systemzustand und die Verwaltung des Systems und Services Siehe man systemctl für weitere Details. Sie können alle folgenden systemctl Befehle mit dem - H Benutzer Host swi verwenden Tch, um eine systemd Instanz auf einem Remote-Rechner zu steuern Dies wird SSH verwenden, um eine Verbindung zu der entfernten systemd instance. systemadm ist das offizielle grafische Frontend für systemctl und wird von der systemd-ui package. Plasma Benutzer können systemd-kcm als grafische installieren Fronted für systemctl Nach der Installation wird das Modul unter Systemadministration hinzugefügt. Analyzing der System state. Show Systemstatus using. List running units. List fehlgeschlagene Einheiten. Die verfügbaren Unit-Dateien können in usr lib systemd System und etc System System gesehen werden Hat Vorrang, installierte Einheitsdateien mit. Using-Einheiten. Units können z. B. Dienste, Mount-Punkte, Geräte oder Sockets sein. Wenn Sie systemctl verwenden, müssen Sie in der Regel den vollständigen Namen der Unit-Datei angeben, einschließlich dessen Suffix, zB Dort Sind aber ein paar kurze Formulare bei der Angabe der Einheit in den folgenden systemctl-Befehlen. Wenn Sie das Suffix nicht angeben, wird systemctl annehmen. Zum Beispiel, netctl und sind gleichwertig. Mount poin Ts wird automatisch in die entsprechende Einheit übersetzt werden. Beispielsweise ist die Angabe von Heimat gleichwertig. Ähnlich zu den Mount-Punkten werden die Geräte automatisch in die entsprechende Einheit übersetzt, daher ist die Angabe von dev sda2 gleichbedeutend. Siehe Mann für Details. Hinweis Einige Unit-Namen enthalten Ein Zeichen zB Namensstring bedeutet dies, dass es sich um Instanzen einer Vorlageneinheit handelt, deren aktueller Dateiname nicht den String-Teil enthält, zB String wird als Instanz-ID bezeichnet und ähnelt einem Argument, das an die Template-Unit übergeben wird, wenn es mit dem aufgerufen wird Systemctl Befehl in der Einheit Datei wird es ersetzen die i Spezifizierer. Um genauer zu sein, bevor Sie versuchen, die Vorlage Einheit zu instanziieren, wird systemd tatsächlich nach einer Einheit mit dem genauen Dateinamen suchen, obwohl durch Konvention ein solcher Zusammenstoß nur selten, dh die meisten Einheitsdateien, die ein Zeichen enthalten, sollen Vorlagen sein. Auch wenn eine Vorlageneinheit ohne Instanzkennung aufgerufen wird, wird sie einfach fehlschlagen, da der Spezifizierer nicht su sein kann Bstituted. Most der folgenden Befehle funktionieren auch, wenn mehrere Einheiten angegeben sind, siehe man systemctl für weitere Informationen. Der Schalter kann in Verbindung mit Freigabe deaktiviert und maskieren, um jeweils starten, stoppen oder maskieren sofort das Gerät anstatt Nach dem nächsten boot. A Paket kann Einheiten für verschiedene Zwecke anbieten Wenn Sie gerade ein Paket installiert haben, kann pacman - Qql Paket grep - Fe - e verwendet werden, um zu überprüfen und zu finden. Starten Sie eine Einheit sofort. Stoppen Sie eine Einheit sofort. Ask a Gerät, um seine Konfiguration neu zu laden. Stellen Sie den Status eines Gerätes, einschließlich, ob es läuft oder nicht. Check, ob ein Gerät bereits aktiviert ist oder nicht. Enable ein Gerät, das beim bootup gestartet werden soll. Disable ein Gerät, um nicht zu starten, während bootup. Mask Eine Einheit, um es unmöglich, es zu starten. Show die manuelle Seite mit einer Einheit verbunden ist, muss dies von der Einheit Datei unterstützt werden. Reload systemd Scannen für neue oder geänderte Einheiten. Power management. polkit ist notwendig für Power-Management als unprivilegierter Benutzer Wenn Sie in einem lokalen sind Systemd-logind Benutzer-Session und keine andere Session aktiv ist, werden die folgenden Befehle ohne Root-Berechtigungen funktionieren Wenn nicht beispielsweise, weil ein anderer Benutzer in einem tty angemeldet ist, wird systemd automatisch nach dem Root-Passwort fragen. Schalten Sie das System neu und starten Sie es neu. Schalten Sie das System aus und schalten Sie das System aus. Setzen Sie das System in den Ruhezustand ein. Setzen Sie das System in den Hybrid-Schlaf-Zustand ein oder suspend-to-both. Writing-Unit-Dateien. Die Syntax der systemd s-Unit-Dateien wird von XDG inspiriert Desktop Entry Specification-Dateien, die wiederum von Microsoft Windows-Dateien inspiriert sind Unit-Dateien werden von zwei Standorten geladen Von der niedrigsten bis zur höchsten Priorität sind sie. Usr lib systemd Systemeinheiten, die von installierten Paketen bereitgestellt werden. Etc systemd Systemeinheiten, die vom Systemadministrator installiert werden. Die Lastpfade sind völlig unterschiedlich, wenn sie im Benutzermodus ausgeführt werden. Systemd Einheitsnamen dürfen nur ASCII alphanumerische Zeichen, Unterstriche und Perioden enthalten Alle anderen Zeichen müssen durch C-style x2d Escapes ersetzt werden Siehe man Und man systemd-escape für weitere information. Look an den Einheiten von Ihren Paketen für Beispiele installiert, sowie die annotated Beispiel Abschnitt von man. Tip Kommentare vorangestellt mit kann in Unit-Dateien als auch verwendet werden, aber nur in neuen Zeilen Do Verwenden Sie keine endgültigen Kommentare nach Systemparametern oder das Gerät wird nicht aktiviert. Handhabungsabhängigkeiten. Mit systemd Abhängigkeiten können durch die ordnungsgemäße Gestaltung der Einheitsdateien gelöst werden Der typischste Fall ist, dass die Einheit A die Einheit B benötigt, um vor A zu laufen Wird begonnen In diesem Fall addieren Benötigt B und Nach B zum Unit-Bereich von A Wenn die Abhängigkeit optional ist, fügen Sie hinzu Wants B und After B stattdessen Hinweis, dass Wants and Requires nicht implizieren After meanin G, dass, wenn After nicht angegeben ist, die beiden Einheiten parallel gestartet werden. Dependenzen werden in der Regel auf Dienste und nicht auf Zielen platziert. Zum Beispiel wird von jedem beliebigen Service, der Ihre Netzwerkschnittstellen konfiguriert, gezogen, um so Ihre benutzerdefinierte Einheit zu bestellen, nachdem es ausreichend ist Da ist sowieso gestartet. Service-Typen. Es gibt mehrere verschiedene Start-up-Typen zu berücksichtigen, beim Schreiben einer benutzerdefinierten Service-Datei Dies ist mit dem Typ-Parameter in der Service-Abschnitt gesetzt. Type einfache Standard-Systemd berücksichtigt den Service sofort gestartet werden Der Prozess Darf nicht Gabel verwenden Diese Art nicht verwenden, wenn andere Dienste auf dieser Dienstleistung bestellt werden müssen, es sei denn, es ist eine Steckdose aktiviert. Type forking systemd berücksichtigt den Dienst, der gestartet wurde, sobald die Prozessgabeln und die Eltern verlassen haben. Für klassische Dämonen verwenden diese Art, wenn Sie nicht Wissen, dass es nicht notwendig ist Du solltest auch PIDFile angeben, so dass systemd den Hauptprozess beibehalten kann. Type oneshot Dies ist nützlich für Skripte, die einen einzelnen Job machen a Nd dann beenden Sie können auch RemainAfterExit ja so einstellen, dass systemd den Service nach dem Beenden des Prozesses noch als aktiv betrachtet hat. Typ benachrichtigt identisch mit Typ einfach aber mit der Festlegung, dass der Daemon ein Signal an systemd sendet, wenn es fertig ist Die Referenzimplementierung für diese Benachrichtigung wird durch. Type dbus zur Verfügung gestellt. Der Dienst wird als bereit angesehen, wenn der angegebene Busname auf dem Systembus des DBus angezeigt wird. Typ idle systemd verzögert die Ausführung der Service-Binärdatei, bis alle Aufträge versandt werden. Andere als dieses Verhalten ist sehr ähnlich Um einfach zu schreiben. Siehe die man-Seite für eine ausführlichere Erläuterung der Typ-Werte. Editing zur Verfügung gestellt Einheiten. Um Konflikte mit pacman zu vermeiden, sollten Dateien, die von Paketen bereitgestellt werden, nicht direkt bearbeitet werden Es gibt zwei sichere Möglichkeiten, um eine Einheit ohne Berührung zu ändern Originaldatei erstellen eine neue Einheitsdatei, die die ursprüngliche Einheit überschreibt oder Drop-In-Snippets erstellt, die oben auf die ursprüngliche Einheit angewendet werden. Für beide Methoden müssen Sie re Laden Sie das Gerät nachträglich auf, um Ihre Änderungen zu übernehmen. Dies kann entweder durch Bearbeiten des Gerätes mit Systembearbeitung erfolgen, das das Gerät automatisch neu lädt oder indem Sie alle Einheiten mit dem Laden neu laden. Sie können systemd-delta verwenden, um zu sehen, welche Geräte-Dateien überschrieben oder erweitert wurden und was Genau wurde geändert. Use systemctl Katze Einheit, um den Inhalt einer Einheit Datei und alle zugehörigen Drop-in-Snippets. Syntax Hervorhebung für Systemd Unit-Dateien in Vim kann durch die Installation von vim-systemd. Replacement Unit Dateien aktiviert werden. Um das Gerät zu ersetzen Datei usr lib System-System-Einheit erstellen Sie die Datei etc System-System-Einheit und reenable das Gerät, um die Symlinks zu aktualisieren. Dies öffnet sich usw. System-System-Einheit in Ihrem Editor Kopieren der installierten Version, wenn es noch nicht existiert und automatisch neu lädt es, wenn Sie die Bearbeitung beenden. Hinweis Pacman aktualisiert die Ersatzeinheitsdateien nicht, wenn die Originale aktualisiert werden, so dass diese Methode die Systemwartung schwieriger machen kann. Aus diesem Grund wird der nächste Ansatz empfohlen Op-in files. To erstellen Drop-in-Dateien für die Einheit Datei usr lib System-System-Einheit erstellen Sie das Verzeichnis etc System-System-Einheit d und platzieren Sie Dateien dort zu überschreiben oder neue Optionen hinzufügen systemd wird diese Dateien analysieren und wenden sie oben auf die Original-Einheit. Der einfachste Weg, dies zu tun ist zu laufen. Dies öffnet sich die Datei etc System-System-Einheit in Ihrem Texteditor erstellen, wenn nötig und automatisch lädt das Gerät, wenn Sie fertig bearbeitet. Revert zu Vendor version. To wieder alle Änderungen an Eine Einheit, die mit systemctl edit gemacht wird. Zum Beispiel, wenn Sie einfach eine zusätzliche Abhängigkeit zu einer Einheit hinzufügen möchten, können Sie die folgende Datei erstellen. Ein weiteres Beispiel, um die ExecStart-Direktive für eine Einheit zu ersetzen, die nicht vom Typ ist Oneshot erstellen die folgende Datei. Hinweis, wie ExecStart muss gelöscht werden, bevor sie neu zugewiesen werden 1 Das gleiche gilt für jedes Element, das mehrfach angegeben werden kann, zB OnCalendar für timers. One mehr Beispiel, um automatisch einen Service neu zu starten. Dieser Artikel oder Abschnitt n Eeds Sprache, Wiki-Syntax oder Stil Verbesserungen. Reason Unklar Beschreibung, kopiert eingefügten Inhalt explizit erwähnt Fedora Diskutieren Sie in Talk Systemd Machen Sie Abschnitt Ziele klarer. systemd verwendet Ziele, die einen ähnlichen Zweck wie Runlevels dienen, aber handeln ein wenig anders Jedes Ziel wird stattdessen benannt Von nummeriert und soll einem bestimmten Zweck dienen, mit der Möglichkeit, mehrere gleichzeitig aktiv zu sein. Einige Ziele werden durch das Erben aller Dienste eines anderen Ziels und Hinzufügen zusätzlicher Dienste für sie implementiert. Es gibt Systemdargets, die das imitieren Gemeinsame SystemVinit Runlevels, so können Sie immer noch Ziel Ziel mit dem vertrauten telinit RUNLEVEL Befehl. Get aktuelle Ziele. Das folgende sollte verwendet werden, unter systemd statt laufen runlevel. Create benutzerdefinierte Ziel. Die Runlevels, die eine definierte Bedeutung unter sysvinit dh 0, 1 gehalten , 3, 5 und 6 haben eine 1 1-Mapping mit einem bestimmten System-Ziel Leider gibt es keinen guten Weg, um das gleiche für die Benutzer - Definierte Runlevels wie 2 und 4 Wenn Sie diese nutzen, wird vorgeschlagen, dass Sie ein neues benanntes systemd Ziel als etc System System Ihr Ziel, das eine der vorhandenen Runlevels als Basis, die Sie als Beispiel sehen können, machen ein Verzeichnis Etc System System Ihr Ziel und dann symlink die zusätzlichen Dienste aus usr lib System System, das Sie aktivieren möchten. Targets table. Change aktuellen Ziel. In Systemd Ziele werden über Zieleinheiten ausgesetzt Sie können sie wie diese ändern. Dies wird nur die aktuelle ändern Ziel und hat keine Auswirkung auf den nächsten Boot Dies ist gleichbedeutend mit Befehlen wie telinit 3 oder telinit 5 in Sysvinit. Change Default-Ziel zum Booten in die Standard-Ziel ist, die standardmäßig standardisiert ist, die grob entspricht dem alten Runlevel 5 Um das Standardziel beim Booten zu ändern, fügen Sie einen der folgenden Kernelparameter an Ihren Bootloader an. Die in etwa dem alten Runlevel 3. entspricht, der etwa dem alten Runlevel entspricht 1.Alternativ können Sie den Bootloader alleine verlassen und ändern. Dies kann mit systemctl durchgeführt werden. Um die vorher eingestellte Verwendung der Kraftoption zu überschreiben, ist der Effekt Dieses Befehls wird von systemctl ausgegeben, ein symlink zum neuen Standardziel wird gemacht. Systemd-tmpfiles erstellt, löscht und reinigt flüchtige und temporäre Dateien und Verzeichnisse Es liest Konfigurationsdateien in etc tmpfiles d und usr lib tmpfiles d, um herauszufinden, welche Aktionen zum Ausführen von Konfigurationsdateien im früheren Verzeichnis Vorrang vor denen im letzteren Verzeichnis haben. Konfiguration Dateien sind in der Regel zusammen mit Service-Dateien zur Verfügung gestellt, und sie sind im Stil von usr lib tmpfiles d Programm benannt Zum Beispiel der Samba-Daemon erwartet das Verzeichnis laufen Samba zu existieren und die richtigen Berechtigungen haben Daher wird das Samba-Paket mit dieser Konfiguration versendet. Konfigurationsdateien können auch verwendet werden, um Werte in bestimmte Dateien beim Booten zu schreiben. Wenn Sie zum Beispiel das Wecken von USB-Geräten mit echo USBE proc acpi wakeup deaktivieren, können Sie stattdessen das folgende tmpfile verwenden. Siehe die systemd-tmpfiles 8 und tmpfiles d 5 man pages für details. Note Diese Methode funktioniert möglicherweise nicht, um Optionen in sys einzustellen, da der systemd-tmpfiles-setup-Dienst vor dem entsprechenden dev ausgeführt werden kann Eismodule geladen In diesem Fall können Sie überprüfen, ob das Modul einen Parameter für die Option hat, die Sie mit modinfo Modul einstellen möchten, und setzen Sie diese Option mit einer Konfigurationsdatei in etc modprobe d. Andernfalls müssen Sie eine udev Regel schreiben, um die Wenn das Gerät angezeigt wird. Ein Timer ist eine Einheitskonfigurationsdatei, deren Name endet und codiert Informationen über einen Timer gesteuert und überwacht von systemd für die zeitgesteuerte Aktivierung Siehe systemd Timers. Since systemd ist ein Ersatz für System V init, Es ist zuständig für die in usw enthaltenen montierungen fstab In der Tat geht es über die üblichen fstab-fähigkeiten hinaus und implementiert spezielle montageoptionen, die mit x-systemd vorangestellt sind. Siehe Fstab Automount mit systemd für ein Beispiel der automounting Montage auf Anfrage mit diesen Erweiterungen Siehe 2 Für die vollständige dokumentation dieser extensions. systemd hat ein eigenes logging-system namens journal daher, läuft ein syslog-daemon ist nicht mehr erforderlich Um das log zu lesen, verwenden Linux, das Verzeichnis var log Journal ist ein Teil des Systemd-Pakets, und das Journal, wenn Storage auf Auto eingestellt ist, schreibt in var log Journal Wenn Sie oder ein Programm dieses Verzeichnis löschen, wird systemd es nicht automatisch neu erstellen und stattdessen schreiben Seine Protokolle, um Systemd Journal in einer nicht-persistenten Weise laufen. Allerdings wird der Ordner neu erstellt werden, wenn Sie Storage persistent und führen Systemctl restart systemd-journald oder reboot. Systemd Journal klassifiziert Nachrichten nach Priority Level und Facility Logging Klassifizierung entspricht klassischen Syslog-Protokoll RFC 5424.Priority Level. Syslog Schweregrad Code in Systemd genannt Priorität verwendet wird, um die Bedeutung einer Nachricht markieren RFC 5424 Abschnitt 6 2 1.So, nützliche Einrichtungen zu sehen, 0,1,3,4,9,10,15.Filtering Ausgabe. journalctl ermöglicht es Ihnen, die Ausgabe durch bestimmte Felder zu filtern. Beachten Sie, dass, wenn es viele Meldungen gibt, um eine große Zeitspanne anzuzeigen oder zu filtern, die Ausgabe dieses Befehls für einige Zeit verzögert werden kann. Tip Während das Journal in einem Binärformat gespeichert ist, wird der Inhalt der gespeicherten Nachrichten nicht modifiziert. Dies bedeutet, dass es mit Zeichenfolgen zum Beispiel für die Wiederherstellung in einer Umgebung sichtbar ist, die nicht systemd installiert hat. Beispielbefehl. Zeigen Sie alle Nachrichten von diesem Boot an Man interessiert sich für nicht aus dem aktuellen, aber aus dem vorherigen boot zB wenn ein nicht behebbarer systemcrash passiert Dies ist möglich durch optionale versatzparameter des - b flag journalctl - b -0 zeigt meldungen aus dem aktuellen boot, journalctl - b - 1 von der vorherigen boot, journalctl - b -2 aus dem zweiten vorherigen und so weiter Siehe man 1 journalctl für die vollständige Beschreibung, die semantik ist viel mächtiger. Show alle Nachrichten vom Datum und optional time. Show alle Nachrichten seit 20 Minuten vor. Folgen Sie neuen Nachrichten. Show alle Nachrichten durch eine bestimmte ausführbare Datei. Show alle Nachrichten von einem bestimmten Prozess. Show alle Nachrichten von einer bestimmten unit. Show Kernel Ring Puffer. Show nur Fehler, kritische und Alert Priorität Nachrichten Zahlen können auch verwendet werden, journalctl - p 3 1 Wenn Single-Number-Keyword verwendet, journalctl - p 3 - alle höheren Priorität Ebenen auch enthalten. Show Äquivalent durch Filtern auf syslog facility. See Mann 1 journalctl Mann 7 oder Lennart s Blog-Post für Details. Tip Standardmäßig schneidet journalctl Zeilen länger als die Bildschirmbreite, aber in manchen Fällen kann es besser sein, das Wrapping anstelle von Trunkierung zu aktivieren. Dies kann durch die Umgebungsvariable SYSTEMDLESS gesteuert werden, die Optionen enthält, die an den Standard-Pager weitergegeben werden und auf FRSXMK zurückgesetzt werden Sehen Sie Mann 1 weniger und Mann 1 journalctl für Details. Wenn Sie die S-Option auslassen, wird die Ausgabe anstatt abgeschnitten verpackt. Zum Beispiel starten Sie journalctl wie folgt. Wenn Sie dieses Verhalten als Standard setzen möchten, exportieren Sie die Variable aus. Journal Größenbegrenzung. Wenn das Journal persistent nicht flüchtig ist, wird sein Größenlimit auf einen Standardwert von 10 der Größe des zugrunde liegenden Dateisystems gesetzt, aber auf 4 GiB gekappt. Zum Beispiel mit dem var log Journal auf einem 20 GiB p Artition, Journal-Daten können bis zu 2 GiB auf einer 50-GiB-Partition, es wäre max bei 4 GiB. Die maximale Größe der persistenten Zeitschrift kann durch die Unkommentation und Änderung der folgenden kontrolliert werden. Es ist auch möglich, die Drop-in verwenden Snippets-Konfigurations-Override-Mechanismus anstatt die globale Konfigurationsdatei zu bearbeiten In diesem Fall vergessen Sie nicht, die Overrides unter dem Journal-Header zu platzieren. Sehen Sie den Mann für weitere info. Clean Journal-Dateien manuell. Journal-Dateien können global entfernt werden aus var log Journal mit zB rm Oder kann nach verschiedenen Kriterien mit journalctl Beispiele getrimmt werden. Entfernen archivierte Journal-Dateien, bis der Speicherplatz, den sie verwenden, unter 100M. Make alle Journal-Dateien enthalten keine Daten älter als 2 Wochen. Sie Mann journalctl für mehr info. Journald in Verbindung mit syslogpatibility Mit einer klassischen, nicht-journald bewussten syslog-Implementierung kann bereitgestellt werden, indem sie systemd alle Nachrichten über das Socket-Run-System-Journal-Syslog weiterleiten Um den Syslog-Daemon zu arbeiten Die Zeitschrift, muss es an diese Steckdose anstelle von dev log offiziellen Ankündigung binden. Der Standard für die Weiterleitung an den Socket ist ForwardToSyslog nein, um System Overhead zu vermeiden, weil rsyslog oder syslog-ng ziehen die Nachrichten aus dem Journal von sich selbst. Forward journald to Dev tty12.Create ein Drop-In-Verzeichnis und erstellen Sie eine Datei in it. Specify ein anderes Journal zu sehen. Es kann eine Notwendigkeit, die Protokolle eines anderen Systems, das im Wasser tot ist, wie das Booten von einem Live-System zu erholen Ein Produktionssystem In einem solchen Fall kann man die Festplatte in zB mnt montieren und den Journalpfad über - D - Directory wie so angeben. Tips und Tricks. Enable installierte Einheiten standardmäßig. This Artikel oder Abschnitt benötigt expansion. Reason Wie funktioniert es Arbeit mit instanziierten Einheiten Diskutieren Sie in Talk Systemd. Arch Linux-Ships mit mit disable Dies bewirkt, dass systemctl Preset alle Einheiten standardmäßig deaktiviert, so dass, wenn ein neues Paket installiert ist, der Benutzer das Gerät manuell aktivieren muss. Wenn dieses Verhalten nicht erwünscht ist, Einfach Y einen Symlink von zu null erstellen, um die Konfigurationsdatei zu überschreiben. Dies führt dazu, dass systemcl Preset alle Einheiten aktiviert, die unabhängig vom Gerätetyp installiert werden, es sei denn, in einer anderen Datei in einem Systemctl Preset s Konfigurationsverzeichnisse angegeben Benutzereinheiten sind nicht betroffen Manpage for for more information. Note Wenn Sie alle Einheiten standardmäßig aktivieren, können Probleme mit Paketen auftreten, die zwei oder mehrere sich gegenseitig ausschließende Einheiten enthalten. Systemctl preset ist so ausgelegt, dass sie von Distributionen und Spins oder Systemadministratoren verwendet wird. Falls zwei gegensätzliche Einheiten aktiviert würden, Sie sollten explizit angeben, welche in einer voreingestellten Konfigurationsdatei deaktiviert werden soll, wie in der Manpage für. Sandboxing-Anwendungsumgebungen angegeben. Eine Einheitsdatei kann als Sandbox erstellt werden, um Anwendungen und ihre Prozesse in einer gehärteten virtuellen Umgebung zu isolieren. Systemd nutzt Namespaces weiß - Blacklisting von Fähigkeiten und Kontrollgruppen zu Containerprozessen durch eine Exten Die Erweiterung einer vorhandenen Systemdatendatei mit Anwendungssandboxen erfordert typischerweise Test-und-Fehler-Tests, begleitet von der großzügigen Verwendung von strace stderr und journalctl Fehlerprotokollierung und Ausgabeeinrichtungen. Sie können zuerst die Upstream-Dokumentation für bereits getätigte suchen Tests zu Basisprozessen auf. Einige Beispiele, wie Sandboxing mit systemd implementiert werden kann. CapabilityBoundingSet definiert eine Whitelist Reihe von erlaubten Fähigkeiten, sondern kann auch verwendet werden, um Blacklist eine spezifische Fähigkeit für eine Einheit. Die CAPSYSADM-Fähigkeit, zum Beispiel, die sein sollte Eines der Ziele eines sicheren Sandkastens CapabilityBoundingSet. Unbound Sandboxing zeigt ein umfangreiches Beispiel für System-Features für Sandboxing. Investigating systemd errors. As ein Beispiel werden wir einen Fehler mit systemd-modules-load service.1 Lets finden die systemd Dienstleistungen, die nicht anfangen.2 Ok, wir haben ein Problem mit systemd-modules-load Service gefunden Wir wollen mehr wissen. Wenn die Proce Ss ID ist nicht aufgelistet, startet einfach den fehlgeschlagenen Service mit systemctl restart systemd-modules-load.3 Jetzt haben wir die Prozess-ID PID, um diesen Fehler in der Tiefe zu untersuchen Geben Sie den folgenden Befehl mit der aktuellen Prozess-ID hier ein 15630.4 Wir sehen, dass einige von Die kernel module configs haben falsche Einstellungen Also haben wir einen Blick auf diese Einstellungen in etc Module-load d.5 Die fehlgeschlagen zu finden Modul Blacklist Usblp Fehlermeldung könnte auf eine falsche Einstellung innerhalb von Lets Deaktivieren Sie es mit Einfügen einer Schleppvorgang vor jeder Option, die wir über Schritt 3.6 gefunden haben. Versuchen Sie nun, systemd-modules-load zu starten. Wenn es erfolgreich war, sollte dies nichts auffordern. Wenn Sie einen Fehler sehen, gehen Sie zurück zu Schritt 3 und verwenden Sie die neue PID für die Lösung der Fehler left. If everything is ok, you can verify that the service was started successfully with. Often you can solve these kind of problems like shown above For further investigation look at Diagnosing boot problems. Diagnosing boot problems. systemd has several options for diagn osing problems with the boot process See boot debugging and the systemd debugging documentation. Diagnosing problems with a specific service. The factual accuracy of this article or section is disputed. Reason This may not catch all errors such as missing libraries Discuss in User talk Alucryd Plex. If some systemd service misbehaves and you want to get more information about what is going on, set the SYSTEMDLOGLEVEL environment variable to debug For example, to run the systemd-networkd daemon in debug mode. Or, equivalently, modify the service file temporarily for gathering enough output For example. If debug information is required long-term, add the variable the regular way. Shutdown reboot takes terribly long. If the shutdown process takes a very long time or seems to freeze most likely a service not exiting is to blame systemd waits some time for each service to exit before trying to kill it To find out if you are affected, see this article. Short lived processes do not seem to log any out put. If journalctl - u foounit does not show any output for a short lived service, look at the PID instead For example, if fails, and systemctl status systemd-modules-load shows that it ran as PID 123, then you might be able to see output in the journal for that PID, i e journalctl - b PID 123 Metadata fields for the journal such as SYSTEMDUNIT and COMM are collected asynchronously and rely on the proc directory for the process existing Fixing this requires fixing the kernel to provide this data via a socket connection, similar to SCMCREDENTIALS. Boot time increasing over time. After using systemd-analyze a number of users have noticed that their boot time has increased significantly in comparison with what it used to be After using systemd-analyze blame NetworkManager is being reported as taking an unusually large amount of time to start. The problem for some users has been due to var log journal becoming too large This may have other impacts on performance, such as for systemctl status or journalctl As such the solution is to remove every file within the folder ideally making a backup of it somewhere, at least temporarily and then setting a journal file size limit as described in Journal size limit. fails to start at boot. Starting with systemd 219, specifies ACL attributes for directories under var log journal and, therefore, requires ACL support to be enabled for the filesystem the journal resides on. See Access Control Lists Enabling ACL for instructions on how to enable ACL on the filesystem that houses var log journal. systemctl enable fails for symlinks in etc systemd system. If etc systemd system foo is a symlink and systemctl enable foo is run, it will fail with this error. This is a design choice of systemd As a workaround, enabling by absolute path works. dependent services are not started when starting a service manually. This section is being considered for removal. One in famous example is which needs the to function properly. The dependencies in are defined as. This only defines the necessary dependent sockets to be enabled services i e as autostart , too - but does not start them whenever the DISABLED non-autostarting service ist started manually e g by running systemctl star t libvirtd. Thus the correct way to manually start a service with dependent subservices once instead of at each start of the system probably is. systemd version printed on boot is not the same as installed package version. You need to regenerate your initramfs and the versions should match. Tip A pacman hook can be used to automatically regenerate the initramfs every time systemd is upgraded See this forum thread and Pacman Hooks. Soon enough, hardly any Linux user will be able to escape the ever growing grasp that systemd imposes on Linux, unless they manually opt out systemd has created more technical, emotional, and social issues than any other piece of software as of late This predominantly came to show in the heated discussions also dubbed as the Init Wars , that occupied parts of the Debian developer body for months While the Debian Technical Comittee finally decided to include systemd in Debian 8 Jessie , there were efforts to supersede the decision by a General Resolution, and even threats to the health of developers in favor of systemd. This goes to show how deep systemd interferes with the way of handling Linux systems that has, in large parts, been passed down to us from the Unix days Theorems like one tool for the job are overthrown by the new kid in town Besides substituting sysvinit as init system, it digs deep into system administration For right now a lot of the commands you are used to will keep on working due to the compatibility layer provided by the package systemd-sysv That might change as soon as systemd 214 is uploaded to Debian, destined to be released in the stable branch with Debian 8 Jessie From thereon, users need to utilize the new commands that come with systemd for managing services, processes, switching run levels, and querying the logging system A workaround is to set up aliases in. So let s have a look at how systemd will change your habits of administrating your computers and the pros and cons involved Before making the switch to systemd it is a good security measure to save the old sysvinit to be able to still boot, should systemd fail This will only work as long as systemd-sysv is not yet installed, and can be easily obtained by running. cp - av sbin init. Thusly prepared, in case of emergency, just append. to the kernel boot-time parameters. Basic Usage of systemctl. systemctl is the command that substitutes the old etc init d foo start stop , but also does a lot more, as you can learn from its man page. Some basic use-cases are. systemctl - list all loaded units and their state where unit is the term for a job service. systemctl list-units - list all units. systemctl start NAME - start activate one or more units. systemctl stop NAME - stop deactivate one or more units. systemctl disable NAME - disable one or more unit files. systemctl list-unit-files - show all installed unit files and their state. systemctl --failed - show which units failed during boot. systemctl --type mount - filter for types types could be service, mount, device, socket, target. systemctl enable - start a root shell on TTY 9 for debugging. For more convinience in handling units, there is the package systemd-ui which is started as user with the command systemadm. Switching runlevels, reboot and shutdown are also handled by systemctl. systemctl isolate - take you to what you know as init 5, where your X-server runs. systemctl isolate - take you to what you know as init 3, TTY, no X. systemctl reboot - shut down and reboot the system. systemctl poweroff - shut down the system. All these commands, other than the ones for switching runlevels, can be executed as normal user. Basic Usage of journalctl. systemd does not only boot machines faster than the old init system, it also starts logging much earlier, including messages from the kernel initialization phase, the initial RAM disk, the early boot logic, and the main system runtime So the days where you needed to use a camera to provide the output of a kernel panic or otherwise stalled system for debugging are mostly over. With systemd logs are aggregated in the journal which resides in var log To be able to make full use of the journal, we first need to set it up, as Debian does not do that for you yet. addgroup --system systemd-journal mkdir - p var log journal chown root systemd-journal var log journal gpasswd - a user systemd-journal. That will set up the journal in a way where you can query it as normal user Querying the journal with journalctl offers some advantages over the way syslog works. journalctl --all - show the full journal of the system and all its users. journalctl - f - show a live view of the journal equivalent to tail - f var log messages. journalctl - b - show the log since the last boot. journalctl - k - b -1 - show all kernel logs from the boot before last - b -1.journalctl - b - p err - shows the log of the last boot, limited to the priority ERROR. journalctl --since yesterday - since Linux people normally do not often reboot, this limits the size more than - b would. journalctl - u --since 2014-07-06 07 00 --until 2014-07-06 08 23 - show the log for cron for a defined timeframe. journalctl - p 2 --since today - show the log for priority 2, which covers emerg, alert and crit resembl es syslog priorities emerg 0 , alert 1 , crit 2 , err 3 , warning 4 , notice 5 , info 6 , debug 7.journalctl - copy the binary journal as text into your current directory. Journal and syslog can work side-by-side On the other hand, you can remove any syslog packages like rsyslog or syslog-ng once you are satisfied with the way the journal works. For very detailed output, append to the kernel boot-time parameter list, and then run. Log levels can also be edited in. Analyzing the Boot Process with systemd. systemd allows you to effectively analyze and optimize your boot process. systemd-analyze - show how long the last boot took for kernel and userspace. systemd-analyze blame - show details of how long each service took to start. systemd-analyze critical-chain - print a tree of the time-critical chain of units. systemd-analyze dot dot - Tsvg - put a vector graphic of your boot process requires graphviz package. systemd-analyze plot - generate a graphical timechart of the boot process. systemd has pr etty good documentation for such a young project under heavy developement First of all, there is the 0pointer series by Lennart Poettering The series is highly technical and quite verbose, and holds a wealth of information Another good source is the distro agnostic Freedesktop info page with the largest collection of links to systemd resources, distro specific pages, bugtrackers and documentation A quick glance at. will give you an overview of all systemd man pages The command structure for systemd for various distributions is pretty much the same, differences are found mainly in the packaging. Subscribe to Xmodulo. Do you want to receive Linux FAQs, detailed tutorials and tips published at Xmodulo Enter your email address below, and we will deliver our Linux posts straight to your email box, for free Delivery powered by Google Feedburner. Support Xmodulo. Did you find this tutorial helpful Then please be generous and support Xmodulo. Ferdinand Thommes. I live as linux developer, technical au thor and city guide in Berlin, Germany and Charleston S C Other than being nerdy I dig riding bicycles and love cooking and good literature. The D-Bus API of systemd PID 1.systemd and its auxiliary daemons expose a number of APIs on D-Bus The following describes the various APIs exposed by the system and service manager itself, and does not cover the auxiliary daemons. The service manager exposes a number of objects on the bus one manager object as central entry point for clients and individual objects for each unit and for each queued job The unit objects each implement a generic Unit interface plus a type-specific interface For example, service units implement as well as The manager object can be used to list unit and job objects, or to directly convert a unit name or job id into a bus path of the corresponding D-Bus objects. Note that properties exposing time values are usually encoded in microseconds usec on the bus, even if their corresponding settings in the unit files are in second s. In contrast to most of the other services of the systemd suite PID 1 does not use PolicyKit for controlling access to privileged operations, but relies exclusively on the low-level D-Bus policy language This is done in order to avoid a cyclic dependency between PolicyKit and systemd PID 1 This means that sensitive operations exposed by PID 1 on the bus are generally not available to unprivileged processes directly However some such as shutdown reboot suspend are made available via logind s interfaces. The Manager Object. The main entry point object is available on the fixed org freedesktop systemd1 object path. Read access is generally granted to all clients, but changes may only be made by privileged clients PolicyKit is not used by this service, and access controlled exclusively via the D-Bus policy enforcement. Note that many of the calls exist twice once on the Manager object, and once on the respective unit objects This is to optimize access times so that methods that belong to unit objects do not have to be called with a resolved unit path, but can be called with only the unit id, too. GetUnit may be used to get the unit object path for a unit name It takes the unit name and returns the object path If a unit has not been loaded yet by this name this call will fail. GetUnitByPID may be used to get the unit object path of the unit a process ID belongs to Takes a Unix PID and returns the object path The PID must refer to an existing process of the system. LoadUnit is similar to GetUnit but will load the unit from disk if possible. StartUnit enqeues a start job, and possibly depending jobs Takes the unit to activate, plus a mode string The mode needs to be one of replace, fail, isolate, ignore-dependencies, ignore-requirements If replace the call will start the unit and its dependencies, possibly replacing already queued jobs that conflict with this If fail the call will start the unit and its dependencies, but will fail if this would change an already queued job If iso late the call will start the unit in question and terminate all units that aren t dependencies of it If ignore-dependencies it will start a unit but ignore all its dependencies If ignore-requirements it will start a unit but only ignore the requirement dependencies It is not recommended to make use of the latter two options Returns the newly created job object. StartUnitReplace is similar to StartUnit but replaces a job that is queued for one unit by a job for another. StopUnit is similar to StartUnit but stops the specified unit rather than starting it Note that isolate mode is invalid for this call. ReloadUnit RestartUnit TryRestartUnit ReloadOrRestartUnit ReloadOrTryRestartUnit may be used to restart and or reload a unit, and takes similar arguments as StartUnit Reloading is done only if the unit is already running and fails otherwise If a service is restarted that isn t running it will be started, unless the Try flavor is used in which case a service that isn t running is not affected by the restart The ReloadOrRestart flavors attempt a reload if the unit supports it and use a restart otherwise. KillUnit may be used to kill i e send a signal to all processes of a unit Takes the unit name, an enum who and a UNIX signal number to send The who enum is one of main , control or all If main , only the main process of a unit is killed If control only the control process of the unit is killed, if all all processes are killed A control process is for example a process that is configured via ExecStop and is spawned in parallel to the main daemon process, in order to shut it down. GetJob returns the job object path for a specific job, identified by its id. CancelJob cancels a specific job identified by its numer ID This operation is also available in the Cancel method of Job objects see below , and exists primarily to reduce the necessary round trips to execute this operation Note that this will not have any effect on jobs whose execution has already begun. ClearJobs flushes the job queue, removing all jobs that are still queued Note that this does not have any effect on jobs whose execution has already begun, it only flushes jobs that are queued and have not yet begun execution. ResetFailedUnit resets the failed state of a specific unit. ResetFailed resets the failed state of all units. ListUnits returns an array with all currently loaded units Note that units may be known by multiple names at the same name, and hence there might be more unit names loaded than actual units behind them The array consists of structures with the following elements. The primary unit name as string. The human readable description string. The load state i e whether the unit file has been loaded successfully. The active state i e whether the unit is currently started or not. The sub state a more fine-grained version of the active state that is specific to the unit type, which the active state is not. A unit that is being followed in its state by this unit, if there is any, otherwise the empt y string. The unit object path. If there is a job queued for the job unit the numeric job id, 0 otherwise. The job type as string. The job object path. ListJobs returns an array with all currently queued jobs Returns an array consisting of structures with the following elements. The numeric job id. The primary unit name for this job. The job type as string. The job state as string. The job object path. The unit object path. Subscribe enables most bus signals to be sent out Clients which are interested in signals need to call this function Signals are only sent out if at least one client invoked this function Unsubscribe undoes the signal subscription that Subscribe implements It is not necessary to invoke Unsubscribe as clients are tracked Signals are no longer sent out as soon as all clients which previously asked for Subscribe either closed the bus connection or invoked Unsubscribe. CreateSnapshot creates a snapshot unit for the current system state, and stores it under the specified name It will return the unit object path to the new snapshot If the cleanup boolean is true the snapshot will be removed automatically when it has been activated, otherwise it remains and can be activated multiple times Snapshots are not persistent. RemoveSnapshot removes a snapshot This call is also available in the Remove method of Snapshot objects see below , and exists primarily to reduce the number of required roundtrips for this call. Reload may be invoked to reload all unit files. Reexecute may be invoked to reexecute the main manager process It will serialize its state, reexecute, and deserizalize the state again This is useful for upgrades and is a more comprehensive version of Reload. Exit may be invoked to ask the manager to exit This is not available for the system manager and is useful only for user session managers. Reboot PowerOff Halt KExec may be used to ask for immediate reboot, powering down, halt or kexec based reboot of the system Note that this does not shut down any services and immediately transitions into the reboot process These functions are normally only called as last step of shutdown, and should not be called directly To shut down the machine it is a much better choice generally to invoke Reboot and PoweOff on the logind manager object See On logind for more information. SwitchRoot may be used to transition to a new root directory This is intended to be used by initial RAM disks The call takes two arguments the new root directory which needs to be specified , plus an init binary path which may be left empty, in which case it is automatically searched for The state of the system manager will be serialized before the transition After the transition the manager binary on the main system is invoked and replaces the old PID 1 All state will then be deserialized. SetEnvironment may be used to alter the environment block that is passed to all spawned processes Takes a string array with environment variable assignments Settings passed will override previously set variables. UnsetEnvironment may be used to unset environment variables Takes a string array with environment variable names All variables specified will be unset if they have been set previously and no longer be passed to all spawned processes This call has no effect for variables that were previously not set, but will not fail in that case. UnsetAndSetEnvironment is a combination of UnsetEnvironment and SetEnvironment It takes two lists The first one is a list of variables to unset, the second one of assignments to set If a variable is listed in both the variable is set after this call, i e the set list overrides the unset list. ListUnitFiles returns an array of unit names plus their enablement status Note that ListUnit returns a list of units currently loaded into memory, while ListUnitFiles returns a list of unit files that could be found on disk Note that while most units are read directly from a unit file with the same name some units are not backed by files, and some files template s cannot directly be loaded as units but need to be instantiated. GetUnitFileState returns the current enablement status of specific unit file. EnableUnitFiles may be used to enable one or more units in the system by creating symlinks to them in etc or run It takes a list of unit files to enable either just file names or full absolute paths if the unit files are residing outside the usual unit search paths , and two booleans the first controls whether the unit shall be enabled for runtime only true, run , or persistently false, etc The second one controls whether symlinks pointing to other units shall be replaced if necessary This call returns one boolean and an array with the changes made The boolean signals whether the unit files contained any enablement information i e an Install section The changes list consists of structures with three strings the type of the change one of symlink or unlink , the file name of the symlink and the destination of the symlink Note that most of the follo wing calls return a changes list in the same format. Similar, DisableUnitFiles disables one or more units in the system, i e removes all symlinks to them in etc and run. Similar, ReenableUnitFiles applies the changes to one or more units that would result from disabling and enabling the unit quickly one after the other in an atomic fashion This is useful to apply updated Install information contained in unit files. Similar, LinkUnitFiles links unit files that are located outside of the usual unit search paths into the unit search path. Similar, PresetUnitFiles enables disables one or more units file according to the preset policy See Presets for more information. Similar, MaskUnitFiles masks unit files, and UnmaskUnitFiles unmasks them again. SetDefaultTarget changes the link See bootup 7 for more information. GetDefaultTarget retrieves the name of the unit to which is aliased. SetUnitProperties may be used to modify certain unit properties at runtime Not all properties may be changed at runti me, but many resource management settings primarily those in may The changes are applied instantly, and stored on disk for future boots, unless runtime is true, in which case the settings only apply until the next reboot name is the name of the unit to modify properties are the settings to set, encoded as an array of property name and value pairs Note that this is not a dictionary Note that when setting array properties with this call this usually results in appending to the pre-configured array To reset the configured arrays set the property to an empty array first, then append to it. StartTransientUnit may be used to create and start a transient unit, which will be released as soon as it is not running or referenced anymore or the system is rebooted name is the unit name including suffix, and must be unique mode is the same as in StartUnit properties contains properties of the unit, specified like in SetUnitProperties aux is currently unused and should be passed as empty array See the New Control Group Interfaces for more information how to make use of this functionality for resource control purposes. Note that most signals are sent out only after Subscribe has been invoked by at least one client Make sure to invoke this call when subscribing to these signals. UnitNew and UnitRemoved are sent out each time a new unit is loaded or unloaded Note that this has little to do with whether a unit is available on disk or not, and simply reflects the units that are currently loaded into memory The signals take two parameters the primary unit name and the object path. JobNew and JobRemoved are sent out each time a new job is queued or dequeued Both signals take the numeric job ID, the bus path and the primary unit name for this job as argument JobRemoved also includes a result string, being one of done canceled timeout failed dependency skipped done indicates successful execution of a job canceled indicates that a job has been canceled via CancelJob above before it finished exe cution this doesn t necessarily mean though that the job operation is actually cancelled too, see above timeout indicates that the job timeout was reached failed indicates that the job failed dependency indicates that a job this job has been depending on failed and the job hence has been removed too skipped indicates that a job was skipped because it didn t apply to the units current state. StartupFinished is sent out when startup finished It carries six usec timespan values each indicating how much boot time has been spent in the firmware if known , in the boot loader if known , in the kernel initialization phase, in the initrd if known , in userspace and in total These values may also be calculated from the FirmwareTimestampMonotonic, LoaderTimestampMonotonic, InitRDTimestampMonotonic, UserspaceTimestampMonotonic, FinishTimestampMonotonic properties see below. UnitFilesChanged is sent out each time the list of enabled or masked unit files on disk have changed. Reloading is sent out imme diately before a daemon reload is done with the boolean parameter set to True and after a daemon reload is completed with the boolean parameter set to False This may be used by UIs to optimize UI updates. Most properties simply reflect the respective options in and the kernel command line The others. Version encodes the version string of the running systemd instance Note that the version string is purely informational, it should not be parsed, one may not assume the version to be formatted in any particular way We take the liberty to change the versioning scheme at any time and it is not part of the API. Features encodes the features that have been enabled resp disabled for this build Enabled options are prefixed with , disabled options with. Tainted encodes a couple of taint flags, as colon separated list When systemd detects it is run on a system with certain problems it will set an appropriate taint flag Taints may be used to lower the chance of bogus bug reports The following taints ar e currently known split-usr mtab-not-symlink cgroups-missing local-hwclock split-usr is set if usr is not pre-mounted when systemd is first invoked See Booting Without usr is Broken for details why this is bad mtab-not-symlink indicates that etc mtab is not a symlink to proc self mounts as required cgroups-missing indicates that control groups have not been enabled in the kernel local-hwclock indicates that the local RTC is configured to be in local time rather than UTC. FirmwareTimestamp FirmwareTimestampMonotonic LoaderTimestamp LoaderTimestampMonotonic KernelTimestamp KernelTimestampMonotonic InitRDTimestamp InitRDTimestampMonotonic UserspaceTimestamp UserspaceTimestampMonotonic FinishTimestamp FinishTimestampMonotonic encode CLOCKREALTIME resp CLOCKMONOTONIC usec timestamps taken when the firmware first began execution, when the boot loader first began execution, when the kernel first began execution, when the initrd first began execution, when the main systemd instance began execut ion and finally, when all queued startup jobs finished execution These values are useful for determining boot-time performance Note that as monotonic time begins with the kernel startup the KernelTimestampMonotonic timestamp will always be 0, and FirmwareTimestampMonotonic and LoaderTimestampMonotonic are to be read as negative values Also, not all fields are available, depending on the used firmware, boot loader or initrd implementation In these cases the resp pairs of timestamps are both 0, indicating that no data is available. Similar, the SecurityStartTimestamp GeneratorsStartTimestamp and LoadUnitTimestamp plus their monotonic and stop counterparts expose performance data for uploading the security policies to the kernel such as the SELinux, IMA, or SMACK policies , for running the generator tools and for loading the unit files. NNames encodes how many unit names are currently known This only includes names of units that are currently loaded and can be more than actually loaded unit s since units may have more than one name. NJobs encodes how many jobs are currently queued. NInstalledJobs encodes how many jobs have ever been queued in total. NFailedJobs encodes how many jobs have ever failed in total. Progress encodes boot progress as floating point value between 0 0 and 1 0 This value begins at 0 0 at early-boot and ends at 1 0 when boot is finished and is based on the number of executed and queued jobs After startup this field is always 1 0 indicating a finished boot. Environment encodes the environment block passed to all executed services It may be altered with bus calls such as SetEnvironment see above. UnitPath encodes the currently active unit file search path It is an array of strings, each being one file system path. Virtualization contains a short ID string describing the virtualization technology the system runs in On bare-metal hardware this is the empty string, otherwise an identifier such as kvm , vmware and so on For a full list of IDs see systemd-detect-v irt 1 Note that only the innermost virtualization technology is exported here This detects both full-machine virtualizations VMs and shared-kernel virtualization containers. Architecture contains a short ID string describing the architecture the systemd instance is running on This follows the same vocabulary as ConditionArchitectures. ControlGroup contains the root control group path of this system manager Note that the root path is encoded as empty string here not as , so that it can be appended to sys fs cgroup systemd easily This value will be set to the empty string for the host instance, and some other string for container instances. Unit Objects. All Unit objects implement the generic interface Depending on the unit type they also implement one unit-type-specific interface, as described below. Start Stop Reload Restart TryRestart ReloadOrRestart ReloadOrTryRestart Kill ResetFailed and SetProperties implement the same operation as the respective method calls on the Manager object see a bove , however operate on the unit object and hence do not take a unit name parameter Invoking the methods directly on the Manager object has the advantage of not requiring a GetUnit call to get the unit object for a specific unit name Calling the methods on the Manager object is hence a round trip optimization. Id contains the primary name of the unit. Names contains all names of the unit, including the primary name that is also exposed in Id. Following either contains the empty string or contains the name of another unit that this unit follows in state This is used for some device units which reflect the unit state machine of another unit, and which other unit this is might possibly change. Requires RequiresOverridable Requisite RequisiteOverridable Wants BindsTo RequiredBy RequiredByOverridable WantedBy BoundBy Conflicts ConflictedBy Before After OnFailure Triggers TriggeredBy PropagatesReloadTo RequiresMountsFor contain arrays which encode the dependencies and their inverse dependencie s where this applies , as configured in the unit file or determined automatically. Description contains the human readable description string for the unit. SourcePath contains the path to a configuration file this unit is automatically generated from in case it is not a native unit in which case it contains the empty string For example, all mount units generated from etc fstab have this field set to this value. Documentation contains a string array with URLs of documentation for this unit. LoadState contains a state value that reflects whether the configuration file of this unit has been loaded The following states are currently defined loaded error masked loaded indicates that the configuration was successfully loaded error indicates that the configuration failed to load, the LoadError field see below contains information about the cause of this failure masked indicates that the unit is currently masked out i e symlinked to dev null or suchlike Note that the LoadState is fully orthogonal to the ActiveState see below as units without valid loaded configuration might be active because configuration might have been reloaded at a time where a unit was already active. ActiveState contains a state value that reflects whether the unit is currently active or not The following states are currently defined active reloading inactive failed activating deactivating active indicates that unit is active obviously reloading indicates that the unit is active and currently reloading its configuration inactive indicates that it is inactive and the previous run was successful or no previous run has taken place yet failed indicates that it is inactive and the previous run was not successful more information about the reason for this is available on the unit type specific interfaces, for example for services in the Result property, see below activating indicates that the unit has previously been inactive but is currently in the process of entering an active state Conversely deactivating indi cates that the unit is currently in the process of deactivation. SubState encodes states of the same state machine that ActiveState covers, but knows more fine-grained states that are unit-type-specific Where ActiveState only covers six high-level states, SubState covers possibly many more low-level unit-type-specific states that are mapped to the six high-level states Note that multiple low-level states might map to the same high-level state, but not vice versa Not all high-level states have low-level counterparts on all unit types At this point the low-level states are not documented here, and are more likely to be extended later on than the common high-level states explained above. FragmentPath contains the unit file path this unit was read from, if there is any if not this contains the empty string. UnitFileState encodes the install state of the unit file of FragmentPath It currently knows the following states enabled enabled-runtime linked linked-runtime masked masked-runtime static disabled invalid enabled indicates that a unit file is permanently enabled enable-runtime indicates the unit file is only temporarily enabled, and will no longer be enabled after a reboot that means, it is enabled via run symlinks, rather than etc linked indicates that a unit is linked into etc permanently, linked indicates that a unit is linked into run temporarily until the next reboot masked indicates that the unit file is masked permanently, masked-runtime indicates that it is only temporarily masked in run, until the next reboot static indicates that the unit is statically enabled, i e always enabled and doesn t need to be enabled explicitly invalid indicates that it could not be determined whether the unit file is enabled. InactiveExitTimestamp InactiveExitTimestampMonotonic ActiveEnterTimestamp ActiveEnterTimestampMonotonic ActiveExitTimestamp ActiveExitTimestampMonotonic InactiveEnterTimestamp InactiveEnterTimestampMonotonic contain CLOCKREALTIME and CLOCKMONOTONIC 64bit usec ti mestamps of the last time a unit left the inactive state, entered the active state, exited the active state, or entered an inactive state These are the points in time where the unit transitioned inactive failed activating activating active active deactivating and finally deactivating inactive failed The fields are 0 in case such a transition has not been recording on this boot yet. CanStart CanStop CanReload encodes as booleans whether the unit supports the start, stop or reload operations Even if a unit supports such an operation the client might not necessary have the right privileges to execute them. CanIsolate encodes as boolean whether the unit may be started in isolation mode. Job encodes the job ID and job object path of the job currently scheduled or executed for this unit, if there is any If no job is scheduled or executed the job id field will be 0.StopWhenUnneeded RefuseManualStart RefuseManualStop AllowIsolate DefaultDependencies OnFailureIsolate IgnoreOnIsolate IgnoreOnSn apshot map directly to the corresponding configuration booleans in the unit file. DefaultControlGroup contains the main control group of this unit as a string This refers to a group in systemd s own name systemd hierarchy, which systemd uses to watch and manipulate the unit and all its processes. NeedDaemonReload is a boolean that indicates whether the configuration file this unit is loaded from i e FragmentPath or SourcePath has changed since the configuration was read and hence whether a configuration reload is recommended. JobTimeoutUSec maps directly to the corresponding configuration setting in the unit file. ConditionTimestamp and ConditionTimestampMonotonic contain the CLOCKREALTIME CLOCKMONOTONIC usec timestamps of the last time the configured conditions of the unit have been checked, or 0 if they have never been checked Conditions are checked when a unit is requested to start. ConditionResult contains the condition result of the last time the configured conditions of this unit were checked. Conditions contains all configured conditions of the unit For each condition five fields are given condition type e g ConditionPathExists , whether the condition is a trigger condition, whether the condition is reversed, the right hand side of the condtion e g the path in case of ConditionPathExists , and the status The status can be 0, in which case the condition hasn t been checked yet, a positive value, in which case the condition passed, or a negative value, in which case the condition failed Currently only 0, 1, and -1 are used, but additional values may be used in the future, retaining the meaning of zero positive negative values. LoadError contains a pair of strings If the unit failed to load as encoded in LoadState see above , then this will include a D-Bus error pair consisting of the error ID and an explanatory human readable string of what happened If it succeeded to load this will be a pair of empty strings. Transient contains a boolean that indicates whether the uni t was created as transient unit i e via CreateTransientUnit on the manager object. Service Unit Objects. All service unit objects implement the interface described here in addition to the generic interface see above. Most properties of the Service interface map directly to the corresponding settings in service unit files For the sake of brevity, here s a list of all exceptions only. WatchdogTimestamp and WatchdogTimestampMonotonic contain CLOCKREALTIME CLOCKMONOTONIC usec timestamps of the last watchdog ping received from the service, or 0 if none was ever received. ExecStartPre ExecStart ExecStartPost ExecReload ExecStop ExecStop each are arrays of structures each containing the binary path to execute an array with all arguments to pass to the executed command, starting with argument 0 a boolean whether it should be considered a failure if the process exits uncleanly two pairs of CLOCKREALTIME CLOCKMONOTONIC usec timestamps when the process began and finished running the last time, or 0 if it never ran or never finished running the PID of the process, or 0 if it has not run yet the exit code and status of the last run This field hence maps more or less to the corresponding setting in the service unit file but is augmented with runtime data. LimitCPU and related properties map more or less directly to the corresponding settings in the service unit files, however are set to 18446744073709551615 i e -1 if they aren t set. Capabilities contains the configured capabilities, as formatted with captotext. SecureBits CapabilityBoundingSet MountFlags also correspond to the configured settings of the unit files, but are encoded as the actual binary flag fields they are, rather than formatted as string. ExecMainStartTimestamp ExecMainStartTimestampMonotonic ExecMainExitTimestamp ExecMainExitTimestampMonotonic ExecMainPID ExecMainCode ExecMainStatus contain information about the main process of the service as far as it is known This is often the same runtime information that is stored i n ExecStart However, it deviates for Type forking services where the main process of the service is not forked off systemd directly These fields either contain information of the last run of the process or of the current running process. MainPID and ControlPID contain the main and control PID of the service The main PID is the current main PID of the service and is 0 when the service currently has no main PID The control PID is the PID of the current start stop reload process running and is 0 if no such process is currently running That means that ExecMainPID and MainPID differ in the way that the latter immediately reflects whether a main process is currently running while the latter possible contains information collected from the last run even if the process is no longer around. StatusText contains the status text passed to the service manager via a call to sdnotify This may be used by services to inform the service manager about its internal state with a nice explanatory string. Resul t encodes the execution result of the last run of the service It is useful to determine the reason a service failed if it is in failed state see ActiveState above The following values are currently known success is set if the unit didn t fail resources indicates that not enough resources have been available to fork off and execute the service processes timeout indicates that a time-out occurred while executing a service operation exit-code indicates that a service process exited with an unclean exit code signal indicates that a service process exited with an uncaught signal core-dump indicates that a service process exited uncleanly and dumped core watchdog indicates that a service did not send out watchdog ping messages often enough start-limit indicates that a service has been started too frequently in a time frame as configured in StartLimitInterval StartLimitBurst. ControlGroup indicates the control group path the processes of this service unit are placed in. Socket Unit Objects. All socket unit objects implement the interface described here in addition to the generic interface see above. Most of the properties map directly to the corresponding settings in socket unit files As socket units can include ExecStartPre and similar fields which contain information about processes to execute They also share most of the fields related to the execution context that Service objects expose see above In addition to these properties there are the following. NAccepted contains the accumulated number of connections ever accepted on this socket This only applies to sockets with Accept set to true i e those where systemd is responsible for accepted connections. Similarly NConnections contains the number of currently open connections on this socket, and also applies only to socket with Accept set to true. Result encodes the reason why a socket unit failed if it is in failed state see ActiveState above The values success resources timeout exit-code signal and core-dump have the same mean ing as they have for the corresponding field of service units see above In addition to that the value service-failed-permanent indicates that the service of this socket failed continuously. Target Unit Objects. All target unit objects implement the interface described here in addition to the generic interface see above. Target units have neither type-specific methods nor properties. Device Unit Objects. All device unit objects implement the interface described here in addition to the generic interface see above. Device units only expose a single type-specific property. SysFSPath contains the sysfs path of the kernel device this object corresponds to. Mount Unit Objects. All mount unit objects implement the interface described here in addition to the generic interface see above. Most of the properties map directly to the corresponding settings in mount unit files As mount units invoke the usr bin mount command their bus objects include implicit ExecMount and similar fields which contain informati on about processes to execute They also share most of the fields related to the execution context that Service objects expose see above In addition to these properties there are the following. ControlPID contains the PID of the currently running usr bin mount or usr bin umount command if there is one running, otherwise 0.Result contains a value explaining why a mount unit failed if it failed It can take the values success resources timeout exit-code signal core-dump which have the identical meaning as the corresponding values of the corresponding field of service unit objects see above. Automount Unit Objects. All automount unit objects implement the interface described here in addition to the generic interface see above. Most of the properties map directly to the corresponding settings in the automount unit files. Result knows the values success and resources at this time They have the same meanings as the corresponding values of the corresponding field of the Service object. Snapshot Unit Objects. All snapshot unit objects implement the interface described here in addition to the generic interface see above. Remove deletes the snapshot unit This operation is also available in the RemoveSnapshot operation of the Manager object see above , which is sometimes nicer to call, in order to reduce roundtrips. Cleanup is a boolean that indicates that the snapshot unit should be removed automatically after the first time it is activated. Timer Unit Objects. All timer unit objects implement the interface described here in addition to the generic interface see above. Unit contains the name of the unit to activate when the timer elapses. TimersMonotonic contains an array of structs that contain information about all monotonic timers of this timer unit The structs contain a string identifying the timer base, which is one of OnActiveUSec OnBootUSec OnStartupUSec OnUnitActiveUSec OnUnitInactiveUSec which correspond to the settings of the same names in the timer unit files the usec offset from this timer base in monotonic time the next elapsation point on the CLOCKMONOTONIC clock, relative its epoch. TimersCalendar contains an array of structs that contain information about all realtime calendar timers of this timer unit The structs contain a string identifying the timer base, which may only be OnCalendar for now the calendar specification string the next elapsation point on the CLOCKREALTIME clock, relative to its epoch. NextElapseUSecRealtime contains the next elapsation point on the CLOCKREALTIME clock in usec since the epoch, or 0 if this timer event does not include at least one calendar event. Similar, NextElapseUSecMonotonic contains the next elapsation point on the CLOCKMONOTONIC clock in usec since the epoch, or 0 if this timer event does not include at least one monotonic event. Result knows the values success and resources with the same meanings as the matching values of the corresponding property of the service interface. Swap Unit Objects. All swap unit objects imple ment the interface described here in addition to the generic interface see above. Most of the properties map directly to the corresponding settings in swap unit files As mount units invoke the usr bin swapon command their bus objects include implicit ExecActivate and similar fields which contain information about processes to execute They also share most of the fields related to the execution context that Service objects expose see above In addition to these properties there are the following. ControlPID contains the PID of the currently running usr bin swapon or usr bin swapoff command if there is one running, otherwise 0.Result contains a value explaining why a mount unit failed if it failed It can take the values success resources timeout exit-code signal core-dump which have the identical meanings as the corresponding values of the corresponding field of service unit objects see above. Path Unit Objects. All path unit objects implement the interface described here in addition to the ge neric interface see above. Most properties correspond directly with the matching settings in path unit files The others. Paths contains an array of structs Each struct contains the condition to watch, which can be one of PathExists PathExistsGlob PathChanged PathModified DirectoryNotEmpty which correspond directly to the matching settings in the path unit files and the path to watch, possibly including glob expressions. Result contains a result value which can be success or resources which have the same meaning as the corresponding field of the service interface. Slice Unit Objects. All slice unit objects implement the interface described here in addition to the generic interface see above. Most properties correspond directly with the matching settings in slice unit files. Scope Unit Objects. All slice unit objects implement the interface described here in addition to the generic interface see above. All properties correspond directly with the matching properties of service units. Controller con tains the bus name unique or well-known that is notified when the scope unit is to be shut down via a RequestStop signal see below This is set when the scope is created If not set the scope s processes will terminated with SIGTERM directly. Abandon may be used to place a scope unit in the abandoned state This may be used to inform the system manager that the manager that created the scope lost interest in the scope for example, because it is terminating , without wanting to shut down the scope entirely. RequestStop is sent to the peer that is configured in the Controller property when systemd is requested to terminate the scope unit A program registering a scope can use this to cleanly shut down the processes it added to the scope, instead of letting systemd do it with the usual SIGTERM logic. Job Objects. Job objects encapsulate scheduled or running jobs Each unit can have none or one jobs in the execution queue Each job is attached to exactly one unit. Cancel cancels the job Note that thi s will remove a job from the queue if it is not yet executed but generally will not cause a job that is already in the process of being executed to be aborted This operation may also be requested via the CancelJob method of the Manager object see above , which is sometimes useful to reduce roundtrips. Id is the numeric Id of the job During the runtime of a systemd instance each numeric ID is only assigned once. Unit refers to the unit this job belongs two It is a structure consisting of the name of the unit and a bus path to the unit s object. JobType refers to the job s type and is one of start verify-active stop reload restart try-restart reload-or-start Note that later versions might define additional values. State refers to the job s state and is one of waiting and running The former indicates that a job is currently queued but has not begun to execute yet, the latter indicates that a job is currently being executed. Last edited Tue Feb 25 00 31 10 2014. 6710 Fix misspelled systemd conf igure options, added hint in Makefile 1498.Created by bear on 2014-07-12 09 31 28 00 00.Assignee spstarr Status Resolved closed on 2014-08-06 19 03 04 00 00 Target Version 1 11 6 Last Update 2014-08-06 19 03 18 00 00 in Redmine. I ve encountered some issues regarding the configuration of the systemd files that can be used on ArchLinux I ve shared my experience on the mailing list 1 Meanwhile, I ve figured out why configure complains Please see the patch file. Related, but not necessarily depending on it, the output of make without parameters didn t show the possibility for installing the systemd files Additionally, maybe this was intended so the list doesn t get too long For this, I ve done a second patch file addressing the Makefile only. Now I m stuck The systemd configuration files were copied to the right places after issuing make install-systems But there s still the in and in etc sysconfig icinga I don t know when this should be substituted Maybe someone could give me a hint I ve at tached the resulting files please see description field for absolute file path position. Kind regards, Bernd. The patch files were created according to 2.

Comments