Server Spec Analysis
Here are some Useful tools to check the specs of a server¶
CPU¶
lscpu
You can see the output below when the command is used on a server. Usually this would contain more information that this.
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
Thread(s) per core: 2
Core(s) per socket: 1
You can see that this server has 2 cpu cores by looking at the CPU(s)
. It's rare that the average physical cpu would
only have 2 cores so we can assume this is all virtual.
RAM¶
We can check the ram by using either free -m
or free -g
Here is the output for both
free -m
simon@simon free -m
total used free shared buff/cache available
Mem: 7971 7173 189 267 608 273
Swap: 8079 3543 4536
simon@simon free -g
total used free shared buff/cache available
Mem: 7 6 0 0 0 0
Swap: 7 3 4
free -m
is more useful if you want to be accurate.
Disc Space¶
Disc space can be found by simply using df -h
.
Here is some example output
simon@simon df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 726M 3.2G 19% /dev/shm
tmpfs 3.9G 2.0M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/dm-3 108G 93G 11G 90% /
tmpfs 3.9G 1.9M 3.9G 1% /tmp
/dev/nvme0n1p2 976M 167M 743M 19% /boot
/dev/nvme0n1p1 200M 19M 182M 10% /boot/efi
tmpfs 798M 20K 798M 1% /run/user/42
tmpfs 798M 108K 798M 1% /run/user/1000