Skip to content

Instantly share code, notes, and snippets.

@versvs
Created March 21, 2018 06:37
Show Gist options
  • Save versvs/4821efa4acd497948fed1e8ea931b61c to your computer and use it in GitHub Desktop.
Save versvs/4821efa4acd497948fed1e8ea931b61c to your computer and use it in GitHub Desktop.
small bash script to get the basic hardware stats of a CentOS machine
#!/bin/bash
# Clear the initial creen contents
clear
echo ------------------------------------------------------------------
echo CPU info [Number, type, speed...]
echo ------------------------------------------------------------------
lscpu
echo ------------------------------------------------------------------
echo Memory available [Mem + swap]
echo ------------------------------------------------------------------
free -ht
echo ------------------------------------------------------------------
echo Filesystem [size, mounts...]
echo ------------------------------------------------------------------
df -h
echo ------------------------------------------------------------------
echo CentOS Release information
echo ------------------------------------------------------------------
cat /etc/centos-release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment