@Test public void testGetProcessList() { System.out.println("===============Testing getProcessList============"); List<ProcessInfo> processesList = JProcesses.get().fastMode() .listProcesses(); assertTrue(processesList != null && processesList.size() > 0); for (final ProcessInfo processInfo : processesList) { System.out.println("Process PID: " + processInfo.getPid()); System.out.println("Process Name: " + processInfo.getName()); System.out.println("Process Time: " + processInfo.getTime()); System.out.println("User: " + processInfo.getUser()); System.out.println("Virtual Memory: " + processInfo.getVirtualMemory()); System.out.println("Physical Memory: " + processInfo.getPhysicalMemory()); System.out.println("CPU usage: " + processInfo.getCpuUsage()); System.out.println("Start Time: " + processInfo.getStartTime()); System.out.println("Start DateTime: " + processInfo.getExtraData().get("start_datetime")); System.out.println("Priority: " + processInfo.getPriority()); System.out.println("Full command: " + processInfo.getCommand()); System.out.println("------------------"); } System.out.println("===============End test getProcessList============"); }
public static List<ProcessInfo> getProcessList() { return getService().getList(); }
JProcesses { public static List<ProcessInfo> getProcessList() { return getService().getList(); } }
JProcesses { public static List<ProcessInfo> getProcessList() { return getService().getList(); } private  JProcesses(); }
JProcesses { public static List<ProcessInfo> getProcessList() { return getService().getList(); } private  JProcesses(); static JProcesses get(); JProcesses fastMode(); JProcesses fastMode(boolean enabled); List<ProcessInfo> listProcesses(); List<ProcessInfo> listProcesses(String processName); static List<ProcessInfo> getProcessList(); static List<ProcessInfo> getProcessList(String processName); static ProcessInfo getProcess(int pid); static JProcessesResponse killProcess(int pid); static JProcessesResponse killProcessGracefully(int pid); static JProcessesResponse changePriority(int pid, int newPriority); }
JProcesses { public static List<ProcessInfo> getProcessList() { return getService().getList(); } private  JProcesses(); static JProcesses get(); JProcesses fastMode(); JProcesses fastMode(boolean enabled); List<ProcessInfo> listProcesses(); List<ProcessInfo> listProcesses(String processName); static List<ProcessInfo> getProcessList(); static List<ProcessInfo> getProcessList(String processName); static ProcessInfo getProcess(int pid); static JProcessesResponse killProcess(int pid); static JProcessesResponse killProcessGracefully(int pid); static JProcessesResponse changePriority(int pid, int newPriority);  }