BASH - Show SWAP Usage.sh: Difference between revisions

From IT-Arts.net
Created page with "Category:Post-It <nowiki> #!/bin/sh # # LIST SWAP USAGE BY APPLICATION for file in /proc/*/status ; do grep -q "VmSwap" $file;if [ $? -eq 0 ]; then awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; fi done|grep -v '0 kB' | sort -k 2 -n exit 0</nowiki>"
 
m Text replacement - "Category:Wiki" to "Category:Wiki '''''[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]''''' "
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Category:Post-It]]
[[Category:Wiki]]
 
'''''[https://it-arts.net/index.php/Category:Wiki Return to Wiki Index]'''''
 


  <nowiki>
  <nowiki>

Latest revision as of 08:20, 17 January 2026


Return to Wiki Index


#!/bin/sh
#
# LIST SWAP USAGE BY APPLICATION

for file in /proc/*/status ; do grep -q "VmSwap" $file;if [ $? -eq 0 ]; then awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; fi done|grep -v '0 kB' | sort -k 2 -n

exit 0