com.groupbyinc.flux.monitor.os.OsProbe.class Maven / Gradle / Ivy
???? 4? &com/groupbyinc/flux/monitor/os/OsProbe java/lang/Object OsProbe.java 4com/groupbyinc/flux/monitor/os/OsProbe$OsProbeHolder
OsProbeHolder -com/groupbyinc/flux/monitor/os/OsStats$Cgroup &com/groupbyinc/flux/monitor/os/OsStats Cgroup 5com/groupbyinc/flux/monitor/os/OsStats$Cgroup$CpuStat CpuStat *com/groupbyinc/flux/monitor/os/OsStats$Cpu Cpu *com/groupbyinc/flux/monitor/os/OsStats$Mem Mem +com/groupbyinc/flux/monitor/os/OsStats$Swap Swap osMxBean ,Ljava/lang/management/OperatingSystemMXBean; getFreePhysicalMemorySize Ljava/lang/reflect/Method; getTotalPhysicalMemorySize getFreeSwapSpaceSize getTotalSwapSpaceSize getSystemLoadAverage getSystemCpuLoad !CONTROL_GROUPS_HIERARCHY_OVERRIDE Ljava/lang/String; logger 8Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger; $assertionsDisabled Z ()J java/lang/Exception * ,???????? 0 java/lang/reflect/Method 2 invoke 9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 4 5
3 6 java/lang/Long 8 longValue : )
9 ; e Ljava/lang/Exception; this (Lcom/groupbyinc/flux/monitor/os/OsProbe; A C E ()[D java/io/IOException H java/lang/IllegalAccessException J +java/lang/reflect/InvocationTargetException L 7com/groupbyinc/flux/common/apache/lucene/util/Constants N WINDOWS P ( O Q LINUX S ( O T readProcLoadavg ()Ljava/lang/String; V W
X ' ( Z (\d+\.\d+\s+){3}\d+/\d+\s+\d+ \ java/lang/String ^ matches (Ljava/lang/String;)Z ` a
_ b java/lang/AssertionError d ()V f g
e h \s+ j split '(Ljava/lang/String;)[Ljava/lang/String; l m
_ n java/lang/Double p parseDouble (Ljava/lang/String;)D r s
q t % & v 6com/groupbyinc/flux/common/apache/logging/log4j/Logger x isDebugEnabled ()Z z { y | error reading /proc/loadavg ~ debug *(Ljava/lang/String;Ljava/lang/Throwable;)V ? ? y ? MAC_OS_X ? ( O ? ! ? doubleValue ()D ? ?
q ? [D ??? &java/lang/ReflectiveOperationException ? ;error reading one minute load average from operating system ? procLoadAvg fields [Ljava/lang/String; Ljava/io/IOException; oneMinuteLoadAverage D (Ljava/lang/ReflectiveOperationException; .Lcom/groupbyinc/flux/common/SuppressForbidden; reason access /proc/loadavg
/proc/loadavg ? 'com/groupbyinc/flux/common/io/PathUtils ? get ;(Ljava/lang/String;[Ljava/lang/String;)Ljava/nio/file/Path; ? ?
? ? readSingleLine ((Ljava/nio/file/Path;)Ljava/lang/String; ? ?
? getSystemCpuPercent ()S " ? "com/groupbyinc/flux/monitor/Probes ? getLoadAndScaleToPercent I(Ljava/lang/reflect/Method;Ljava/lang/management/OperatingSystemMXBean;)S ? ?
? ? java/nio/file/Files ? readAllLines &(Ljava/nio/file/Path;)Ljava/util/List; ? ?
? ? java/util/List ? size ()I ? ? ? ? (I)Ljava/lang/Object; ? ? ? ? path Ljava/nio/file/Path; lines $Ljava/util/List; Ljava/util/List; getControlGroups ()Ljava/util/Map; readProcSelfCgroup ()Ljava/util/List; ? ?
? java/util/HashMap ?
? h iterator ()Ljava/util/Iterator; ? ? ? ?
java/util/Map ? java/util/Iterator ? hasNext ? { ? ? next ()Ljava/lang/Object; ? ? ? ? : ? ? , ? # $ ? put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; ? ? ? ? controlGroupPath previous
controller controllers line
controllerMap 5Ljava/util/Map; Ljava/util/Map; access /proc/self/cgroup /proc/self/cgroup ? isEmpty ? { ? ? getCgroupCpuAcctUsageNanos (Ljava/lang/String;)J "readSysFsCgroupCpuAcctCpuAcctUsage &(Ljava/lang/String;)Ljava/lang/String; ? ?
? parseLong ?
9 controlGroup access /sys/fs/cgroup/cpuacct /sys/fs/cgroup/cpuacct
cpuacct.usage "getCgroupCpuAcctCpuCfsPeriodMicros "readSysFsCgroupCpuAcctCpuCfsPeriod
?
access /sys/fs/cgroup/cpu /sys/fs/cgroup/cpu cpu.cfs_period_us !getCgroupCpuAcctCpuCfsQuotaMicros %readSysFsCgroupCpuAcctCpuAcctCfsQuota ?
cpu.cfs_quota_us getCgroupCpuAcctCpuStat K(Ljava/lang/String;)Lcom/groupbyinc/flux/monitor/os/OsStats$Cgroup$CpuStat; readSysFsCgroupCpuAcctCpuStat $(Ljava/lang/String;)Ljava/util/List;
hashCode ?
_
nr_periods! equals (Ljava/lang/Object;)Z#$
_% nr_throttled' throttled_time) (JJJ)V f+
, numberOfPeriods J numberOfTimesThrottled timeThrottledNanos cpu.stat2 areCgroupStatsAvailable Haccess /proc/self/cgroup, /sys/fs/cgroup/cpu, and /sys/fs/cgroup/cpuacct java/nio/file/LinkOption6 exists 2(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z89
?: getCgroup 1()Lcom/groupbyinc/flux/monitor/os/OsStats$Cgroup;4 {
> ? ?
@ ? ? cpuacctC &(Ljava/lang/Object;)Ljava/lang/Object; ?E ?F ? ?
H cpuJ ?
L ?
N
P a(Ljava/lang/String;JLjava/lang/String;JJLcom/groupbyinc/flux/monitor/os/OsStats$Cgroup$CpuStat;)V fR
S !error reading control group statsU cpuAcctControlGroup cgroupCpuAcctUsageNanos cpuControlGroup cgroupCpuAcctCpuCfsPeriodMicros cgroupCpuAcctCpuCfsQuotaMicros cpuStat 7Lcom/groupbyinc/flux/monitor/os/OsStats$Cgroup$CpuStat; getInstance *()Lcom/groupbyinc/flux/monitor/os/OsProbe;
access$000`_
a
h getClass ()Ljava/lang/Class;de
f 2com/groupbyinc/flux/common/logging/ESLoggerFactoryh getLogger K(Ljava/lang/Class;)Lcom/groupbyinc/flux/common/apache/logging/log4j/Logger;jk
il osInfo +(JI)Lcom/groupbyinc/flux/monitor/os/OsInfo; %com/groupbyinc/flux/monitor/os/OsInfop java/lang/Runtimer
getRuntime ()Ljava/lang/Runtime;tu
sv availableProcessorsx ?
sy OS_NAME{ $ O| OS_ARCH~ $ O
OS_VERSION? $ O? <(JIILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V f?
q? refreshInterval allocatedProcessors I osStats *()Lcom/groupbyinc/flux/monitor/os/OsStats; ? ?
? ! G
? (S[D)V f?
? )
? )
? (JJ)V f?
? )
? )
?
?<=
? java/lang/System? currentTimeMillis? )
?? ?(JLcom/groupbyinc/flux/monitor/os/OsStats$Cpu;Lcom/groupbyinc/flux/monitor/os/OsStats$Mem;Lcom/groupbyinc/flux/monitor/os/OsStats$Swap;Lcom/groupbyinc/flux/monitor/os/OsStats$Cgroup;)V f?
? ,Lcom/groupbyinc/flux/monitor/os/OsStats$Cpu; mem ,Lcom/groupbyinc/flux/monitor/os/OsStats$Mem; swap -Lcom/groupbyinc/flux/monitor/os/OsStats$Swap; cgroup /Lcom/groupbyinc/flux/monitor/os/OsStats$Cgroup; getMethod .(Ljava/lang/String;)Ljava/lang/reflect/Method; ?com.groupbyinc.flux.common.sun.management.OperatingSystemMXBean? java/lang/Class? forName %(Ljava/lang/String;)Ljava/lang/Class;??
?? @(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;??
??
methodName desiredAssertionStatus? {
?? &java/lang/management/ManagementFactory? getOperatingSystemMXBean .()Ljava/lang/management/OperatingSystemMXBean;??
?? ??
? ! " es.cgroups.hierarchy.override? getProperty? ?
?? Code LocalVariableTable LineNumberTable
StackMapTable
Exceptions RuntimeInvisibleAnnotations LocalVariableTypeTable Signature 7()Ljava/util/Map; &()Ljava/util/List; 8(Ljava/lang/String;)Ljava/util/List;
SourceFile InnerClasses !
! " # $ % &