Created
May 16, 2018 08:53
-
-
Save Diablo2050/b50d6a590c1b8a8172937a319edc4145 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| cores=$(lscpu | egrep "^CPU\(s\)") | |
| cpu_model=$(grep "model name" /proc/cpuinfo | uniq) | |
| ram=$(free -g | grep Mem | awk '{ print $2 }') | |
| red="\e[91m" | |
| norm="\e[0m" | |
| echo -e "$red | |
| CPU INFO:\n $norm | |
| $cores | |
| $cpu_model | |
| $red | |
| RAM INFO: \n$norm | |
| Ram in GB: $ram | |
| $red | |
| Disk INFO: $norm | |
| " | |
| disk=/dev/sd | |
| for i in {a..z} | |
| do | |
| if [ -e $disk$i ] | |
| then | |
| model=$(smartctl -i $disk$i |egrep "Model Family|User Capacity") | |
| echo $model | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment