mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2025-02-16 15:22:44 +00:00
Add CPU IO and network monitoring on [system]
This commit is contained in:
parent
c64c6fbf50
commit
89290279a4
13
README.md
13
README.md
@ -1235,7 +1235,18 @@ xcowsay
|
|||||||
## System
|
## System
|
||||||
[[back to top](#handy-bash-oneliner-commands)]
|
[[back to top](#handy-bash-oneliner-commands)]
|
||||||
|
|
||||||
# Check if it's root running
|
##### Display CPU and IO statistics for devices and partitions.
|
||||||
|
```bash
|
||||||
|
# refresh every second
|
||||||
|
iostat -x -t 1
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Display bandwidth usage on an network interface (e.g. enp175s0f0)
|
||||||
|
```bash
|
||||||
|
iftop -i enp175s0f0
|
||||||
|
```
|
||||||
|
|
||||||
|
##### Check if it's root running
|
||||||
```bash
|
```bash
|
||||||
if [ "$EUID" -ne 0 ]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
echo "Please run this as root"
|
echo "Please run this as root"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user