shell小记:lsdev
2016-01-21 15:41
561 查看
lsdev
lsdev安装
使用
作用
bug
安装
$ 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,与内核有关。
相关文章推荐
- android wifi 无线调试
- 运维入门
- 动态清空 nohup 输出文件
- install scrapy with pip and easy_install
- Linux Shell常用技巧
- Shell 脚本编程陷阱
- shell字符串操作详解
- Shell中删除某些文件外所有文件的3个方法
- Ruby中执行Linux shell命令的六种方法详解
- VB使用shell函数打开外部exe程序的实现方法
- Shell编程的一些知识集合
- Shell中的for和while循环详细总结
- 什么是Shell?Shell脚本基础知识详细介绍
- Shell脚本中引用、调用另一个脚本文件的2种方法
- Shell脚本解压rpm软件包
- Linux Shell 数组建立及使用技巧
- Shell脚本实现复制文件到多台服务器的代码分享
- Shell脚本实现批量替换文件内容
- Shell脚本实现的一个简易Web服务器例子分享
- linux Shell学习笔记第五天