LINUX 笔记-free 命令

free命令可以显示Linux系统中空闲的、已用的物理内存及swap内存,及被内核使用的buffer。

[email protected]:~$ free -h
total used free shared buff/cache available
Mem: 3.8G 1.3G 928M 27M 1.7G 2.2G
Swap: 4.0G 0B 4.0G

total:Total installed memory (MemTotal and SwapTotal in /proc/meminfo)

used:Used memory (calculated as total - free - buffers - cache)

free:Unused memory (MemFree and SwapFree in /proc/meminfo)

shared:Memory used (mostly) by tmpfs (Shmem in /proc/meminfo, available on kernels 2.6.32, displayed as zero if
not available)

buffers:Memory used by kernel buffers (Buffers in /proc/meminfo)

cache:Memory used by the page cache and slabs (Cached and Slab in /proc/meminfo)

buff/cache:Sum of buffers and cache(A buffer is something that has yet to be "written" to disk. A cache is something that has been "read" from the disk and stored for later use.)

available:Estimation of how much memory is available for starting new applications, without swapping. Unlike the data provided by the cache or free fields, this field takes into account page cache and also that not all reclaimable memory slabs will be reclaimed due to items being in use (MemAvailable in /proc/meminfo, available on kernels 3.14, emulated on kernels 2.6.27+, otherwise the same as free)

时间: 2024-08-11 00:18:34

LINUX 笔记-free 命令的相关文章

LINUX 笔记-top命令

top命令经常用来监控linux的系统状况,比如cpu.内存的使用. top - 08:16:55 up 1 day, 1:09, 2 users, load average: 0.00, 0.01, 0.00 Tasks: 252 total, 1 running, 250 sleeping, 0 stopped, 1 zombie %Cpu(s): 0.5 us, 0.3 sy, 0.0 ni, 98.6 id, 0.4 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem

Linux笔记整理——命令篇

一.列出目录内容 ls -a:显示所有文件(包括隐藏文件): ls -l:显示详细信息: ls -R:递归显示子目录结构: ls -ld:显示目录和链接信息: ctrl+r:历史记录中所搜命令(输入命令中的任意一个字符): Linux中以.开头的文件是隐藏文件: pwd:显示当前目录 二.查看文件的类型 file:查看文件的类型 三.复制文件目录 1.cp:复制文件和目录 cp源文件(文件夹)目标文件(文件夹) 常用参数:-r:递归复制整个目录树:-v:显示详细信息: 复制文件夹时要在cp命令后

LINUX 笔记-crontab命令

用户所建立的crontab文件中,每一行都代表一项任务,每行的每个字段代表一项设置,它的格式共分为六个字段,前五段是时间设定段,第六段是要执行的命令段,格式如下: minute   hour   day   month   week   command 其中: minute: 表示分钟,可以是从0到59之间的任何整数. hour:表示小时,可以是从0到23之间的任何整数. day:表示日期,可以是从1到31之间的任何整数. month:表示月份,可以是从1到12之间的任何整数. week:表示星

LINUX 笔记-watch命令

命令格式:watch[参数][命令] 可以将命令的输出结果输出到标准输出设备,多用于周期性执行命令/定时执行命令 命令参数: -n或--interval  watch缺省每2秒运行一下程序,可以用-n或-interval来指定间隔的时间. -d或--differences  用-d或--differences 选项watch 会高亮显示变化的区域. 而-d=cumulative选项会把变动过的地方(不管最近的那次有没有变动)都高亮显示出来. 如:每隔一秒高亮显示网络链接数的变化情况 watch 

LINUX 笔记-ps命令

使用该命令能确定有哪些进程正在运行和运行的状态.进程是否结束.进程有没有僵死.哪些进程占用了过多的资源等等 USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.2 119816 5628 ? Ss 04:37 0:09 /sbin/init auto noprompt root 2 0.0 0.0 0 0 ? S 04:37 0:00 [kthreadd] root 4 0.0 0.0 0 0 ? S< 04:3

LINUX 笔记-iostat命令

显示CPU和I/O统计信息 iostat的不带参数的显示CPU和I/ O的所有分区的统计信息 -c Display the CPU utilization report. -d Display the device utilization report Linux 4.10.0-32-generic (ubuntu) 08/31/2017 _x86_64_ (2 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 0.50 0.04 0.

LINUX 笔记-tee命令

作用:把输出的一个副本输送到标准输出,另一个副本拷贝到相应的文件中 格式:tee filename 例:who | tee who.out 使用who命令,结果输出到屏幕上,同时保存在who.out文件中

LINUX 笔记-netstat命令

netstat命令用于显示与IP.TCP.UDP和ICMP协议相关的统计数据,一般用于检验本机各端口的网络连接情况.netstat是在内核中访问网络及相关信息的程序,它能提供TCP连接,TCP和UDP监听,进程内存管理的相关报告. netstat参数虽然很多,但是常用的不多,主要是下面几个参数: netstat -[atunlp] -a :all,表示列出所有的连接,服务监听,Socket资料 -t :tcp,列出tcp协议的服务 -u :udp,列出udp协议的服务 -n :port numb

LINUX 笔记-vmstat命令

procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 1 0 0 858612 160236 1617384 0 0 6 12 63 124 1 0 99 0 0 Procs r: The number of runnable processes (running or wa