Hello KGIII. I'm writing to report some differences between the outputs of the commands in the article and those on this debian (bookworm) system:
Code:
[flip@flop ~]$ lspci |grep Network <<- no output.
[flip@flop ~]$ lspci |grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
[flip@flop ~]$ lspci -class display <<- outputs "invalid option" message.
lspci: invalid option -- 'c'
Usage: lspci [<switches>]
Basic display modes:
-mm Produce machine-readable output (single -m for an obsolete format)
-t Show bus tree
<snip>
[flip@flop ~]$ lspci -class network <<- outputs "invalid option" message.
lspci: invalid option -- 'c
<snip>
[flip@flop ~]$ lspci -class memory <<- outputs "invalid option" message.
lspci: invalid option -- 'c'
<snip>
In the manpage there is an option for the use of the "class" variable in relation to output info on devices thus:
Code:
lspci -d [<vendor>]:[<device>][:<class>[:<prog-if>]]
but on my system one doesn't use the term "class" in any form that I can find. To get the info one needs to know the class ID, and for that the manpage refers the reader to the file: /usr/share/misc/pci.ids, where one discovers that the class ID for the Network controller is: 02, and the subclass ID of ethernet is: 00, so the
command for info is as follows:
Code:
[flip@flop ~]$ lspci -d ::0200
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
or one can use the variant: lspci -d *:*:200, to get the same result where * means any vendor and any device. More info is available from a command such as:
Code:
[flip@flop ~]$ lspci -nnkd ::200
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet [1458:e000]
Kernel driver in use: r8169
Kernel modules: r8169
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
Subsystem: TP-LINK Technologies Co., Ltd. TG-3468 Gigabit PCI Express Network Adapter [7470:3468]
Kernel driver in use: r8169
Kernel modules: r8169
A different approach is to use grep to select info which is included on nearby lines from lspci output. The following gather relevant info for the graphics card and ethernet:
Code:
[flip@flop ~]$ lspci -nnk | grep -i -A 3 vga
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [GeForce 210] [10de:0a65] (rev a2)
Subsystem: ASUSTeK Computer Inc. GT218 [GeForce 210] [1043:8354]
Kernel driver in use: nouveau
Kernel modules: nouveau
[flip@flop ~]$ lspci -nnk | grep -i -A 3 network
Subsystem: TP-LINK Technologies Co., Ltd. TG-3468 Gigabit PCI Express Network Adapter [7470:3468]
Kernel driver in use: r8169
Kernel modules: r8169
[flip@flop ~]$ lspci -nnk | grep -i -A 3 eth
02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet [1458:e000]
Kernel driver in use: r8169
Kernel modules: r8169
04:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06)
Subsystem: TP-LINK Technologies Co., Ltd. TG-3468 Gigabit PCI Express Network Adapter [7470:3468]
Kernel driver in use: r8169
Kernel modules: r8169
I'd be interested to know which version of lspci was used for the article. The following output shows from where the one used for the above commands came:
Code:
[flip@flop ~]$ apt policy pciutils
pciutils:
Installed: 1:3.9.0-2
Candidate: 1:3.9.0-2
Version table:
*** 1:3.9.0-2 500
500 http://ftp.au.debian.org/debian bookworm/main amd64 Packages
100 /var/lib/dpkg/status
Using sudo made no difference to the above outputs.