Condense network output and show all PCI devices

- Filter out veth* interfaces from network statistics and NIC details
  (these are container virtual interfaces that clutter the output)
- Show all interesting PCI devices instead of just VGA/ethernet/raid
  (excludes Host bridge, PCI bridge, ISA bridge, SMBus, IOMMU, Dummy)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-24 21:34:17 -05:00
parent 6e3cafa98d
commit 8a12db93ae

View File

@@ -152,12 +152,15 @@ get_network_info() {
get_detailed_network() {
echo -e "\n${GREEN}=== Network Interface Statistics ===${NC}"
ip -s link show
# Show only physical interfaces and bridges, skip veth* (container interfaces)
for iface in $(ls /sys/class/net | grep -v lo | grep -v "^veth"); do
ip -s link show "$iface" 2>/dev/null
done
echo -e "\n${GREEN}=== Network Statistics ===${NC}"
if command -v netstat >/dev/null 2>&1; then
netstat -i
elif command -v ss >/dev/null 2>&1; then
if command -v ss >/dev/null 2>&1; then
ss -s
elif command -v netstat >/dev/null 2>&1; then
netstat -i
else
log_message warn "netstat/ss not found for network statistics"
fi
@@ -166,7 +169,8 @@ get_detailed_network() {
get_hardware_info() {
echo -e "${GREEN}BIOS Version:${NC} $(dmidecode -s bios-version)"
echo -e "\n${GREEN}=== PCI Devices ===${NC}"
lspci | grep -i -E "vga|ethernet|raid"
# Show all interesting devices, exclude bridges and internal infrastructure
lspci | grep -v -E "Host bridge|PCI bridge|ISA bridge|SMBus|IOMMU|Dummy"
}
get_motherboard_info() {
@@ -221,7 +225,8 @@ get_memory_details() {
get_nic_details() {
echo -e "\n${GREEN}=== Network Interface Details ===${NC}"
for iface in $(ls /sys/class/net | grep -v lo); do
# Show only physical interfaces and bridges, skip veth* (container interfaces)
for iface in $(ls /sys/class/net | grep -v lo | grep -v "^veth"); do
echo -e "\n${GREEN}Interface: $iface${NC}"
# Get driver info