I've seen a few posts wanting the same regarding usage, however the answers ALWAYS refer to installing some third party tool.
I do not want to install anything.
Any one liners? The following would be a nice output:
CPU 11% RAM 20% HDD 85%
You can use this
echo "CPU `LC_ALL=C top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1}'`% RAM `free -m | awk '/Mem:/ { printf("%3.1f%%", $3/$2*100) }'` HDD `df -h / | awk '/\// {print $(NF-1)}'`"
The output is
CPU 7.4% RAM 33.9% HDD 94%
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加