SHARE
TWEET

Script to show pc information

hoome Jul 20th, 2013 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. kernel=$(uname -r)
  3. architecture=$(uname -m)
  4. hostname=$(hostname)
  5. user=$USER
  6. cpu=$(cat /proc/cpuinfo | grep name -m 1 | cut -d ":" -f 2)
  7. mem=$(echo "$(cat /proc/meminfo | grep MemTotal | cut -d ":" -f 2 | sed 's/ //g' | sed 's/kB//g') / 1024" | bc)
  8. kde=$(kinfocenter -v | grep KDE -m 1 | cut -d ":" -f 2)
  9. speed=$(/home/artur/Projetos/Shell/getclock.sh)
  10. ip=$(/sbin/ifconfig enp3s0 | grep inet -m 1 | cut -d "n" -f 2 | sed 's/et //')
  11. vga=$(nvidia-smi -q | grep "Product Name" | cut -d ":" -f 2)
  12. vgatemp=$(nvidia-smi -q | grep Temperature -A 1 | grep Gpu | cut -d ":" -f 2 | sed 's/ //g' | sed 's/C/°C/g')
  13. vgadriver=$(nvidia-smi -q | grep "Driver Version" | cut -d ":" -f 2 | sed 's/ //g')
  14. vgaram=$(nvidia-smi -q | grep -A 1 "Memory Usage" | grep Total | cut -d ":" -f 2 | sed 's/ //')
  15. vgausedram=$(nvidia-smi -q | grep -A 2 "Memory Usage" | grep Used | cut -d ":" -f 2 | sed 's/ //')
  16. clear
  17. echo -e "\033[1;32mArch Linux\n"
  18. echo -e "\033[1;33mLinux: \033[1;37m$kernel \t\t\t\t \033[1;33mPlatform: \033[1;37m$architecture"
  19. echo -e "\033[1;33mHost: \033[1;37m$hostname \t\t\t\t \033[1;33mUser: \033[1;37m$user"
  20. echo -e "\033[1;33mCPU:\033[1;37m$cpu \t \033[1;33mVGA: \033[1;37m$vga"
  21. echo -e "\033[1;33mMemory:\033[1;37m $mem MB \t\t\t\t \033[1;33mCPU Cur. Speed:\033[1;37m $speed MHz"
  22. echo -e "\033[1;33mLocal IP: \033[1;37m$ip\t\t\t \033[1;33mKDE:\033[1;37m$kde"
  23. echo -e "\033[1;33mVGA Driver: \033[1;37m$vgadriver \t\t\t\t \033[1;33mVGA Temp.: \033[1;37m$vgatemp"
  24. echo -e "\033[1;33mVGA RAM: \033[1;37m$vgaram \t\t\t\t \033[1;33mVGA Used: \033[1;37m$vgausedram"
  25. echo -e "\033[1;33m"
  26. df -h | grep Sist.
  27. echo -en "\033[1;37m"
  28. df -h | grep sd
  29. echo -e "\033[1;37m"
  30. sensors | grep ACPI -A 8 | cut -d "(" -f 1 | sed 's/+//g' | grep -v ACPI
  31. echo -e "\033[m"
  32. if [ "$1" == "--start" ]; then
  33.     /bin/bash
  34. fi
RAW Paste Data
Top