[systemd-devel] systemctl status cpu/memory

Reindl Harald h.reindl at thelounge.net
Thu Apr 30 11:40:10 UTC 2020


the cpu time of 672ms is wrong, memory is missing in Fedora 31 while it
was there in previous versions though it's a oneshot service

*after* stop the service the correct cpu usage of it's lifetime is logged

[root at srv-rhsoft:~]$ systemctl status guest-arrakis.service
● guest-arrakis.service - VMware-Guest Arrakis
   Loaded: loaded (/etc/systemd/system/guest-arrakis.service; disabled;
vendor preset: disabled)
   Active: active (exited) since Wed 2020-04-29 20:42:10 CEST; 16h ago
  Process: 1408 ExecStart=/usr/bin/vmrun -T ws start
/mnt/data/fileserver/vmware/arrakis/arrakis.vmx nogui (code=exited,
status=0/SUCCESS)
 Main PID: 1408 (code=exited, status=0/SUCCESS)
      CPU: 672ms

[root at srv-rhsoft:~]$ systemctl stop guest-arrakis.service
[root at srv-rhsoft:~]$ cat messages
Apr 30 13:35:28 srv-rhsoft systemd[1]: Stopping VMware-Guest Arrakis...
Apr 30 13:35:47 srv-rhsoft systemd[1]: Stopped VMware-Guest Arrakis.
Apr 30 13:35:47 srv-rhsoft systemd[1]: guest-arrakis.service: Consumed
30min 19.944s CPU time.

[root at srv-rhsoft:~]$ cat /etc/systemd/system/guest-arrakis.service
[Unit]
Description=VMware-Guest Arrakis
PartOf=vmware-guest.target
Requisite=vmware.service
After=vmware-vmnet.service network-up.service
Wants=network-up.service

[Service]
Type=oneshot
RemainAfterExit=yes
Nice=19
IOSchedulingClass=idle
User=vmware
Group=vmware
ExecStart=/usr/bin/vmrun -T ws start
'/mnt/data/fileserver/vmware/arrakis/arrakis.vmx' nogui
ExecReload=-/usr/bin/vmrun -T ws reset
'/mnt/data/fileserver/vmware/arrakis/arrakis.vmx' nogui soft
ExecStop=-/usr/bin/vmrun -T ws stop
'/mnt/data/fileserver/vmware/arrakis/arrakis.vmx' nogui soft
ExecStop=-/usr/bin/sleep 5
TimeoutSec=300
SuccessExitStatus=255

ProtectSystem=full
CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_WRITE CAP_SYS_ADMIN
CAP_SYS_BOOT CAP_SYS_PTRACE
IPAddressDeny=any
IPAddressAllow=localhost

[Install]
WantedBy=vmware-guest.target


More information about the systemd-devel mailing list