-
-
Save pythoninthegrass/52a4642fc31a7e110fe1145608b0e3df to your computer and use it in GitHub Desktop.
Revisions
-
pythoninthegrass revised this gist
Jun 26, 2023 . 2 changed files with 22 additions and 34 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,34 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ #!/usr/bin/env bash # To see current swap usage sysctl -a | grep swap # Monitor swap usage vm_stat 60 # Use only when when your system is in a very bad shape sudo pkill -HUP -u _windowserver # To monitor, what's creating/updating these swap files sudo fs_usage | grep swapfile # Or for page ins/outs sudo fs_usage | grep PAGE_ # To see what WindowServer process is doing exactly sudo spindump -reveal $(pgrep WindowServer) # or for kernel_task sudo spindump -reveal 0 -
anildigital revised this gist
Apr 27, 2020 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ ### To see current swap usage ``` sysctl -a | grep swap ``` ### Use only when when your system is in a very bad shape ``` -
anildigital created this gist
Apr 27, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ ### Use only when when your system is in a very bad shape ``` $ sudo pkill -HUP -u _windowserver ``` ### To monitor, what's creating/updating these swap files, run: ``` $ sudo fs_usage | grep swapfile ``` ### Or for page ins/outs, run: ``` $ sudo fs_usage | grep PAGE_ ``` ### To see what WindowServer process is doing exactly, run: ``` $ sudo spindump -reveal $(pgrep WindowServer) ``` ### or for kernel_task, run: ``` $ sudo spindump -reveal 0 ```