-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sysctl: fix with printf for the value 2 of vm.overcommit_memory
Signed-off-by: Jay Shin <[email protected]>
- Loading branch information
1 parent
b43adfa
commit 74b3823
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
# xsos v0.7.32 last mod 2024-05-28 | ||
# xsos v0.7.33 last mod 2024-06-25 | ||
# Latest version at <http://github.com/ryran/xsos> | ||
# RPM packages available at <http://people.redhat.com/rsawhill/rpms> | ||
# Copyright 2012-2018 Ryan Sawhill Aroha <[email protected]> | ||
|
@@ -3147,7 +3147,7 @@ SYSCTL() { | |
__P vm.min_free_kbytes | ||
__Pa vm.nr_hugepages "[$hpgsz-MiB pages] " "-vHPGSZ=$hpgsz" '{if ($1>0) printf "\"%s\"%s (%.1f GiB total)", $1, H0, $1*HPGSZ/1024; else printf "\"%s\"%s", $1, H0}' | ||
__Pa vm.nr_overcommit_hugepages "[$hpgsz-MiB pages] " "-vHPGSZ=$hpgsz" '{if ($1>0) printf "\"%s\"%s (%.1f GiB total)", $1, H0, $1*HPGSZ/1024; else printf "\"%s\"%s", $1, H0}' | ||
__Pa vm.overcommit_memory "[0-2] " '{if ($1==0) printf "\"0\"%s (heuristic overcommit)", H0; else if ($1==1) printf "\"1\"%s (always overcommit, never check)", H0; else if ($1==2) print "\"2\"%s (always check, never overcommit)", H0}' | ||
__Pa vm.overcommit_memory "[0-2] " '{if ($1==0) printf "\"0\"%s (heuristic overcommit)", H0; else if ($1==1) printf "\"1\"%s (always overcommit, never check)", H0; else if ($1==2) printf "\"2\"%s (always check, never overcommit)", H0}' | ||
__P vm.overcommit_ratio | ||
__Pa vm.oom_kill_allocating_task "[bool] " '{if ($1==0) printf "\"0\"%s (scan tasklist)", H0; else printf "\"1\"%s (kill OOM-triggering task)", H0}' | ||
__Pa vm.panic_on_oom "[0-2] " '{if ($1==0) printf "\"0\"%s (no panic)", H0; else if ($1==1) printf "\"1\"%s (no panic if OOM-triggering task limited by mbind/cpuset)", H0; else if ($1==2) printf "\"2\"%s (always panic)", H0}' | ||
|