Skip to content

Instantly share code, notes, and snippets.

@chavarera
Created February 17, 2021 08:18
Show Gist options
  • Save chavarera/bfc0c9b60185a024eec97728f44e1c6a to your computer and use it in GitHub Desktop.
Save chavarera/bfc0c9b60185a024eec97728f44e1c6a to your computer and use it in GitHub Desktop.
Get linux based System Information
# Created By : Ravishankar Chavare
# Reference : Cinfo(utility Tool)
# Link : github.com/chavarera/cinfo
# Date : 17-02-2021
echo ' Architecture Info '
echo '__________________________________________________________________________________'
hostnamectl | grep -e 'Machine ID' -e 'Boot ID' -e 'Operating System' -e Kernel -e Architecture
echo -e "\n\n\n user Information "
echo '_____________________________________________________________________________________'
lslogins -u
echo -e "\n\n\n Hardware Information "
echo '_____________________________________________________________________________________'
lscpu | grep -e 'Model name' -e 'CPU MHz' -e 'CPU max MHz' -e 'CPU min MHz' -e 'CPU op-mode(s)' -e 'Address sizes' -e 'Thread(s) per core' -e Kernel -e 'Core(s) per socket' -e 'Vendor ID' -e Virtualization -e 'L1d cache' -e 'L1i cache' -e 'L2 cache' -e 'NUMA node0 CPU(s)'
echo -e "\n\n\n CPU Information "
echo '_____________________________________________________________________________________'
lscpu | grep -e 'Model name' -e 'Architecture'
echo -e "\n\n\n Kernel Drivers Information "
echo '_____________________________________________________________________________________'
ls -l /lib/modules/$(uname -r)/kernel/drivers/
echo -e "\n\n\n Memory Information(in MB) "
echo '_____________________________________________________________________________________'
free -m
echo -e "\n\n\n Network Information "
echo '_____________________________________________________________________________________'
nmcli -p device show
echo -e "\n\n\n Port Information "
echo '_____________________________________________________________________________________'
ss -lntu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment