Skip to content

Commit

Permalink
Merge ef9b42e into ad3ed12
Browse files Browse the repository at this point in the history
  • Loading branch information
Roeezz committed May 16, 2020
2 parents ad3ed12 + ef9b42e commit dc76f77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ private static Pair<Long, Long> queryVmStat() {
String[] memorySplit = ParseUtil.whitespaces.split(checkLine);
if (memorySplit.length > 1) {
switch (memorySplit[0]) {
case "pgpgin":
case "pswpin":
swapPagesIn = ParseUtil.parseLongOrDefault(memorySplit[1], 0L);
break;
case "pgpgout":
case "pswpout":
swapPagesOut = ParseUtil.parseLongOrDefault(memorySplit[1], 0L);
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,15 @@ public long getSwapPagesOut() {

private static long queryPagesIn() {
long swapPagesIn = 0L;
for (String s : ExecutingCommand.runNative("kstat -p cpu_stat:::pgpgin")) {
for (String s : ExecutingCommand.runNative("kstat -p cpu_stat:::pgswapin")) {
swapPagesIn += ParseUtil.parseLastLong(s, 0L);
}
return swapPagesIn;
}

private static long queryPagesOut() {
long swapPagesOut = 0L;
for (String s : ExecutingCommand.runNative("kstat -p cpu_stat:::pgpgout")) {
for (String s : ExecutingCommand.runNative("kstat -p cpu_stat:::pgswapout")) {
swapPagesOut += ParseUtil.parseLastLong(s, 0L);
}
return swapPagesOut;
Expand Down

0 comments on commit dc76f77

Please sign in to comment.