马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
简介
lshw: HardWare LiSter for Linux 一样平常用来查察linux装备的硬件信息,包罗内存、cpu、主板等信息。
- $ lshw --help
- Hardware Lister (lshw) -
- usage: lshw [-format] [-options ...]
- lshw -version
- -version print program version ()
- format can be
- -html output hardware tree as HTML
- -xml output hardware tree as XML
- -json output hardware tree as a JSON object
- -short output hardware paths
- -businfo output bus information
- options can be
- -class CLASS only show a certain class of hardware
- -C CLASS same as '-class CLASS'
- -c CLASS same as '-class CLASS'
- -disable TEST disable a test (like pci, isapnp, cpuid, etc. )
- -enable TEST enable a test (like pci, isapnp, cpuid, etc. )
- -quiet don't display status
- -sanitize sanitize output (remove sensitive information like serial numbers, etc.)
- -numeric output numeric IDs (for PCI, USB, etc.)
- -notime exclude volatile attributes (timestamps) from output
复制代码 代码:https://ezix.org/src/pkg/lshw.git
核心结构
- class hwNode
- {
-
-
- public:
- hwNode(const string & id,
- hw::hwClass c = hw::generic,
- const string & vendor = "",
- const string & product = "",
- const string & version = "");
- hwNode(const hwNode & o);
- ~hwNode();
- hwNode & operator =(const hwNode & o);
- string getId() const;
- void setHandle(const string & handle);
- string getHandle() const;
- bool enabled() const;
- bool disabled() const;
- void enable();
- void disable();
- bool claimed() const;
- void claim(bool claimchildren=false);
- void unclaim();
- hw::hwClass getClass() const;
- const char * getClassName() const;
- void setClass(hw::hwClass c);
- string getDescription() const;
- void setDescription(const string & description)
复制代码 |