How to Check Linux Memory Space

cocoamaemae
1 min readFeb 11, 2019

--

Brief

There are several commands to check linux memory space like free, top, vmstat, ps or etc. Explain free command in this time.

E.g.1

$ free -h
total used free shared buff/cache available
Mem: 993M 98M 783M 6.8M 112M 776M
Swap: 1.0G 0B 1.0G

Checking free, it shows 783M against total 998M. It can be found there is enough memory space. At a glance, Swap total is exceeded but Swap used is 0 B.

E.g.2

$ free -h
total used free shared buff/cache available
Mem: 1.8G 1.1G 105M 469M 685M

In this example. free is only 105M against total 1.8G. But Linux is decreasing disc I/O by allocating rest of memory to buffer/cached. In many cases, free is just 100M left. Practical memory space is 105M + 685M = 890M, so there is enough capacity.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

cocoamaemae
cocoamaemae

No responses yet

Write a response