public class GenericProbe
extends java.lang.Object
Constructor and Description |
---|
GenericProbe(java.lang.String[] fields)
Creates a new memory probe that will return only the mentioned
attributes' values, in the very same order.
|
Modifier and Type | Method and Description |
---|---|
long[] |
getData()
Reads the system data source file for memory usage, and returns
the values of attributes of interest.
|
public GenericProbe(java.lang.String[] fields) throws java.lang.Exception
fields
- names of attributes of interest.java.lang.Exception
- an attribute name does not existgetData()
public long[] getData() throws java.io.IOException
java.io.IOException
- for some reason, the system data source file
could not be read, or more probably the file format is not
compatible with this probe.GenericProbe(String[])