Seize the day

POST : Backend study

Linux 명령어 공부

서버 하드웨어 조사

/proc/cpuinfo
/proc/version
uname -a

ec2-user@Azure-Backend1:~$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 79
model name	: Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
stepping	: 1
microcode	: 0xffffffff
cpu MHz		: 2294.687
cache size	: 51200 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 20
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 rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arch_capabilities
bugs		: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa mmio_stale_data bhi
bogomips	: 4589.37
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

ec2-user@Azure-Backend1:~$ uname -a
Linux Azure-Backend1 6.5.0-1021-azure #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
ec2-user@Azure-Backend1:~$ cat /proc/version
Linux version 6.5.0-1021-azure (buildd@lcy02-amd64-097) (x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #22~22.04.1-Ubuntu SMP Tue Apr 30 16:08:18 UTC 2024

 

lscpu

ec2-user@Azure-Backend1:~$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  1
  On-line CPU(s) list:   0
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Xeon(R) CPU E5-2673 v4 @ 2.30GHz
    CPU family:          6
    Model:               79
    Thread(s) per core:  1
    Core(s) per socket:  1
    Socket(s):           1
    Stepping:            1
    BogoMIPS:            4589.37
    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 rep_good nopl xtopology cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 mov
                         be popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arch_capabilities
Virtualization features:
  Hypervisor vendor:     Microsoft
  Virtualization type:   full
Caches (sum of all):
  L1d:                   32 KiB (1 instance)
  L1i:                   32 KiB (1 instance)
  L2:                    256 KiB (1 instance)
  L3:                    50 MiB (1 instance)
NUMA:
  NUMA node(s):          1
  NUMA node0 CPU(s):     0
Vulnerabilities:
  Gather data sampling:  Not affected
  Itlb multihit:         Not affected
  L1tf:                  Mitigation; PTE Inversion
  Mds:                   Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
  Retbleed:              Not affected
  Spec rstack overflow:  Not affected
  Spec store bypass:     Vulnerable
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines; STIBP disabled; RSB filling; PBRSB-eIBRS Not affected; BHI Retpoline
  Srbds:                 Not affected
  Tsx async abort:       Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown

 

/proc/meminfo

ec2-user@Azure-Backend1:~$ cat /proc/meminfo
MemTotal:         853544 kB
MemFree:           72912 kB
MemAvailable:      91352 kB
Buffers:            2316 kB
Cached:           136556 kB
SwapCached:            0 kB
Active:           351704 kB
Inactive:         277860 kB
Active(anon):     262056 kB
Inactive(anon):   241856 kB
Active(file):      89648 kB
Inactive(file):    36004 kB
Unevictable:       30724 kB
Mlocked:           27652 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Zswap:                 0 kB
Zswapped:              0 kB
Dirty:                60 kB
Writeback:             0 kB
AnonPages:        521452 kB
Mapped:            75128 kB
Shmem:              4156 kB
KReclaimable:      23504 kB
Slab:              67192 kB
SReclaimable:      23504 kB
SUnreclaim:        43688 kB
KernelStack:        3260 kB
PageTables:         4396 kB
SecPageTables:         0 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      426772 kB
Committed_AS:    1361764 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       36136 kB
VmallocChunk:          0 kB
Percpu:              500 kB
HardwareCorrupted:     0 kB
AnonHugePages:    264192 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
Unaccepted:            0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:       81120 kB
DirectMap2M:      915456 kB
DirectMap1G:           0 kB

 

/sys/devices

ec2-user@Azure-Backend1:~$ ls -al /sys/devices
total 0
drwxr-xr-x 15 root root 0 Jun  5 19:33 .
dr-xr-xr-x 12 root root 0 Jun  5 19:33 ..
drwxr-xr-x  4 root root 0 Jun  6 08:08 0006:045E:0621.0001
drwxr-xr-x  6 root root 0 Jun  5 19:33 LNXSYSTM:00
drwxr-xr-x  3 root root 0 Jun  6 08:08 breakpoint
drwxr-xr-x  3 root root 0 Jun  6 08:08 isa
drwxr-xr-x  4 root root 0 Jun  6 08:08 kprobe
drwxr-xr-x  5 root root 0 Jun  6 08:08 msr
drwxr-xr-x 12 root root 0 Jun  6 08:00 platform
drwxr-xr-x  4 root root 0 Jun  6 08:08 pnp0
drwxr-xr-x  3 root root 0 Jun  6 08:08 software
drwxr-xr-x 10 root root 0 Jun  5 19:33 system
drwxr-xr-x  3 root root 0 Jun  6 08:08 tracepoint
drwxr-xr-x  4 root root 0 Jun  6 08:08 uprobe
drwxr-xr-x 20 root root 0 Jun  5 19:33 virtual

 

mount

ec2-user@Azure-Backend1:~$ mount
/dev/sda1 on / type ext4 (rw,relatime,discard,errors=remount-ro)
devtmpfs on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=423640k,nr_inodes=105910,mode=755,inode64)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,size=170712k,nr_inodes=819200,mode=755,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14348)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/var/lib/snapd/snaps/core20_2264.snap on /snap/core20/2264 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/core20_2318.snap on /snap/core20/2318 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/lxd_28373.snap on /snap/lxd/28373 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/snapd_21465.snap on /snap/snapd/21465 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/var/lib/snapd/snaps/snapd_21759.snap on /snap/snapd/21759 type squashfs (ro,nodev,relatime,errors=continue,threads=single,x-gdu.hide)
/dev/sda15 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/dev/sdb1 on /mnt type ext4 (rw,relatime,x-systemd.requires=cloud-init.service,_netdev)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=85352k,nr_inodes=21338,mode=700,uid=1000,gid=1000,inode64)
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,size=170712k,nr_inodes=819200,mode=755,inode64)
nsfs on /run/snapd/ns/lxd.mnt type nsfs (rw)
overlay on /var/lib/docker/overlay2/fb105881cf0db3299b1114c878cbd14a70603c83d112a8e30facd3aa15a6cf3c/merged type overlay (rw,relatime,lowerdir=/var/lib/docker/overlay2/l/QF4G6GENHO5OKNLBDCACBBTI26:/var/lib/docker/overlay2/l/SDQGHINHI2TKTSYACVUMUAZKC6:/var/lib/docker/overlay2/l/MADWWRZQPTECR5AP2SMT6OJZUC:/var/lib/docker/overlay2/l/2VV3K3RRUSRMY6MFDGJ6REIUBF:/var/lib/docker/overlay2/l/T23LPZHDVB34ZFXVBHEMQDB7KO:/var/lib/docker/overlay2/l/KJFD6VK4P33OESIQEEFZLT5D24:/var/lib/docker/overlay2/l/POXKUZVVQ2PZHAJEAPI2UGFRDY:/var/lib/docker/overlay2/l/TGHDZFO6SL4ZVLSNY6XW3K7XCM:/var/lib/docker/overlay2/l/2MJZSBIFOBKFWUZTXDPPGRCRYX,upperdir=/var/lib/docker/overlay2/fb105881cf0db3299b1114c878cbd14a70603c83d112a8e30facd3aa15a6cf3c/diff,workdir=/var/lib/docker/overlay2/fb105881cf0db3299b1114c878cbd14a70603c83d112a8e30facd3aa15a6cf3c/work,nouserxattr)
nsfs on /run/docker/netns/12c7e4cd227c type nsfs (rw)

 

