1 [main] DEBUG Sigar - no libsigar-amd64-linux.so in java.library.path org.hyperic.sigar.SigarException: no libsigar-amd64-linux.so in java.library.path at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:172) at org.hyperic.sigar.Sigar.(Sigar.java:100) at com.cdc.tools.SigarUtils.cpu(SigarUtils.java:112) at com.cdc.AssetManagementApplication.main(AssetManagementApplication.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Caused by: java.lang.UnsatisfiedlinkError: org.hyperic.sigar.Cpu.gather(Lorg/hyperic/sigar/Sigar;)V at org.hyperic.sigar.Cpu.gather(Native Method) at org.hyperic.sigar.Cpu.fetch(Cpu.java:30) at org.hyperic.sigar.Sigar.getCpu(Sigar.java:320) at org.hyperic.sigar.Sigar.getCpuPerc(Sigar.java:341) at com.cdc.tools.SigarUtils.cpu(SigarUtils.java:114) at com.cdc.AssetManagementApplication.main(AssetManagementApplication.java:17) ... 8 more
解决: 主要参数-Djava.library.path=./lib lib存放 hyperic-sigar-1.6.4/sigar-bin/lib
nohup ./jdk1.8.0_162/jre/bin/java -jar -Djava.library.path=./lib asset-management.jar
感谢:아키텍처와 함께 :: Java를 이용한 서버 CPU, 메모리 자원 모니터링
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)