String status = "no service";
try {
Service service = jpm.getService(s);
if (service != null) {
runs = service.isRunning() + "";
status = service.status();
}
}
catch (Exception e) {
status = e.getMessage();
exception(e, "could not fetch status information from service %s, due to %s", s, e.getMessage());