Fix, publish man page, bump release version.

This uses `ronn` to create a developer-maintained manual
page. The output is pushed into git, such that a normal
distribution compilation does not need to have `ronn` installed
to do a full install. Developers will need to check in the
psstop.1 file after modifying the psstop.1.md file
This commit is contained in:
Auke Kok
2018-03-26 11:53:42 -07:00
parent 510e0e563b
commit f2e96c9511
4 changed files with 164 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
EXTRA_DIST = COPYING psstop.spec
EXTRA_DIST = COPYING psstop.spec psstop.1.md
bin_PROGRAMS = psstop
@@ -8,3 +8,8 @@ psstop_SOURCES = src/main.c
AM_CPPFLAGS = $(AM_CFLAGS) $(glib_CFLAGS)
psstop_LDADD = $(glib_LIBS)
psstop.1: psstop.1.md
ronn -r $< --pipe > $@
dist_man_MANS = \
psstop.1

View File

@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.66])
AC_INIT(psstop, 1, arjan@linux.intel.com)
AC_INIT(psstop, 1.2, dev@lists.clearlinux.org)
AM_INIT_AUTOMAKE([foreign -Wall -W subdir-objects])
AM_SILENT_RULES([yes])
AC_PROG_CC

95
psstop.1 Normal file
View File

@@ -0,0 +1,95 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "PSSTOP" "1" "March 2018" "" ""
.
.SH "NAME"
\fBpsstop\fR \- memory snapshot of the current processes based on /proc
.
.SH "SYNOPSIS"
\fB/usr/bin/psstop\fR
.
.SH "DESCRIPTION"
The Linux kernel exposes memory usage information about running processes in the \fBprocfs\fR filesystem\. This information can be retrieved by reading several files that can simply be read as ordinary text files and offer various different views of the usage of memory by processes\.
.
.P
Because memory consumption between applications and processes is often shared between threads, there are different ways to describe how much memory a specific thread or process is actually using\. Depending on what kind of memory consumption you want to know about, you may have to determine the right memory consumption metric\.
.
.P
The PSS (Proportional set size) usage of a process is a method to describe memory consumption by a process that accounts for it\'s proportion of shared memory consumption between itself and other processes that also cover shared memory resources\. These shared resources could be any type of shared memory that is shared between processes, like buffers or caches, or library code\.
.
.SH "SYNTAX"
\fBpsstop\fR is meant to be directly executed from the command line:
.
.IP "" 4
.
.nf
psstop
[\.\.\.]
0 Kb: (sd\-pam) (24051)
1122 Kb: tmux: server (31523)
4 Kb: bash (31524)
4 Kb: bash (31525)
4 Kb: vim (31684)
Total is 14958Kb (174 processes)
.
.fi
.
.IP "" 0
.
.SH "OPTIONS"
The following options are understood:
.
.TP
\fB\-c\fR:
.
.IP
Display the basename of the executable rather than the name of the process or thread\.
.
.TP
\fB\-p processname\fR:
.
.IP
Display the PSS usage of processes that match the provided process name\.
.
.TP
\fB\-h\fR:
.
.IP
Display the program\'s available options\.
.
.SH "EXIT STATUS"
On success, 0 is returned, a non\-zero failure code otherwise\.
.
.SH "FILES"
\fB/proc/*/smaps\fR
.
.SH "SEE ALSO"
.
.IP "\(bu" 4
ps(1)
.
.IP "\(bu" 4
free(1)
.
.IP "\(bu" 4
\fBhttps://en\.wikipedia\.org/wiki/Proportional_set_size\fR
.
.IP "\(bu" 4
\fBprocfs(5)\fR
.
.IP "" 0
.
.SH "BUGS"
Please report bugs to: \fBdev@lists\.clearlinux\.org\fR
.
.SH "COPYRIGHT"
.
.IP "\(bu" 4
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or later of the License
.
.IP "" 0

View File

@@ -1,24 +1,39 @@
psstop(1) -- memory snapshot of the current processes based on /proc
====================================================================
## SYNOPSIS
`psstop`
`/usr/bin/psstop`
## DESCRIPTION
PSSTOP tracks the amount of memory from the process's proportional share of this
mapping (Pss) and the proportional swap share of the mapping (SwapPss). The
memory information comes from smaps (/proc/PID/smaps). The /proc/PID/smaps is an
extension based on maps, showing the memory consumption for each of the
process's mappings.
The Linux kernel exposes memory usage information about running
processes in the `procfs` filesystem. This information can be retrieved
by reading several files that can simply be read as ordinary text files
and offer various different views of the usage of memory by processes.
Because memory consumption between applications and processes is often
shared between threads, there are different ways to describe how much
memory a specific thread or process is actually using. Depending on
what kind of memory consumption you want to know about, you may have
to determine the right memory consumption metric.
The PSS (Proportional set size) usage of a process is a method to
describe memory consumption by a process that accounts for it's
proportion of shared memory consumption between itself and other
processes that also cover shared memory resources. These shared
resources could be any type of shared memory that is shared between
processes, like buffers or caches, or library code.
## SYNTAX
`psstop` is meant to be directly executed from the
command line as :
`psstop` is meant to be directly executed from the command line:
```
psstop
[...]
@@ -29,16 +44,37 @@ command line as :
4 Kb: bash (31525)
4 Kb: vim (31684)
Total is 14958Kb (174 processes)
```
## OPTIONS
The following options are understood:
* `-c`:
Display the basename of the executable rather than the name
of the process or thread.
* `-p processname`:
Display the PSS usage of processes that match the provided process
name.
* `-h`:
Display the program's available options.
## EXIT STATUS
On success, 0 is returned, a non-zero failure code otherwise.
## COPYRIGHT
* This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 or later of the License
## FILES
`/proc/*/smaps`
## SEE ALSO
@@ -46,4 +82,18 @@ the Free Software Foundation, version 3 or later of the License
* free(1)
* `https://en.wikipedia.org/wiki/Proportional_set_size`
* `procfs(5)`
## BUGS
Please report bugs to: `dev@lists.clearlinux.org`
## COPYRIGHT
* This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 3 or later of the License