From 0f1f62f5072d20a00bf969e198eacd06b0654e16 Mon Sep 17 00:00:00 2001 From: Bonnie I-Man Ng Date: Tue, 9 Jul 2019 10:49:04 +0800 Subject: [PATCH] add 'system' section 1. Eliminate the zombie 2. Show memory usage --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 93efb2e..4c89438 100644 --- a/README.md +++ b/README.md @@ -1244,6 +1244,22 @@ xcowsay ## System [[back to top](#handy-bash-one-liners)] +##### Eliminate the zombie +```bash +# A zombie is already dead, so you cannot kill it. You can eliminate the zombie by killing its parent. +# First, find PID of the zombie +ps aux| grep 'Z' +# Next find the PID of zombie's parent +pstree -p -s +# Then you can kill its parent and you will notice the zombie is gone. +sudo kill 9 +``` +###### Show memory usage +```bash +free -c 10 -mhs 1 +# print 10 times, at 1 second interval +``` + ##### Display CPU and IO statistics for devices and partitions. ```bash # refresh every second