SAS Environment Manager Service Architecture: emi_init

Today, whilst trying to troubleshoot why a SAS Environment Manager Service Architecture configuration was no longer collecting and processing logs, I discovered a handy status option for the emi_init command. I’m posting the help output and status output here to remind me in future :)

Here’s the output from the emi_init help option showing all the other available options:

[sas@sas94m3lnx01 bin]$ ./emi_init.sh -h
usage: emi_init [options] [(--enable|--disable) ]
Initializes Service Architecture and/or enables components
Options:
 -d,--debug                     Enable debug output
    --disable <[APM,ACM,ALL]>   Components to disable (can't be used with
                                --enable)
    --enable <[APM,ACM,ALL]>    Components to enable (can't be used with
                                --disable)
 -f,--force                     Re-initialize and overwrite settings
 -h,--help                      Show usage information
 -i,--initialize                Initialize Service Architecture
 -k,--loadKits                  Load kits
    --resetDB                   Reset the Data Mart, purging all existing
                                ACM and APM data, non-recoverable
    --resetFlags                Resets all initialized and enabled flags
                                to false.
                                Note: This does not undo changes made
                                during initialization or component
                                enablement.
 -s,--status                    Show operational status
 -v,--verbose                   Enable verbose output
    --vafeed                Enable VA Feed
Exit status:
0  if OK
1  if minor issues are encountered
2  if an error is encountered
-1 for invalid usage

… and here’s some output from the emi_init status option:

[sas@sas94m3lnx01 bin]$ ./emi_init.sh -s
Service Architecture settings:
	Level Root Dir  : [/opt/sas94m3/config/Lev1]
	Base Dir        : [/opt/sas94m3/config/Lev1/Web/SASEnvironmentManager/emi-framework]
	Initialized     : [true]
	Enabled         : [true]
	APM Initialized : [true]
	ACM Initialized : [false]
	APM Enabled     : [true]
	ACM Enabled     : [false]
	VA Feed Enabled : [false]

You can find more information on emi_init and similar commands in the Performing Functions By Using a Command Line section of the SAS Environment Manager 2.5: User’s Guide

Restarting SAS Web Apps with SAS Environment Manager

Have you ever wanted to restart a single SAS® web application without having to wait for the entire stack of SAS Web Application Servers to restart? Well, SAS Environment Manager provides the ability to do this, and I think that’s fantastic. I needed to restart the SAS Logon Manager several times the other day, and by using SAS Environment Manager I was able to save at least an hour of my time in repeatedly restarting the individual app rather than the entire app server. This post shows the steps involved in restarting a single web app with SAS Environment Manager. I’m saving these steps because each time I’ve needed to do it, it has taken me a while to find the right place (because there’s so much to see in SAS Environment Manager!).

In my case, I needed to allow a Metacoda web application to use SAS Logon Manager and this required a change to metadata and a restart of the SAS Logon Manager web app (as described in SAS Problem Note 56451: The error “The Application is not authorized to use SAS Logon Manager” occurs …).

I used the SAS Management Console Configuration Manager plug-in to add the ServiceUrl.Allowed advanced parameter to SAS Application Infrastructure. The next step was to restart SAS Logon Manager to pick up the change. After logging into SAS Environment Manager, I knew that the SAS Logon Manager web app was in the SAS Web App Server instance named SASServer1_1, so I searched for that by typing in sasserver1_1 and selecting Servers from the drop down:

SAS Environment Manager: Finding a SAS Web App Server instance

That returned a single sas94m3 tc Runtime SASServer1_1 instance which I clicked on: Continue reading “Restarting SAS Web Apps with SAS Environment Manager”