Putting Your i System in Semi-Restricted State
November 16, 2011 Hey, Joe
We need to put one of our i partitions in restricted state where no applications are running. However, we also need TCP/IP to be up while the system is down, so that we can download PTFs and some software upgrades while our third-party packages aren’t in use. Is there a way to put our system in a semi-restricted state where we can only use our system console and TCP/IP communications? –Mike Yes, there is. And it’s relatively easy to accomplish. Here’s the drill. First, make sure all your users are off the system. Then, make sure that all your batch processing is completed and that all your external interfaces are shut down (particularly any Web sites running through the QHTTPSVR subsystem). Put the system in restricted state by running this End Subsystems (ENDSBS) command. ENDSBS SBS(*ALL) DELAY(60) Look for the following message in the QSYSOPR message queue. This tells you when all subsystems are ended and only the system console is active on your partition. CPF0968 - System ended to restricted condition At this point, the system is in restricted state. For more information on i restricted state, see this article on getting into an i5/OS restricted state. Going Into Semi-Restricted State In restricted state, your controlling subsystem will also have a status of END, so you won’t be able to restart TCP/IP. Although there may be a way to restart TCP/IP from restricted state without IPLing, I’ve found it easier to just IPL into restricted state with TCP/IP started, as I’m showing here. You can do that by performing the following steps. 1. Change your startup program name to *NONE so that you won’t restart your user subsystems and programs when you IPL. Retrieve and print the name of your current startup program by running the following Display System Value command. DSPSYSVAL SYSVAL(QSTRUPPGM) OUTPUT(*PRINT) This provides a record of what the startup program value was before you changed it. Now change the Startup Program (QSTRUPPGM) system value to *NONE by running the following Change System Value (CHGSYSVAL) command. CHGSYSVAL SYSVAL(QSTRUPPGM) VALUE(*NONE) This will ensure your user subsystems won’t start after you IPL. 2. Type in the Change IPL Attributes command (command) and press F4 to prompt it. CHGIPLA You’ll see a screen that looks something like this. These are the attributes that the operating system uses to control the functions that your machine runs at IPL time. Make the following parameters changes on this screen. Change the Start TCP/IP (STRTCP) parameter to *YES. This will start TCP/IP services when the machine IPLs. Change the Start print writers (STRPRTWTR) parameter to *NO. This is mostly a precaution to prevent any system printers from starting. Press ENTER to save your changes. 3. IPL and restart your system by running the following Power Down System (PWRDWNSYS) command. PWRDWNSYS OPTION(*IMMED) RESTART(*YES) After your system restarts, the system will not run your startup program. So your applications, Web site, interactive subsystems, QSNADS subsystem, etc., will not start. However, since you designated that you want to start TCP/IP on your IPL (STRTCP IPL parameter = *YES), the QSYSWRK subsystem will start and any TCP/IP interfaces that are set to automatically start on an IPL will be active. If you run a Work with Active Jobs command, you’ll see that there will only be two non-system subsystems active: your controlling subsystem (QCTL), and the QSYSWRK subsystem. All TCP/IP functions are run out of QSYSWRK, and TCP/IP should be active on your system. You will be in the semi-restricted state you asked for. To make sure your TCP/IP interfaces are active in semi-restricted state, you can view your TCP/IP interfaces from the green screen by running the following options.
At this point, you should be able to download PTFs and upgrades without having the rest of your application programs running. If you’re not able to run a TCP/IP server that you need, run the following Start TCP/IP Server command to start the server. STRTCPSVR SERVER(server_to_restart) Restarting Your System After you’ve done your work and are ready to restart the system with your application programs running, do the following. Change the startup program system value back to the program and library name of your startup program. Do this by typing in the following Work with System Value command and pressing 2=change in front of the system value. WRKSYSVAL SYSVAL(QSTRUPPGM) Put your system back into restricted state again by running the ENDSBS command ENDSBS SBS(*ALL) DELAY(60) Perform the following PWRDWNSYS command to IPL and restart your system. This will restart all your applications and put your system back into regular working order. PWRDWNSYS OPTION(*IMMED) RESTART(*YES) After your system IPLs, all your application programs, server interfaces, interactive sessions, etc., will be able to run again. As I said, there may another way to do this without double IPLing your system. But this process will definitely satisfy your requirements to 1) put your system in semi-restricted mode with only TCP/IP active; and 2) restart your system when you’re finished applying your upgrades. HTH –Joe RELATED STORY Getting into a i5/OS Restricted State
|