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:8173808114806447278688568822978766591952
Swap:104857201048572   


View in MB:

free -m

Output:

  total used  free shared   buff/cache available
Mem:7982109646418322446461
Swap:102301023   

 

Display RAM details with Units:

free -h

Output:

  total used  free shared   buff/cache available
Mem:7.8G1.0G4.6G83M2.2G6.3G
Swap:1.0G0B1.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:

FilesystemSizeUsedAvailUse%Mounted on
udev3.9G03.9G0%/dev
tmpfs799M8.6M790M2%/run
/dev/xvda149G27G23G54%/
tmpfs3.9G03.9G0%/dev/shm
tmpfs5.0M05.0M0%/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: