From 2cb4e5a8ec5c38212adb10f08c6374859bf056a9 Mon Sep 17 00:00:00 2001 From: geekpi Date: Thu, 2 Jan 2014 02:14:39 +0000 Subject: [PATCH] =?UTF-8?q?[Translated]=20Linux=20free=20Command=20=A8C=20?= =?UTF-8?q?Display=20Free=20and=20used=20Memory=20in=20the=20System?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...play Free and used Memory in the System.md | 96 ------------------- ...play Free and used Memory in the System.md | 92 ++++++++++++++++++ 2 files changed, 92 insertions(+), 96 deletions(-) delete mode 100644 sources/Linux free Command 每 Display Free and used Memory in the System.md create mode 100644 translated/Linux free Command 每 Display Free and used Memory in the System.md diff --git a/sources/Linux free Command 每 Display Free and used Memory in the System.md b/sources/Linux free Command 每 Display Free and used Memory in the System.md deleted file mode 100644 index 688a24f77d..0000000000 --- a/sources/Linux free Command 每 Display Free and used Memory in the System.md +++ /dev/null @@ -1,96 +0,0 @@ -Translating---------------------geekpi - - - -Linux free Command Display Free and used Memory in the System -================================================================================ -System administrator must maintain the health of their server. One of the critical component is memory. When server memory is full utilized, it can slow down the server performance. To monitor memory utilization, Linux have another command that called free. - -### What is free command ### - -**Free** command is a tool that can display amount of free and used memory in the system. The output of free command is similar with top command. Most of Linux distribution already have free command. - -### How to run it ### - -To run it, just type **free** on your console. Running it without an option will show you a default view with kilobyte units. - - $ free - -![Free default view](http://linoxide.com/wp-content/uploads/2013/12/free_default.png) - -From the above screenshot we can read : - -#### Memory (in kilobytes units) #### - -- Total : 1026740 -- Used : 843396 -- Free : 183344 -- Shared : 0 -- Buffers : 52704 -- Cached : 376384 - -#### Swap (in kilobytes units) #### - -- Total : 1045500 -- Used : 3376 -- Free : 1042124 - -When you see the buffers/cache free memory is low or you see that the swap free is low, then a memory upgrade is needed. This mean that memory utilization is high. Please notice that the **shared memory column should be ignored** because it is obsolete. - -### Display memory information in another units ### - -As we mentioned before, by default free will show information in kilobytes unit. Free also provide us **-b (bytes), -k (kilobytes), -m (megabytes), -g (gigabytes) and tera (terabytes)**. To show the information in the unit we want, just pick one of them and put the option behind free command. Heres a sample output in megabytes unit. - - $ free -m - -![Free with megabytes unit](http://linoxide.com/wp-content/uploads/2013/12/free_m.png) - -This trick is also applied to **-b, -k, -g** and **tera** option. - -### Display memory information in human readable ### - -Free also provide us with **-h** option which mean human readable. So what is the difference with previous option, such as **-m** (megabytes) option? The most visible difference is that **-h** option will add human readable unit after the numbers. Lets take a look a sample of it. - - $ free -h - -![Human readable free](http://linoxide.com/wp-content/uploads/2013/12/free_h.png) - -As we can see together, there is **G (gigabyte)** letter behind 1,0 number. When the number is not reach gigabtye, free is smart enough to know it and put the appropriate unit behind each numbers. **M** letter behind let say 929 number tell us its 969 Megabytes. - -### Display free with delay ### - -As one of statistic tool, the best way to capture memory utilization is using a delay. To do this, we can use **-s** option followed by N seconds that we want. We can always combine more than 1 options to make the output is fit with our needs. Let say we want to capture memory utilization every 3 seconds and human readable. So the command will be like this : - - $ free -hs 3 - -![Free with 3 seconds delay](http://linoxide.com/wp-content/uploads/2013/12/free_hs3.png) - -### Display low and high memory utilization ### - -If we want to show low and high memory statistics, we can use -l option. Heres a sample. - - $ free -l - -![Free low-high statistics](http://linoxide.com/wp-content/uploads/2013/12/free_l.png) - -### Display Linux total memory ### - -When we need the information of total for every column, we can add -t option behind free command. This will add 1 more row at the bottom which display it. - - $ free -t - -![Free with total memory](http://linoxide.com/wp-content/uploads/2013/12/free_t.png) - -### Conclusion ### - -Besides [vmstat][1], Free command is another simple statistic tool for capturing memory utilization. With this you can grab a quick information about what happen in your Linux memory. Free is using /proc/meminfo as a base for showing memory utilization information. As usual, you can always type man free on your console to explore more detail about free. - --------------------------------------------------------------------------------- - -via: http://linoxide.com/linux-command/linux-free-command/ - -霂嚗[霂ID](https://github.com/霂ID) ∪笆嚗[∪笆ID](https://github.com/∪笆ID) - -祆 [LCTT](https://github.com/LCTT/TranslateProject) 蝧餉嚗[Linux銝剖稽(http://linux.cn/) 隤典 - -[1]:http://linoxide.com/linux-command/linux-vmstat-command-tool-report-virtual-memory-statistics/ \ No newline at end of file diff --git a/translated/Linux free Command 每 Display Free and used Memory in the System.md b/translated/Linux free Command 每 Display Free and used Memory in the System.md new file mode 100644 index 0000000000..e6b4f71ab1 --- /dev/null +++ b/translated/Linux free Command 每 Display Free and used Memory in the System.md @@ -0,0 +1,92 @@ +Linux free 賭誘 - 曄內蝟餌銝剔征脣撌脖蝙函摮 +================================================================================ +蝟餌蝞∠敹憿餌恣隞隞祆∪函亙熒嗡葉閬銝典臬摮敶∪典摮冽說塚摰隡撠∪函扯賬銝箔閫摮拍函嚗Linux銝銝芸極瑞妍銝榻ree + +### free臭銋 ### + +**free** 賭誘臭銝芣曄內蝟餌銝剔征脣撌脩典摮憭批撌亙瑯free賭誘颲箏top賭誘訾撮憭批袂inux銵撌脩急free賭誘 + +### How to run it ### + +銝箔餈銵嚗芾冽批嗅啗**free**銝撣阡憿寡銵隡曄內銝銝芯誑KB銝箏雿暺霈方箝 + + $ free + +![free暺霈方霄(http://linoxide.com/wp-content/uploads/2013/12/free_default.png) + +隞銝Y芸暹隞祉堆 + +#### 摮 (隞仕B霈) #### + +- Total : 1026740 +- Used : 843396 +- Free : 183344 +- Shared : 0 +- Buffers : 52704 +- Cached : 376384 + +#### Swap (隞仕B霈) #### + +- Total : 1045500 +- Used : 3376 +- Free : 1042124 + +敶雿閫buffer/cache蝛粹脩征港swap蝛粹脩征港嚗銋摮閬蝥找餈唾摮拍函敺擃霂瑟釣 **曹澈摮銝芸霂亥◤敹賜**嚗銝箔撌脩鋡怠撘鈭 + +### 隞亙嗡曄內摮靽⊥ ### + +憒隞砍啁嚗暺霈支free隡隞仕B銝箏雿曄內靽⊥胯free瑟靘蝏隞 **b (B), -k (KB), -m (MB), -g (GB) and tera (TB)**餈鈭雿閬曄內隞祆唾雿嚗芾拐銝芸僎狄reeZ銝銝V銝芣臭誑MB銝箏雿颲箝 + + $ free -m + +![free賭誘隞仗B銝箏雿](http://linoxide.com/wp-content/uploads/2013/12/free_m.png) + +餈銝芣撌扳撌批琿其**-b, -k, -g** and **tera** 憿嫘 + +### 隞乩犖蝐餃航粉孵曄內摮靽⊥ ### + +free瑟靘鈭**-h**憿對餈喟鈭箇掩航粉(霂瘜:蝟餌銝航賢僎銝摮-h憿對撌脰◤-m隞)銋餈銝嗡憿寞隞銋銝g憒**-m**(MB)憿對 憭抒航銝**-h**憿嫣冽啣W銝鈭箇掩航粉霈拇隞祉銝銝芯摮 + + $ free -h + +![鈭箇掩航粉free](http://linoxide.com/wp-content/uploads/2013/12/free_h.png) + +憒隞砌韏瑞啁嚗1,0啣餈**G(GB)**摮瘥敶啣撟嗆瓷颲曉蚣B塚free頞喳芣亦仿撟嗅冽銝芣啣Z銝Y**M** - 啣929霂隞砍929MB(霂瘜: 銝929 number tell us its 969 Megabytes嚗餈摨霂乩蛹typo) + +### 撱嗉曄內free ### + +雿銝箔銝芣曄內撌亙瘀憟賜摮拍函寞臭蝙典辣餈銝箔餈銋嚗隞砍臭誑雿輻**-s**憿孵Z銝隞祆唾N蝘隞祆餅臬典Z銝憭鈭1銝芰憿寞乩蝙颲箸說頞單隞祉瘙憒隞祆唾瘥3s摮拍函撟嗡臭犖蝐餃航粉銋撠勗餈瑕: + + $ free -hs 3 + +![撱嗉3s曄內free](http://linoxide.com/wp-content/uploads/2013/12/free_hs3.png) + +### 曄內擃雿摮拍函 ### + +憒隞祆唾仿擃雿摮蝏霈∴隞砍臭誑雿輻-l憿嫘銝X臭銝芯摮 + + $ free -l + +![Free 雿-擃 蝏霈((http://linoxide.com/wp-content/uploads/2013/12/free_l.png) + +### 曄內Linux券典摮 ### + +憒隞祇閬瘥餉恣靽⊥荔隞砍臭誑狄ree賭誘Z銝-t憿嫘餈隡摮摨券憭乩銵曄內 + + $ free -t + +![free賭誘撣行餉恣摮](http://linoxide.com/wp-content/uploads/2013/12/free_t.png) + +### 餌 ### + +支[vmstat][1]隞亙嚗free賭誘臬血銝銝芰其摮拍函蝞蝏霈∪極瑯刻銝芯臭誑銝銝芸翰喃雿Linux摮靽⊥胯free賭誘雿輻/proc/meminfo雿銝箏箏交曄內摮拍函靽⊥胯憒敺撣訾瘀雿臭誑冽批嗅唬颲"man free"亙啣喃free游蝏 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/linux-command/linux-free-command/ + +霂嚗[geekpi](https://github.com/geekpi) ∪笆嚗[∪笆ID](https://github.com/∪笆ID) + +祆 [LCTT](https://github.com/LCTT/TranslateProject) 蝧餉嚗[Linux銝剖稽(http://linux.cn/) 隤典 + +[1]:http://linoxide.com/linux-command/linux-vmstat-command-tool-report-virtual-memory-statistics/ \ No newline at end of file