Change GPL-2.0+/LGPL-2.0+ to GPL-2.0-or-later/LGPL-2.0-or-later
[platform/upstream/procps-ng.git] / free.1
1 .\"             -*-Nroff-*-
2 .\"  This page Copyright (C) 1993 Matt Welsh, mdw@sunsite.unc.edu.
3 .\"  Long options where added at April 15th, 2011.
4 .\"  Freely distributable under the terms of the GPL
5 .TH FREE 1 "2018-05-31" "procps-ng" "User Commands"
6 .SH NAME
7 free \- Display amount of free and used memory in the system
8 .SH SYNOPSIS
9 .B free
10 .RI [ options ]
11 .SH DESCRIPTION
12 .B free
13 displays the total amount of free and used physical and swap memory in the
14 system, as well as the buffers and caches used by the kernel. The
15 information is gathered by parsing /proc/meminfo. The displayed
16 columns are:
17 .TP
18 \fBtotal\fR
19 Total installed memory (MemTotal and SwapTotal in /proc/meminfo)
20 .TP
21 \fBused\fR
22 Used memory (calculated as \fBtotal\fR - \fBfree\fR - \fBbuffers\fR - \fBcache\fR)
23 .TP
24 \fBfree\fR
25 Unused memory (MemFree and SwapFree in /proc/meminfo)
26 .TP
27 \fBshared\fR
28 Memory used (mostly) by tmpfs (Shmem in /proc/meminfo)
29 .TP
30 \fBbuffers\fR
31 Memory used by kernel buffers (Buffers in /proc/meminfo)
32 .TP
33 \fBcache\fR
34 Memory used by the page cache and slabs (Cached and SReclaimable in /proc/meminfo)
35 .TP
36 \fBbuff/cache\fR
37 Sum of \fBbuffers\fR and \fBcache\fR
38 .TP
39 \fBavailable\fR
40 Estimation of how much memory is available for starting
41 new applications, without swapping. Unlike the data
42 provided by the \fBcache\fR or \fBfree\fR fields,
43 this field takes into account page cache and also that
44 not all reclaimable memory slabs will be reclaimed
45 due to items being in use (MemAvailable in /proc/meminfo, available on
46 kernels 3.14, emulated on kernels 2.6.27+, otherwise the same as \fBfree\fR)
47 .SH OPTIONS
48 .TP
49 \fB\-b\fR, \fB\-\-bytes\fR
50 Display the amount of memory in bytes.
51 .TP
52 \fB\-k\fR, \fB\-\-kibi\fR
53 Display the amount of memory in kibibytes.  This is the default.
54 .TP
55 \fB\-m\fR, \fB\-\-mebi\fR
56 Display the amount of memory in mebibytes.
57 .TP
58 \fB\-g\fR, \fB\-\-gibi\fR
59 Display the amount of memory in gibibytes.
60 .TP
61 \fB\-\-tebi\fR
62 Display the amount of memory in tebibytes.
63 .TP
64 \fB\-\-pebi\fR
65 Display the amount of memory in pebibytes.
66 .TP
67 \fB\-\-kilo\fR
68 Display the amount of memory in kilobytes. Implies --si.
69 .TP
70 \fB\-\-mega\fR
71 Display the amount of memory in megabytes. Implies --si.
72 .TP
73 \fB\-\-giga\fR
74 Display the amount of memory in gigabytes. Implies --si.
75 .TP
76 \fB\-\-tera\fR
77 Display the amount of memory in terabytes. Implies --si.
78 .TP
79 \fB\-\-peta\fR
80 Display the amount of memory in petabytes. Implies --si.
81 .TP
82 \fB\-h\fR, \fB\-\-human\fP
83 Show all output fields automatically scaled to shortest three digit unit and
84 display the units of print out.  Following units are used.
85 .sp
86 .nf
87   B = bytes
88   Ki = kibibyte
89   Mi = mebibyte
90   Gi = gibibyte
91   Ti = tebibyte
92   Pi = pebibyte
93 .fi
94 .sp
95 If unit is missing, and you have exbibyte of RAM or swap, the number is in
96 tebibytes and columns might not be aligned with header.
97 .TP
98 \fB\-w\fR, \fB\-\-wide\fR
99 Switch to the wide mode. The wide mode produces lines longer
100 than 80 characters. In this mode \fBbuffers\fR and \fBcache\fR
101 are reported in two separate columns.
102 .TP
103 \fB\-c\fR, \fB\-\-count\fR \fIcount\fR
104 Display the result
105 .I count
106 times.  Requires the
107 .B \-s
108 option.
109 .TP
110 \fB\-l\fR, \fB\-\-lohi\fR
111 Show detailed low and high memory statistics.
112 .TP
113 \fB\-s\fR, \fB\-\-seconds\fR \fIdelay\fR
114 Continuously display the result \fIdelay\fR  seconds
115 apart.  You may actually specify any floating point number for
116 \fIdelay\fR using either . or , for decimal point.
117 .BR usleep (3)
118 is used for microsecond resolution delay times.
119 .TP
120 \fB\-\-si\fR
121 Use kilo, mega, giga etc (power of 1000) instead of kibi, mebi, gibi (power
122 of 1024).
123 .TP
124 \fB\-t\fR, \fB\-\-total\fR
125 Display a line showing the column totals.
126 .TP
127 \fB\-\-help\fR
128 Print help.
129 .TP
130 \fB\-V\fR, \fB\-\-version\fR
131 Display version information.
132 .PD
133 .SH FILES
134 .TP
135 /proc/meminfo
136 memory information
137 .PD
138 .SH BUGS
139 The value for the \fBshared\fR column is not available from kernels before
140 2.6.32 and is displayed as zero.
141 .TP
142 Please send bug reports to
143 .UR procps@freelists.org
144 .UE
145 .SH "SEE ALSO"
146 .BR ps (1),
147 .BR slabtop (1),
148 .BR top "(1),
149 .BR vmstat (8).