org.hyperic.sigar.ProcFd Maven / Gradle / Ivy
/*****************************************************
* WARNING: this file was generated by -e
* on Mon May 24 16:26:06 2010.
* Any changes made here will be LOST.
*****************************************************/
package org.hyperic.sigar;
import java.util.HashMap;
import java.util.Map;
/**
* ProcFd sigar class.
*/
public class ProcFd implements java.io.Serializable {
private static final long serialVersionUID = 948L;
public ProcFd() { }
public native void gather(Sigar sigar, long pid) throws SigarException;
/**
* This method is not intended to be called directly.
* use Sigar.getProcFd() instead.
* @exception SigarException on failure.
* @see org.hyperic.sigar.Sigar#getProcFd
*/
static ProcFd fetch(Sigar sigar, long pid) throws SigarException {
ProcFd procFd = new ProcFd();
procFd.gather(sigar, pid);
return procFd;
}
long total = 0;
/**
* Get the Total number of open file descriptors.
* Supported Platforms: AIX, HPUX, Linux, Solaris, Win32.
*
* System equivalent commands:
* - AIX:
lsof
* - Darwin:
lsof
* - FreeBSD:
lsof
* - HPUX:
lsof
* - Linux:
lsof
* - Solaris:
lsof
* - Win32:
*
* @return Total number of open file descriptors
*/
public long getTotal() { return total; }
void copyTo(ProcFd copy) {
copy.total = this.total;
}
public Map toMap() {
Map map = new HashMap();
String strtotal =
String.valueOf(this.total);
if (!"-1".equals(strtotal))
map.put("Total", strtotal);
return map;
}
public String toString() {
return toMap().toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy