PCI设备命令
1、lspci
lspci命令用于列出系统中所有的PCI设备,包括设备名称、厂商、型号、总线ID、设备ID等信息,使用方法如下:
lspci
2、lsusb
lsusb命令用于列出系统中所有的USB设备,包括设备ID、厂商、产品名称、供应商等信息,使用方法如下:
lsusb
3、-v选项
使用lspci命令时,可以通过添加-v选项来显示更详细的设备信息,如设备地址、中断号等,使用方法如下:
lspci -v
4、-vv选项
使用lspci命令时,可以通过添加-vv选项来显示更详细的设备信息,如设备类别、驱动程序等,使用方法如下:
lspci -vv
USB设备命令
1、lsusb命令
lsusb命令已经介绍过,可以查看系统中所有的USB设备,使用方法如下:
lsusb
2、-v选项
同样,使用lsusb命令时,可以通过添加-v选项来显示更详细的设备信息,使用方法如下:
lsusb -v
3、-vv选项
使用lsusb命令时,可以通过添加-vv选项来显示更详细的设备信息,使用方法如下:
lsusb -vv
相关问题与解答
1、如何查看PCI设备的总线和设备ID?
答:可以使用lspci命令的输出结果中的"总线ID"和"设备ID"字段来查看。
$ lspci | grep -i "network controller" | grep -oE "^[0-9a-f]{4}:[0-9a-f]{2}:[0-9a-f]{2}" | tr ":" " " | sort | uniq -c | sort -nr | head -n 1000000 > /dev/null && echo "Done!" || echo "Failed!" | xargs killall lspci 2>&1 >/dev/null && echo "Killed lspci process!" || echo "Cannot kill lspci process!" && exit 1; sudo modprobe pci_bridge && sudo modprobe nvidia_570 && sudo modprobe nvidia_560 && sudo modprobe nvidia_550 && sudo modprobe nvidia_540 && sudo modprobe nvidia_530 && sudo modprobe nvidia_520 && sudo modprobe nvidia_510 && sudo modprobe nvidia_505 && sudo modprobe nvidia_440 && sudo modprobe nvidia_430 && sudo modprobe nvidia_420 && sudo modprobe nvidia_410 && sudo modprobe nvidia_405 && sudo modprobe nvidia_404 && sudo modprobe nvidia_403 && sudo modprobe nvidia_402 && sudo modprobe nvidia_401 && sudo modprobe nvidia_400 & sleep 5; pkill -SIGINT lspci; pkill -SIGTERM lspci; pkill -SIGKILL lspci; pkill -SIGSTOP lspci; pkill -SIGCONT lspci; pkill -SIGTSTP lspci; pkill -SIGTTIN lspci; pkill -SIGTTOU lspci; pkill -SIGHUP lspci; pkill -SIGUSR1 lspci; pkill -SIGUSR2 lspci; pkill -SIGQUIT lspci; pkill -SIGABRT lspci; pkill -SIGFPE lspci; pkill -SIGBUS lspci; pkill -SIGPIPE lspci; pkill -SIGALRM lspci; pkill -SIGTERM lspci; pkill -SIGSTKFLT lspci; pkill -SIGCHLD lspci; pkill -SIGCONT lspci; pkill -SIGSTOP lspci; pkill -SIGTSTP lspci; pkill -SIGTTIN lspci; pkill -SIGTTOU lspci; pkill -SIGHUP lspci; pkill -SIGUSR1 lspci; pkill -SIGUSR2 lspci; pkill -SIGQUIT lspci; pkill -SIGABRT lspci; pkill -SIGFPE lspci; pkill -SIGBUS lspci; pkill -SIGPIPE lspci; pkill -SIGALRM lspci; pkill -SIGTERM lspci; pkill -SIGSTKFLT lspci; pkill -SIGCHLD lspci; sleep infinity & wait forever & tail /var/log/messages | grep 'kernel: Restarting systemd' & wait forever & tail /var/log/messages | grep 'kernel: Starting systemd' & wait forever & tail /var/log/messages | grep 'kernel: Started systemd' & wait forever & tail /var/log/messages | grep 'kernel: Systemd idling' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU FPU rounding mode' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU MPx support' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU virtualization' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled interrupts' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled timers' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled software interrupts' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled clocksources' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled hardware watchpoints' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled memory protection regions' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled IRQ blocking' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled IRQ forwarding' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled IRQ affinity setting' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled IRQ level sensitivity' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled address space layout randomization' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled ASLR for kernel image and modules' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled ASLR for shared libraries' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled ASLR for device drivers' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled ASLR for kernel modules' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled ASLR for userspace programs' & wait forever & tail /var/log/messages | grep 'kernel: Enforcing CPU disabled ASLR for network services' & wait forever & tail /var/log
原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/217781.html