Last change
on this file since 8813 was
6696,
checked in by rwilson, 16 years ago
|
Created a tool to monitor a processes' memory usage.
|
File size:
705 bytes
|
Line | |
---|
1 | A simple shell program to log memory usage of a process. |
---|
2 | |
---|
3 | Usage: ./memlog.sh <cmd> [<params>] |
---|
4 | |
---|
5 | This will run the command '<cmd> [<params>]' and will log memory |
---|
6 | usage once per second of the <cmd> process. The log will be written |
---|
7 | to ./<cmd>.log and has the format: |
---|
8 | |
---|
9 | YYYYMMDD HH:MM:SS|<RSS> <VSIZE> |
---|
10 | |
---|
11 | where the RSS is the resident memory size in 1k blocks and VSIZE |
---|
12 | is the size of memory used in the virtual address space (1K blocks). |
---|
13 | |
---|
14 | The accompanying test.py program is a small python program that |
---|
15 | uses increasing memory and then frees the memory. You should see |
---|
16 | the increase and decrease in the python.log file when you do: |
---|
17 | |
---|
18 | ./memlog.sh python test.py |
---|
19 | |
---|
20 | The test program runs for about 40 seconds. |
---|
Note: See
TracBrowser
for help on using the repository browser.