[systemd-devel] machinectl status vs show
Lennart Poettering
lennart at poettering.net
Wed Jun 17 01:42:46 PDT 2015
On Wed, 17.06.15 10:13, David Herrmann (dh.herrmann at gmail.com) wrote:
> Hi
>
> On Wed, Jun 17, 2015 at 5:53 AM, Johannes Ernst
> <johannes.ernst at gmail.com> wrote:
> > Are those supposed to produce the same information, just formatted differently (man vs machine per man page)?
> >
> > I’m failing to convince ‘show’ to give me the container’s IP address, while ‘status’ has all of them.
>
> As with almost all *ctl tools in systemd, 'show' is used to print DBus
> properties of the object in question. 'status' on the other hand
> prints a human-readable, pre-selected set of attributes of an object.
>
> With machinectl, the 'show' command must be used with a parameter. So
> `machinectl --all show $machine` should contain the same information
> as `machinectl status $machine`, and even more. If that's not the
> case, please post an example.
Well, "machinectl status" also shows the cgroup tree, which
"machinectl show" currently does not.
The IP addresses are not exposed as property, they are exposed
as method, since acquiring them is relatively complex due to
transitioning into the containers... That means they show up in
"machinectl status", because that code explicitly calls that method,
but not in "machinectl show" which shows the plain props, and nothing
else.
Note that "systemctl show" and "systemctl status" have a similar
relationship as "machinectl show" and "machinectl status".
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list