wibian/mate/cpu.sh

9 lines
174 B
Bash

#!/bin/bash
# This script monitors CPU usage
# Get the current usage of CPU
cpuUsage=$(top -bn1 | awk '/Cpu/ { print $2}')
# Print the usage
echo "CPU: $cpuUsage%"