synchronize sigar calls
This commit is contained in:
parent
a82fbb4cda
commit
c91d0991ad
@ -27,7 +27,7 @@ public class SigarProcess implements SigarProcessMBean {
|
|||||||
this.sigarImpl.close();
|
this.sigarImpl.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ProcMem getMem() {
|
private synchronized ProcMem getMem() {
|
||||||
try {
|
try {
|
||||||
long pid = this.sigar.getPid();
|
long pid = this.sigar.getPid();
|
||||||
return this.sigar.getProcMem(pid);
|
return this.sigar.getProcMem(pid);
|
||||||
@ -36,7 +36,7 @@ public class SigarProcess implements SigarProcessMBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ProcTime getTime() {
|
private synchronized ProcTime getTime() {
|
||||||
try {
|
try {
|
||||||
long pid = this.sigar.getPid();
|
long pid = this.sigar.getPid();
|
||||||
return this.sigar.getProcTime(pid);
|
return this.sigar.getProcTime(pid);
|
||||||
@ -45,7 +45,7 @@ public class SigarProcess implements SigarProcessMBean {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ProcFd getFd() {
|
private synchronized ProcFd getFd() {
|
||||||
try {
|
try {
|
||||||
long pid = this.sigar.getPid();
|
long pid = this.sigar.getPid();
|
||||||
return this.sigar.getProcFd(pid);
|
return this.sigar.getProcFd(pid);
|
||||||
|
Loading…
Reference in New Issue
Block a user