📄 config.script
字号:
TRUST LEVEL 5 USER John@company.com USER Jane@company.comTRUST LEVEL 0 USER badguy@company.comTRUST LEVEL 3 USER *@company.comTRUST LEVEL 4 USER SampleAuth&colon.//*@company.comTRUST LEVEL 1 USER *&colon.//*:exmp..*.*---------------------------------------------------------------------.*:ih1.configuration:i2.start/shutdown notifications:ih1.start/shutdown notifications:i2.configuration:h2 id=notifycfg.Start/Shutdown Notifications:h3.Description:p.You may specify that you want notifications sent to certainmachines/processes when STAF is either started or shutdown. You do this byusing the NOTIFY configuration statement. Notifications are handled by theSTAF Queue service, see :hdref refid=queuesrv. for more information.:note.You may also dynamically register for SHUTDOWN notifications via theSHUTDOWN service, see :hdref refid=shutds..:note text=Warning.In order for the receving machine to accept thenotifications, it must specify a default or explicit trust level of at least3 for this machine. As of version 2.2.0 of STAF, the default trust levelis 3, so no explicit action is necessary on systems running this version ofSTAF (or higher).:enote.:h4.Syntax:xmp.NOTIFY <ONSTART | ONSHUTDOWN> MACHINE <Machine> &lbrk.PRIORITY <Priority>&rbrk. <NAME <Name> | HANDLE <Handle>>:exmp.:p.:xph.ONSTART:exph. indicates that a notification should be sent whenSTAF is fully initialized. The type of the message will be the string :xph.STAF/Start:exph.with a blank message.:p.:xph.ONSHUTDOWN:exph. indicates that a notification should be sent whenSTAF is shutdown. The type of the message will be the string :xph.STAF/Shutdown:exph.with a blank message.:p.:xph.MACHINE:exph. indicates the machine to receive the message.:p.:xph.PRIORITY:exph. indicates the priority of the message. The default is5.:p.:xph.NAME:exph. specifies that all processes with the given registeredname on the given machine should be notified. This option is usuallypreferred over :xph.HANDLE:exph., as it is difficult to know the desiredhandle in advance.:p.:xph.HANDLE:exph. specifies that the process with the given handle on thegiven machine should be notified.:h4.Examples:xmp.NOTIFY ONSTART MACHINE Server1 PRIORITY 3 NAME EventManagerNOTIFY ONSHUTDOWN MACHINE Server1 NAME EventManager:exmp..*.*---------------------------------------------------------------------.*:ih1.configuration:i2.tracing:ih1.tracing:i2.configuration:h2 id=tracecfg.Tracing:h3.Description:p.STAF provides various tracing facilities to help in auditing and debugging.STAF externalizes these facilities through trace points. Enabling a particulartrace point causes trace messages to be generated whenever a particular eventoccurs, such as a service request resulting in an "Insufficient Trust Level"(aka "Access Denied") error code.Care should be taken when enabling trace points, as certain trace points,such as ServiceResult, can lead to large quantities of trace messages beinggenerated. In these cases, it is best to limit tracing to only specificservices.:p.You may enable or disable STAF trace points and STAF services for tracingusing the :xph.TRACE:exph. configuration statement. In addition, you can set thetrace output destination and set the default tracing state for newlyregistered services. By default, all STAF services are enabled for tracing.Also, if you are using the default STAF configuration file provided, only the :xph.ERROR:exph. and :xph.DEPRECATED:exph. trace points are enabledby default.:note.The :xph. TRACE ENABLE/DISABLE SERVICE(S) :exph.statements effect the currentlist of services. So, if you add line :xph. TRACE DISABLE ALL SERVICES :exph.to the configuration file and then register any external services later in theconfiguration file, those services will not necessarily be disabled.To ensure that all registered services are disabled, either set the defaultservice state to disabled, or add the :xph.TRACE:exph. statements after the:xph.SERVICE:exph. configuration statements in the configuration file.:h4.Syntax:xmp.TRACE ENABLE ALL [ TRACEPOINTS | SERVICES ]TRACE ENABLE TRACEPOINTS <Trace point list> | SERVICES <Service list>TRACE ENABLE TRACEPOINT <Trace point> [TRACEPOINT <Trace point>]...TRACE ENABLE SERVICE <Service> [SERVICE <Service>]...TRACE DISABLE ALL [ TRACEPOINTS | SERVICES ]TRACE DISABLE TRACEPOINTS <Trace point list> | SERVICES <Service list>TRACE DISABLE TRACEPOINT <Trace point> [TRACEPOINT <Trace point>]...TRACE DISABLE SERVICE <Service> [SERVICE <Service>]...TRACE SET DESTINATION TO < STDOUT | STDERR | FILE <File name> >TRACE SET DEFAULTSERVICESTATE <Enabled | Disabled>:exmp.:p.See the TRACE service, section :hdref refid=tracesrv.,for information on the above options.:p.See table :hdref refid=tracepointref. for a list of valid trace points.:h4.Examples:xmp.TRACE SET DESTINATION TO STDERRTRACE SET DESTINATION TO FILE {STAF/Config/STAFRoot}/bin/STAF.trcTRACE ENABLE ALLTRACE DISABLE SERVICE "Sem"TRACE ENABLE TRACEPOINTS "Error ServiceAccessDenied"TRACE DISABLE SERVICES "Process Queue Var"TRACE SET DEFAULTSERVICESTATE Enabled:exmp.:p. In order to ensure that you are only tracing service results onthe var and sem services, and that tracing for all other services isdisabled (including services registered in the future) do this &colon.:xmp.TRACE SET DEFAULTSERVICESTATE DisabledTRACE DISABLE ALL SERVICESTRACE DISABLE ALL TRACEPOINTSTRACE ENABLE TRACEPOINTS "ServiceResult"TRACE ENABLE SERVICES "VAR SEM":exmp..*.*---------------------------------------------------------------------.*:ih1.configuration:i2.example:ih1.examples:i2.configuration file:h2 id=examplescfg.Configuration File Examples:h3 id=defaultcfg.Default Configuration File:p.This is the default configuration file provided with STAF.:xmp keep=14.# Turn on tracing of internal errors and deprecated optionstrace enable tracepoints "error deprecated"# Enable TCP/IP connectionsinterface tcp library STAFTCP# Set default local trusttrust machine local&colon.//local level 5# Add default service loaderserviceloader library STAFDSLS:exmp.:h3 id=examplecfg.Configuration File Example:note text='Warning'.This configuration file contains references to fictional services,machines, etc. and is provided for informational purposes only. Please donot try to use this as your actual STAF.cfg file. It is unlikely towork.:enote.:xmp keep=7.# ---------------------------------------------------------------------# STAF Configuration File# ---------------------------------------------------------------------# Set the writeable location where STAF can write dataSET DATADIR E:\test\stafdata# Enable TCP/IP connectionsinterface tcp library STAFTCP option ConnectTimeout=10000# Set default local trusttrust machine local&colon.//local level 5# Add default service loaderserviceloader library STAFDSLS# ---------------------------------------------------------------------# STAF Log Mask Variable# ---------------------------------------------------------------------SET SHARED VAR STAF/Service/Log/Mask="START STOP WARNING FATAL ERROR"# ---------------------------------------------------------------------# Setup Trust Levels# ---------------------------------------------------------------------TRUST DEFAULT LEVEL 2TRUST LEVEL 3 MACHINE test1.austin.ibm.com MACHINE test2.test.austin.ibm.comTRUST LEVEL 5 MACHINE automate.austin.ibm.comTRUST LEVEL 4 MACHINE *.test.austin.ibm.comTRUST LEVEL 3 USER IBM&colon.//*@us.ibm.comTRUST LEVEL 4 USER JohnDoe@company.comTRUST LEVEL 0 USER BadGuy@company.com# ---------------------------------------------------------------------# Delegated Services# ---------------------------------------------------------------------SERVICE pager DELEGATE globpager.test.austin.ibm.com# ---------------------------------------------------------------------# Java Services# ---------------------------------------------------------------------# Operating system independent name for my STAF services directorySET SYSTEM VAR myServiceDir={STAF/Config/STAFRoot}{STAF/Config/Sep/File}servicesSERVICE STAX LIBRARY JSTAF \ EXECUTE {myServiceDir}{STAF/Config/Sep/File}STAX.jar \ OPTION J2=-Xms64m OPTION J2=-Xmx128mSERVICE Event LIBRARY JSTAF \ EXECUTE {myServiceDir}{STAF/Config/Sep/File}STAFEvent.jar# ---------------------------------------------------------------------# C++ Services# ---------------------------------------------------------------------SERVICE log LIBRARY STAFLogSERVICE monitor LIBRARY STAFMonSERVICE respool LIBRARY STAFPool# ---------------------------------------------------------------------# Notifications# ---------------------------------------------------------------------NOTIFY ONSTART MACHINE automate.austin.ibm.com PRIORITY 3 NAME EventManagerNOTIFY ONSHUTDOWN MACHINE automate.austin.ibm.com NAME EventManager# ---------------------------------------------------------------------# Activate tracing# ---------------------------------------------------------------------TRACE SET DESTINATION TO FILE {STAF/DataDir}/user/STAF.trcTRACE ENABLE TRACEPOINTS "ServiceAccessDenied Error"TRACE ENABLE SERVICES "Process Trust":exmp..*.*---------------------------------------------------------------------.*:ih1.configuration:i2.tuning:ih1.tuning:i2.configuration:h2 id=tunecfg.Tuning:h3.Description:p.STAF provides a way to tune its thread stack size. This is done via setting a "STAF_THREAD_STACK_SIZE" environment variable before STAFProc gets started. User can use this environment variable to set STAF's thread stack size in kilobytes. :h4.Examples, to set the thread stack size to 128KB:xmp.On Unix: export STAF_THREAD_STACK_SIZE=128On Windows: set STAF_THREAD_STACK_SIZE=128:exmp..*.*---------------------------------------------------------------------.*:ih1.configuration:i2.data directory structure:ih1.data directory structure:i2.configuration:h2 id=datadircfg.Data Directory Structure:p.By default, STAF and its services will write data to::xph.{STAF/Config/STAFRoot}/data/{STAF/Config/InstanceName}:exph.. For example: :xph.C:\STAF\data\STAF:exph. on Windows systems or :xph./usr/local/staf/data/STAF:exph.on Unix systems. The :xph.STAF/DataDir:exph. system variable is set to the fully-qualified nameof this directory.:p.You may use the DATADIR operational parameter to change the writeable data directory for STAF. This directory name must be unique per instance of STAF running on a single machine.:p.Note that the ability to change the data directory allows you to install STAF to a shared location(e.g. a read-only directory that is accessible via a mounted drive, etc.) and use a uniquewriteable data directory per instance of STAF.:p.The following table describes the structure of the STAF data directory::table cols='* 4*' align='l l'.:tcap.Data Directory Structure:thd.:c.Directory Name:c.Description:ethd.:row.:c.:xph.{STAF/DataDir}/tmp:exph.:c.This is the location where temporary data can be stored.This directory and all of its contents will be removed and an empty :xph.tmp:exph.directory is created whenever STAFProc is restarted.:row.:c.:xph.{STAF/DataDir}/user:exph.:c.Other user data (e.g. from testcases, applications, etc.) can be stored in thisdirectory. You should create subdirectories within this directory to when storing yourdata.:row.:c.:xph.{STAF/DataDir}/service:exph.:c.This directory exists if one or more external services are (or have been) registered.If a service stores persistent data, it should create a subdirectory within thisdirectory using its registered service name (in lower-case) and store its data in thissubdirectory. For example::xmp.{STAF/DataDir}/service/event{STAF/DataDir}/service/log{STAF/DataDir}/service/stax:exmp.:row.:c.:xph.{STAF/DataDir}/lang/java/jvm:exph.:c.This directory exists if one or more external Java services are (or have been) registered.For each JVM created for Java services, STAF will create a subdirectory within thisdirectory using the name of the JVM. The log files for the JVM (e.g. :xph.JVMLog.1:exph.)will be stored in this subdirectory. For example::xmp.{STAF/DataDir}/lang/java/STAFJVM1/JVMLog.1{STAF/DataDir}/lang/java/STAX/JVMLog.1:exmp.:row.:c.:xph.{STAF/DataDir}/lang/java/service:exph.:c.This directory exists if one or more external Java services are (or have been) registered.For each Java service registered, STAF will create a subdirectory within thisdirectory using the registered service name and a subdirectory with it named :xph.jars:exph.. This subdirectory will contain nested jar files for the service, if any are providedby the service. For example::xmp.{STAF/DataDir}/lang/java/service/Event/jars{STAF/DataDir}/lang/java/service/STAX/jars:exmp.:row.:c.:xph.{STAF/DataDir}/register:exph.:c.For STAF's use only. This directory is used for storing registration data, if any,specified when this version of STAF was installed.:etable.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -