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 © 2022 Ben Tasker | Sitemap | Privacy Policy
Available at snippets.bentasker.co.uk, http://phecoopwm6x7azx26ctuqcp6673bbqkrqfeoiz2wwk36sady5tqbdpqd.onion and http://snippets.bentasker.i2p
hit counter