public class org.apache.cassandra.utils.SigarLibrary
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.utils.SigarLibrary
super_class: java.lang.Object
{
private org.slf4j.Logger logger;
descriptor: Lorg/slf4j/Logger;
flags: (0x0002) ACC_PRIVATE
public static final org.apache.cassandra.utils.SigarLibrary instance;
descriptor: Lorg/apache/cassandra/utils/SigarLibrary;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
private org.hyperic.sigar.Sigar sigar;
descriptor: Lorg/hyperic/sigar/Sigar;
flags: (0x0002) ACC_PRIVATE
private org.hyperic.sigar.FileSystemMap mounts;
descriptor: Lorg/hyperic/sigar/FileSystemMap;
flags: (0x0002) ACC_PRIVATE
private boolean initialized;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private long INFINITY;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private long EXPECTED_MIN_NOFILE;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private long EXPECTED_NPROC;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private long EXPECTED_AS;
descriptor: J
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.apache.cassandra.utils.SigarLibrary
dup
invokespecial org.apache.cassandra.utils.SigarLibrary.<init>:()V
putstatic org.apache.cassandra.utils.SigarLibrary.instance:Lorg/apache/cassandra/utils/SigarLibrary;
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=2, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
ldc Lorg/apache/cassandra/utils/SigarLibrary;
invokestatic org.slf4j.LoggerFactory.getLogger:(Ljava/lang/Class;)Lorg/slf4j/Logger;
putfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
2: aload 0
aconst_null
putfield org.apache.cassandra.utils.SigarLibrary.mounts:Lorg/hyperic/sigar/FileSystemMap;
3: aload 0
iconst_0
putfield org.apache.cassandra.utils.SigarLibrary.initialized:Z
4: aload 0
ldc -1
putfield org.apache.cassandra.utils.SigarLibrary.INFINITY:J
5: aload 0
ldc 10000
putfield org.apache.cassandra.utils.SigarLibrary.EXPECTED_MIN_NOFILE:J
6: aload 0
ldc 32768
putfield org.apache.cassandra.utils.SigarLibrary.EXPECTED_NPROC:J
7: aload 0
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.INFINITY:J
putfield org.apache.cassandra.utils.SigarLibrary.EXPECTED_AS:J
8: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Initializing SIGAR library"
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
9: aload 0
new org.hyperic.sigar.Sigar
dup
invokespecial org.hyperic.sigar.Sigar.<init>:()V
putfield org.apache.cassandra.utils.SigarLibrary.sigar:Lorg/hyperic/sigar/Sigar;
10: aload 0
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.sigar:Lorg/hyperic/sigar/Sigar;
invokevirtual org.hyperic.sigar.Sigar.getFileSystemMap:()Lorg/hyperic/sigar/FileSystemMap;
putfield org.apache.cassandra.utils.SigarLibrary.mounts:Lorg/hyperic/sigar/FileSystemMap;
11: aload 0
iconst_1
putfield org.apache.cassandra.utils.SigarLibrary.initialized:Z
12: goto 18
13: StackMap locals: org.apache.cassandra.utils.SigarLibrary
StackMap stack: org.hyperic.sigar.SigarException
astore 1
start local 1 14: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Could not initialize SIGAR library {} "
aload 1
invokevirtual org.hyperic.sigar.SigarException.getMessage:()Ljava/lang/String;
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;)V
end local 1 15: goto 18
16: StackMap locals:
StackMap stack: java.lang.UnsatisfiedLinkError
astore 1
start local 1 17: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Could not initialize SIGAR library {} "
aload 1
invokevirtual java.lang.UnsatisfiedLinkError.getMessage:()Ljava/lang/String;
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;Ljava/lang/Object;)V
end local 1 18: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 19 0 this Lorg/apache/cassandra/utils/SigarLibrary;
14 15 1 e Lorg/hyperic/sigar/SigarException;
17 18 1 linkError Ljava/lang/UnsatisfiedLinkError;
Exception table:
from to target type
9 12 13 Class org.hyperic.sigar.SigarException
9 12 16 Class java.lang.UnsatisfiedLinkError
public boolean initialized();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.initialized:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/utils/SigarLibrary;
private boolean hasAcceptableProcNumber();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.sigar:Lorg/hyperic/sigar/Sigar;
invokevirtual org.hyperic.sigar.Sigar.getResourceLimit:()Lorg/hyperic/sigar/ResourceLimit;
invokevirtual org.hyperic.sigar.ResourceLimit.getProcessesMax:()J
lstore 1
start local 1 1: lload 1
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.EXPECTED_NPROC:J
lcmp
ifge 2
lload 1
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.INFINITY:J
lcmp
ifne 3
2: StackMap locals: long
StackMap stack:
iconst_1
ireturn
3: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 1 4: StackMap locals: org.apache.cassandra.utils.SigarLibrary
StackMap stack: org.hyperic.sigar.SigarException
astore 1
start local 1 5: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Could not determine if max processes was acceptable. Error message: {}"
aload 1
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
6: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/utils/SigarLibrary;
1 4 1 fileMax J
5 7 1 sigarException Lorg/hyperic/sigar/SigarException;
Exception table:
from to target type
0 2 4 Class org.hyperic.sigar.SigarException
private boolean hasAcceptableFileLimits();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.sigar:Lorg/hyperic/sigar/Sigar;
invokevirtual org.hyperic.sigar.Sigar.getResourceLimit:()Lorg/hyperic/sigar/ResourceLimit;
invokevirtual org.hyperic.sigar.ResourceLimit.getOpenFilesMax:()J
lstore 1
start local 1 1: lload 1
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.EXPECTED_MIN_NOFILE:J
lcmp
ifge 2
lload 1
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.INFINITY:J
lcmp
ifne 3
2: StackMap locals: long
StackMap stack:
iconst_1
ireturn
3: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 1 4: StackMap locals: org.apache.cassandra.utils.SigarLibrary
StackMap stack: org.hyperic.sigar.SigarException
astore 1
start local 1 5: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Could not determine if max open file handle limit is correctly configured. Error message: {}"
aload 1
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
6: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/utils/SigarLibrary;
1 4 1 fileMax J
5 7 1 sigarException Lorg/hyperic/sigar/SigarException;
Exception table:
from to target type
0 2 4 Class org.hyperic.sigar.SigarException
private boolean hasAcceptableAddressSpace();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=1
start local 0 0: getstatic org.apache.cassandra.utils.FBUtilities.isWindows:Z
ifeq 2
1: iconst_1
ireturn
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.sigar:Lorg/hyperic/sigar/Sigar;
invokevirtual org.hyperic.sigar.Sigar.getResourceLimit:()Lorg/hyperic/sigar/ResourceLimit;
invokevirtual org.hyperic.sigar.ResourceLimit.getVirtualMemoryMax:()J
lstore 1
start local 1 3: lload 1
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.EXPECTED_AS:J
lcmp
ifne 5
4: iconst_1
ireturn
5: StackMap locals: long
StackMap stack:
iconst_0
ireturn
end local 1 6: StackMap locals: org.apache.cassandra.utils.SigarLibrary
StackMap stack: org.hyperic.sigar.SigarException
astore 1
start local 1 7: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Could not determine if VirtualMemoryMax was acceptable. Error message: {}"
aload 1
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
8: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/apache/cassandra/utils/SigarLibrary;
3 6 1 fileMax J
7 9 1 sigarException Lorg/hyperic/sigar/SigarException;
Exception table:
from to target type
2 4 6 Class org.hyperic.sigar.SigarException
private boolean isSwapEnabled();
descriptor: ()Z
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.sigar:Lorg/hyperic/sigar/Sigar;
invokevirtual org.hyperic.sigar.Sigar.getSwap:()Lorg/hyperic/sigar/Swap;
astore 1
start local 1 1: aload 1
invokevirtual org.hyperic.sigar.Swap.getTotal:()J
lstore 2
start local 2 2: lload 2
lconst_0
lcmp
ifle 4
3: iconst_1
ireturn
4: StackMap locals: org.hyperic.sigar.Swap long
StackMap stack:
iconst_0
ireturn
end local 2 end local 1 5: StackMap locals: org.apache.cassandra.utils.SigarLibrary
StackMap stack: org.hyperic.sigar.SigarException
astore 1
start local 1 6: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Could not determine if swap configuration is acceptable. Error message: {}"
aload 1
invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;Ljava/lang/Throwable;)V
7: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/cassandra/utils/SigarLibrary;
1 5 1 swap Lorg/hyperic/sigar/Swap;
2 5 2 swapSize J
6 8 1 sigarException Lorg/hyperic/sigar/SigarException;
Exception table:
from to target type
0 3 5 Class org.hyperic.sigar.SigarException
public long getPid();
descriptor: ()J
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.initialized:Z
ifeq 1
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.sigar:Lorg/hyperic/sigar/Sigar;
invokevirtual org.hyperic.sigar.Sigar.getPid:()J
goto 2
StackMap locals:
StackMap stack:
1: ldc -1
StackMap locals:
StackMap stack: long
2: lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/utils/SigarLibrary;
public void warnIfRunningInDegradedMode();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=5, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.utils.SigarLibrary.initialized:Z
ifeq 15
1: aload 0
invokevirtual org.apache.cassandra.utils.SigarLibrary.isSwapEnabled:()Z
istore 1
start local 1 2: aload 0
invokevirtual org.apache.cassandra.utils.SigarLibrary.hasAcceptableAddressSpace:()Z
istore 2
start local 2 3: aload 0
invokevirtual org.apache.cassandra.utils.SigarLibrary.hasAcceptableFileLimits:()Z
istore 3
start local 3 4: aload 0
invokevirtual org.apache.cassandra.utils.SigarLibrary.hasAcceptableProcNumber:()Z
istore 4
start local 4 5: iload 1
ifne 6
iload 2
ifeq 6
iload 3
ifeq 6
iload 4
ifne 13
6: StackMap locals: org.apache.cassandra.utils.SigarLibrary int int int int
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Cassandra server running in degraded mode. Is swap disabled? : {}, Address space adequate? : {}, nofile limit adequate? : {}, nproc limit adequate? : {} "
iconst_4
anewarray java.lang.Object
dup
iconst_0
7: iload 1
ifeq 8
iconst_0
goto 9
StackMap locals: org.apache.cassandra.utils.SigarLibrary int int int int
StackMap stack: org.slf4j.Logger java.lang.String java.lang.Object[] java.lang.Object[] int
8: iconst_1
StackMap locals: org.apache.cassandra.utils.SigarLibrary int int int int
StackMap stack: org.slf4j.Logger java.lang.String java.lang.Object[] java.lang.Object[] int int
9: invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
aastore
dup
iconst_1
iload 2
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
aastore
dup
iconst_2
10: iload 3
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
aastore
dup
iconst_3
iload 4
invokestatic java.lang.Boolean.valueOf:(Z)Ljava/lang/Boolean;
aastore
11: invokeinterface org.slf4j.Logger.warn:(Ljava/lang/String;[Ljava/lang/Object;)V
12: goto 16
13: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Checked OS settings and found them configured for optimal performance."
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
end local 4 end local 3 end local 2 end local 1 14: goto 16
15: StackMap locals: org.apache.cassandra.utils.SigarLibrary
StackMap stack:
aload 0
getfield org.apache.cassandra.utils.SigarLibrary.logger:Lorg/slf4j/Logger;
ldc "Sigar could not be initialized, test for checking degraded mode omitted."
invokeinterface org.slf4j.Logger.info:(Ljava/lang/String;)V
16: StackMap locals:
StackMap stack:
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lorg/apache/cassandra/utils/SigarLibrary;
2 14 1 swapEnabled Z
3 14 2 goodAddressSpace Z
4 14 3 goodFileLimits Z
5 14 4 goodProcNumber Z
}
SourceFile: "SigarLibrary.java"