Debian Codegraph @

man/free.1

raw
1 .\"
2 .\" Copyright (c) 2011-2023 Craig Small <[email protected]>
3 .\" Copyright (c) 2013-2023 Jim Warner <[email protected]>
4 .\" Copyright (c) 2011-2012 Sami Kerola <[email protected]>
5 .\" Copyright (c) 2002-2003 Albert Cahalan
6 .\" Copyright (c) 1993 Matt Welsh <[email protected]>
7 .\"
8 .\" This program is free software; you can redistribute it and/or modify
9 .\" it under the terms of the GNU General Public License as published by
10 .\" the Free Software Foundation; either version 2 of the License, or
11 .\" (at your option) any later version.
12 .\"
13 .\"
14 .TH FREE 1 2023-05-02 procps-ng
15 .SH NAME
16 free \- Display amount of free and used memory in the system
17 .SH SYNOPSIS
18 .B free
19 .RI [ option " .\|.\|.]"
20 .SH DESCRIPTION
21 .B free
22 displays the total amount of free and used physical and swap memory in the
23 system, as well as the buffers and caches used by the kernel. The
24 information is gathered by parsing /proc/meminfo. The displayed
25 columns are:
26 .TP
27 \fBtotal\fR
28 Total usable memory (MemTotal and SwapTotal in /proc/meminfo). This includes
29 the physical and swap memory minus a few reserved bits and kernel binary code.
30 .TP
31 \fBused\fR
32 Used or unavailable memory (calculated as \fBtotal\fR - \fBavailable\fR)
33 .TP
34 \fBfree\fR
35 Unused memory (MemFree and SwapFree in /proc/meminfo)
36 .TP
37 \fBshared\fR
38 Memory used (mostly) by tmpfs (Shmem in /proc/meminfo)
39 .TP
40 \fBbuffers\fR
41 Memory used by kernel buffers (Buffers in /proc/meminfo)
42 .TP
43 \fBcache\fR
44 Memory used by the page cache and slabs (Cached and SReclaimable in /proc/meminfo)
45 .TP
46 \fBbuff/cache\fR
47 Sum of \fBbuffers\fR and \fBcache\fR
48 .TP
49 \fBavailable\fR
50 Estimation of how much memory is available for starting
51 new applications, without swapping. Unlike the data
52 provided by the \fBcache\fR or \fBfree\fR fields,
53 this field takes into account page cache and also that
54 not all reclaimable memory slabs will be reclaimed
55 due to items being in use (MemAvailable in /proc/meminfo, available on
56 kernels 3.14, emulated on kernels 2.6.27+, otherwise the same as \fBfree\fR)
57 .SH OPTIONS
58 .TP
59 \fB\-b\fR, \fB\-\-bytes\fR
60 Display the amount of memory in bytes.
61 .TP
62 \fB\-k\fR, \fB\-\-kibi\fR
63 Display the amount of memory in kibibytes. This is the default.
64 .TP
65 \fB\-m\fR, \fB\-\-mebi\fR
66 Display the amount of memory in mebibytes.
67 .TP
68 \fB\-g\fR, \fB\-\-gibi\fR
69 Display the amount of memory in gibibytes.
70 .TP
71 \fB\-\-tebi\fR
72 Display the amount of memory in tebibytes.
73 .TP
74 \fB\-\-pebi\fR
75 Display the amount of memory in pebibytes.
76 .TP
77 \fB\-\-kilo\fR
78 Display the amount of memory in kilobytes. Implies --si.
79 .TP
80 \fB\-\-mega\fR
81 Display the amount of memory in megabytes. Implies --si.
82 .TP
83 \fB\-\-giga\fR
84 Display the amount of memory in gigabytes. Implies --si.
85 .TP
86 \fB\-\-tera\fR
87 Display the amount of memory in terabytes. Implies --si.
88 .TP
89 \fB\-\-peta\fR
90 Display the amount of memory in petabytes. Implies --si.
91 .TP
92 \fB\-h\fR, \fB\-\-human\fP
93 Show all output fields automatically scaled to shortest three digit unit and
94 display the units of print out. Following units are used.
95 .sp
96 .nf
97 B = bytes
98 Ki = kibibyte
99 Mi = mebibyte
100 Gi = gibibyte
101 Ti = tebibyte
102 Pi = pebibyte
103 .fi
104 .sp
105 If unit is missing, and you have exbibyte of RAM or swap, the number is in
106 tebibytes and columns might not be aligned with header.
107 .TP
108 \fB\-w\fR, \fB\-\-wide\fR
109 Switch to the wide mode. The wide mode produces lines longer
110 than 80 characters. In this mode \fBbuffers\fR and \fBcache\fR
111 are reported in two separate columns.
112 .TP
113 \fB\-c\fR, \fB\-\-count\fR \fIcount\fR
114 Display the result
115 .I count
116 times. Requires the
117 .B \-s
118 option.
119 .TP
120 \fB\-l\fR, \fB\-\-lohi\fR
121 Show detailed low and high memory statistics.
122 .TP
123 \fB\-L\fR, \fB\-\-line\fR
124 Show output on a single line, often used with the
125 .B \-s
126 option to show memory statistics repeatedly.
127 .TP
128 \fB\-s\fR, \fB\-\-seconds\fR \fIdelay\fR
129 Continuously display the result \fIdelay\fR seconds
130 apart. You may actually specify any floating point number for
131 \fIdelay\fR using either . or , for decimal point.
132 .BR usleep (3)
133 is used for microsecond resolution delay times.
134 .TP
135 \fB\-\-si\fR
136 Use kilo, mega, giga etc (power of 1000) instead of kibi, mebi, gibi (power
137 of 1024).
138 .TP
139 \fB\-t\fR, \fB\-\-total\fR
140 Display a line showing the column totals.
141 .TP
142 \fB\-v\fR, \fB\-\-committed\fR
143 Display a line showing the memory commit limit and amount of committed/uncommitted
144 memory. The \fBtotal\fR column on this line will display the memory commit
145 limit. This line is relevant if memory overcommit is disabled. On systems
146 with memory overcommit enabled, the \fBfree\fR value can temporarily appear
147 negative. This is not a bug, but an effect of overcommit, as the system has promised
148 more memory than the total of its virtual address space.
149 The negative value indicates the magnitude of the system's memory over-allocation.
150 .TP
151 \fB\-\-help\fR
152 Print help.
153 .TP
154 \fB\-V\fR, \fB\-\-version\fR
155 Display version information.
156 .SH FILES
157 .TP
158 /proc/meminfo
159 memory information
160 .SH BUGS
161 The value for the \fBshared\fR column is not available from kernels before
162 2.6.32 and is displayed as zero.
163 .P
164 Please send bug reports to
165 .MT [email protected]
166 .ME .
167 .SH "SEE ALSO"
168 .BR ps (1),
169 .BR slabtop (1),
170 .BR top "(1),
171 .BR vmstat (8).