Class Diagnostics


  • public class Diagnostics
    extends Object
    Provides access to various metrics helpful for system diagnosis.
    Since:
    1.0
    Author:
    Michael Nitschinger
    • Constructor Detail

      • Diagnostics

        public Diagnostics()
    • Method Detail

      • systemInfo

        @IgnoreJRERequirement
        public static void systemInfo​(Map<String,​Object> infos)
        Collects system information as delivered from the OperatingSystemMXBean.
        Parameters:
        infos - a map where the infos are passed in.
      • gcInfo

        public static void gcInfo​(Map<String,​Object> infos)
        Collects system information as delivered from the GarbageCollectorMXBean.
        Parameters:
        infos - a map where the infos are passed in.
      • memInfo

        public static void memInfo​(Map<String,​Object> infos)
        Collects system information as delivered from the MemoryMXBean.
        Parameters:
        infos - a map where the infos are passed in.
      • runtimeInfo

        public static void runtimeInfo​(Map<String,​Object> infos)
        Collects system information as delivered from the RuntimeMXBean.
        Parameters:
        infos - a map where the infos are passed in.
      • threadInfo

        public static void threadInfo​(Map<String,​Object> infos)
        Collects system information as delivered from the ThreadMXBean.
        Parameters:
        infos - a map where the infos are passed in.
      • collect

        public static Map<String,​Object> collect()
        Collects all available infos in one map.
        Returns:
        the map populated with the information.
      • collectAndFormat

        public static String collectAndFormat()
        Collects all available infos and formats it in a better readable way.
        Returns:
        a formatted string of available information.