mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-22 21:07:00 +00:00
add 'system' section
1. Eliminate the zombie 2. Show memory usage
This commit is contained in:
parent
ef9141b0a3
commit
0f1f62f507
16
README.md
16
README.md
@ -1244,6 +1244,22 @@ xcowsay
|
|||||||
## System
|
## System
|
||||||
[[back to top](#handy-bash-one-liners)]
|
[[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 <zombie_PID>
|
||||||
|
# Then you can kill its parent and you will notice the zombie is gone.
|
||||||
|
sudo kill 9 <parent_PID>
|
||||||
|
```
|
||||||
|
###### 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.
|
##### Display CPU and IO statistics for devices and partitions.
|
||||||
```bash
|
```bash
|
||||||
# refresh every second
|
# refresh every second
|
||||||
|
Loading…
Reference in New Issue
Block a user