File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed
bus-health/src/main/java/org/aoju/bus/health Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -130,10 +130,10 @@ public LinuxOperatingSystem() {
130130 super .getVersionInfo ();
131131 }
132132
133- private static List <OSProcess > queryProcessList (Set <Integer > descendantPids ) {
133+ private List <OSProcess > queryProcessList (Set <Integer > descendantPids ) {
134134 List <OSProcess > procs = new ArrayList <>();
135135 for (int pid : descendantPids ) {
136- OSProcess proc = new LinuxOSProcess (pid );
136+ OSProcess proc = new LinuxOSProcess (pid , this );
137137 if (!proc .getState ().equals (OSProcess .State .INVALID )) {
138138 procs .add (proc );
139139 }
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public class FreeBsdOperatingSystem extends AbstractOperatingSystem {
5959 .collect (Collectors .joining ("," ));
6060 private static final long BOOTTIME = querySystemBootTime ();
6161
62- private static List <OSProcess > getProcessListFromPS (int pid ) {
62+ private List <OSProcess > getProcessListFromPS (int pid ) {
6363 String psCommand = "ps -awwxo " + PS_COMMAND_ARGS ;
6464 if (pid >= 0 ) {
6565 psCommand += " -p " + pid ;
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ public class OpenBsdOperatingSystem extends AbstractOperatingSystem {
5252 .collect (Collectors .joining ("," ));
5353 private static final long BOOTTIME = querySystemBootTime ();
5454
55- private static List <OSProcess > getProcessListFromPS (int pid ) {
55+ private List <OSProcess > getProcessListFromPS (int pid ) {
5656 List <OSProcess > procs = new ArrayList <>();
5757 // https://man.openbsd.org/ps#KEYWORDS
5858 // missing are threadCount and kernelTime which is included in cputime
Original file line number Diff line number Diff line change @@ -82,11 +82,11 @@ public class SolarisOperatingSystem extends AbstractOperatingSystem {
8282 HAS_KSTAT2 = lib != null ;
8383 }
8484
85- private static List <OSProcess > queryAllProcessesFromPrStat () {
85+ private List <OSProcess > queryAllProcessesFromPrStat () {
8686 return getProcessListFromProcfs (-1 );
8787 }
8888
89- private static List <OSProcess > getProcessListFromProcfs (int pid ) {
89+ private List <OSProcess > getProcessListFromProcfs (int pid ) {
9090 List <OSProcess > procs = new ArrayList <>();
9191
9292 File [] numericFiles = null ;
You can’t perform that action at this time.
0 commit comments