28
23

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Swapを使ってるプロセスを探す

Last updated at Posted at 2017-12-15

Swapを使っているプロセスと使用量を使ってる順に表示

$ grep VmSwap /proc/*/status | sort -k 2 -nr

Swapを使っているプロセスをpsで調べるワンライナー

$ grep VmSwap /proc/*/status | sort -k 2 -nr | cut -d"/" -f3 | grep -e '^[0-9]*$' | xargs -I{} ps u -p{} --no-headers

現実的には上の幾つかのプロセスを再起動なりしてあげるとSwapが開放されるでしょう。

28
23
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
28
23

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?