Establishes a new recording session.
hs_create_recording_session monServerName, sample_interval[,dir_name][,start_time][,end_time] [,protection_level][,error_option][,script_type]
name of the Monitor Server used to collect data from the Adaptive Server for which you want to collect historical data. The user name and password you used to connect to Historical Server must match a valid login account on the Adaptive Server being monitored by the Monitor Server you specify here.
determines the time between samples (in seconds). The shortest valid sample interval is one second; the longest valid sample interval is 86400 seconds, which is the number of seconds in one day.
path name of the directory where the historical data files resulting from this recording session will reside. The operating system account that started Historical Server must have search (execute) and write permissions on this directory.
The default is the Historical Server home directory, specified in the -D parameter to the Historical Server start-up command.
date and time
at which recording is to start, using the format year/month/day hour:minute[:second] [time
zone]
. The default is to start immediately. The following time zone options are available:
Parameter value |
Explanation |
---|---|
EST |
U.S. Eastern Time zone, standard time. |
EDT |
U.S. Eastern Time zone, daylight saving time. |
CST |
U.S. Central Time zone, standard time. |
CDT |
U.S. Central Time zone, daylight saving time. |
MST |
U.S. Mountain Time zone, standard time. |
MDT |
U.S. Mountain Time zone, daylight saving time. |
PST |
U.S. Pacific Time zone, standard time |
PDT |
U.S. Pacific Time zone, daylight saving time |
MET |
Middle European Time zone, standard time |
MET DST |
Middle European Time zone, daylight saving time |
WET DST |
Western European (Greenwich) Time zone, daylight saving time |
GMT |
Greenwich Mean Time. This is equivalent to Western European (Greenwich) Time zone without regard to daylight saving time. All of the preceding time zone specifications, such as EST or EDT, can be supplied only in combination with dates and times when Standard Time or Daylight Savings Time is in effect. GMT can be paired with any date and time specification. |
GMT{+-}hours_offset |
To specify any other time zone, where hours_offset is the number of hours that must be added to Greenwich Mean Time to derive the local time. The acceptable range of offset values is between +24 and -24 hours, inclusive. Fractional offsets such as +5.5 are valid. |
If you do not specify a time zone, the local time zone of the Historical Server is used.
The start_time may not be more that 31 days from the present time.
time at which recording is to stop. The default is to stop the recording session 24 hours after the start_time. If you specify an end_time and do not specify a start_time, the start_time defaults to the present.
specifies whether the data files created in this recording session are password-protected or accessible to all users. The protection level controls viewing the metadata in the control file (using the hs_list command) and creating playback sessions with the data (using the hs_create_playback_session command).
private (default) – specifies that the recorded data will be password-protected. The files will be accessible only by the same account that created them, or by the Historical Server superuser.
public – specifies that access to the recorded data will be unrestricted.
specifies how you want Historical Server to handle non-fatal errors during a recording session. Valid values are:
continue (default) – specifies that recording is to continue when non-fatal errors are detected. For example, when the Monitor Server fills all of its configured buffers while summarizing monitoring information, one or more non-fatal errors are sent to Historical Server, but it is still possible for Historical Server to collect the available information from the current sample and from future samples.
halt – specifies that the recording session is to terminate when a non-fatal error is detected.
specifies whether you want Historical Server to create a script file that creates tables from your the recording session view definitions.
sybase_script – creates a script file containing SQL commands that create an Adaptive Server table for each view in the recording session.
no_script (the default) – does not create a script file.
This example creates a recording session to capture data from the Monitor Sever called SERVER1_MON. The data is captured every 30 seconds and written to the data files in the /user/hist_dir directory, starting now and ending on August 8, 1997 at 10:30 a.m. EDT (Eastern Time zone, daylight saving time). The resulting files have private restrictions. The recording session continues if non-fatal errors are detected. A script file that creates an Adaptive Server table for each recorded view is created.
hs_create_recording_session SERVER1_MON,30, /user/hist_dir,NULL,"97/08/08 10:30 EDT", private,continue, sybase_script
Fatal errors include crashes and other connection failures with Adaptive Server or Monitor Server. A fatal error forces termination of the recording session, regardless of the value of error_option.
You must issue this command before you define any views, alarms, or filters for the recording session. After you have issued this command and have defined at least one view, you can start recording with the hs_initiate_recording command.