예제 #1
0
 def init_cgroups():
     # Track metrics for the roll-up cgroup and for the agent cgroup
     try:
         CGroupsTelemetry.track_cgroup(CGroups.for_extension(""))
         CGroupsTelemetry.track_agent()
     except Exception as e:
         logger.error("monitor: Exception tracking wrapper and agent: {0} [{1}]", e, traceback.format_exc())
예제 #2
0
 def init_cgroups():
     # Track metrics for the roll-up cgroup and for the agent cgroup
     try:
         CGroupsTelemetry.track_cgroup(CGroups.for_extension(""))
         CGroupsTelemetry.track_agent()
     except Exception as e:
         logger.error(
             "monitor: Exception tracking wrapper and agent: {0} [{1}]", e,
             traceback.format_exc())
예제 #3
0
 def init_cgroups():
     # Track metrics for the roll-up cgroup and for the agent cgroup
     try:
         CGroupsTelemetry.track_cgroup(CGroups.for_extension(""))
         CGroupsTelemetry.track_agent()
     except Exception as e:
         # when a hierarchy is not mounted, we raise an exception
         # and we should therefore only issue a warning, since this
         # is not unexpected
         logger.warn("Monitor: cgroups not initialized: {0}", ustr(e))
         logger.verbose(traceback.format_exc())
예제 #4
0
 def init_cgroups():
     # Track metrics for the roll-up cgroup and for the agent cgroup
     try:
         CGroupsTelemetry.track_cgroup(CGroups.for_extension(""))
         CGroupsTelemetry.track_agent()
     except Exception as e:
         # when a hierarchy is not mounted, we raise an exception
         # and we should therefore only issue a warning, since this
         # is not unexpected
         logger.warn("Monitor: cgroups not initialized: {0}", ustr(e))
         logger.verbose(traceback.format_exc())
예제 #5
0
 def init_cgroups():
     # Track metrics for the wrapper cgroup and for the agent cgroup
     try:
         # This creates the wrapper cgroup for everything under agent,
         # /sys/fs/cgroup/{cpu,memory}/WALinuxAgent/
         # There is no need in tracking this cgroup, as it only serves
         # as an umbrella for the agent and extensions cgroups
         CGroups.for_extension("")
         # This creates the agent's cgroup (for the daemon and extension handler)
         # /sys/fs/cgroup/{cpu,memory}/WALinuxAgent/WALinuxAgent
         # If the system is using systemd, it would have already been set up under /system.slice
         CGroupsTelemetry.track_agent()
     except Exception as e:
         # when a hierarchy is not mounted, we raise an exception
         # and we should therefore only issue a warning, since this
         # is not unexpected
         logger.warn("Monitor: cgroups not initialized: {0}", ustr(e))
         logger.verbose(traceback.format_exc())