Dmidecode
Information
표시 해주는 정보는 아래와 같습니다.
- BIOS Information: BIOS 설정 상태 정보입니다.
- System Information: 시스템 정보입니다. 메인보드 모델 및 제조사 등의 정보를 출력합니다.
- Base Board Information: 메인보드의 제조사 및 BIOS, S/N등을 표시합니다.
- Chassis Information: 시스템 구조 정보입니다.
- Processor Information: 시스템 프로세서 정보입니다.
- Cache Information: 프로세서 캐시 에 대한 정보입니다.
- Memory Controller Information: 메모리 컨트롤러 정보입니다.
- Memory Module Information: 메모리 모듈 정보입니다.
- Port Connector Information: 시스템 포트 정보입니다.
- System Slot Information: 확장 슬롯 정보입니다.
- BIOS Language Information: BIOS 언어 정보입니다.
- Physical Memory Array: 물리적 (하드웨어) 메모리 정보입니다.
- Memory Device: 메모리 모듈 정보입니다.
How to use
-
dmidecode -t bios
: BIOS정보 -
dmidecode -t system
: System 정보 -
dmidecode -t baseboard
: Mainboard 정보 -
dmidecode -t chassis
: 구조 정보 -
dmidecode -t processor
: 프로세서 정보 -
dmidecode -t memory
: 메모리 정보 -
dmidecode -t cache
: 캐시 정보 -
dmidecode -t connector
: 포트 정보 -
dmidecode -t slot
: 슬롯 정보 -
dmidecode -s baseboard-manufacturer
: 메인보드 제조사 보기 -
dmidecode -s baseboard-product-name
: 메인보드 모델명 보기
System UUID
#!/bin/bash
cat /var/lib/dbus/machine-id && exit
# Provided by dbus, hence available on all systemd systems.
# Any user can read it and it is persistent accross boots.
# It is unique per installation, and works well in VMs.
# Not all systems (i.e. stage3 gentoo/handbook install)
# have dbus installed by default.
cat /sys/class/dmi/id/product_uuid && exit
# Which should be the same as
# dmidecode -s system-uuid
# Requires root
# Persistent accross re-installs
# Depends on x86 hardware
# Not available on all kernels, may be module dependent.
# Lennert Poettering has a good analysis
# http://0pointer.de/blog/projects/ids.html
# FreeBSD has
sysctl kern.hostuuid
# Which is persistent accross reboots
Depending on your kernel, the DMI information may be available via sysfs. Try those:
# cat /sys/class/dmi/id/board_serial
xxxxxxxxxxxxxxx
# cat /sys/class/dmi/id/product_uuid
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
or using a tool
dbus is installed. Therefore it is simply cat /var/lib/dbus/machine-id
Disk UUID: /etc/fstab
and /dev/disk/by-uuid
Product UUID
C에서 /sys/class/dmi/id/product_uuid
파일을 읽을 때 EOF이 안나오고 다음과 같이 계속 읽힐 수 있다. 따라서 Whitespace 또는 NULLCHAR 과 관은 문자열을 체크할 수 있도록 해야 한다.
See also
Favorite site
- 메인보드 정보확인 명령어
- Linux 하드웨어 정보 확인하기 - dmidecode, lshw
- ZETAWIKI - 리눅스 dmidecode
- dmidecode 명령으로 하드웨어 정보 확인하기
- Stackoverflow - Getting a unique id from a unix-like system
- [추천] KLDP - 리눅스 및 유닉스 UUID 관련 질문입니다..
- [추천] On IDs 1
References
-
0pointer.de_-_On_IDs.pdf ↩