File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -690,6 +690,15 @@ ui_show_summary() {
690690 echo " ├─ Kernel: $( uname -r) "
691691 echo " ├─ glibc: $( ui_get_glibc_version) "
692692 echo " ├─ CPU Cores: $( nproc 2> /dev/null || echo " unknown" ) "
693+ # CPU model detection
694+ local cpu_model=" unknown"
695+ if command -v lscpu & > /dev/null; then
696+ cpu_model=$( LC_ALL=C lscpu | awk -F: ' /^Model name/{print $2}' | sed ' s/^[[:space:]]*//' )
697+ fi
698+ if [[ -z " $cpu_model " || " $cpu_model " == " unknown" ]] && [[ -r /proc/cpuinfo ]]; then
699+ cpu_model=$( awk -F: ' /model name|Hardware|Processor/{print $2; exit}' /proc/cpuinfo | sed ' s/^[[:space:]]*//' )
700+ fi
701+ echo " ├─ CPU Model: ${cpu_model} "
693702 if command -v free & > /dev/null; then
694703 local mem_gb=$( free -g | awk ' /^Mem:/ {print $2}' )
695704 echo " ├─ Memory: ${mem_gb} GB"
You can’t perform that action at this time.
0 commit comments