仮想マシン上でマシンスペックを確認してみた

- https://qiita.com/salty_7/items/56280d95949db85a4684 で作成したVirtualbox上のUbuntu18.04でマシンスペックを確認してみた

## CPU

```bash
vagrant@ubuntu-bionic:~$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 158
model name      : Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
stepping        : 10
cpu MHz         : 2999.986
cache size      : 9216 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
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 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase avx2 invpcid rdseed clflushopt
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 5999.97
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 158
model name      : Intel(R) Core(TM) i5-8500 CPU @ 3.00GHz
stepping        : 10
cpu MHz         : 2999.986
cache size      : 9216 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
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 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase avx2 invpcid rdseed clflushopt
bugs            : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf
bogomips        : 5999.97
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

```

## Memory

```bash
vagrant@ubuntu-bionic:~$ cat /proc/meminfo
MemTotal:        1008936 kB
MemFree:          758232 kB
MemAvailable:     778964 kB
Buffers:           10008 kB
Cached:           131108 kB
SwapCached:            0 kB
Active:           102516 kB
Inactive:          73320 kB
Active(anon):      39124 kB
Inactive(anon):      232 kB
Active(file):      63392 kB
Inactive(file):    73088 kB
Unevictable:        5408 kB
Mlocked:            5408 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         40212 kB
Mapped:            40128 kB
Shmem:               604 kB
Slab:              48008 kB
SReclaimable:      23828 kB
SUnreclaim:        24180 kB
KernelStack:        1936 kB
PageTables:         3616 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      504468 kB
Committed_AS:     293128 kB
VmallocTotal:   34359738367 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
CmaTotal:              0 kB
CmaFree:               0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
DirectMap4k:       55232 kB
DirectMap2M:      993280 kB
```

## マザーボード

```bash
vagrant@ubuntu-bionic:~$ sudo dmidecode -t baseboard
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.5 present.

Handle 0x0008, DMI type 2, 15 bytes
Base Board Information
        Manufacturer: Oracle Corporation
        Product Name: VirtualBox
        Version: 1.2
        Serial Number: 0
        Asset Tag: Not Specified
        Features:
                Board is a hosting board
        Location In Chassis: Not Specified
        Chassis Handle: 0x0003
        Type: Motherboard
        Contained Object Handles: 0

```

## グラフィックカード

```bash
vagrant@ubuntu-bionic:~$ lspci |grep VGA
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter
```

## HDD

```bash
vagrant@ubuntu-bionic:~$ df
Filesystem     1K-blocks     Used Available Use% Mounted on
udev              491824        0    491824   0% /dev
tmpfs             100896      580    100316   1% /run
/dev/sda1       10098432   987396   9094652  10% /
tmpfs             504468        0    504468   0% /dev/shm
tmpfs               5120        0      5120   0% /run/lock
tmpfs             504468        0    504468   0% /sys/fs/cgroup
vagrant        958876784 55809384 903067400   6% /vagrant
tmpfs             100892        0    100892   0% /run/user/1000
```

### ディスク単位での情報を見る

```bash
vagrant@ubuntu-bionic:~$ sudo parted -l
Model: VBOX HARDDISK (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type     File system  Flags
 1      1049kB  10.7GB  10.7GB  primary  ext4         boot


Error: /dev/sdb: unrecognised disk label
Model: VBOX HARDDISK (scsi)
Disk /dev/sdb: 10.5MB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
```


### パーティションの階層構造を見る

```bash
vagrant@ubuntu-bionic:~$ lsblk
NAME   MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda      8:0    0  10G  0 disk
└─sda1   8:1    0  10G  0 part /
sdb      8:16   0  10M  0 disk
```

### uuidを見る

```bash
vagrant@ubuntu-bionic:~$ ls -la /dev/disk/by-uuid/
total 0
drwxr-xr-x 2 root root  80 Sep  9 05:16 .
drwxr-xr-x 6 root root 120 Sep  9 05:16 ..
lrwxrwxrwx 1 root root   9 Sep  9 05:26 2018-09-07-16-23-24-00 -> ../../sdb
lrwxrwxrwx 1 root root  10 Sep  9 05:26 76897eba-89ce-43b5-801c-71444c3e1636 -> ../../sda1
```

## ネットワークカード

```bash
vagrant@ubuntu-bionic:~$ lspci |grep Ethernet
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
```

## OS

```bash
vagrant@ubuntu-bionic:~$ uname -a
Linux ubuntu-bionic 4.15.0-33-generic #36-Ubuntu SMP Wed Aug 15 16:00:05 UTC 2018 x86_64 x86_64 x86_64 GNU/Linu x
```

### Ubuntuのバージョンを見る

```bash
vagrant@ubuntu-bionic:~$ lsb_release -r
Release:        18.04
```

## 参考

- https://qiita.com/DaisukeMiyamoto/items/98ef077ddf44b5727c29