Skip to content

Commit 25eced7

Browse files
committed
doc: update the README and man page
Mention the -t option and simplify the information presented
1 parent 519c056 commit 25eced7

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ but for backwards compatible reasons the ps_mem name remains.
99
Usage:
1010

1111
```
12-
ps_mem [-h|--help] [-s|--split-args] [-p PID] [-w N]
12+
ps_mem [-h|--help] [-p PID,...] [-s|--split-args] [-t|--total] [-w N]
1313
```
1414

1515
Example output:
@@ -27,7 +27,7 @@ Example output:
2727
=================================
2828
```
2929

30-
The [-p PID] option allows filtering the results.
30+
The [-p PID,...] option allows filtering the results.
3131
For example to restrict output to the current $USER you could:
3232

3333
```

ps_mem.1

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
.\" Simple man page to ps_mem.py script
1+
.\" Simple man page to ps_mem script
22
.\" Contact [email protected]
3-
.TH ps_mem 1 "31 July 2013" "" ""
3+
.TH ps_mem 1 "04 October 2014" "" ""
44
.SH NAME
55
ps_mem \- Memory profiling tool
66
.SH SYNOPSIS
7-
.B ps_mem
8-
[\-h|\-\-help] [\-s|\-\-split\-args] [\-p PID] [\-w N]
7+
.B ps_mem [OPTION]...
98
.SH DESCRIPTION
109
Display the core memory used per program (not per process)
1110
.br
@@ -14,7 +13,9 @@ In detail it reports:
1413
.br
1514
.PP
1615
.RS
17-
sum(private RAM for program processes) + sum(Shared RAM for program processes).
16+
sum (private RAM for program processes) +
17+
.br
18+
sum (shared RAM for program processes)
1819
.br
1920
.RE
2021
.PP
@@ -24,12 +25,15 @@ The shared RAM is problematic to calculate, and the tool automatically selects t
2425
\-h \-\-help
2526
Show help message
2627
.TP
28+
\-p PID[,PID2,...PIDN]
29+
Show memory consumption for the specified processes
30+
.TP
2731
\-s \-\-split\-args
2832
Show and separate memory usage entries by command line arguments
2933
and not just the program name.
3034
.TP
31-
\-p PID
32-
Show memory consumption of process with specified PID
35+
\-t \-\-total
36+
Only display the total number of bytes for the selected processes
3337
.TP
3438
\-w N
3539
Report memory consumption every N seconds

ps_mem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def parse_options():
176176
return (split_args, pids_to_show, watch, only_total)
177177

178178
def help():
179-
help_msg = 'ps_mem.py - Show process memory usage\n'\
179+
help_msg = 'ps_mem - Show process memory usage\n'\
180180
'\n'\
181181
'-h Show this help\n'\
182182
'-w <N> Measure and show process memory every N seconds\n'\

0 commit comments

Comments
 (0)