private static boolean isAlive(String pid) throws IOException {
String commandString ="ps -o pid,command -e";
String args[] = new String[] {"bash", "-c" , commandString};
ShellCommandExecutor shExec = new ShellCommandExecutor(args);
try {
shExec.execute();
}catch(ExitCodeException e) {
return false;
} catch (IOException e) {
LOG.warn("IOExecption thrown while checking if process is alive" +
StringUtils.stringifyException(e));