man page patch, including embedded section mentioning smemcap
Here is a patch for the smem man page. It includes the following:
* A new section on embedded usage briefly describing smemcap
NOTE: Someone please doublecheck it,
since I am not an embedded developer.
* Mentions that kernel image for -K option must be uncompressed.
* A new copyright section.
* A new resources section.
* Replaces notes with a requirements section.
* Adds a couple of commands to the see also list.
* Fixes a couple typos.
This commit is contained in:
parent
9ad7a9f60c
commit
4bd765bc0c
1 changed files with 60 additions and 9 deletions
69
smem.8
69
smem.8
|
|
@ -1,4 +1,4 @@
|
||||||
.TH SMEM 8 "07/09/2009" "" ""
|
.TH SMEM 8 "03/15/2010" "" ""
|
||||||
|
|
||||||
.SH NAME
|
.SH NAME
|
||||||
smem \- Report memory usage with shared memory divided proportionally.
|
smem \- Report memory usage with shared memory divided proportionally.
|
||||||
|
|
@ -16,7 +16,7 @@ is reported as the PSS (Proportional Set Size). The USS and PSS only
|
||||||
include physical memory usage. They do not include memory that has been
|
include physical memory usage. They do not include memory that has been
|
||||||
swapped out to disk.
|
swapped out to disk.
|
||||||
|
|
||||||
Memory can be reported by process, by user, by mapping, or system\-wide.
|
Memory can be reported by process, by user, by mapping, or systemwide.
|
||||||
Both text mode and graphical output are available.
|
Both text mode and graphical output are available.
|
||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
|
|
@ -34,17 +34,21 @@ you used a tarred set of /proc data saved earlier, possibly on a
|
||||||
different machine. The \-\-kernel and \-\-realmem options let you
|
different machine. The \-\-kernel and \-\-realmem options let you
|
||||||
specify a couple things that smem cannot discover on its own.
|
specify a couple things that smem cannot discover on its own.
|
||||||
|
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI "\-K " KERNEL ", \-\-kernel=" KERNEL
|
.BI "\-K " KERNEL ", \-\-kernel=" KERNEL
|
||||||
Path to kernel image. This lets smem include the size of the kernel's
|
Path to an uncompressed kernel image. This lets smem include the size
|
||||||
code and statically allocated data in the systemwide (\-w) output.
|
of the kernel's code and statically allocated data in the systemwide
|
||||||
|
(\-w) output. (To obtain an uncompressed image of a kernel on disk, you
|
||||||
|
may need to build the kernel yourself, then locate file vmlinux in the
|
||||||
|
source tree.)
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI "\-R " REALMEM ", \-\-realmem=" REALMEM
|
.BI "\-R " REALMEM ", \-\-realmem=" REALMEM
|
||||||
Amount of physical RAM. This lets smem detect the amount of memory used
|
Amount of physical RAM. This lets smem detect the amount of memory used
|
||||||
by firmware/hardware in the systemwide (\-w) output. If provided, it
|
by firmware/hardware in the systemwide (\-w) output. If provided, it
|
||||||
will also be used as the total memory size to base percentages on.
|
will also be used as the total memory size to base percentages on.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BI "\-S " SOURCE ", \-\-source=" SOURCE
|
.BI "\-S " SOURCE ", \-\-source=" SOURCE
|
||||||
/proc data source. This lets you specify an alternate source of the
|
/proc data source. This lets you specify an alternate source of the
|
||||||
|
|
@ -54,7 +58,7 @@ using smemcap, and parse the data later on a different machine. If the
|
||||||
running system.
|
running system.
|
||||||
|
|
||||||
.SS REPORT BY
|
.SS REPORT BY
|
||||||
If none of the following options are include, smem reports memory usage
|
If none of the following options are included, smem reports memory usage
|
||||||
by process.
|
by process.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -135,8 +139,38 @@ Show pie graph.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
|
|
||||||
.SH NOTES
|
.SH REQUIREMENTS
|
||||||
\fBsmem\fP requires a 2.6.27 or newer kernel.
|
\fBsmem\fP requires:
|
||||||
|
|
||||||
|
.IP \(bu 3
|
||||||
|
Linux kernel 2.6.27 or newer.
|
||||||
|
.IP \(bu
|
||||||
|
Python 2.x (at least 2.4 or so).
|
||||||
|
.IP \(bu
|
||||||
|
The matplotlib library
|
||||||
|
(only if you want to generate graphical charts).
|
||||||
|
|
||||||
|
.SH EMBEDDED USAGE
|
||||||
|
To capture memory statistics on resource\-constrained systems, the
|
||||||
|
the \fBsmem\fP source includes a utility named \fBsmemcap\fP.
|
||||||
|
\fBsmemcap\fP captures all /proc entries required by \fBsmem\fP
|
||||||
|
and outputs them as an uncompressed .tar file to STDOUT.
|
||||||
|
\fBsmem\fP can analyze the output using the \fB\-\-source\fP option.
|
||||||
|
\fBsmemcap\fP is small and does not require Python.
|
||||||
|
.PP
|
||||||
|
To use \fBsmemcap\fP:
|
||||||
|
.IP 1. 3
|
||||||
|
Obtain the smem source at http://selenic.com/repo/smem
|
||||||
|
.IP 2.
|
||||||
|
Compile \fIsmemcap.c\fP for your target system.
|
||||||
|
.IP 3.
|
||||||
|
Run \fBsmemcap\fP on the target system and save the output:
|
||||||
|
.br
|
||||||
|
smemcap > memorycapture.tar
|
||||||
|
.IP 4.
|
||||||
|
Copy the output to another machine and run smem on it:
|
||||||
|
.br
|
||||||
|
smem -S memorycapture.tar
|
||||||
|
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.I /proc/$pid/cmdline
|
.I /proc/$pid/cmdline
|
||||||
|
|
@ -149,8 +183,25 @@ Show pie graph.
|
||||||
.PP
|
.PP
|
||||||
.I /proc/version
|
.I /proc/version
|
||||||
|
|
||||||
|
.SH RESOURCES
|
||||||
|
Main Web Site: http://www.selenic.com/smem
|
||||||
|
|
||||||
|
Source code repository: http://selenic.com/repo/smem
|
||||||
|
|
||||||
|
Mailing list: http://selenic.com/mailman/listinfo/smem
|
||||||
|
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR free (1), pmap (1)
|
.BR free (1),
|
||||||
|
.BR pmap (1),
|
||||||
|
.BR proc (5),
|
||||||
|
.BR ps (1),
|
||||||
|
.BR top (1),
|
||||||
|
.BR vmstat (8)
|
||||||
|
|
||||||
|
.SH COPYING
|
||||||
|
Copyright (C) 2008-2009 Matt Mackall. Free use of this software
|
||||||
|
is granted under the terms of the GNU General Public License
|
||||||
|
version 2 or later.
|
||||||
|
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
\fBsmem\fP was written by Matt Mackall.
|
\fBsmem\fP was written by Matt Mackall.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue