10/01/96, Terminating PCSIM Sessions SPECIAL NOTICES Information in this document is correct to the best of our knowledge at the time of this writing. Please send feedback by fax to "AIXServ Information" at (512) 823-4009. Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment. +----------------------------------------------------------+ | | | NOTE: The information in this document has NOT been | | verified for AIX 4.1. | | | +----------------------------------------------------------+ ABOUT THIS DOCUMENT This document contains questions and answers based on EQUAL Item BJSSQ and is applicable to AIX 3.2. 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 Terminating PCSIM Sessions 1 10/01/96, 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 seg- ments still need to be released. The following example dem- onstrates 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: of information not relevant to this problem) ... 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. Terminating PCSIM Sessions 2 10/01/96, To summarize: o Use "ipcs -tm" to determine the IDs of the shared memory segments that need to be removed. o Use "ipcrm -mSegID#! -mSegID#! ..." to remove the unwanted segments. o The segments are leftover when a user terminates a "pcsim" session incorrectly because, in this case, "pcsim" does not have an opportunity to clean up loose ends. Terminating PCSIM Sessions 3 10/01/96, READER'S COMMENTS Please fax this form to (512) 823-4009, attention "AIXServ Informa- tion". You may also e-mail comments to: elizabet@austin.ibm.com. These comments should include the same customer information requested below. Use this form to tell us what you think about this document. If you have found errors in it, or if you want to express your opinion about it (such as organization, subject matter, appearance) or make sug- gestions for improvement, this is the form to use. If you need technical assistance, contact your local branch office, point of sale, or 1-800-CALL-AIX (for information about support offer- ings). These services may be billable. Faxes on a variety of sub- jects may be ordered free of charge from 1-800-IBM-4FAX. Outside the U.S. call 415-855-4329 using a fax machine phone. When you send comments to IBM, you grant IBM a nonexclusive right to use or distribute your comments in any way it believes appropriate without incurring any obligation to you. NOTE: If you have a problem report or item number, supplying that number may help us determine why a procedure did or did not work in your specific situation. Problem Report or Item #: Branch Office or Customer #: Be sure to print your name and fax number below if you would like a reply: Name: Fax Number: ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ ______________________________________________________________________ END OF DOCUMENT (pcsim.shared.mem.cmd) Terminating PCSIM Sessions 4