semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Nov 25, 2005 3:34 pm Post subject: |
|
|
There are various tools that can tell you the total amount of memory in use by your TSO session, such as RMF, TASID, SHOWMVS, probably OMEGAMON, and others. There are also many Rexx execs on the web that will show you memory layout within the system.
It sounds like you have a Unix or Windows background. MVS does not have 'processes' per se. It has Address spaces (sort of similar to a Windows process) and tasks (analagous to a Windows thread). Within any address space such as a TSO session, there are several tasks, sometimes referred to as a TCB because this the main control block for each task. Memory is allocated by programs running in each task, but that memory can be shared among tasks. When the owning task goes away, so does the memory it allocated. As far as I know there is no easy way to find out how much memory a particular TCB using, though I'm sure it can be determined by running the memory allocation control block chains. TASID is one program that does run those chains, though the function is sort of hard to find. If you are running Tasid (search for it at the IBM web site), then use option 7 (storage view), then type L or LISTMAP. That will show you a list of TCBs: Code: | CPU=0% Job Step TCB Map Line 1 of 8
Command ===> Scroll ===> CSR
Select a TCB to view its storage.
C TCBs Program Sections Size
+------------------------+----------+-------+----------+
| 008FDF30 | IEAVAR00 | 44 | 93000 |
| 008FD230 | IEFSD060 | 41 | C4000 |
| 008FD098 | IKJEFT01 | 67 | FF000 |
| 008E1D40 | IKJEFT02 | 47 | 8D000 |
| 008E1BA8 | IKJEFT09 | 42 | 87000 |
| 008E1A10 | ISPMAIN | 73 | 109000 |
| 008E1878 | TASID | 74 | CF000 |
| 008FD4C0 | IEAVTSDT | 3 | 1B000 |
+------------------------+----------+-------+----------+ |
select the TCB you are interested in and you will see the storage layout and total for that TCB.
Code: | CPU=0% Storage and modules for TCB at 008E1878 Area 1 of 30
Command ===> Scroll ===> CSR
Select an area to view. Total virtual storage: 828Kb
C Start Length Subpool Loaded modules:
| 00033000 B000 0| TASID ISPCFIGU IKJEFT25 IRXEFMVS
| 00043000 6000 0| IRXEFPCK IRXFLOC IRXFUSER IRXANCHR
| 00054000 7000 0|
| 0005F000 12000 0|
| 09F02000 1000 0|
| 09F81000 2000 0|
| 09F86000 4000 0|
| 09FCA000 7000 0|
| 09FD2000 1000 0|
| 09FD8000 A000 0|
| 00049000 1000 1|
| 09F7C000 2000 1|
| 0000D000 8000 78|
| 09F07000 5000 78|
| 09F1A000 B000 78|
| 09F28000 31000 78| Contiguous areas of storage are combined
| 09F71000 B000 78| into single sections in the display.
| 7F4C1000 1000 229|
| 7F4C4000 1000 230|
| 7F4C3000 1000 230| |
That can be used to find the storage alloated by a particular task or program. Not too simple to use, but it will tell you what programs are using the most memory.
There is no such thing as "unused memory" - memory is considered to be in use until the allocating program frees the memory or ends. There is not a concept pf "garbage collection" inherent in the MVS memory managers. |
|