|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.trinetwatch.server.Server
public class Server
Class Server manages the gathering of information from collection agents, the
controlling of the stations via the control agents, and services any requests
coming from GUI-clients. This program contains many settings that can be set
on the command line or in a configuration file.
Command Line Options
-c, --configFile [path] : The file to use as the configuration file for the SeisNetWatch server program.
-b, --programName [name_string] : The name of this program as it should be displayed. The default name is "SeisNetWatch".
-b, --baseDir [path] : The base directory into which the different program files, configuration files and log files are placed. The directories are [baseDir}/bin, [baseDir]/conf, [baseDir]/class, and [baseDir]/log. Any program binaries are place in 'bin', configuration files are placed in 'conf', the Java class files are placed in 'class', and any log files are placed in 'log'. The default base directory is "../".
-d, --daemon : Puts the NSI in daemon mode (no console input). Default is to accept a terminate command on the keyboard to shutdown.
-s, --staticParamsNap [seconds] : This option allows the user to set the length of time the program is to sleep after the initial request for the static parameter information for all the stations. The default setting is for 30 seconds.
-g, --gatherSPTimeout [seconds] : This option sets the length of time the program will spend gathering static parameters. Once the specified length of time has passed the program will no longer attempt to acquire more static parameter data from the collection agents. The default setting is for 300 seconds. A setting of zero indicates an infinite timeout, where the program will attempt to acquire more static parameter data until all of it is received.
-i, --inactivityTimeout [seconds] : This option sets the length of time that a client connection needs to be inactive before being automatically disconnected. The default setting is for 300 seconds. A setting of zero indicates an infinite timeout, where the clients will never be automatically disconnected. (Note that this setting does not refer to user inactivity on the client program, but rather whether or not the client has a live connection to the server.)
-y, --historyLengthHours [hours] : This option sets the length of time that dynamic parameter values are saved in the history buffer. A setting of zero disables the history feature. The maximum allowed setting is 32767 hours; the default setting is 4 hours. (This may be specified as a floating-point value.)
-r, --consoleRedirectFileName [file] : If a filename is given then the "standard" output and "standard" error console output streams are redirected into the given file. If an absolute pathname (starting with '/') is not given then the file is placed in the '[baseDir]/log' directory. The default filename is "" (empty string for no redirection).
-l, --globalLogFileName [file] : The NSI server places status information into the given log file. The default name of the file is "NSIserver.log" and it is placed in '[baseDir]/log'. This option accepts absolute paths, relative paths or just the file name.
--logFilesMaxAgeDays [days] : This option sets the maximum age for log files. A setting of zero indicates no maximum, where the program will not remove any log files. The default setting is for 90 days.
-L, --logfileLogLevel [level] : The logfileLogLevel selects what level of log messages are sent to the log file. There are six different levels: 'NO_MSGS', 'INFO', 'WARNING', 'ERROR', 'DEBUG', and 'ALL_MSGS'. One of these must be used as the argument. The default level is ERROR.
-C, --consoleLogLevel [level] : The consoleLogLevel selects what level of log messages are sent to the console output. The levels are the same as for the logfileLogLevel. The default level is NO_MSGS.
-p, --configFileParsingLogFlag : If specified then debug information pertaining to the file parsing routines will be sent to a log file named 'NSIparsing.log'.
-P, --configFileParsingLogfile [filename] : This switch tells the program where to store the NSI parsign log info. It accepts absolute paths, relative paths, or just the file name. The default location of this file is '[baseDir]/log/NSIparsing.log'.
-R, --rulesetFileName [file] : The ruleset file is a file which holds information about how the stations will be classified. The switch accepts absolute paths, relative paths, or just the file name. The default location of this file is '[baseDir]/conf/ruleset.ini'.
-S, --stationsFileName [file] : The Stations file contains the names and information about all the stations in the network that the NSI server should know about and care about. The switch accepts absolute paths, relative paths, or just the file name. The default location of this file is '[baseDir]/conf/stations_info.ini'.
-G, --guiAcceptorIORFile [file] : In this file is placed the CORBA Object Reference (IOR) for the GUIAcceptor class. The switch accepts absolute paths only. The default value for this parameter is 'gui_acceptor_ior.ref'.
-I, --hostIPAddress [address] : The IP address (in the form #.#.#.#) for the machine hosting this program may be specified. This can be useful when the machine has more than one IP address associated with it. If this parameter is not given then the program will attempt to determine and use a valid IP address for the machine (which, in most cases, works well).
-o, --orbPortNum [number] : This parameter allows the port number used by the CORBA services to be specified (as a number between 0 and 32768). The default value is 1045.
-ORBconfig [file] : This parameter allows the path to the 'orb.config' to be specified. The switch accepts absolute paths, relative paths, or just the file name. The default location of this file is '[baseDir]/conf/orb.config'.
-n, --serverName [name_of_server] : This servername will appear at the bottom of the GUI window on the clients machine. The default value is an empty string.
-D, --noDynStationsFlag : Specified to disable the "dynamic" creation of station entries in the NSI server. If this flag is not specified and the NSI server receives an update for a station that was not in its "stations_info.ini" file, a new "dynamically-created" station entry is created. If this flag is specified then the update is ignored (and a 'debug' log entry is written).
-H, --generalHelpString [help_string] : The General Help String will normally be a URL or some other similar pointer to where the user can find help information at. The default value is an empty string.
-u, --sameStatusSubsets = "subsetName",... : Specifies one or more names of subsets to be tracked for when all of the member stations of any of the possible subsets have the same status level. An empty string specifies that no subsets will be tracked. The default value is an empty string.
-U, --sameStatusPollDelay [seconds] : Specifies the delay to be used between polls of the subsets tracked for having the same status level. The default value is 2 (seconds).
-v, --version : Displays the version information for the program.
--ignoreUnknownFlag : If specified then station detail items with the performance level "Unknown" will be ignored when determining the performance level for the station. This will prevent "Unknown"-performance-level items from hiding "Bad"-performance-level items, but may allow "Unknown"-performance-level items to go unnoticed.
--loadDynParamsFromArchiveFlag : Set 'true' to load dynamic parameters for all stations from the history archive at server startup. The data value for each parameter will be set to the newest value found in the archive. (See also the 'maxDynParamsFromArchiveHours' parameter.) The default setting is 'false'.
--maxDynParamsFromArchiveHours : Sets the maximum-allowed age limit (in hours) for dynamic parameters loaded from the history archive at server startup (when 'loadDynParamsFromArchiveFlag'==true). If the newest dynamic-parameter-history entry is older than this value then the parameter will not be loaded. A setting of zero will result in no age-limit value. The default setting is 24.0 hours. (This may be specified as a floating-point value.)
--stationLevelsCacheHours [hours] : Sets the length of the station-levels cache. Use of this cache allows the server to more quickly respond to launch-stations-snapshot requests from clients. A setting of zero disables the cache. The maximum allowed setting is 32767 hours; the default setting is zero. (This setting may be specified as a floating-point value.)
--archiveDirectoryName [file] : This parameter allows the path to the archive to be specified. If an absolute pathname (starting with '/') is not given then the file is placed in the '[baseDir]' directory. The default location of the archive files is '[baseDir]/history'.
--keepArchiveFilesOpenFlag : Specified to keep archive files open until the archive is closed. The default is to open and close the files each time an item is archived.
--archiveNonVotingParamsFlag : Specified to archive non-voting parameters. The default is to only archive voting parameters.
--archivePollTime [seconds] : Specifies the delay to be used between polls of the archive thread or 0 to use thread interrupts. The default value is 0.
--threadLogIntervalSecs [seconds] If this parameter is greater than zero then a log file of program "thread" information will be generated, with its value specifying the check-and-output interval in seconds. This log file is used for debugging purposes. Its name will be in the form "log/NSIServerThreads_yyyymmdd.log". If this parameter is not specified or is set to zero then the file will not be generated.
--memoryLogIntervalSecs [seconds] : If this parameter is greater than zero then a log file of program memory information will be generated, with its value specifying the check-and-output interval in seconds. This log file is used for debugging purposes. Its name will be in the form "log/NSIServerMemInfo_yyyymmdd.log". If this parameter is not specified or is set to zero then the file will not be generated.
--memoryLogMaxAgeInDays [days] : The maximum age, in days, for the memory-log files enabled by the "memoryLogIntervalMSecs" parameter. Memory-log files older than this value will be automatically deleted; unless the value is zero, in which case the files will never be deleted. If this parameter is not specified then the value will default to 180 days.
--memoryLogSwitchDays [days] : The switch interval, in days, to be used for the memory-log files enabled by the "memoryLogIntervalMSecs" parameter. After the given number of days, the current log file is closed and a new one is started. If this parameter is not specified then the value will default to 30 days.
--useAgentLocationsFlag: If specified the agent locations should be used, otherwise only the locations in the stations file should be used.
--defaultUsageLevel [level] : The name of the default usage level for stations. If not specified or if set to an empty string then the default usage level for stations will be "Undefined".
baseDir = "[path]" staticParamsNap = 'seconds' gatherSPTimeout = 'seconds' inactivityTimeout = 'seconds' historyLengthHours = 'hours' consoleRedirectFileName = "[filename]" globalLogFileName = "[filename]" logFilesMaxAgeDays = 'days' logfileLogLevel = "[level]" consoleLogLevel = "[level]" configFileParsingLogFlag = 'true/false' configFileParsingLogfile = "[logfile name]" daemon = 'true/false' rulesetFileName = "[filename]" stationsFileName = "[filename]" guiAcceptorIORFile = "[filename]" hostIPAddress = 'address' orbPortNum = 'number' orbConfig = "[filename]" serverName = "serverName" noDynStationsFlag = 'true/false' generalHelpString = "HelpPointer" sameStatusSubsets = "subsetName",... sameStatusPollDelay = 'seconds' ignoreUnknownFlag = 'true/false' loadDynParamsFromArchiveFlag = 'true/false' maxDynParamsFromArchiveHours = 'hours' stationLevelsCacheHours = 'hours' archiveDirectoryName = "[filename]" keepArchiveFilesOpenFlag = 'true/false' archiveNonVotingParamsFlag = 'true/false' archivePollTime = 'seconds' threadLogIntervalSecs = 'seconds' memoryLogIntervalSecs = 'seconds' memoryLogMaxAgeInDays = 'days' memoryLogSwitchDays = 'days' useAgentLocationsFlag = 'true/false' defaultUsageLevel = "[level]"
Field Summary | |
---|---|
static java.lang.String |
ACK_SERVER_MSG
|
static int |
ControlAckTimeout
|
static int |
minCtrlResultMsgLength
|
static int |
minEanDpMsgLength
|
static int |
minEanSpMsgLength
|
static java.lang.String |
TERM_ALL_MSG
|
static java.lang.String |
TERM_SERVER_MSG
|
Constructor Summary | |
---|---|
Server()
Creates an instance of the NSI Server object. |
Method Summary | |
---|---|
void |
addStationCtrlThread(java.lang.String stationName,
com.isti.trinetwatch.server.CTA_Msg_Manager ctrlThread)
Registers CTA_Msg_Manager objects that are run as threads. |
com.isti.trinetwatch.server.CTA_Msg_Manager |
deleteStationCtrlThread(java.lang.String ctrledStationName)
Removes (or unregisters) a CTA_Msg_Manager Thread object. |
static java.lang.String |
doesFileExist(java.lang.String fileName)
This method checks to see if the file 'fileName' exists. |
int |
gatherSPTimeout()
Returns the total length of time GatherParameters should search for static parameters for the stations. |
GroupTable |
getAgentsTable()
Returns a handle to the GroupTable of agents. |
java.lang.String |
getArchiveDirectoryName()
Gets the archive directory name. |
boolean |
getArchiveNonVotingParamsFlag()
Gets the value of the archive non-voting params flag (archiveNonVotingParamsFlag.) |
long |
getArchivePollTime()
Gets the archive poll time. |
com.isti.trinetwatch.server.S2CTA_impl |
getCTARequestObj()
Returns a handle to the S2CTA_impl object. |
UsageLevelTag |
getDefaultUsageLevel()
Gets the default usage level. |
java.lang.String |
getDefaultUsageLevelText()
Gets the default usage level text. |
RuleSet |
getDefRuleSetObj()
Returns a handle to the "default" rule set object. |
java.lang.String |
getGeneralHelpString()
Returns the general help string. |
GroupTable |
getGroupsTable()
Returns the handle to the GroupTable of station groups. |
int |
getHighestUsageLev()
Returns highest usage level |
long |
getHistoryLengthSeconds()
Returns the length of time (in seconds) that dynamic parameters are saved in the history buffer. |
boolean |
getKeepArchiveFilesOpenFlag()
Gets the value of the keep archive files open flag (keepArchiveFilesOpenFlag.) |
boolean |
getLoadDynParamsFromArchiveFlag()
Determines if dynamic parameters should be loaded from the history archive at startup. |
LogFile |
getLogFileObj()
Returns a handle to the log file object used by the server. |
int |
getLowestUsageLev()
Returns lowest usage level |
long |
getMaxDynParamsFromArchiveSeconds()
Returns the maximum age (in seconds) for dynamic parameterss loaded from history archive at startup. |
GroupTable |
getNetworksTable()
Returns the handle to the GroupTable of station networks. |
boolean |
getNoDynStationsFlag()
Returns the 'noDynStationsFlag' value. |
com.ooc.CORBA.ORB |
getORB()
Returns a handle to the ORB. |
java.lang.String |
getOrbCfgFilePath()
Returns the path to the orb configuration file. |
java.lang.String |
getParamHelpString(java.lang.String paramName)
Returns the help string for the given parameter name, or null if no help string is available. |
RuleSetTable |
getRuleSetTable()
Returns a handle to the table of rule set objects. |
boolean |
getSameStatusThreadFlag()
Returns true if the thread was started that tracks when all the stations in a group have the same status level. |
java.lang.String |
getServerName()
Returns the server name for this NSI server. |
java.lang.String |
getServerStartTimeString()
Returns the local start time of the server as a string. |
boolean |
getServerTerminatingFlag()
Returns true if the shutdown of the server has been initiated. |
int |
getSPNapLength()
Returns the time the GatherParameters will sleep for. |
com.isti.trinetwatch.server.CTA_Msg_Manager |
getStationCtrlThread(java.lang.String stationName)
Returns a handle for the control manager thread for the given station name. |
java.util.Enumeration |
getStationCtrlThreadsEnum()
Returns an enumeration of Threads of type CTA_Msg_Manager that are currently running and have been registered. |
StationInfoParser |
getStationInfoParser()
Returns the station information parser. |
long |
getStationLevelsCacheSeconds()
Returns the length of time (in seconds) of the station-levels cache. |
StationTable |
getStationsTable()
Returns a handle to the table of stations. |
StatusLevelTable |
getStatusLevelTable()
Returns a handle to the table of status levels. |
FifoHashtable |
getSubsetPropTable()
Returns the table of subset-of-station property info blocks. |
UsageLevelTable |
getUsageLevelTable()
Returns a handle to the table of usage levels. |
static java.lang.String |
getVersion()
Returns the version string for the server. |
boolean |
isStationLevelsCacheEnabled()
Determines if the stations-levels cache is enabled (configuration parameter 'stationLevelsCacheHours' set to a value greater than zero). |
static void |
main(java.lang.String[] args)
Program entry point. |
static int |
propLogLevel(CfgPropItem tmpProp)
This method looks at the string value of the given property item and returns the integer for the loging level that string represents. |
boolean |
readConfigFiles(java.lang.String ruleSetFileName,
java.lang.String stationInfoFileName,
boolean logParsingFlag)
Reads and processes configuration files for usage and status level information, station information and rule-set information. |
boolean |
requestStationSPs(java.lang.String stationName)
Sends a message to the collection agents requesting the static parameters for one particular station. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String TERM_ALL_MSG
public static final java.lang.String TERM_SERVER_MSG
public static final java.lang.String ACK_SERVER_MSG
public static final int ControlAckTimeout
public static final int minEanDpMsgLength
public static final int minEanSpMsgLength
public static final int minCtrlResultMsgLength
Constructor Detail |
---|
public Server()
Method Detail |
---|
public boolean readConfigFiles(java.lang.String ruleSetFileName, java.lang.String stationInfoFileName, boolean logParsingFlag)
ruleSetFileName
- the name of the rule-set file.stationInfoFileName
- the name of the stations information
file.logParsingFlag
- if true then debug messages from the rule-set and
station parsers are sent to an "NSIparsing.log" log file.
public com.ooc.CORBA.ORB getORB()
public StationInfoParser getStationInfoParser()
public GroupTable getGroupsTable()
public GroupTable getNetworksTable()
public GroupTable getAgentsTable()
public FifoHashtable getSubsetPropTable()
public boolean getSameStatusThreadFlag()
public StationTable getStationsTable()
public UsageLevelTable getUsageLevelTable()
public StatusLevelTable getStatusLevelTable()
public RuleSetTable getRuleSetTable()
public RuleSet getDefRuleSetObj()
public LogFile getLogFileObj()
public java.lang.String getDefaultUsageLevelText()
public UsageLevelTag getDefaultUsageLevel()
public int getLowestUsageLev()
public int getHighestUsageLev()
public com.isti.trinetwatch.server.S2CTA_impl getCTARequestObj()
public int getSPNapLength()
public int gatherSPTimeout()
public long getHistoryLengthSeconds()
public boolean getLoadDynParamsFromArchiveFlag()
public long getMaxDynParamsFromArchiveSeconds()
public long getStationLevelsCacheSeconds()
public boolean isStationLevelsCacheEnabled()
public java.lang.String getGeneralHelpString()
public java.lang.String getServerName()
public boolean getNoDynStationsFlag()
public boolean requestStationSPs(java.lang.String stationName)
stationName
- a string containing the name of the station whose
static parameters are desired.
public boolean getServerTerminatingFlag()
public void addStationCtrlThread(java.lang.String stationName, com.isti.trinetwatch.server.CTA_Msg_Manager ctrlThread)
stationName
- a string containing the name of the station
associated with this thread.ctrlThread
- a handle to the CTA_Msg_Manager object that is to
be registered.public java.util.Enumeration getStationCtrlThreadsEnum()
public com.isti.trinetwatch.server.CTA_Msg_Manager getStationCtrlThread(java.lang.String stationName)
stationName
- the name of the station which is being controled.
public com.isti.trinetwatch.server.CTA_Msg_Manager deleteStationCtrlThread(java.lang.String ctrledStationName)
ctrlThread
- the object that is to be removed.
public java.lang.String getOrbCfgFilePath()
public java.lang.String getServerStartTimeString()
public java.lang.String getParamHelpString(java.lang.String paramName)
public static java.lang.String getVersion()
public java.lang.String getArchiveDirectoryName()
public boolean getKeepArchiveFilesOpenFlag()
public boolean getArchiveNonVotingParamsFlag()
public long getArchivePollTime()
public static int propLogLevel(CfgPropItem tmpProp)
tmpProp
- A CfgPropItem who's string value data represents a
logging level.
public static java.lang.String doesFileExist(java.lang.String fileName)
fileName
- The relative path or full path to a file.
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |