1SMEM(8) SMEM(8)
2
3
4
6 smem - Report memory usage with shared memory divided proportionally.
7
8
10 smem [options]
11
12
14 smem reports physical memory usage, taking shared memory pages into
15 account. Unshared memory is reported as the USS (Unique Set Size).
16 Shared memory is divided evenly among the processes sharing that mem‐
17 ory. The unshared memory (USS) plus a process's proportion of shared
18 memory is reported as the PSS (Proportional Set Size). The USS and PSS
19 only include physical memory usage. They do not include memory that
20 has been swapped out to disk.
21
22 Memory can be reported by process, by user, by mapping, or system-wide.
23 Both text mode and graphical output are available.
24
25
27 GENERAL OPTIONS
28 -h, --help
29 Show help.
30
31
32 SOURCE DATA
33 By default, smem will pull most of the data it needs from the /proc
34 filesystem of the system it is running on. The --source option lets
35 you used a tarred set of /proc data saved earlier, possibly on a dif‐
36 ferent machine. The --kernel and --realmem options let you specify a
37 couple things that smem cannot discover on its own.
38
39
40 -K KERNEL, --kernel=KERNEL
41 Path to kernel image. This lets smem include the size of the
42 kernel's code and statically allocated data in the systemwide
43 (-w) output.
44
45
46 -R REALMEM, --realmem=REALMEM
47 Amount of physical RAM. This lets smem detect the amount of
48 memory used by firmware/hardware in the systemwide (-w) output.
49 If provided, it will also be used as the total memory size to
50 base percentages on.
51
52
53 -S SOURCE, --source=SOURCE
54 /proc data source. This lets you specify an alternate source of
55 the /proc data. For example, you can capture data from an
56 embedded system using smemcap, and parse the data later on a
57 different machine. If the --source option is not included, smem
58 reports memory usage on the running system.
59
60
61 REPORT BY
62 If none of the following options are include, smem reports memory usage
63 by process.
64
65
66 -m, --mappings
67 Report memory usage by mapping.
68
69
70 -u, --users
71 Report memory usage by user.
72
73
74 -w, --system
75 Report systemwide memory usage summary.
76
77
78 FILTER BY
79 If none of these options are included, memory usage is reported for all
80 processes, users, or mappings. (Note: If you are running as a non-root
81 user, and if you are not using the --source options, then you will only
82 see data from processes whose /proc/ information you have access to.)
83
84
85 -M MAPFILTER, --mapfilter=MAPFILTER
86 Mapping filter regular expression.
87
88
89 -P PROCESSFILTER, --processfilter=PROCESSFILTER
90 Process filter regular expression.
91
92
93 -U USERFILTER, --userfilter=USERFILTER
94 User filter regular expression.
95
96
97 OUTPUT FORMATTING
98 -c COLUMNS, --columns=COLUMNS
99 Columns to show.
100
101
102 -H, --no-header
103 Disable header line.
104
105
106 -k, --abbreviate
107 Show unit suffixes.
108
109
110 -n, --numeric
111 Show numeric user IDs instead of usernames.
112
113
114 -p, --percent
115 Show percentages.
116
117
118 -r, --reverse
119 Reverse sort.
120
121
122 -s SORT, --sort=SORT
123 Field to sort on.
124
125
126 -t, --totals
127 Show totals.
128
129
130 OUTPUT TYPE
131 These options specify graphical output styles.
132
133
134 --bar=BAR
135 Show bar graph.
136
137
138 --pie=PIE
139 Show pie graph.
140
141
143 smem requires a 2.6.27 or newer kernel.
144
145
147 /proc/$pid/cmdline
148
149 /proc/$pid/smaps
150
151 /proc/$pid/stat
152
153 /proc/meminfo
154
155 /proc/version
156
157
159 free(1),pmap(1)
160
161
163 smem was written by Matt Mackall.
164
165
166
167
168 07/09/2009 SMEM(8)