Exported on 25-Sep-2021 15:10:38
Parameters
1 - List CPU, RAM and Storage
These commands show the current usage for the following resources:
- CPU
- RAM
- Storage
The output is simple scrap from the "top" command that comes by default in Linux.
The connection details have changed from the last step.
Login as user {Linux User} on node {Linux Node}
# Use Linux Top command to scrap server vitals
# Witht the help of sed and awk utility commands
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)}'`"
Check Server Vitals Of A Linux Systems
This Blueprint shows current usage percentage of CPU, RAM and Storage for the target Linux system
CPU The computer's central processing unit (CPU) is the portion of a computer that retrieves and executes instructions. The CPU is essentially the brain of a CAD system. It consists of an arithmetic and logic unit (ALU), a control unit, and various registers. The CPU is often simply referred to as the processor. This blueprint prints the current usage percentage of all the CPUs available in the target machine.
RAM Random-access memory is a form of computer memory that can be read and changed in any order, typically used to store working data and machine code. This blueprint prints the current usage percentage of the RAM in the target machine.
Storage Computer data storage is a technology consisting of computer components and recording media that are used to retain digital data. It is a core function and fundamental component of computers. This blueprint prints the current usage percentage of the Storage in the target machine.
Pre-Blueprint Attune setup
Tested on following Linux distributions:
Basic Unix commands are used to make this script and it is expected to work on all other Linux distributions.