protected void formatProcesses(String job)
{
try {
IDuccWorkJob dwj = readJob(job);
IDuccProcessMap pmap = dwj.getProcessMap();
String headerFmt = "%25s %8s %12s %12s %12s %12s %12s %12s %10s %8s %8s %8s %8s %8s %8s %8s %s";
String underline = dup("-", 25) + " -------- ------------ ------------ ------------ ------------ ------------ ------------ ---------- -------- -------- -------- -------- -------- -------- -------- -----------------";
String dataFmt = null;
if ( csv ) {
dataFmt = "%s\t%s\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%s";
} else {
dataFmt = "%25.25s %8s %12d %12d %12d %12d %12d %12d %10d %8d %8d %8d %8d %8d %8d %8d %s";
System.out.println(String.format(headerFmt, "Node", "Pid", "Init Time",
"Mem", "MemMax", "Faults", "Swap", "MaxSwap", "CPU",
"gcCount", "gcTime",
"wiDisp", "wiDone", "wiError", "wiRetry", "wiPrmpt",
"Exit Reason"));
System.out.println(underline);
}
for (DuccId id : pmap.keySet() ) {
IDuccProcess idp = pmap.getProcess(id);
String node = idp.getNodeIdentity().getName();
String pid = idp.getPID();
String exit_reason = idp.getReasonForStoppingProcess();
long mem = idp.getResidentMemory();