shell小记:lsdev

lsdev


安装

$ sudo apt-get install procinfo

使用

通过 man lsdev 可以查看相关帮助文档:

 LSDEV(8)                Linux System Manual                LSDEV(8)

NAME
       lsdev - display information about installed hardware

SYNOPSIS
       lsdev

DESCRIPTION
       lsdev  gathers  information  about your computer's installed
       hardware from the interrupts, ioports and dma files  in  the
       /proc  directory,  thus giving you a quick overview of which
       hardware uses what I/O addresses and what IRQ and DMA  chan‐
       nels.

OPTIONS
       None.

FILES
       /proc/interrupts
              IRQ channels.

       /proc/ioports
              I/O memory addresses.

       /proc/dma
              DMA channels.

BUGS
       lsdev can't always figure out which lines in the three exam‐
       ined files refer to one and the same device,  because  these
       files  sometimes  use  different names for the same piece of
       hardware. For example,  in  some  kernels  the  keyboard  is
       referred  to  as `kbd' in /proc/ioports and as `keyboard' in
       /proc/interrupts.  This should be fixed in the  kernel,  not
       in  lsdev  (as has indeed happened for this particular exam‐
       ple).

      The program does however try to  match  lines  by  stripping
       anything after a space or open parenthesis from the name, so
       that e.g. the `serial' lines from /proc/interrupts match the
       `serial(set)'  lines  from  /proc/ioports.   This attempt at
       DWIM might be considered a bug in itself.

       This program only shows the kernel's idea of  what  hardware
       is present, not what's actually physically available.

SEE ALSO
       procinfo(8).

AUTHOR
       Sander van Malssen svm@kozmix.cistron.nl

作用

lsdev 的使用比较简单,不需要参数,它能够获取你电脑上已安装的硬件信息,它主要从 /proc/interrupts/proc/ioports/proc/dma 文件中读取你所要的信息。

bug

当使用 lsdev 的时候,如果一个设备同时有多个名字,例如键盘keyboard在 /proc/ioports 中命名为 kbd,而在 /proc/interrupts 中则命名为 keyboard ,而 lsdev 并不能识别出两者均为同一个设备。但其实这并不是 lsdev 的bug,与内核有关。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值