[systemd-devel] how to know what exactly parameter set in busCtl methods?

Tomasz Michalski tmichalski23 at gmail.com
Tue Jan 16 11:52:37 UTC 2018


Hi
I have a problem with call methods from terminal which take an argument,
for example when I try to use this one:
busctl call org.freedesktop.systemd1
/org/freedesktop/systemd1/unit/syscom_2epath org.freedesktop.systemd1.Unit
Kill
I get output
Invalid arguments '' to call org.freedesktop.systemd1.Unit.Kill(),
expecting 'si'.

The same with Restart:
Invalid arguments '' to call org.freedesktop.systemd1.Unit.Restart(),
expecting 's'.

I know that some parameters has to be given acc to introspects:
busctl introspect org.freedesktop.systemd1
/org/freedesktop/systemd1/unit/syscom_2epath
.Result                          property  s         "success"

.Unit                             property  s         "syscom.service"

org.freedesktop.systemd1.Unit interface -         -

.Kill                               method    si        -

.Reload                         method    s         o

.ReloadOrRestart          method    s         o

.ReloadOrTryRestart    method    s         o
.ResetFailed                 method    -         -

.Restart                         method    s         o

.SetProperties               method    ba(sv)    -

.Start                              method    s         o

.Stop                               method    s         o

.TryRestart                      method    s         o

However I don't know what I should exactly write, what exactly string? I
tried for example:
busctl call org.freedesktop.systemd1
/org/freedesktop/systemd1/unit/syscom_2eservice
org.freedesktop.systemd1.Unit Restart "dupa"
I got output:
Too few parameters for signature.

How can I get to know what exactly should I give as parameter. This is a
bit frustrating.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180116/243b42f6/attachment-0001.html>


More information about the systemd-devel mailing list