Check Server Configuration - Memory, Hard Disc, Processor in Ubuntu Linux

In Linux Ubuntu, you do not have any GUI mode to display the RAM detail and Hard Disk details. So you need the commands to view the server status in Ubuntu.

1. View RAM Details

You can view RAM details if different units like KB, MB, GB etc. The default is KB.

free

Output:

   total  used   free  shared    buff/cache  available
Mem: 8173808 1148064 4727868 85688 2297876 6591952
Swap: 1048572 0 1048572      


View in MB:

free -m

Output:

   total  used   free  shared    buff/cache  available
Mem: 7982 1096 4641 83 2244 6461
Swap: 1023 0 1023      

 

Display RAM details with Units:

free -h

Output:

   total  used   free  shared    buff/cache  available
Mem: 7.8G 1.0G 4.6G 83M 2.2G 6.3G
Swap: 1.0G 0B 1.0G      

 

2. View Hard Disc Details

You can view RAM details if different units like KB, MB, GB or with the unit. The default is KB.

df -h

Output:

Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 799M 8.6M 790M 2% /run
/dev/xvda1 49G 27G 23G 54% /
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock

You can view Total value by using:

df -h --total

 

To check hard disk memory used by and directory:

du -hs /path/to/directory

Output:

21G              /var/www/

 

3. View Processor Details

cpuinfo provides all the information about the CPUs.

cat /proc/cpuinfo

Output:

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model        : 63

model name : Intel(R) Xeon(R) CPU E5-2676 v3 @ 2.40GHz

stepping : 2

microcode : 0x3c

cpu MHz : 2400.098

cache size : 30720 KB

physical id : 0

siblings      : 2

core id       : 0

cpu cores  : 2

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 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology 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 invpcid_single kaiser fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt

bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf

bogomips : 4800.19

clflush size : 64

cache_alignment : 64

address sizes : 46 bits physical, 48 bits virtual

power management:

 

Keywords: