Linux

Linux ์‹œ์Šคํ…œ ๊ตฌ์„ฑ ์ •๋ณด ํ™•์ธ - ์ปค๋„,CPU,๋ฉ”๋ชจ๋ฆฌ,๋””์Šคํฌ,NIC

๐Ÿง Yon 2022. 12. 15. 23:18
๋ฐ˜์‘ํ˜•

Overview: ๊ธฐ๋ณธ ์‹œ์Šคํ…œ ๊ตฌ์„ฑ ์ •๋ณด ํ™•์ธ

1.1 ์ปค๋„ ์ •๋ณด
- uname
- ์ปค๋„ ๋ฒ„์ „, ์•„ํ‚คํ…์ฒ˜ ์ •๋ณด ํ™•์ธ
- dmesg
- ์ปค๋„ ๋””๋ฒ„๊ทธ ๋ฉ”์‹œ์ง€
- ์ปค๋„ ํŒŒ๋ผ๋ฏธํ„ฐ
- ๋ถ€ํŒ… ์‹œ ์ปค๋„์ด ์ธ์‹ํ•˜๋Š” ๋ฉ”๋ชจ๋ฆฌ ์ •๋ณด
- ์ปค๋„ ์ปดํŒŒ์ผ ์ •๋ณด ํ™•์ธ

1.2 CPU ์ •๋ณด
- dmidecode
- -t bios, system, processor, memory
- lscpu
- /proc/cpuinfo

1.3 ๋ฉ”๋ชจ๋ฆฌ ์ •๋ณด
- dmidecode
- -t memory
- free

1.4 ๋””์Šคํฌ ์ •๋ณด
- df -h ๋…ผ๋ฆฌ ํŒŒํ‹ฐ์…˜ ์ •๋ณด
- sda vs hda
- ์‹œ์Šคํ…œ์ด ๋””์Šคํฌ์™€ ํ†ต์‹ ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉํ•˜๋Š” ์ปจํŠธ๋กค๋Ÿฌ ํƒ€์ž…์— ๋”ฐ๋ผ ๋‹ค๋ฅด๊ฒŒ ๋‚˜ํƒ€๋‚จ
- SCSI(Server) = sda
- IDE(PC) = hda
- Virtual Server= vda(XEN, KVM)
- smartctl ๋ฌผ๋ฆฌ ์ •๋ณด
- ex) smartctl -a /dev/sda
- RAID ์ปจํŠธ๋กค๋Ÿฌ๋ฅผ ํ†ตํ•ด ๋งŒ๋“ค์–ด์ง„ Logical ๋ณผ๋ฅจ ํ‘œ๊ธฐ
- -d ์˜ต์…˜ ์ฃผ๊ณ  RAID ์ปจํŠธ๋กค๋Ÿฌ ๋“œ๋ผ์ด๋ฒ„์™€ ํ•จ๊ป˜ ์กฐํšŒํ•˜๋ฉด ์ถ”๊ฐ€ ์ •๋ณด ๊ฐ€๋Šฅ
- ๋””์Šคํฌ ํŽŒ์›จ์–ด ๋ฒ„์ „์—์„œ ๋ฒ„๊ทธ/์ด์Šˆ ๋ฐœ๊ฒฌ ์‹œ ํ•ด๋‹น ์—ฌ๋ถ€ ํ™•์ธ ๊ฐ€๋Šฅ

1.5 ๋„คํŠธ์›Œํฌ ์นด๋“œ ์ •๋ณด
- lspci
- ex) lspci | grep -i ether
- ๋„คํŠธ์›Œํฌ ์นด๋“œ ์ œ์กฐ์‚ฌ ๋ฐ ๋ชจ๋ธ๋ช… ํ™•์ธ ๊ฐ€๋Šฅ(ํŽŒ์›จ์–ด, ๋“œ๋ผ์ด๋ฒ„ ์ฐพ์„ ๋•Œ ์œ ์šฉ)
- ethtool
- ethtool --supported link mode / advertised link mode: ์ง€์› ๊ฐ€๋Šฅํ•œ ๋„คํŠธ์›Œํฌ ์นด๋“œ ์†๋„-speed: ํ˜„์žฌ ์†๋„-g: Ring Buffer ํฌ๊ธฐ ํ™•์ธ(ํด ์ˆ˜๋ก ์ข‹์Œ, Current=Maximum ๋Š˜ ์œ ์ง€ํ•  ๊ฒƒ)1) ํŒจํ‚ท ๋„์ฐฉ2) Ring Buffer์— ๋ณต์‚ฌ3) ์ปค๋„์— ๋ณต์‚ฌ-G: Ring Buffer ๊ฐ’ ์„ค์ • (RX ๊ฐ’ maximum์œผ๋กœ ์กฐ์ • ๊ฐ€๋Šฅ)-K: ๋„คํŠธ์›Œํฌ ์นด๋“œ ์„ฑ๋Šฅ ์ตœ์ ํ™”-i: ์ปค๋„ ๋ชจ๋“ˆ ์ •๋ณด ํ‘œ์‹œ

๋ฐ˜์‘ํ˜•