這篇文章給大家聊聊關(guān)于getmodulehandle,以及getstdhandle函數(shù)對(duì)應(yīng)的知識(shí)點(diǎn),希望對(duì)各位有所幫助,不要忘了收藏本站哦。
communication和communicate有什么差別
差別就是兩者詞性是不一樣具體的不同如下
communication為名詞中文意思是n.
表達(dá);交流;交際;傳遞;通信;交通聯(lián)系;信息;書(shū)信;電話;
例句
Somesignlanguagesareverysophisticatedmeansofcommunication.
有些手語(yǔ)可以表達(dá)非常復(fù)雜的內(nèi)容。
communicate為動(dòng)詞中文意思是v.
(與某人)交流(信息或消息、意見(jiàn)等);溝通;傳達(dá),傳遞(想法、感情、思想等);傳染;相通;
例句
Theneedtocommunicateisakeycharacteristicofhumansociety.
需要交流是人類社會(huì)最重要的一個(gè)特征
dmidecode 查看硬盤(pán)信息
使用dmidecode命令查看硬件信息的方法:
dmidecode命令輸出格式
執(zhí)行dmidecode命令,輸出如下:
#dmidecode|head-10
#dmidecode2.9
SMBIOS2.4present.
25structuresoccupying844bytes.
Tableat0x000DC010.
Handle0x0000,DMItype0,24bytes
BIOSInformation
Vendor:LENOVO
Version:05CN39WW(V1.10)
ReleaseDate:08/29/2007
以上輸出中,前面4條是dmidecode命令整體信息,“25structuresoccupying844bytes.”該行指示該機(jī)器的DMI記錄項(xiàng)總共有25條。
后面就是DMI表中各條記錄,每條記錄的輸出格式如下:
RecordHeader:Handle{recordid},DMItype{dmitypeid},{recordsize}bytes
RecordValue:{multilinerecordvalue}
recordid:DMI表中每條記錄唯一的標(biāo)識(shí)
dmitypeid:記錄的類型,比如BIOS,Memory等
recordsize:DMI表中該條記錄的大小
multilinerecordvalues:多行與該DMI類型相關(guān)的字段描述
DMI類型
DMI表包含以下DMI類型,每個(gè)DMIType值對(duì)應(yīng)一項(xiàng)硬件信息:
TypeInformation
----------------------------------------
0BIOS
1System
2BaseBoard
3Chassis
4Processor
5MemoryController
6MemoryModule
7Cache
8PortConnector
9SystemSlots
10OnBoardDevices
11OEMStrings
12SystemConfigurationOptions
13BIOSLanguage
14GroupAssociations
15SystemEventLog
16PhysicalMemoryArray
17MemoryDevice
1832-bitMemoryError
19MemoryArrayMappedAddress
20MemoryDeviceMappedAddress
21Built-inPointingDevice
22PortableBattery
23SystemReset
24HardwareSecurity
25SystemPowerControls
26VoltageProbe
27CoolingDevice
28TemperatureProbe
29ElectricalCurrentProbe
30Out-of-bandRemoteAccess
31BootIntegrityServices
32SystemBoot
3364-bitMemoryError
34ManagementDevice
35ManagementDeviceComponent
36ManagementDeviceThresholdData
37MemoryChannel
38IPMIDevice
39PowerSupply
根據(jù)上表我們亦可知道,可以通過(guò)dmidecode命令查到哪些硬件信息,例如要查詢主板(BaseBoard)的信息,可以執(zhí)行以下命令:
#dmidecode-t2
#dmidecode2.9
SMBIOS2.4present.
Handle0x0002,DMItype2,8bytes
BaseBoardInformation
Manufacturer:LENOVO
ProductName:IGT30
Version:REFERENCE
SerialNumber:2083601501567
除了使用DMIType_id作為索引進(jìn)行查詢外,還可以通過(guò)設(shè)備關(guān)鍵詞查詢,設(shè)備關(guān)鍵詞與Type_id對(duì)應(yīng)關(guān)系如下:
KeywordTypes
------------------------------
bios0,13
system1,12,15,23,32
baseboard2,10
chassis3
processor4
memory5,6,16,17
cache7
connector8
slot9
這樣,執(zhí)行“dmidecode–tbaseboard”命令將顯示type_id為2、10項(xiàng)的信息。
使用dmidecode命令查詢內(nèi)存(RAM)信息
最后來(lái)看個(gè)使用dmidecode命令的例子,如何使用dmidecode命令查詢內(nèi)存信息。
首先,可以通過(guò)以下命令查詢機(jī)器最大支持的內(nèi)存總量:
#dmidecode-t16
#dmidecode2.9
SMBIOS2.4present.
Handle0x000D,DMItype16,15bytes
PhysicalMemoryArray
Location:SystemBoardOrMotherboard
Use:SystemMemory
ErrorCorrectionType:None
MaximumCapacity:4GB
ErrorInformationHandle:NotProvided
NumberOfDevices:2
從以上輸出可知,該機(jī)器理論上支持的最大內(nèi)存為4G。
然后使用以下命令查詢機(jī)器可用的內(nèi)存:
#grepMemTotal/proc/meminfo
MemTotal:2055764kB
可以看到機(jī)器可用的內(nèi)存為2G,也即我們可以再擴(kuò)2G內(nèi)存。
但是在用的2G內(nèi)存是怎么組成的?是1條2G內(nèi)存?是2條1G內(nèi)存?
我們可以通過(guò)以下命令進(jìn)行查詢:
#dmidecode-t17
#dmidecode2.9
SMBIOS2.4present.
Handle0x000E,DMItype17,27bytes
MemoryDevice
ArrayHandle:0x000D
ErrorInformationHandle:NoError
TotalWidth:32bits
DataWidth:32bits
Size:1024MB
FormFactor:SODIMM
Set:1
Locator:M1
BankLocator:Bank0
Type:DDR2
??
Handle0x000F,DMItype17,27bytes
MemoryDevice
ArrayHandle:0x000D
ErrorInformationHandle:NoError
TotalWidth:32bits
DataWidth:32bits
Size:1024MB
??
從以上信息可以看出,該機(jī)器插了2條1G的內(nèi)存。
小結(jié)
使用linux系統(tǒng)自帶工具dmidecode可以查看機(jī)器硬件信息,較常用到以下幾條命令。
查詢機(jī)器型號(hào):
#dmidecode|grep-iproduct
ProductName:TIANYIF41A
ProductName:IGT30
查詢內(nèi)存條數(shù):
#dmidecode-t17|grep"Size.*MB"|wc-l
2
查詢物理CPU信息:
#dmidecode-t4
另外也可通過(guò)/proc查詢CPU相關(guān)信息。
查詢物理CPU個(gè)數(shù):
#cat/proc/cpuinfo|grep'physicalid'|sort|uniq|wc-l
1
查詢CPU核數(shù):
#cat/proc/cpuinfo|grep'coreid'|wc-l
好了,文章到這里就結(jié)束啦,如果本次分享的getmodulehandle和getstdhandle函數(shù)問(wèn)題對(duì)您有所幫助,還望關(guān)注下本站哦!