In class GangliaDataSource, the polling is realized via the system command telnet:
String cmd = "telnet " + hostname + " " + port;
String content = "";
try {
Process p = Runtime.getRuntime().exec(cmd);
BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = null;
while ((line = reader.readLine()) != null) {
...
}
...
this approach might not be very portable as it is not guaranteed that there is a telnet command available. We should replace this with a java.net.Socket based implementation that opens a client socket towards the Ganglia port
In class GangliaDataSource, the polling is realized via the system command telnet:
this approach might not be very portable as it is not guaranteed that there is a telnet command available. We should replace this with a java.net.Socket based implementation that opens a client socket towards the Ganglia port