cat /proc/cpuinfo
cat /proc/cpuinfo | grep processor | wc -l
2
cat /proc/cpuinfo
root@instance-1:~# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) CPU @ 2.00GHz
stepping : 3
microcode : 0x1
cpu MHz : 2000.160
cache size : 39424 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
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 ht syscall nx pdpe1gb rdtscp lm constant_ tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hyper visor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsa ves arat md_clear arch_capabilities
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit
bogomips : 4000.32
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 85
model name : Intel(R) Xeon(R) CPU @ 2.00GHz
stepping : 3
microcode : 0x1
cpu MHz : 2000.160
cache size : 39424 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 1
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
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 ht syscall nx pdpe1gb rdtscp lm constant_ tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hyper visor lahf_lm abm 3dnowprefetch invpcid_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsa ves arat md_clear arch_capabilities
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs taa itlb_multihit
bogomips : 4000.32
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
root@instance-1:~#
cat /proc/meminfo not useful
root@instance-1:~# cat /proc/meminfo
MemTotal: 4029876 kB
MemFree: 736648 kB
MemAvailable: 2458444 kB
Buffers: 157004 kB
Cached: 1644576 kB
SwapCached: 0 kB
Active: 2049900 kB
Inactive: 767640 kB
Active(anon): 1149472 kB
Inactive(anon): 1748 kB
Active(file): 900428 kB
Inactive(file): 765892 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 76 kB
Writeback: 0 kB
AnonPages: 1015960 kB
Mapped: 224136 kB
Shmem: 135260 kB
KReclaimable: 345012 kB
Slab: 404780 kB
SReclaimable: 345012 kB
SUnreclaim: 59768 kB
KernelStack: 3216 kB
PageTables: 11164 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 2014936 kB
Committed_AS: 2058208 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 16736 kB
VmallocChunk: 0 kB
Percpu: 1352 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
Hugetlb: 0 kB
DirectMap4k: 289980 kB
DirectMap2M: 3903488 kB
DirectMap1G: 2097152 kB
root@instance-1:~#
free – m
free -m total ram & free ram.
free -m
total used free shared buff/cache available
Mem: 3935 1118 720 132 2096 2402
Swap: 0 0 0
total used free shared buff/cache available
Mem: 3 1 0 0 2 2
Swap: 0 0 0
root@instance-1:~#
iscpu command
cpuid
sudo lshw
sudo lshw -class processor
root@instance-1:~# sudo lshw -class processor
*-cpu:0
description: CPU
product: Intel(R) Xeon(R) CPU @ 2.00GHz
vendor: Intel Corp.
physical id: 1001
bus info: cpu@0
slot: CPU 1
size: 2GHz
capacity: 2GHz
width: 64 bits
capabilities:
*-cpu:1
description: CPU
vendor: Google
physical id: 1002
bus info: cpu@1
slot: CPU 2
size: 2GHz
capacity: 2GHz
sudo lshw -short -C memory
root@instance-1:~# sudo lshw -short -C memory
H/W path Device Class Description
================================================
/0/0 memory 96KiB BIOS
/0/200 memory 4GiB System Memory
/0/200/0 memory 4GiB DIMM RAM Synchronous
root@instance-1:~#
lshw -class disk
*-disk
description: SCSI Disk // (SAS, SATA, SCSI and ATA)
product: PersistentDisk
vendor: Google
physical id: 0.1.0
bus info: scsi@0:0.1.0
logical name: /dev/sda
version: 1
size: 30GiB (32GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=6 guid=760c3e21-8024-4623-b29f-6156d1355e3a logicalsectorsize=512 sectorsize=4096
root@instance-1:~#
lshw -class disk -class storage
hwinfo
dmidecode command to know RAM bandwidth rate
sudo dmidecode –type 17
root@instance-1:~# sudo dmidecode –type 17
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.
Handle 0x7000, DMI type 17, 21 bytes
Memory Device
Array Handle: 0x0200
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB
Form Factor: DIMM
Set: None
Locator: DIMM 0
Bank Locator: Not Specified
Type: RAM
Type Detail: Synchronous
sudo dmidecode –type processor
root@instance-1:~# sudo dmidecode –type processor
# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.4 present.
Handle 0x1001, DMI type 4, 32 bytes
Processor Information
Socket Designation: CPU 1
Type: Central Processor
Family: Other
Manufacturer: Google
ID: 53 06 05 00 FF FB 8B 1F
Version: Not Specified
Voltage: Unknown
External Clock: Unknown
Max Speed: 2000 MHz
Current Speed: 2000 MHz
Status: Populated, Enabled
Upgrade: Other
L1 Cache Handle: Not Provided
L2 Cache Handle: Not Provided
L3 Cache Handle: Not Provided
Handle 0x1002, DMI type 4, 32 bytes
Processor Information
Socket Designation: CPU 2
Type: Central Processor
Family: Other
Manufacturer: Google
ID: 53 06 05 00 FF FB 8B 1F
Version: Not Specified
Voltage: Unknown
External Clock: Unknown
Max Speed: 2000 MHz
Current Speed: 2000 MHz
Status: Populated, Enabled
Upgrade: Other
L1 Cache Handle: Not Provided
L2 Cache Handle: Not Provided
L3 Cache Handle: Not Provided
root@instance-1:~#
DIsk speed & type iops
smartctl -a /dev/sda1
smartctl -a /dev/sda1
Command ‘smartctl’ not found, but can be installed with:
apt install smartmontools
root@instance-1:~# smartctl -a /dev/sda1
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-5.3.0-1030-gcp] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Vendor: Google
Product: PersistentDisk
Revision: 1
Compliance: SPC-4
User Capacity: 32,212,254,720 bytes [32.2 GB]
Logical block size: 512 bytes
LU is fully provisioned [LBPRZ=1]
Rotation Rate: 1025 rpm
Serial number:
Device type: disk
Local Time is: Fri Jul 31 15:44:15 2020 UTC
SMART support is: Unavailable – device lacks SMART capability.
=== START OF READ SMART DATA SECTION ===
Current Drive Temperature: 0 C
Drive Trip Temperature: 0 C
Error Counter logging not supported
Device does not support Self Test logging
root@instance-1:~#
to know disk space & hardware partitions
df -h
root@instance-1:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 394M 3.0M 391M 1% /run
/dev/sda1 29G 17G 13G 56% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
/dev/loop1 55M 55M 0 100% /snap/core18/1754
/dev/loop3 55M 55M 0 100% /snap/core18/1880
/dev/loop5 97M 97M 0 100% /snap/core/9436
/dev/sda15 105M 3.6M 101M 4% /boot/efi
/dev/loop2 97M 97M 0 100% /snap/core/9665
/dev/loop4 119M 119M 0 100% /snap/google-cloud-sdk/142
/dev/loop0 119M 119M 0 100% /snap/google-cloud-sdk/143
tmpfs 394M 0 394M 0% /run/user/0
root@instance-1:~#
df -h /dev/sda1
root@instance-1:~# df -h /dev/sda1
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 29G 17G 13G 56% /
root@instance-1:~#
dd command to know write / Read performance like Crystaldiskmark
testing write speed
Block Device Information with lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 118.7M 1 loop /snap/google-cloud-sdk/143
loop1 7:1 0 55M 1 loop /snap/core18/1754
loop2 7:2 0 97M 1 loop /snap/core/9665
loop3 7:3 0 55M 1 loop /snap/core18/1880
loop4 7:4 0 118.5M 1 loop /snap/google-cloud-sdk/142
loop5 7:5 0 96.5M 1 loop /snap/core/9436
loop6 7:6 0 1 loop
loop7 7:7 0 0 loop
sda 8:0 0 30G 0 disk
├─sda1 8:1 0 29.9G 0 part /
├─sda14 8:14 0 4M 0 part
└─sda15 8:15 0 106M 0 part /boot/efi
root@instance-1:~#
hdparm to know cached/. Buffered read disks
sudo apt-get install hdparm
hdparm -Tt /dev/sda
root@instance-1:~# hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 15558 MB in 1.99 seconds = 7812.32 MB/sec
Timing buffered disk reads: 376 MB in 3.01 seconds = 125.05 MB/sec
root@instance-1:~# hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 15342 MB in 1.99 seconds = 7702.95 MB/sec
Timing buffered disk reads: 380 MB in 3.00 seconds = 126.63 MB/sec
root@instance-1:~# hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 15222 MB in 1.99 seconds = 7643.60 MB/sec
Timing buffered disk reads: 382 MB in 3.02 seconds = 126.63 MB/sec
Network speed throughout & ethernet card info
to know public ip address
eth0: error fetching interface information: Device not found
uname Command
uname -a (all info)
root@instance-1:~# uname -a
Linux instance-1 5.3.0-1030-gcp #32~18.04.1-Ubuntu SMP Thu Jun 25 19:30:23 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
-i infrastructure , -0 os, -p processor type
uname -v kernel version
uname -s kernel Name
uname -r kernel release
last but not least: htop
top – 16:09:03
up 17 days, 1:30, 1 user,
load average: 0.09, 0.04, 0.01
Tasks: 131 total, 1 running, 86 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.7 us, 2.0 sy, 0.0 ni, 81.8 id, 14.5 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 4029876 total, 1081416 free, 1144452 used, 1804008 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 2456488 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
490 root 20 0 46224 4808 2928 S 0.7 0.1 0:30.21 systemd-udevd
4301 root 20 0 1010864 23548 6852 S 0.7 0.6 1:23.24 snapd
303 root 20 0 200840 13848 11200 D 0.3 0.3 0:00.01 php7.3
1396 mysql 20 0 2375716 845308 34396 S 0.3 21.0 192:58.16 mysqld
1 root 20 0 225680 8844 6136 S 0.0 0.2 1:08.86 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.23 kthreadd
3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:
Also read linux performance tuning