Terminating PCSIM Sessions

About This Document

This document contains questions and answers based on EQUAL Item BJSSQ and is applicable to AIX Version 3.2.5 only.

Questions And Answers

This document is based on EQUAL Item BJSSQ. The information has been verified to be applicable at maintenance level 3.2.5 and pcsim 1.2.

Question:

What is the proper way to exit a pcsim session?

Answer:

Press the following keys in this exact order:

 
Esc  p c s i m 

Question:

Why doesn't pcsim terminate the pcsim sessions when a person exits incorrectly?

Answer:

Just before returning control to the system, pcsim cleans up loose ends, including releasing the shared memory segments you see listed in the report from the "ipcs" command. (If you would like to see this report for yourself, enter the "ipcs" command at the AIX prompt.) The ipcs report shows all shared memory segments (among other things), including those used by pcsim sessions. The "/bin/pcsim" file counts the number of segments in this report which are associated with pcsim sessions and thereby determines the number of active pcsim sessions.

The problem is that when pcsim is terminated incorrectly, it does not have a chance to release these segments. The result is that the system thinks more pcsim sessions are active than actually are. If the user terminates pcsim incorrectly, then it is the user's responsibility to clean up for the program.

Question:

How do you terminate these sessions which have been exited incorrectly?

Answer:

The sessions actually are terminated, but the memory segments still need to be released. The following example demonstrates how to release these segments.

Example of releasing memory segments

Execute the command "ipcs -tm" from the AIX command line. The resulting "ipcs" report looks similar to this:

 
Shared Memory: 
m     0 0x0d050249 --rw-------     root  system 11:38:12 ... 
m 40961 0x5806188b --rw-rw-rw- username  system  7:35:04 ... 
m     2 0x49504301 --rw-rw-rw- username  system 11:47:46 ... 
m     3 0x00000000 --rw-rw-rw- username  system 11:47:49 ... 
m     4 0x0d062281 --rw-rw-rw-     root  system 15:49:04 ... 
   ***** **********                               ******** 
   ID        KEY                                   TIME 
   FIELD   FIELD                                  FIELD 

Note that your "ipcs" output may look different.

Each pcsim session will have two shared memory segments listed. They will have the following KEY fields

 
0x495043?? 
0x00000000 

where "??" is the pcsim session number.

You will need to remove both shared memory segments for the exited pcsim session. To find out which 0x00000000 segment goes with which pcsim segment, note that the time of the pcsim segment and the time of the 0X00000000 segment should be the same or very close.

In the example above, you would enter "ipcrm -m2 -m3" to remove the segments. The "2" and the "3" are taken from the ID field.

Remember to remove both shared memory segments for each pcsim session.

To summarize:


Terminating PCSIM Sessions: pcsim.shared.mem.325.cmd ITEM: FAX
Dated: 98/08/21~00:00 Category: cmd
This HTML file was generated 99/06/24~12:42:01
Comments or suggestions?
Contact us