k8sp / systemd

3 stars 1 forks source link

systemd-analyze critical-chain flanneld.service 在不同的机器上,返回的结果不一样 #1

Open jiamliang opened 8 years ago

jiamliang commented 8 years ago

在10.10.10.191上执行:

systemd-analyze critical-chain  flanneld.service

返回的结果如下:

core@coreos-191 ~ $ systemd-analyze critical-chain  flanneld.service
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

flanneld.service +483ms
└─system.slice
  └─-.slice
core@coreos-191 ~ $

在10.10.10.192/3上执行:

systemd-analyze critical-chain  flanneld.service

返回的结果如下:

core@coreos-192 ~ $ systemd-analyze critical-chain  flanneld.service
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

flanneld.service +842ms
└─etcd2.service @10.618s +2.467s
  └─basic.target @7.323s
    └─sockets.target @7.323s
      └─fleet.socket @13.100s +592us
        └─sysinit.target @7.261s
          └─audit-rules.service @6.792s +467ms
            └─systemd-tmpfiles-setup.service @6.491s +204ms
              └─systemd-journal-flush.service @5.427s +1.027s
                └─systemd-journald.service @1.359s +4.060s
                  └─systemd-journald-dev-log.socket
                    └─-.slice
core@coreos-192 ~ $ 

目前暂时不清楚具体的原因,三台机器上执行 systemctl show flanneld.service 的输出结果是基本一致的。 (193的Before属性比191/2 多了一个 multi-user.target)

jiamliang commented 8 years ago

三台机器上:systemctl list-dependencies flanneld.service 的输出是一模一样的 191/2上执行.systemd-analyze dot flanneld.service是一模一样的, 193上执行的结果多了两行:

    "multi-user.target"->"flanneld.service" [color="green"];
    "multi-user.target"->"flanneld.service" [color="grey66"];

这个在 systemctl show flanneld.service 的输出中193比191/2的Before属性中多了一个 multi-user.target