{"_path":"/linux/find-out-who-uses-swap","_dir":"linux","_draft":false,"_partial":false,"_locale":"en","_empty":false,"title":"Find Out Who Uses Swap","description":"","excerpt":{"type":"root","children":[{"type":"element","tag":"code","props":{"code":"for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 \" \" $3}END{ print \"\"}' $file; done | sort -k 2 -n -r | less\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"text","value":"for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 \" \" $3}END{ print \"\"}' $file; done | sort -k 2 -n -r | less\n"}]}]}]}]},"body":{"type":"root","children":[{"type":"element","tag":"code","props":{"code":"for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 \" \" $3}END{ print \"\"}' $file; done | sort -k 2 -n -r | less\n","language":"shell"},"children":[{"type":"element","tag":"pre","props":{},"children":[{"type":"element","tag":"code","props":{"__ignoreMap":""},"children":[{"type":"element","tag":"span","props":{"class":"line"},"children":[{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":"for"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-8ee681"},"children":[{"type":"text","value":"file"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":"in"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" /proc/"}]},{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":"*"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":"/status "}]},{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":";"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":"do"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" awk "}]},{"type":"element","tag":"span","props":{"class":"ct-1d7396"},"children":[{"type":"text","value":"'/VmSwap|Name/{printf $2 \" \" $3}END{ print \"\"}'"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":"done"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" "}]},{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" sort -k 2 -n -r "}]},{"type":"element","tag":"span","props":{"class":"ct-b91087"},"children":[{"type":"text","value":"|"}]},{"type":"element","tag":"span","props":{"class":"ct-bbbdc4"},"children":[{"type":"text","value":" less"}]}]}]}]}]},{"type":"element","tag":"style","children":[{"type":"text","value":".ct-1d7396{color:#A5D6FF}.ct-8ee681{color:#C9D1D9}.ct-bbbdc4{color:#C9D1D9}.ct-b91087{color:#FF7B72}.light .ct-b91087{color:#859900}.light .ct-bbbdc4{color:#657B83}.light .ct-8ee681{color:#268BD2}.light .ct-1d7396{color:#2AA198}"}]}],"toc":{"title":"","searchDepth":2,"depth":2,"links":[]}},"_type":"markdown","_id":"content:Linux:Find out who uses swap.md","_source":"content","_file":"Linux/Find out who uses swap.md","_extension":"md"}