df -h 

ec2-user@Azure-Backend1:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  4.0G   25G  14% /
tmpfs           417M     0  417M   0% /dev/shm
tmpfs           167M  1.1M  166M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
efivarfs        128K   37K   87K  30% /sys/firmware/efi/efivars
/dev/sda15      105M  6.1M   99M   6% /boot/efi
/dev/sdb1       3.9G   28K  3.7G   1% /mnt
tmpfs            84M  4.0K   84M   1% /run/user/1000

 

du -sh /*
du -sh

ec2-user@Azure-Backend1:~$ du -sh ./*
38M	./certbot
1.5M	./docker
0	./nest_server
190M	./source_nest_server
12K	./ssl

ec2-user@Azure-Backend1:~$ du -sh
368M

 

rc-local.service 상태조회

ec2-user@Azure-Backend1:~$ sudo service rc-local status
● rc-local.service - /etc/rc.d/rc.local Compatibility
     Loaded: loaded (/lib/systemd/system/rc-local.service; enabled; vendor preset: enabled)
    Drop-In: /usr/lib/systemd/system/rc-local.service.d
             └─debian.conf
     Active: active (exited) since Wed 2024-06-05 19:33:44 UTC; 13h ago
       Docs: man:systemd-rc-local-generator(8)
        CPU: 14ms

Jun 05 19:33:41 Azure-Backend1 systemd[1]: Starting /etc/rc.d/rc.local Compatibility...
Jun 05 19:33:41 Azure-Backend1 su[519]: (to ec2-user) root on none
Jun 05 19:33:42 Azure-Backend1 su[519]: pam_unix(su-l:session): session opened for user ec2-user(uid=1000) by (uid=0)
Jun 05 19:33:44 Azure-Backend1 rc.local[635]: bun run ./src/main.ts
Jun 05 19:33:44 Azure-Backend1 rc.local[635]: server pid is 640
Jun 05 19:33:44 Azure-Backend1 su[519]: pam_unix(su-l:session): session closed for user ec2-user
Jun 05 19:33:44 Azure-Backend1 systemd[1]: Started /etc/rc.d/rc.local Compatibility.

 

 

top

posted at

2024. 6. 6. 17:30


CONTENTS

Seize the day
BLOG main image
김대정의 앱 개발 노트와 사는 이야기
RSS 2.0Tattertools
공지
아카이브
최근 글 최근 댓글
카테고리 태그 구름사이트 링크