Hardinfo 在存储部分不显示任何内容

Hardinfo 在存储部分不显示任何内容

在此处输入图片描述我在我的 ubuntu 20.04 笔记本电脑上安装了 Hardinfo。“存储”部分是空白的。我注意到一个相关问题,其中提到“传感器”部分是空白的。这是“传感器”的修复方法:Hardinfo 使用 lm-sensors 作为传感器部分。要在此处查看任何内容,您需要先安装 lm-sensors。

sudo apt-get install lm-sensors

之后您需要设置传感器:

sudo sensors-detect

只需按照它说的做即可。我总是相信它知道自己在做什么,并对所有测试都说“是”,等等。只需确保你说“是”来保存它的发现,因为它默认为“否”。现在重新启动传感器服务: sudo service module-init-tools start

使用以下命令查看是否找到有效的传感器并且可以使用它们:

sensors

这也是针对“存储”的修复吗?如果不是,那么解决问题的步骤是什么?

谢谢。

更新,我在命令行中运行了以下命令: $ hardinfo Gtk-Message: 21:36:50.562: Failed to load module "canberra-gtk-module" Warning: truncated a line (probably flags list) longer than 896 bytes while reading /proc/cpuinfo.

我研究了错误并运行了以下命令: sudo apt-get install --reinstall libcanberra-gtk-module

然后我跑了:

$ hardinfo Warning: truncated a line (probably flags list) longer than 896 bytes while reading /proc/cpuinfo.

所以只修复了部分问题。我仍然遇到上述错误,“存储”仍然是空白

答案1

我想我找到了问题的答案。HardInfo 是一个小型应用程序,可显示有关硬件和操作系统的信息。目前,它了解 PCI、ISA PnP、USB、IDE、SCSI、串行和并行端口设备。处理器是 Intel(R) Pentium(R) Gold 7505 @ 2.00GHz x 4,存储设备是 SSD,BC711 NVMe SK hynix(128GB)。我怀疑 hardinfo 无法识别 SSD,并且它不喜欢 /proc/cpuinfo 中的扩展标志,否则 hardinfo 似乎可以正常运行。如果有人有被识别的 SSD,请告诉我,我会继续挖掘。谢谢

答案2

已确认错误hardinfo

你说得对@TBr,

在运行 Ubuntu 20.04.2 LTS 时,我检查了带有 NVMe SSD 的计算机,它识别出一个 USB 闪存盘,其中的 FAT32 分区显示为“vfat”和一个“假 cdrom”(是的,它是闪存盘的一部分,计算机中没有光驱)。

Hardinfo 可以看到 USB 闪存盘的内容,但看不到内部 NVMe 驱动器的内容。

在此处输入图片描述

编辑:

  • 我发现了您的错误报告并点击了“也影响到我”。

  • 我注意到您无法Report.sh从 Ubuntu 论坛获取。目前还没有文件可供下载,但我在这个编辑后的答案的末尾放了一个“测试版”。应该可以

    • 将包含脚本内容的整个文本从“代码”窗口复制并粘贴到计算机中的文本编辑器中

    • 用合适的名称保存,例如Report.sh

    • 使其可执行

      chmod +x Report.sh
      
    • 在存储脚本文件的目录中运行它

      ./Report.sh
      
    • 读取文件

      less '~/Report.txt'
      

测试版Report.sh

#!/bin/bash

## MAFoElffen     2021.08.19
## Version 01.01, 2021.08.20
## Includes recommended changes submitted by:
##     sudodus    2021.08.20
##     oldfred    2021.08.20
## Filename: Report-01.01.sh
## Description: Report Finds Machine Hardware Related Information.
##     For support use at "UbuntuForums.org".

## Check if ran as root
if [[ "$EUID" == 0 ]]
   then echo "This script cannot be run as root"
   exit
fi

## Set filename and path to
report="$HOME/Report.txt"

## Set locale settings
LANG=C

## Set a pretty screen decoration for displaying the report onscreen
blueback="\0033[1;37;44m"
resetvid="\0033[0m"

