소스 검색

Improving output when swap space has zero size

Jan Wagner 11 년 전
부모
커밋
344106ec16
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      plugins/check_swap.c

+ 2 - 1
plugins/check_swap.c

@@ -353,7 +353,8 @@ main (int argc, char **argv)
 	} else if(total_swap_mb > 0) {
 		percent_used = 100 * ((double) used_swap_mb) / ((double) total_swap_mb);
 	} else {
-		percent_used = 0;
+		percent_used = 100;
+		status = "- Swap is either disabled, not present, or of zero size. ";
 	}
 
 	result = max_state (result, check_swap (percent_used, free_swap_mb));