Check which processes are using swap



Published: 2017-10-02 08:55:55 +0000
Categories: BASH,

Language

BASH

Description

Simple command to check which processes are using swap (and how much). Can be used to help track down the source of high swap usage

Snippet

for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less

Keywords

swap, usage, check, identify, process,

Latest Posts


Copyright © 2019 Ben Tasker | Sitemap | Privacy Policy
Available at snippets.bentasker.co.uk and snippets.6zdgh5a5e6zpchdz.onion