## Check for preinstalled prerequisites
REQUIRED=$(apt list --installed | grep inxi 2> /dev/null)
SUB1="installed"
boot_mode=$( [ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "Legacy mode (alias CSM alias BIOS mode)" )

echo "This script will install any prerequisite packages..." # The LiveCD has this preinstalled

if [[ $REQUIRED == *"$SUB1"* ]]; then
    continue;
else
    sudo add-apt-repository universe
    sudo apt install -y inxi;
fi

# User Input for Computer Make, Model, Type.
clear
echo -e "Please provide some \"Basic Information\"..."
#read -p "Computer Make (ie: Dell/HP/ASUS/Lenova): " computer_make
#read -p "Computer Model (ie: Ultima 420p) " computer_model
#read -p "Computer Type (ie: Server | Desktop | Laptop): " computer_type
read -p "What is the main complaint (summarized)? " main_complaint
read -p "Describe the Problem: " problem_description
clear

# Machine Info
echo -e "Starting Report: `date +%F`  `date +%T`" > $report
echo -e "" >> $report
echo -e "${blueback}---------- User Input:$resetvid" >> $report
#echo -e "Computer Make:  $computer_make" >> $report
#echo -e "Computer Model: $computer_model" >> $report
#echo -e "Computer Type:  $computer_type" >> $report
echo -e ""  >> $report
echo -e "Main Complaint: $main_complaint" >> $report
echo -e "Problem Description:  $problem_description" >> $report
echo -e "" >> $report
echo -e "${blueback}---------- General computers specs from 'lshw':$resetvid" >> $report
sudo bash -c "lshw | sed '/*-core/,$ d'" >> $report
clear
echo -e "" >> $report
echo -e "${blueback}---------- General computers specs from 'inxi':$resetvid" >> $report
sudo bash -c "inxi -CDGimMoprS | grep -v 'loop\|snap'" >> $report
clear
echo -e "${blueback}---------- File System Disk Space Usage:$resetvid" >> $report
bash -c "df -h | grep -v '/snap/'" >> $report
echo -e "" >> $report
echo -e "" >> $report
echo -e "${blueback}---------- Additional Disk/Partition Information:$resetvid" >> $report
echo -e "${blueback}---------- Information From 'fdisk':$resetvid"  >> $report
sudo bash -c "fdisk -l | grep 'Disk\|Device\|/dev/' | grep -v 'loop\|snap'"  >> $report
echo -e "" >> $report
echo -e "${blueback}---------- Information From 'lsblk':$resetvid"  >> $report
bash -c "lsblk -o NAME,SIZE,FSTYPE,LABEL,MOUNTPOINT,MODEL | grep -v '/snap/'" >> $report
echo -e "    ------- 'lsblk' information continued..." >> $report
bash -c "lsblk -o NAME,PARTUUID,UUID | grep -v loop" >> $report
echo -e "${blueback}---------- Mount Details of '/etc/fstab':$resetvid"  >> $report
bash -c "egrep -v '#' /etc/fstab"  >> $report
echo -e "" >> $report
echo -e "${blueback}---------- Video Details:$resetvid"  >> $report
sudo bash -c "lshw -C video" >> $report
clear
echo -e "" >> $report
echo -e "${blueback}---------- Other Details:$resetvid"  >> $report
echo -e "The computer boot mode was: $boot_mode" >> $report
echo -e "The current kernel version is: `uname -r`" >> $report
echo -e "The current release description is: `lsb_release -sd`" >> $report
echo -e "" >> $report
echo -e "The current logged in User is: `who`" >> $report
echo -e "" >> $report
echo -e "The User\'s ID is: `id`" >> $report
echo -e "" >> $report
echo -e "The current running DE is: $XDG_CURRENT_DESKTOP" >> $report
echo -e "" >> $report
echo -e "*** End Of Report ***"  >> $report
echo -e "" >> $report
echo -e "The Report can be found at '$report' and can be viewed with 'less'"
echo -e ""
echo -e ""
less -r $report
## Post-Process Report.txt to remove the extraneous ANSI characters sequences from the report text...
perl -i -pe 's/\x1b\[[0-9;]*[mG]//g' $report
#sed -i 's/\x1b\[[0-9;]*[mG]//g' $report

相关内容