Created
November 6, 2024 13:56
-
-
Save Huskynarr/e881436c81109333ea6ec11ccf969bc3 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 | |
| # Farbdefinitionen | |
| BLUE='\033[0;34m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| CYAN='\033[0;36m' | |
| RED='\033[0;31m' | |
| NC='\033[0m' # Keine Farbe | |
| BOLD='\033[1m' | |
| # Header | |
| printf "${BLUE}${BOLD}╔════════════════════════════════════════╗${NC}\n" | |
| printf "${BLUE}${BOLD}║ System Information Summary ║${NC}\n" | |
| printf "${BLUE}${BOLD}╚════════════════════════════════════════╝${NC}\n\n" | |
| # CPU-Informationen | |
| printf "${CYAN}${BOLD}🖥️ CPU Informationen${NC}\n" | |
| printf "${YELLOW}├─ " | |
| lscpu | grep "Model name" | sed 's/Model name: *//g' | |
| printf "${GREEN}├─ Kerne: " | |
| lscpu | grep "^CPU(s):" | awk '{print $2}' | |
| printf "${GREEN}├─ Threads pro Kern: " | |
| lscpu | grep "Thread(s) per core" | awk '{print $4}' | |
| printf "${GREEN}├─ Physische Kerne: " | |
| lscpu | grep "Core(s) per socket" | awk '{print $4}' | |
| printf "${GREEN}└─ Sockel: " | |
| lscpu | grep "Socket(s)" | awk '{print $2}' | |
| echo | |
| # Speicherinformationen | |
| printf "${CYAN}${BOLD}🧮 Speicherinformationen${NC}\n" | |
| printf "${GREEN}├─ Gesamtspeicher: " | |
| free -h | grep "^Mem:" | awk '{print $2}' | |
| printf "${GREEN}├─ Genutzter Speicher: " | |
| free -h | grep "^Mem:" | awk '{print $3}' | |
| printf "${GREEN}├─ Freier Speicher: " | |
| free -h | grep "^Mem:" | awk '{print $4}' | |
| printf "${GREEN}├─ Swap-Gesamt: " | |
| free -h | grep "^Swap:" | awk '{print $2}' | |
| printf "${GREEN}└─ Swap-Verwendet: " | |
| free -h | grep "^Swap:" | awk '{print $3}' | |
| echo | |
| # GPU-Informationen | |
| printf "${CYAN}${BOLD}🎮 GPU Informationen${NC}\n" | |
| if command -v nvidia-smi &> /dev/null; then | |
| printf "${GREEN}├─ GPU: " | |
| nvidia-smi --query-gpu=gpu_name --format=csv,noheader | |
| printf "${GREEN}├─ Treiberversion: " | |
| nvidia-smi --query-gpu=driver_version --format=csv,noheader | |
| printf "${GREEN}├─ GPU-Speicher: " | |
| nvidia-smi --query-gpu=memory.total --format=csv,noheader | |
| printf "${GREEN}└─ CUDA Version: " | |
| nvidia-smi | grep "CUDA Version" | awk '{print $9}' | |
| else | |
| printf "${RED}└─ NVIDIA GPU nicht erkannt oder Treiber nicht installiert${NC}\n" | |
| fi | |
| echo | |
| # Python-Informationen | |
| printf "${CYAN}${BOLD}🐍 Python Informationen${NC}\n" | |
| if command -v python3 &> /dev/null; then | |
| printf "${GREEN}└─ " | |
| python3 --version | |
| else | |
| printf "${RED}└─ Python3 nicht installiert${NC}\n" | |
| fi | |
| echo | |
| # Docker-Informationen | |
| printf "${CYAN}${BOLD}🐋 Docker Informationen${NC}\n" | |
| if command -v docker &> /dev/null; then | |
| printf "${GREEN}└─ " | |
| docker --version | |
| else | |
| printf "${RED}└─ Docker nicht installiert${NC}\n" | |
| fi | |
| echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment