드레스룸 시스템행거 인테리어

반응형

linux 기본 구성 하드웨어 정보 확인

 

 

CPU - cpuinfo

 

[root@master ~]# cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 94
model name      : Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
stepping        : 3
microcode       : 0xc6
cpu MHz         : 3191.998
cache size      : 6144 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 22
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec arat spec_ctrl intel_stibp flush_l1d arch_capabilities
bogomips        : 6383.99
clflush size    : 64
cache_alignment : 64
address sizes   : 43 bits physical, 48 bits virtual
power management:

 

 

CPU - lscpu

[root@master ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                1
On-line CPU(s) list:   0
Thread(s) per core:    1
Core(s) per socket:    1
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 94
Model name:            Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Stepping:              3
CPU MHz:               3191.998
BogoMIPS:              6383.99
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              6144K
NUMA node0 CPU(s):     0
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid mpx rdseed adx smap clflushopt xsaveopt xsavec arat spec_ctrl intel_stibp flush_l1d arch_capabilities
[root@master ~]#

 

cpu를 보통 확인하는 두 가지의 방법이다.

보통 cpu info를 확인 하지만 core 가 많다면 more옵션을 사용해야 한다. 너무너무너무너무 길게나온다.

 

lscpu로 확인 하게 된다면 NUMA node 만 확인해도 코어 수 가 나온다. 위에 예제는 vmware로 했기 때문이고

일반 적인 듀얼 cpu를 사용 하게 된다면, NUMA node1이 생성 된다.

또한 numa node뒤에

NUMA node 0 CPU(s)  0 - 13, 28 - 41

NUMA node 1 CPU(s) 14 - 27,  42 - 55

 

이런식으로 나올 것이다. 뒤에는 하이퍼스레딩을 disable하게 된다면  사라지게 된다.

 

 

MEM - meminfo

[root@master ~]# cat /proc/meminfo
MemTotal:        1882560 kB
MemFree:          300108 kB
MemAvailable:     921640 kB
Buffers:              36 kB
Cached:           767360 kB
SwapCached:            0 kB
Active:           753720 kB
Inactive:         594984 kB
Active(anon):     395252 kB
Inactive(anon):   222356 kB
Active(file):     358468 kB
Inactive(file):   372628 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       2097148 kB
SwapFree:        2096884 kB
Dirty:                12 kB
Writeback:             0 kB
AnonPages:        579296 kB
Mapped:           146364 kB
Shmem:             36300 kB
Slab:              84636 kB
SReclaimable:      43200 kB
SUnreclaim:        41436 kB
KernelStack:        9360 kB
PageTables:        45612 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     3038428 kB
Committed_AS:    4439488 kB
VmallocTotal:   34359738367 kB
VmallocUsed:      146528 kB
VmallocChunk:   34359341052 kB
HardwareCorrupted:     0 kB
AnonHugePages:    133120 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:      124800 kB
DirectMap2M:     1972224 kB
DirectMap1G:           0 kB
[root@master ~]#

 

 

MEM - free

 

[root@master ~]# free
              total        used        free      shared  buff/cache   available
Mem:        1882560      740496      290012       36300      852052      911564
Swap:       2097148         264     2096884

 

memory 역시 meminfo 로 자세히 볼 수있지만 free 명령어로 통해 -m -g 등 원하는 용량표기 법을 통해 볼수 있다.

 

 

 

DISK - df 

 

[root@master ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   47G   11G   37G  23% /
devtmpfs                 903M     0  903M   0% /dev
tmpfs                    920M     0  920M   0% /dev/shm
tmpfs                    920M  9.8M  910M   2% /run
tmpfs                    920M     0  920M   0% /sys/fs/cgroup
/dev/sda1               1014M  193M  822M  19% /boot
tmpfs                    184M   32K  184M   1% /run/user/0
/dev/sr0                 4.3G  4.3G     0 100% /run/media/root/CentOS 7 x86_64

 

현재 디스크 사이즈, 사용량, 마운트 위치 등이 표기 되어있다.

 

 

DISK - fdisk

 

[root@master ~]# fdisk -l

Disk /dev/sda: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000e00f2

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200   104857599    51379200   8e  Linux LVM

Disk /dev/mapper/centos-root: 50.5 GB, 50457477120 bytes, 98549760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

 

해당 서버에 인식하고 있는 디스크 정보들 및 파티션 정보를 확인 할 수 있다.

디스크가 여러개 있다면 /dev/sdb, sdc, sdd 등 여러개의 장치를 확인 할 수 있다.

 

 

DISK - lsblk

 

[root@master ~]# lsblk
NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda               8:0    0   50G  0 disk
├─sda1            8:1    0    1G  0 part /boot
└─sda2            8:2    0   49G  0 part
  ├─centos-root 253:0    0   47G  0 lvm  /
  └─centos-swap 253:1    0    2G  0 lvm  [SWAP]
sr0              11:0    1  4.3G  0 rom  /run/media/root/CentOS 7 x86_64

 

블록장치 목록을 볼수 있다.

트리형태로 디스크 환경을 확인 할 수 있기 때문에 간단하게 확인하기 좋다.

 

 

 

NETWORK - ifconfig

 

[root@master ~]# ifconfig
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST>  mtu 1500
        inet 192.168.236.140  netmask 255.255.255.0  broadcast 192.168.236.255
        inet6 fe80::20c:29ff:fec8:c1c9  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:c8:c1:c9  txqueuelen 1000  (Ethernet)
        RX packets 19962  bytes 28564166 (27.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2882  bytes 214190 (209.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens32: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:0c:29:c8:c1:c9  txqueuelen 1000  (Ethernet)
        RX packets 19901  bytes 28560140 (27.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2882  bytes 214190 (209.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens36: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST>  mtu 1500
        ether 00:0c:29:c8:c1:c9  txqueuelen 1000  (Ethernet)
        RX packets 61  bytes 4026 (3.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 348  bytes 28621 (27.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 348  bytes 28621 (27.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:12:ba:37  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

 

현재 uplink되어있는 network 장치를 확인 할 수 있다.

 

 

NETWORK - ip a

 

[root@master ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens32: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000
    link/ether 00:0c:29:c8:c1:c9 brd ff:ff:ff:ff:ff:ff
3: ens36: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP group default qlen 1000
    link/ether 00:0c:29:c8:c1:c9 brd ff:ff:ff:ff:ff:ff
4: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:0c:29:c8:c1:c9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.236.140/24 brd 192.168.236.255 scope global bond0
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fec8:c1c9/64 scope link
       valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether 52:54:00:12:ba:37 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
6: virbr0-nic: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast master virbr0 state DOWN group default qlen 1000
    link/ether 52:54:00:12:ba:37 brd ff:ff:ff:ff:ff:ff

 

 

ifconfig 랑 비슷하다. 본인이 원하는 스타일대로 확인 하면 될 것 같다.

 

생각나는 리눅스 기본 장치 확인 하는 방법을 적어 보았다.

이 이외에도 많지만 생각 나는대로 적었으며 더 필요한건 추후에 추가 하도록 하겠다.

 

 

반응형

'linux' 카테고리의 다른 글

lsi-3108 raidcontroller  (2) 2020.07.08
raid란? raid 구성 살펴 보기  (6) 2020.07.07
linux nouveau 제거 삭제 비활성화  (0) 2020.07.02
Anaconda(conda) 가상환경 설치  (3) 2020.06.29
linux (centos, ubuntu) 모니터링 도구 - gpu 편  (2) 2020.06.25

이 글을 공유합시다

facebook twitter kakaoTalk kakaostory naver band