N天学习一个Linux命令之free
用途
查看系统内存(物理/虚拟/缓存/共享)使用情况
用法
free [-b | -k | -m | -g | -h] [-o] [-s delay ] [-c count ] [-a] [-t] [-l] [-V]
常用选项
选项 | 含义 | 说明 |
---|---|---|
-b | 单位byte | switch displays the amount of memory in bytes; |
-k | 单位k | switch (set by default) displays it in kilobytes; |
-m | 单位m | switch displays it in megabytes; |
-g | 单位g | switch displays it in gigabytes; |
-h | 人类可读方式 | switch displays all output fields automatically scaled to the shortest (three digit) representation including the unit. That makes the values human readable. |
-t | 显示汇总行 | switch displays a line containing the totals. |
-o | disables the display of a "buffer adjusted" line | switch disables the display of a "buffer adjusted" line. If the -o option is not specified, free subtracts buffer memory from the used memory and adds it to the free memory reported. |
-s 间隔秒数 | 间隔几秒重复刷新显示 | switch activates continuous polling delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolution delay times. |
-c 次数 | 重复刷新显示总次数 | switch used together with the -s switch interrupts the polling after count repetitions. |
-l | 显示low行 | switch shows detailed low and high memory statistics. |
-a | 显示可用内存 | switch shows the available memory (if supported by the running kernel and enabled with sysctl -w vm.mem-info_legacy_layout=0 ; shows zero when unsupported or disabled). The produced output is wider than 80 characters. |
-V | 显示程序版本信息 | switch displays version information. |
实践
1 显示内存使用情况
[root@vm ~]# free -h
total used free shared buffers cached
Mem: 2.9G 2.7G 209M 37M 11M 185M
-/+ buffers/cache: 2.5G 405M
Swap: 1.6G 1.2G 415M
参考资料
【1】man free
【2】每天一个linux命令(45):free 命令
http://www.cnblogs.com/peida/archive/2012/12/25/2831814.html
【3】Linux上的free命令详解
http://www.cnblogs.com/coldplayerest/archive/2010/02/20/1669949.html
N天学习一个Linux命令之free的更多相关文章
- N天学习一个Linux命令之帮助命令:man
前言 工作中每天都在使用常用的命令和非常用的命令,忘记了用法或者参数,都会bing一下,然后如此循环.一直没有真正的系统的深入的去了解命令的用法,我决定打破它.以前看到有人,每天学习一个linux命令 ...
- N天学习一个linux命令之ping
用途 检测主机是否可到达,也就是说,目标主机是否可以联网,还可以用于检测网速.通过发送ICMP ECHO_REQUEST数据包检测. 用法 ping [options] destination 常用选 ...
- N天学习一个linux命令之kill
用途 用于终止进程 用法 kill [-s signal|-p] [--] pid... kill -l [signal] 说明 1.默认发送信号15(请求终止进程,程序可以捕获,操作系统会杀死没有对 ...
- N天学习一个linux命令之du
用途 统计文件或者目录占用硬盘空间大小 用法 du [OPTION] [FILE]du [OPTION] --files0-from=F 常用参数 -a, --all统计所有文件,不仅仅是目录 -b, ...
- N天学习一个linux命令之scp
用途 通过ssh通道,不同主机之间复制文件 用法 scp [options] [user@host:]file1 [user2@host2:]file2 常用参数 -1使用 ssh 1协议 -2使用s ...
- 每天学习一个Linux命令-目录
在工作中总会零零散散使用到各种Linux命令,从今天开始详细的学习一下linux常用命令,坚持每天一个命令,学习的主要参考资料为: 1.竹子-博客(https://www.cnblogs.com/pe ...
- N天学习一个linux命令之umask
前言 umask不是linux命令,而是shell内置的指令,俗称用户权限掩码,用于对用户创建的文件和目录设置默认权限.默认的权限掩码是0022,也就是说新创建的文件权限是0644,新创建的目录权限是 ...
- N天学习一个linux命令之ip
用途 show / manipulate routing, devices, policy routing and tunnels 用法 通用格式 ip [ OPTIONS ] OBJECT { CO ...
- N天学习一个Linux命令之grep
前言任何系统都会出问题,出了问题一般怎么排查BUG?这个时候程序中记录的异常日志以及关键节点的日志就非常重要了,面对一大堆的日志文件,怎么找出我们需要的有用信息呢?linux中可以使用grep命令查找 ...
随机推荐
- Text段、Data段和BSS段
不同的compiler在编译的过程中对于存储的分配可能略有不同,但基本结构大致相同. 大体上可分为三段:Text段.Data段和BSS段. text段用于存放代码,通常情况下在内存中被映射为只读,但d ...
- php排序函数测试
1.sort,asort,arsort函数 十万个数的数组排序,用了0.17秒 $starttime=explode(' ',microtime());;for ($i=0; $i <10000 ...
- ShaderLab中vertex fragment类Shader基础格式笔记
//U3D用的shader语言叫ShaderLab,基础语法官方文档地址 //https://docs.unity3d.com/Manual/SL-Shader.html //开头指明名字,可以在别的 ...
- python3+request接口自动化框架
首次书写博客,记录下写的自动化接口框架,框架比较简单,哈哈哈,算是记录下历程把!~~~ 一.本次框架由python3.6 书写 1.准备代码环境,下载python3.6 下载地址:https:/ ...
- 自定义View(9)使用Renderscript 渲染特效。
1.渲染脚本官网 https://developer.android.com/guide/topics/renderscript/compute 2.高斯模糊 ScriptIntrinsicBlur ...
- 2CSS层叠规则(即引入CSS的三种不同方式的优先级)
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...
- Zookeeper概念学习系列之zookeeper的节点
znode有两种类型: 临时节点(ephemeral node) 和 持久节点(persistent node). znode的类型在创建时确定并且之后不能再修改. 短暂znode的客户端会话结束 ...
- azkaban-executor启动时出现conf/global.properties (No such file or directory)的问题解决(图文详解)
问题详情 // :: INFO [FlowRunnerManager] [Azkaban] Cleaning recently finished // :: INFO [FlowRunnerMana ...
- 【GAN学习笔记】对抗式生成网络入门
今天观看学习了一下台大李宏毅所讲授的 <Introduction of Generative Adversarial Network (GAN)>,对GAN有了一个初步的了解. GAN的基 ...
- 六时出行 App iOS隐私政策
本应用尊重并保护所有使用服务用户的个人隐私权.为了给您提供更准确.更有个性化的服务,本应用会按照本隐私权政策的规定使用和披露您的个人信息.但本应用将以高度的勤勉.审慎义务对待这些信息.除本隐私权政策另 ...