From 85a55fdcd8b9868c5fed1735cedcd9a4dde14672 Mon Sep 17 00:00:00 2001 From: flying-scorpio Date: Tue, 7 Jan 2020 12:56:30 +0100 Subject: [PATCH] Made the folder global Scripts --- system_info.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 system_info.sh diff --git a/system_info.sh b/system_info.sh new file mode 100755 index 0000000..1bbd2b9 --- /dev/null +++ b/system_info.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +# This script will return the following set of system information: + +# - Hostname information: +echo -e "\e[31;43m***** HOSTNAME INFORMATION *****\e[0m" +hostnamectl +echo "" + +# - File system disk space usage: +echo -e "\e[31;43m***** FILE SYSTEM DISK SPACE USAGE *****\e[0m" +df -h +echo "" + +# - Free and used memory in the system: +echo -e "\e[31;43m***** FREE AND USED MEMORY *****\e[0m" +free +echo "" + +# - System uptime and load: +echo -e "\e[31;43m***** SYSTEM UPTIME AND LOAD *****\e[0m" +uptime +echo "" + +# - Logged-in users: +echo -e "\e[31;43m***** CURRENTLY LOGGED-IN USERS *****\e[0m" +who +echo "" + +# - Top 5 processes as far as memory usage is concerned +echo -e "\e[31;43m***** TOP 5 MEMORY-CONSUMING PROCESSES *****\e[0m" +ps -eo %mem,%cpu,comm --sort=-%mem | head -n 6 +echo "" +echo -e "\e[1;32mDone.\e[0m" +