Correlation between the svmon command and ps command outputs
There are some relationships between the svmon command and ps command outputs.
Example 1
The following is an example for the svmon command
and ps command output:
# # ps v 405528
PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
405528 pts/0 A 43:11 1 168 172 32768 1 4 99.5 0.0 yes
(0) root @ clock16: 6.1.2.0: /
# svmon -O unit=KB,segment=category,filtercat=exclusive -P 405528
Unit: KB
-------------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual
405528 yes 172 16 0 168
...............................................................................
EXCLUSIVE segments Inuse Pin Pgsp Virtual
172 16 0 168
Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual
554f1 f work shared library data s 92 0 0 92
49416 2 work process private s 76 16 0 76
6d49f 1 clnt code,/dev/hd2:338 s 4 0 - -
The ps command
output above displays the SIZE
as 168 and RSS
as
172. The use of the svmon command above provides
both the values.
You can use the output values from the svmon command
displayed above with the following equations to calculate the
SIZE
and RSS
:SIZE = Work Process Private Memory Usage in KB + Work Shared Library Data Memory Usage in KB
RSS = SIZE + Text Code Size (Type=clnt, Description=code,)
Using the values in the example above you get the
following:
SIZE = 92 + 76 = 168
RSS = 168 + 4 = 172
Example 2
The following is an example for
the svmon command and ps command
output:
# ps v 282844
PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
282844 - A 15:49 322 24604 25280 xx 787 676 0.0 3.0 /opt/rsct/b
(0) root @ clock16: 6.1.2.0: /
# svmon -O unit=KB,segment=category,filtercat=exclusive -P 282844
Unit: KB
-------------------------------------------------------------------------------
Pid Command Inuse Pin Pgsp Virtual
282844 IBM.CSMAgentR 25308 16 0 24604
...............................................................................
EXCLUSIVE segments Inuse Pin Pgsp Virtual
25308 16 0 24604
Vsid Esid Type Description PSize Inuse Pin Pgsp Virtual
2936e 2 work process private s 23532 16 0 23532
2d36f f work shared library data s 1072 0 0 1072
1364 1 clnt code,/dev/hd2:81988 s 676 0 - -
154c1 - clnt /dev/hd9var:353 s 16 0 - -
41494 - clnt /dev/hd2:82114 s 8 0 - -
4d3d7 - clnt /dev/hd9var:357 s 4 0 - -
7935a - clnt /dev/hd9var:307 s 0 0 - -
4d377 3 mmap maps 2 source(s) s 0 0 - -
3934a - clnt /dev/hd9var:300 s 0 0 - -
The ps command
output above displays the SIZE
as 24604 and RSS
as
25280.
You can use the output values from the svmon command
displayed above with the following equations to calculate the
SIZE
and RSS
:SIZE = Work Process Private Memory Usage in KB + Work Shared Library Data Memory Usage in KB
RSS = SIZE + Text Code Size (Type=clnt, Description=code,)
Using the values in the example above you get the
following:
SIZE = 23532 + 1072 = 24604
RSS = 24604 + 676 = 25280