Sybase 12.5.1 User Manual

Historical server
Table of Contents

Advertisement

Quick Links

User's Guide
Historical Server
12.5.1

Advertisement

Table of Contents
loading

Summary of Contents for Sybase 12.5.1

  • Page 1 User’s Guide Historical Server 12.5.1...
  • Page 2 Copyright © 1989-2003 by Sybase, Inc. All rights reserved. This publication pertains to Sybase software and to any subsequent release until otherwise indicated in new editions or technical notes. Information in this document is subject to change without notice. The software described herein is furnished under a license agreement, and it may be used or copied only in accordance with the terms of that agreement.
  • Page 3: Table Of Contents

    The Historical Server control file and home directory....9 The operating system start-up account ........10 The Historical Server superuser account ........ 11 Sybase Open Client/Server connections......... 11 Initial configuration on UNIX platforms ........... 12 Assumptions on UNIX platforms ..........12 Configuration procedures on UNIX platforms......
  • Page 4 Contents Starting Historical Server on UNIX .......... 33 Stopping Historical Server on UNIX ........34 Starting and stopping Historical Server on Windows NT ....36 Starting Historical Server on Windows NT ......37 Inferring start-up parameters from the NT Registry....37 Verifying that Historical Server is running .......
  • Page 5 Contents View control record..............94 Data item control record ............94 Alarm control record ..............94 Filter control record ..............95 Data file ..................95 Error message file ................96 Script file ..................97 Script file table names ............. 97 Script file table column names ..........
  • Page 6 Contents Using “Timestamp”, “Timestamp Datim”, and “Elapsed Time” 170 Examples of Recording Session Views........173 AP PE ND IX D Cache performance summary ............174 Database object lock status ............175 Database object page I/O ............175 Data cache activity for individual caches ........176 Data cache statistics for recording session........
  • Page 7: About This Book

    Adaptive Server Enterprise Monitor Historical Server User’s Guide describes how to use Sybase® Adaptive Server® Enterprise Monitor Historical Server version 12.5.1 (Historical Server). Historical Server is a Sybase Open Server™ application that obtains performance statistics on Sybase SQL Server™ version 11.0 and Adaptive Server Enterprise version 11.5 and later.
  • Page 8 A more recent version of the release bulletin may be available on the World Wide Web. To check for critical product or document information that was added after the release of the product CD, use the Sybase Technical Library. •...
  • Page 9 About This Book • Glossary – defines technical terms used in the Adaptive Server documentation. • Historical Server User’s Guide – describes how to use Historical Server to ® obtain performance information for SQL Server and Adaptive Server. • Java in Adaptive Server Enterprise – describes how to install and use Java classes as data types, functions, and stored procedures in the Adaptive Server database.
  • Page 10 Sybase DTM XA interface with X/Open XA transaction managers. • XML Services in Adaptive Server Enterprise – describes the Sybase native XML processor and the Sybase Java-based XML support, introduces XML in the database, and documents the query and mapping functions that comprise XML Services.
  • Page 11 About This Book Other sources of Use the Sybase Getting Started CD, the Sybase Technical Library CD and the information Technical Library Product Manuals Web site to learn more about your product: • The Getting Started CD contains release bulletins and installation guides in PDF format, and may also contain other documents or updated information not included on the Technical Library CD.
  • Page 12 Finding the latest information on EBFs and software maintenance Point your Web browser to the Sybase Support Page at http://www.sybase.com/support. Select EBFs/Maintenance. Enter user name and password information, if prompted (for existing Web accounts) or create a new account (a free service).
  • Page 13 About This Book If you need help Each Sybase installation that has purchased a support contract has one or more designated people who are authorized to contact Sybase Technical Support. If you cannot resolve a problem using the manuals or online help, please have the designated person contact Sybase Technical Support or the Sybase subsidiary in your area.
  • Page 14 Historical Server...
  • Page 15: Chapter 1 Introduction

    Adaptive Server Enterprise Monitor Server (Monitor Server) – this server collects Adaptive Server performance data in real time and makes the data available to the other Adaptive Server Monitor components. Monitor Server is a Sybase Open Server application. • Adaptive Server Enterprise Monitor Historical Server (Historical Server) –...
  • Page 16: Adaptive Server Monitor Architecture

    Description of Adaptive Server Enterprise Monitor • Monitors in the Adaptive Server Enterprise plug-in for Sybase Central™ (Monitor Viewer) – the monitors obtain Adaptive Server performance data from Monitor Server and display the data in real time in tables and graphs.
  • Page 17: Adaptive Server Enterprise Monitor Architecture

    Server and Monitor Server are running. See the Sybase Adaptive Server Enterprise Monitor Client Library Programmer’s Guide for more information. The Adaptive Server Enterprise plug-in for Sybase Central includes a set of monitors showing different aspects of Adaptive Server resource usage at various levels of detail.
  • Page 18 To examine the data gathered by a recording session, you can: • Populate Adaptive Server tables with the data from recording sessions by using the Sybase bulk copy ( ) utility. See “Bulk copy example” on page 99 for more information.
  • Page 19 CHAPTER 1 Introduction Playback sessions Playback sessions let you retrieve the data gathered during one or more recording sessions. You can play back data in two forms: • Playback to a client – the results of the playback are sent to the user, who can view the results on the terminal or redirect them to a file.
  • Page 20 Adaptive Server Enterprise Monitor architecture When you define a recording session, you define one or more views to be included in that recording session. A recording session must have at least one view. For more information about creating recording session views, see hs_create_view on page 72 Appendix D, “Examples of Recording Session Views”...
  • Page 21 CHAPTER 1 Introduction • Other information – this is the only statistic type valid for data items that represent character strings. For example, Value for Sample for Object Name returns the name of a table. This statistic type is also the only one valid for data items that represent values such as IDs and values for configured parameters, such as Process ID and Code Memory Size.
  • Page 22 Adaptive Server Enterprise Monitor architecture • – this statistic type calculates an average value per “Average for Session” occurrence of an activity over the session. Only a few data items can use this statistic type. The meaning of the returned value depends on the data item.
  • Page 23: Chapter 2 Configuring Historical Server

    Configuring Historical Server C H A P T E R Topic Page Historical Server configuration concepts Initial configuration on UNIX platforms Initial configuration on Windows NT Setting Historical Server start-up parameters Configuring multiple instances of Historical Server Historical Server configuration concepts This section describes concepts that you should understand before configuring Historical Server including: •...
  • Page 24: The Operating System Start-Up Account

    Historical Server configuration concepts • It is the default directory location for the data files that Historical Server writes during recording sessions. The users who create the recording sessions can override this default location. parameter in the Historical Server start-up command specifies the home directory location.
  • Page 25: The Historical Server Superuser Account

    Historical Server, but no user has unrestricted access to historical data files. Sybase Open Client/Server connections Historical Server establishes client/server connections using either interfaces files (the interfaces file on UNIX; sql.ini file on Windows NT) or a directory service, as supported by Sybase Open Client/Server version 11.1.x. User’s Guide...
  • Page 26: Initial Configuration On Unix Platforms

    Set the $SYBASE environment variable to the value of the Sybase installation directory where you unloaded Historical Server. Log on using the “sybase” account or another account that has read, write, and search (execute) permissions on the $SYBASE directory. Set the $PATH environment variable.
  • Page 27 CHAPTER 2 Configuring Historical Server A script file ensures that correct parameters are used for each Historical Server start-up. The script file contains the Historical Server start-up command, , and its parameters. histserver To create a Historical Server script file: Using any editor, create a new file.
  • Page 28 Initial configuration on UNIX platforms • A Monitor Server paired with each Adaptive Server • Historical Server Use either (if your system is running X-Windows) or dsedit dscp command line utility) to add entries to an interfaces file. Follow the instructions in Open Client/Server Configuration Guide for UNIX.
  • Page 29: Initial Configuration On Windows Nt

    CHAPTER 2 Configuring Historical Server (if your system is running X-Windows) or dsedit dscp command line utility) to add entries to an interfaces file. To add these entries, you must know the following information: • Historical Server name. • Monitor Server and Adaptive Server names that you want Historical Server to connect to.
  • Page 30: Results Of Installation On Windows Nt

    Initial configuration on Windows NT Results of installation on Windows NT On the Windows NT platform, the Sybase installation process performs a nearly complete installation of Historical Server. The installation process: • Copies Historical Server files to the Sybase installation directory.
  • Page 31 • Historical Server. Entries for Historical Server should exist, since the Sybase installation process adds them. However, since the Adaptive Server/Monitor Server pairs usually are running on a different machine from Historical Server, entries probably do not exist for them on the Historical Server machine.
  • Page 32 Initial configuration on Windows NT • Historical Server. • The Monitor Server associated with each Adaptive Server listed. • Any Adaptive Server that you want Historical Server to collect data for. to add entries to a sql.ini file. To add these entries, you must dsedit know the following information: •...
  • Page 33 Save or print the existing settings before proceeding. From the registry menu, select the Save Subtree As command or the Print command. In the tree view, highlight: \SOFTWARE\SYBASE\Server\ srvrName\Parameters where srvrName is the name of the server whose start-up parameters you want to change.
  • Page 34: Setting Historical Server Start-Up Parameters

    Setting Historical Server start-up parameters From the Registry menu, choose Exit. Setting Historical Server start-up parameters This section describes the Historical Server start-up command and parameters. The section applies to Historical Server running on both UNIX and NT platforms. Function Starts Historical Server.
  • Page 35 Historical Server to connect. If you omit this after the dash.) parameter, the name and location of the default interfaces file is: UNIX: $SYBASE/interfaces NT: SYBASE\sql.ini (where SYBASE is the value of the SYBASE environment variable) User’s Guide...
  • Page 36 Setting Historical Server start-up parameters Parameter Description logFile Path name of the log file in which information and error messages about the Historical Server are logged. The data collected includes start-up information, error messages, and possibly a record of alarms that were triggered. The default path name is hs.log in the current directory.
  • Page 37: Configuring Multiple Instances Of Historical Server

    CHAPTER 2 Configuring Historical Server Parameter Description hsName Name of Historical Server as it appears in the interfaces file. If omitted, the Historical Server name defaults to the value of the DSLISTEN environment variable. If DSLISTEN is not set, the name “histserver”...
  • Page 38: Configuring An Additional Historical Server On Unix Platforms

    Configuring multiple instances of Historical Server When multiple instances of Historical Server use different home directories: • The Historical Server instances can be started by different user accounts. • The Historical Server instances use different control files. • The recording sessions of one server are not visible to the others. For example, the command, issued through , cannot access the...
  • Page 39: Configuring An Additional Historical Server On Windows Nt

    Save or print the existing settings before proceeding. From the Registry menu, select the Save Subtree As command or the Print command. In the tree view, highlight: \SOFTWARE\SYBASE\Server From the Edit menu, choose Add Key. In the resulting dialog box, in the Key Name box, enter the name of the Historical Server you are adding.
  • Page 40 Configuring multiple instances of Historical Server Leave the Class box blank. In the tree view, highlight: \SOFTWARE\SYBASE\Server\hsName where hsName is the new Historical Server name. Select Edit | Add Value. In the resulting dialog box, in the Value Name box, enter:...
  • Page 41 Historical Server data. All users who will create Historical Server recording sessions must have write access to this directory. Example: -Dc:\SYBASE\data\hs.data Arg2 REG_SZ installationRootDir\ini\sql.ini Example: -Ic:\SYBASE\ini\sql.ini...
  • Page 42 Select Edit | Add Value as many times as necessary to enter all of the following values, datatypes, and strings to the hsName key entry. SYBHIS_ Value name Datatype String DisplayName REG_SZ Sybase HISServer _ hsName ErrorControl REG_DWORD 01 (Select hex radio button) Group REG_SZ (leave blank) ImagePath REG_ rootInstlDir\bin\histsrvr.exe -ShsName...
  • Page 43 CHAPTER 2 Configuring Historical Server 15 Select Registry | Exit. 16 Restart the machine. Adding connectivity information for Historical Server This task assigns a port or network address to Historical Server. It also ensures that Historical Server can connect to one or more Adaptive Server/Monitor Server pairs.
  • Page 44 Configuring multiple instances of Historical Server • Add Historical Server to the appropriate directory service, using . You must know the Historical Server name to complete this dsedit step. The default name created by the installation process is in the format machineName_hs.
  • Page 45 Do not put carriage returns in your .bat file. The entire file should be one line. c:\sybase\bin\histsrvr.exe -Shs_server1 -Dc:\sybase\data\hs_data -Ic:\sybase\ini\sql.ini -lc:\sybase\data\hs.log Save the file with a .bat extension. Sybase recommends that you use RUN_ hsName.bat. For example: RUN_hs_server1.bat User’s Guide...
  • Page 46 Configuring multiple instances of Historical Server Historical Server...
  • Page 47: Chapter 3 Starting And Stopping Historical Server

    Chapter 2, “Configuring Historical Server,” you would start Historical Server using: install_dir/install/RUN_histServerName where install_dir is the Sybase root directory and histServerName is the name of the Historical Server you want to start. Regardless of which method you use: •...
  • Page 48: Stopping Historical Server On Unix

    See “The operating system start-up account” on page 10 for more information. • Set the $SYBASE environment variable to the root directory of the Sybase installation. The $SYBASE environment variable must contain the name of a directory that has the appropriate locales and charsets subdirectories for Historical Server.
  • Page 49 CHAPTER 3 Starting and Stopping Historical Server The superuser is the one whose account was specified in the parameters to the Historical Server start-up command. Determining current activity on Historical Server Before shutting down Historical Server, check current activity on Historical Server to determine if you want to issue a deferred shutdown or an immediate shutdown.
  • Page 50: Starting And Stopping Historical Server On Windows Nt

    Starting and stopping Historical Server on Windows NT • Adaptive Server To stop Historical Server on a UNIX platform: Connect to Historical Server. If you are using , the command is: isql isql [ -Uhs_superuser_name -Phs_superuser_password ] -Shistorical_server where: • superuser_name is the name that was used with the parameter to the Historical Server start-up command.
  • Page 51: Starting Historical Server On Windows Nt

    A batch (.bat) file containing the start-up command and parameters. The file name is run_hsName.bat, where hsName is the name of the Historical Server instance. Sybase recommends that you invoke the batch file from a command line shell rather than by double-clicking on it in File Manager.
  • Page 52: Verifying That Historical Server Is Running

    Starting and stopping Historical Server on Windows NT When you start Historical Server using the Control Panel, the server reads its start-up parameters from this NT Registry entry. If you start the server from the command line or by means of a batch file, the start-up parameters are taken from both the registry entry and from the command.
  • Page 53 CHAPTER 3 Starting and Stopping Historical Server Determining current activity on Windows NT Before shutting down Historical Server, check current activity on Historical Server to determine if you want to issue a deferred shutdown or an immediate shutdown. A deferred shutdown lets all current activity complete before terminating Historical Server.
  • Page 54 Starting and stopping Historical Server on Windows NT • Click the Stop button on the Windows NT Control Panel Services window. • Issue the command from hs_shutdown isql • If start-up was launched from the command line or by means of a batch file, then Historical Server is associated with the login that started it.
  • Page 55 Server before you shut down the system. Using the Kill Process button causes an uncontrolled shutdown. If Microsoft Visual C++ Process Viewer tool is installed on your system, Sybase recommends that you do not use the Kill Process button in the Process Viewer window. User’s Guide...
  • Page 56 Starting and stopping Historical Server on Windows NT Historical Server...
  • Page 57: Chapter 4 Command Reference

    Command Reference C H A P T E R This chapter describes the Historical Server command interface. Topics Page Command summary Command syntax Command status and errors Script files as input to Historical Server Connecting to Historical Server Historical Server commands Command summary Table 4-1 summarizes the Historical Server commands.
  • Page 58: Command Syntax

    Command syntax Activity Commands Creating a Use these commands to create a playback session: playback session • – defines the hs_create_playback_session characteristics of a playback session • – specifies one or more hs_create_playback_view views from the input recording sessions to include in the playback session.
  • Page 59: Command Status And Errors

    CHAPTER 4 Command Reference If a parameter value contains embedded spaces (such as those in data items, statistic types, and date-time specifications), you must surround the value with quotes. Matched pairs of single-quote or double-quotes are valid delimiters. If the parameter value contains an embedded quote that is the same as the character used to delimit the entire value, supply a pair of the quotes within the parameter value.
  • Page 60: Script Files As Input To Historical Server

    Script files as input to Historical Server Errors detected by Client-Library, Adaptive Server, and Monitor Server use their own error numbering and severity-level schemes. Script files as input to Historical Server A convenient way to provide input to Historical Server is to enter the commands in a text file and use that file as input.
  • Page 61: How To Connect

    “Configuring Historical Server” for more information. How to connect Connect to Historical Server using a utility that offers an interactive interface to Sybase servers, such as SQL Advantage or . Follow the isql standard connection procedures for the utility. For example, in SQL Advantage, choose the Connect menu item.
  • Page 62 Connecting to Historical Server Permissions required to perform Activity the activity Create recording sessions. Valid login and password in the Adaptive Server being monitored. Execute permission on the stored procedure in the mon_rpc_connect Adaptive Server being monitored. This permission is required to connect to Monitor Server.
  • Page 63: Mutually Exclusive Sessions

    CHAPTER 4 Command Reference Mutually exclusive sessions A Historical Server connection can be involved with only one session at a time. You can either be defining a recording session, or defining and executing a playback session, but you cannot mix together commands for multiple sessions.
  • Page 64: Historical Server Commands

    Historical Server commands Starting and ending a playback session command starts a playback definition. hs_create_playback_session After issuing this command, you use other commands to define the playback session and perform the playback. After issuing a successful command, you hs_create_playback_session must successfully execute a command to end the hs_terminate_playback playback session.
  • Page 65: Hs_Create_Alarm

    CHAPTER 4 Command Reference hs_create_alarm Creates an alarm. An alarm is triggered when a data item value reaches a Description specified threshold value. Syntax hs_create_alarm view_name, data_item_name, data_item_stat, alarm_action, alarm_action_data, alarm_value view_name Parameters name of the view that contains the data item to which the alarm applies. data_item_name data item to which the alarm applies.
  • Page 66 hs_create_alarm If alarm_action is Then alarm_action_data is Name of the file to execute, optionally followed by execute a list of parameters separated by spaces. The file must exist and the user who started Historical Server must have execute permission for it. When an alarm condition occurs and Warning! alarm_action...
  • Page 67 CHAPTER 4 Command Reference • When an alarm condition occurs and alarm_action is , Historical Server writes three lines to the log file. The first line contains: • Timestamp of the sample that triggered the alarm • Name of the data item on which the alarm was set •...
  • Page 68: Hs_Create_Filter

    hs_create_filter • For each key data item: • Name of the data item • Value of that data item for the row of sample data that triggered the alarm • When an alarm condition occurs and alarm_action is , the execute specified file is executed by the account that started Historical Server, not by the account that created the alarm.
  • Page 69 CHAPTER 4 Command Reference • – passes values that are not equal to any value in a list of values. That is, a value passes the filter if it is not equal to the first filter value, not equal to the second filter value, and not equal to any other value in the list.
  • Page 70 hs_create_filter Examples This example creates a filter for a view named Page I/O. The view contains the Page I/O data item with a “Value for Session” statistic type. The example limits the rows recorded for a sample to the 20 rows that have the highest total number of Page I/Os for the recording session to date.
  • Page 71: Hs_Create_Playback_Session

    CHAPTER 4 Command Reference • owner_name.object_name • database_name.owner_name.object_name If filter_type is , each component can contain a single instance of the wildcard character (%). The wildcard can be used in place of the entire component. For example, a value_spec of for the %.%.authors data_item Object Name sets a filter that returns the...
  • Page 72 hs_create_playback_session Parameters start_time specifies the date and time of the beginning of the recorded data to be played back. The default is to start playback from the beginning of the first session specified by session_id. Use the value NULL to accept the default.
  • Page 73 CHAPTER 4 Command Reference “year/month/day hour:minute[:second] [time zone]” Depending on the summarization_interval and missing_data_option parameters, and depending on whether there is any data available at the time specified, playback might use data from a time later than that specified; however, playback does not use data from a time earlier than start_time.
  • Page 74 hs_create_playback_session end_time specifies the date and time for the end of the recorded data to be played back. The default is to end playback at the end of the last session specified. Use the value NULL to accept the default. The format of this parameter is the same as the start_time format.
  • Page 75 CHAPTER 4 Command Reference summarization_interval a required parameter (no default exists) that specifies the level of detail of the playback. Valid values are: • – plays back data as it was collected, using the same sample intervals. Choose this option to view raw data as it was recorded. Also, this is the only option available for playing back snapshot data, such as current SQL statement data and status information on locks or processes.
  • Page 76 hs_create_playback_session "D H:M:S" where: • S – is seconds. • M – is minutes. • H – is hours. • D – is days. All components are numeric and can be one or two digits. Some examples are: "30" (specifies sample intervals of 30 seconds) "10:0"...
  • Page 77 CHAPTER 4 Command Reference • the input recording sessionss session lengths and the requested playback start and end times To handle these differences, accumulated counts are prorated. Percentages and rates are weight-averaged, weighted by the number of seconds that each input sample contributes. See Appendix C, “Specifications for Defining Playback Views”...
  • Page 78 hs_create_playback_session target specifies the target results of the playback session. Valid values are: • (default) – enables playback to the client. client • – enables creation of a new session containing all the data file specified by this command and by hs_create_playback_session subsequent commands.
  • Page 79 CHAPTER 4 Command Reference script_type when target is , this parameter specifies whether you want the file command to create a script file for the newly hs_initiate_playback created session. The script file contains SQL commands that create an Adaptive Server table for each playback view defined for the new session.
  • Page 80 hs_create_playback_session session_id[ ,session_id. . .] specifies the unique identifiers for the input sessions to be played back. At least one session_id is required. When more than one are used, they must be specified in the correct order according to their start times, with the earliest start time first.
  • Page 81: Hs_Create_Playback_View

    CHAPTER 4 Command Reference • If target is , the client retrieves the data using the client command. Playback can occur from hs_playback_sample recording sessions that are still in the process of recording. • If target is , the client does not retrieve any data for this file playback session;...
  • Page 82 hs_create_playback_view Parameters view_name name of a view that you want to play back. The playback view name must match the name of a corresponding view in the input sessions. If there are two or more input sessions, then the view must exist in all of the input sessions and must contain the exact same data items and filters in all of the input sessions.
  • Page 83: Hs_Create_Recording_Session

    CHAPTER 4 Command Reference "Device Reads","Rate for Sample" Usage • command is valid only during the hs_create_playback_view definition of a playback session; that is, it must be issued after a successful command, but before a hs_create_playback_session successful command. hs_initiate_playback • A playback session must have at least one view.
  • Page 84 hs_create_recording_session year/month/day hour:minute[:second] [time zone] The default is to start immediately. The following time zone options are available: Parameter value Explanation U.S. eastern time zone, standard time. U.S. eastern time zone, daylight saving time. U.S. central time zone, standard time. U.S.
  • Page 85 CHAPTER 4 Command Reference protection_level 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 command).
  • Page 86: Hs_Create_View

    hs_create_view Examples 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).
  • Page 87: Hs_Delete_Data

    CHAPTER 4 Command Reference • “Value for Sample” • “Value for Session” • “Rate for Sample” • “Rate for Session” • “Avg for Sample” • “Avg for Session” Not all statistic types are valid for all data items. See Table B-3 on page 148.
  • Page 88: Hs_Initiate_Playback

    hs_initiate_playback Parameters low_session_id unique identifier of the first recording session whose data is to be deleted. high_session_id unique identifier of the last in a range of sessions whose data is to be deleted. If omitted, only the session identified by low_session_id has its data deleted.
  • Page 89: Hs_Initiate_Recording

    CHAPTER 4 Command Reference • If no views were created before the command, hs_initiate_playback then returns an error. The user may still attempt hs_initiate_playback command, or may cancel the playback hs_create_playback_view session with the command. hs_terminate_playback hs_initiate_recording Specifies that the definition of a recording session is complete and Description requests that recording be started or scheduled to start at the recording session’s start_time.
  • Page 90 hs_list restriction Selects a subset of the data available about recording sessions for a given level. If level is Then restriction is • One of the following: sessions • – limits the returned data to currently active active recording sessions of this Historical Server instance. •...
  • Page 91 CHAPTER 4 Command Reference • Filter count • command returns the following field as a float datatype: hs_list • Alarm value • All other fields are returned as character strings. • If a session was recorded with the protection level and the private current user is not the Historical Server superuser, the current user’s name and password are verified against the name and password of the...
  • Page 92 hs_list • Sampling interval used If this value is 0, it means that the session was created by playback with a summarization_level of . (The entire entire session is represented in one sample, and there is no sample interval.) • Error option used (continue or halt on non-fatal error) •...
  • Page 93: Hs_Playback_Sample

    CHAPTER 4 Command Reference • File name for log file or file to execute • Alarm value • produces one row for each filter for a data item in a view, with filters the following columns: • Session ID • View name •...
  • Page 94 hs_playback_sample Parameters step specifies the sample to send to the client, relative to the sample sent in the most recent command for the current playback hs_playback_sample session. Valid values are 0 or positive numbers. The default is +1, which sends the next later sample. At the beginning, a step of +1 returns the first sample.
  • Page 95 CHAPTER 4 Command Reference The columns in each table correspond to the data items in the corresponding playback view. The columns are arranged in the order in which the data items were listed when you defined the playback view. See Table B-3 on page 148 to determine the datatype of each column.
  • Page 96 hs_playback_sample • Summary playback views do not require the server process to exist for the duration of the playback sample. Summary views return rows for all server processes included in any of the input views. However, since Process ID is not guaranteed to be unique, the Kernel Process ID must be included in any summary view that includes Process ID to ensure uniqueness of the key.
  • Page 97: Hs_Shutdown

    CHAPTER 4 Command Reference For the client to receive a timestamp in this case, there must be a playback view containing only the data item Timestamp Timestamp . A view containing any other data items returns zero rows. Datim The playback session’s summarization level affects the number of empty samples returned during playback: •...
  • Page 98 Sybase strongly recommends that you do not use the kill Warning! signal (SIGKILL) to shut down Historical Server. The kill signal does not permit any controlled cleanup to be done and may result in data loss.
  • Page 99: Hs_Status

    CHAPTER 4 Command Reference hs_status Obtains status information. Description Syntax hs_status option option Parameters one of the following specifications: • – displays the name of the Historical Server home directory directory, specified by the parameter to the Historical Server start-up command. •...
  • Page 100: Hs_Terminate_Playback

    hs_terminate_playback Examples This example displays the name of the Historical Server home directory: hs_status directory command returns the field and all of the Usage hs_status max_connections fields as integer datatypes. All other fields are returned as character activity strings. hs_terminate_playback Terminates the definition of a playback session and the actual Description playback.
  • Page 101 CHAPTER 4 Command Reference • – deletes the files. delete • (the default) – does not delete the files. This parameter is retain ignored when you are cancelling a recording session that was not initiated. This example terminates the active recording session with identifier 5 and Examples then deletes all files associated with session 5.
  • Page 102 hs_terminate_recording Historical Server...
  • Page 103: Chapter 5 Data Files

    Data Files C H A P T E R Topic Page Overview of Historical Server data files Control file Data file Error message file Script file Bulk copy example Cut utility example Overview of Historical Server data files The topics in this section are: •...
  • Page 104: Permissions On Files

    All files use newline characters as end-of-record markers. The fields in each file are variable-length and are separated by commas. All data is stored in ASCII format, which is compatible with the Sybase bulk copy ( ) utility. Historical Server...
  • Page 105: Control File

    CHAPTER 5 Data Files Control file The hs.ctl control file resides in the Historical Server home directory. The control file maintains information about all recording sessions, past and present, known to Historical Server. See “The Historical Server control file and home directory” on page 9 for more details about how Historical Server uses the control file.
  • Page 106: Session Control Record

    Control file • The session ID of the session whose control information was most recently written to the control file • The number of session entries in the control file that are no longer valid because one or more data files or error message files they refer to were deleted Following this header record are a number of records of different types that describe all of the recording sessions, past and present, known to Historical...
  • Page 107 CHAPTER 5 Data Files • Record identifier (the word “session”). • Status of the session. The status can be active, inactive, or invalid. A status of invalid applies if any data file or error message file belonging to the session has been deleted or if the session was terminated before its start time was reached.
  • Page 108: View Control Record

    Control file There is one session control record in the file for each recording session. The first view control record for the session follows immediately. View control record The view control record contains: • Record identifier (the word “view”) • View name •...
  • Page 109: Filter Control Record

    CHAPTER 5 Data Files • Alarm action • Alarm action data (file name, possibly followed by a list of parameters) • Alarm datatype • Alarm value One alarm control record exists for each alarm that is defined for the current data item.
  • Page 110: Error Message File

    Error message file Each such record holds: • Date and time of the sample This timestamp is based on the local time in effect at the Adaptive Server that was monitored • Values of all of the data items sampled If no data is returned for this view during a given sample interval, a placeholder record is written to the historical data file.
  • Page 111: Script File

    CHAPTER 5 Data Files • 5 – Monitor Server • Error message text For more information about error message fields, refer to the Reference Manual. Script file If the value of the script_type parameter of the hs_create_recording_session command is , a script file is created for the session. The name of sybase_script the script file is ssessionid where sessionid is the unique identifier for the session.
  • Page 112: Passing Script File Commands

    Script file Each column is assigned a datatype that is appropriate for the type of information that the data item represents. All columns except the sample timestamp column can contain null values. Passing script file commands You can pass the create table commands in the script file to Adaptive Server by using the utility’s command.
  • Page 113: Bulk Copy Example

    CHAPTER 5 Data Files Bulk copy example This section describes how to pass historical data files to the Bulk Copy ( utility to populate Adaptive Server tables. To store recorded data in an Adaptive Server table by using , you must first create a table for each view defined for the session.
  • Page 114: Example

    Bulk copy example • sqlserver is the name of Adaptive Server. • -t, specifies the column terminators as being commas. The default row terminator when using the option is a \n (new line) character used by data files. Therefore, you do not need to specify the option.
  • Page 115: Cut Utility Example

    CHAPTER 5 Data Files device_name varchar (255) null, device_reads_val null, device_writes_val null, device_io_val null, After the recording session is complete, you can use to import data from the view’s data file into the database table. Use the following commands: bcp pubs2..device_io in d1_1_device_io -c -e d1_1_device_io.err -Uusername -Ppassword -Sserver -t Cut utility example...
  • Page 116 Cut utility example Suppose that you are interested in only the total I/O for each device during the sample. You could execute the following command to cut out the data you want by executing the following command: cut -f1,2,5 -d, d1_1_device_io > d1_1_device.io.new where field 1 is the date and time of the sample, 2 is the second field, which is the device name, and 5 is the fifth field, which is the device I/O value.
  • Page 117: Ap Pe Nd Ix A Data Items

    Data Items A P P E N D I X Table of data items and definitions Table A-1 describes the data items available for inclusion in recording session views. The table lists data items in alphabetical order and provides the following information about each one: •...
  • Page 118 Table of data items and definitions Data item Description Blocking Process ID ID of the process that holds a lock that another process is waiting for, if any. A returned value of zero means that the other process is not blocked. Version: 11.0 and later Type: Result Cache Efficiency...
  • Page 119 APPENDIX A Data Items Data item Description Cache Prefetch Efficiency A percentage comparing the count of pages being reused in large I/O buffers (the denominator) to the number of those pages that were ever referenced by Adaptive Version: 11.0 and later Server.
  • Page 120 Table of data items and definitions Data item Description Cache Spinlock The fraction of the requests for a data cache’s spinlock that were forced to wait. Contention spinlock_waits / spinlock_requests Type: Result Version: 11.0 and later Code Memory Size Amount of memory in bytes allocated to Adaptive Server. Type: Result Version: 11.0 and later Connect Time...
  • Page 121 APPENDIX A Data Items Data item Description Current Stmt Batch ID The ID of a particular query batch being executed on a particular process. Type: Result Version: 11.5 and later Current Stmt Batch Text The text of a particular query batch being executed for a particular process. This text may be only an initial substring of the complete text in a query batch.
  • Page 122 Table of data items and definitions Data item Description Current Stmt Locks Number of lock requests by the currently executing SQL statement that were granted Granted After Wait after waiting. Type: Result Version: 11.5 and later Current Stmt Locks Number of lock requests by the currently executing SQL statement that were granted Granted Immediately immediately or were not needed (because sufficient locking was already held by the requestor).
  • Page 123 APPENDIX A Data Items Data item Description Current Stmt Procedure The database name of the stored procedure (including triggers, a special kind of stored Database Name procedure) that contains the currently executing SQL statement for a particular process. If the currently executing SQL statement is not contained in a stored Version: 11.5 and later procedure, this name is “**NoDatabase**”...
  • Page 124 Table of data items and definitions Data item Description Current Stmt Text Byte The byte offset to the beginning of a statement within the query batch or stored Offset procedure being executed for a particular process. If both Current Stmt Procedure Database ID is equal to 0 and Current Stmt Procedure Version: 11.5 and later ID is equal to 0, then the statement is the currently executing SQL statement in the query batch.
  • Page 125 APPENDIX A Data Items Data item Description Elapsed Time The time increment, in seconds, either from one data refresh to the next (sample) or from the creation of the view to the present (session). Version: 11.0 and later Type: Result Engine Number Number of the Adaptive Server engine.
  • Page 126 Table of data items and definitions Data item Description Lock Result Result of a logical lock request. Lock result values are: • 1 – granted immediately. Version: 11.0 and later • 2 – not needed; requestor already held a sufficient lock. •...
  • Page 127 APPENDIX A Data Items Data item Description Lock Type Adaptive Server protects tables or data pages currently used by active transactions by locking them. Adaptive Server employs the following lock types: Version: 11.0 and later • 1 – exclusive table lock. •...
  • Page 128 Table of data items and definitions Data item Description Most Active Device I/O Number of combined reads and writes against the device with the most activity during a given time interval. Version: 11.0 and later Type: Result Most Active Device Name of the device with the largest number of combined reads and writes during a Name given time interval.
  • Page 129 APPENDIX A Data Items Data item Description Object ID ID of a database object. The object returned is a database table, a stored procedure, or a temporary table. Version: 11.0 and later Object IDs might be negative numbers. The object IDs that Adaptive Server assigns to temporary tables can be positive or negative.
  • Page 130 Table of data items and definitions Data item Description Procedure Database ID Database ID of the active stored procedure. Type: Key Version: 11.0 and later Procedure Database Database name of the active stored procedure. Name Type: Key Version: 11.0 and later Procedure Elapsed Time Number of seconds elapsed during a stored procedure execution.
  • Page 131 APPENDIX A Data Items Data item Description Procedure Owner Name Name of the owner of the active stored procedure. Type: Result Version: 11.0 and later Procedure Physical Reads Number of requests to execute a stored procedure, for which a read from sysprocedures was necessary.
  • Page 132 Table of data items and definitions Data item Description Rows Deleted Number of rows deleted from a database table. Type: Result Version: 11.0 and later Rows Deleted Deferred Number of rows deleted from a database table in deferred mode. Type: Result Version: 11.0 and later Rows Deleted Direct Number of rows deleted from a database table in direct mode.
  • Page 133 APPENDIX A Data Items Data item Description Select Statements Number of SELECT or OPEN CURSOR statements. Type: Result Version: 11.0 and later Server Structures Size Amount of memory in bytes allocated for the Adaptive Server structures. Type: Result Version: 11.0 and later SQL Server Name Name of the Adaptive Server that is being monitored as specified by the parameter...
  • Page 134 Table of data items and definitions Data item Description Transactions Total number of committed Transact-SQL statement blocks delimited by a begin statement. transaction commit transaction Version: 11.0 and later Type: Result Historical Server...
  • Page 135: Ap Pe Nd Ix B Specifications For Defining Recording Session Views

    Specifications for Defining A P P E N D I X Recording Session Views This appendix describes rules and considerations for designing recording session views. Topic Page Definition of key and result Designing recording session views Table of valid key and result data item combinations Table of valid statistic types for data items Definition of key and result Data items are either keys or results.
  • Page 136: Designing Recording Session Views

    Designing recording session views Table B-1: View examples using various key combinations View definition Results Page I/O Since there are no keys in the view, the result is page I/O for the whole server. For example: Page I/O -------- Process ID (key), Login The result is page I/O per process.
  • Page 137: Using The Application Name

    APPENDIX B Specifications for Defining Recording Session Views To create a non-raw playback view that shows per-process data, the recording session view and the playback view must include both the Process ID and Kernel Process ID data items. If playback is , using only Process ID is allowed.
  • Page 138: Table Of Valid Key And Result Data Item Combinations

    Table of valid key and result data item combinations • Views that contain keys other than those listed in the previous bullets return rows when there is no activity. Table of valid key and result data item combinations There are restrictions on the data items that can be combined within a view. The restrictions are based upon the relationships between data items.
  • Page 139 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Blocking Process ID Valid at server level? Required keys: • Process ID • Database ID • Object ID • Lock Status • Page Number Optional keys: Lock Type Cache Efficiency Valid at server level?
  • Page 140 Table of valid key and result data item combinations Data item Required and optional keys Cache Refer and Reuse Valid at server level? Required keys: Cache ID Cache Reuse Valid at server level? Required keys: Cache ID Cache Reuse Dirty Valid at server level? Required keys: None...
  • Page 141 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys CPU Busy Percent Valid at server level? Required keys: None Optional keys: Engine Number CPU Percent Valid at server level? Required keys: Process ID or Application Name Optional keys: Engine Number CPU Time...
  • Page 142 Table of valid key and result data item combinations Data item Required and optional keys Current Execution Class Valid at server level? Required keys: Process ID Current Process State Valid at server level? Required keys: Process ID Current Stmt Batch ID Valid at server level? Required keys: Process ID...
  • Page 143 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Current Stmt Line Number Valid at server level? Required keys: Process ID Current Stmt Locks Granted Valid at server level? After Wait Required keys: Process ID Current Stmt Locks Granted Valid at server level? Immediately...
  • Page 144 Table of valid key and result data item combinations Data item Required and optional keys Current Stmt Procedure Valid at server level? Database ID Required keys: Process ID Current Stmt Procedure Valid at server level? Database Name Required keys: Process ID Current Stmt Procedure ID Valid at server level? Required keys:...
  • Page 145 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Database ID (KEY) Database Name Valid at server level? Required keys: Database ID Deadlock Count Valid at server level? Required keys: None Demand Lock Valid at server level? Required keys: •...
  • Page 146 Table of valid key and result data item combinations Data item Required and optional keys Device I/O Valid at server level? Required keys: None Optional keys: Device Name Device Misses Valid at server level? Required keys: None Optional keys: Device Name Device Name (KEY) Device Reads Valid at server level?
  • Page 147 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Index Logical Reads Valid at server level? Required keys: None Optional keys: • Process ID • Database ID • Object ID • Engine Number • Key combination: •...
  • Page 148 Table of valid key and result data item combinations Data item Required and optional keys Large I/O Denied Valid at server level? Required keys: Cache ID Large I/O Performed Valid at server level? Required keys: Cache ID Large I/O Requested Valid at server level? Required keys: Cache ID...
  • Page 149 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Locks Being Blocked Count Valid at server level? Required keys: • Process ID • Database ID • Object ID • Lock Status • Lock Type • Page Number Locks Granted After Wait Valid at server level? Required keys:...
  • Page 150 Table of valid key and result data item combinations Data item Required and optional keys Locks Not Granted Valid at server level? Required keys: None Optional keys: • Process ID or • Application Name • Key Combination: • Database ID •...
  • Page 151 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Most Active Device I/O Valid at server level? Required keys: None Most Active Device Name Valid at server level? Required keys: None Net Bytes Received Valid at server level? Required keys: None Net Bytes Sent...
  • Page 152 Table of valid key and result data item combinations Data item Required and optional keys Net Packets Received Valid at server level? Required keys: None Net Packets Sent Valid at server level? Required keys: None Number of Engines Valid at server level? Required keys: None Number of Processes...
  • Page 153 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Page Cache Size Valid at server level? Required keys: None Page Hit Percent Valid at server level? Required keys: None Optional keys: • Process ID • Engine Number •...
  • Page 154 Table of valid key and result data item combinations Data item Required and optional keys Page Writes Valid at server level? Required keys: None Optional keys: • Process ID • Engine Number • Key combination: • Database ID • Object ID •...
  • Page 155 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Procedure CPU Time Valid at server level? Required keys: • Procedure Database ID • Procedure ID Optional keys: • Process ID • Procedure Stmt Number • Procedure Line Number Procedure Database ID (KEY) Procedure Database Name Valid at server level?
  • Page 156 Table of valid key and result data item combinations Data item Required and optional keys Procedure Execution Count Valid at server level? Required keys: • Procedure Database ID • Procedure ID Optional keys: • Process ID • Procedure Stmt Number •...
  • Page 157 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Procedure Owner Name Valid at server level? Required keys: • Procedure Database ID • Procedure ID Procedure Physical Reads Valid at server level? Required keys: None Procedure Statement Number (KEY) Process ID (KEY)
  • Page 158 Table of valid key and result data item combinations Data item Required and optional keys Rows Inserted Clustered Valid at server level? Required keys: None Rows Inserted Heap Valid at server level? Required keys: None Rows Updated Valid at server level? Required keys: None Rows Updated Deferred...
  • Page 159 APPENDIX B Specifications for Defining Recording Session Views Data item Required and optional keys Server Structures Size Valid at server level? Required keys: None SQL Server Name Valid at server level? Required keys: None SQL Server Version Valid at server level? Required keys: None Thread Exceeded Max...
  • Page 160: Examples Of Valid Combinations

    Table of valid key and result data item combinations Data item Required and optional keys Timestamp Valid at server level? Required keys: None Timestamp Datim Valid at server level? Required keys: None Transactions Valid at server level? Required keys: None 1.
  • Page 161: Examples Of Invalid Combinations

    APPENDIX B Specifications for Defining Recording Session Views Examples of invalid combinations • Current Engine, Process ID, Lock Status Count Lock Status Count is not available per process. • Login Name, Blocking Process ID Need to add the other required key data items. •...
  • Page 162 Table of valid statistic types for data items Table B-3: Data items and their valid statistic types Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Application charp Execution Class Application charp Name...
  • Page 163 APPENDIX B Specifications for Defining Recording Session Views Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Current charp Application Name Current long Engine Current charp Execution Class Current ENUMS Process State Current Stmt long...
  • Page 164 Table of valid statistic types for data items Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Current Stmt long long double double Logical Reads Current Stmt long Number Current Stmt long long double...
  • Page 165 APPENDIX B Specifications for Defining Recording Session Views Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Database charp Name Deadlock long long Count Demand charp Lock Device Hit double double Percent Device Hits...
  • Page 166 Table of valid statistic types for data items Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Lock Hit double double Percent Lock Result ENUMS Lock Results ENUMS Summarized Lock Status ENUMS Lock Status long...
  • Page 167 APPENDIX B Specifications for Defining Recording Session Views Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Net Max long Packet Size Net Packet double double double double Size Received Net Packet double double...
  • Page 168 Table of valid statistic types for data items Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Procedure double double double double Elapsed Time Procedure charp Execution Class Procedure long long double double...
  • Page 169 APPENDIX B Specifications for Defining Recording Session Views Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Rows long long double double Deleted Direct Rows long long double double Inserted Rows long long...
  • Page 170 Table of valid statistic types for data items Statistic Value Value Rate type Rate for Avg for Avg for data item sample session sample session sample session Thread double double Exceeded Max Percent Thread Max long Used Time Waited long on Lock Timestamp charp...
  • Page 171: Ap Pe Nd Ix C Specifications For Defining Playback Views

    Specifications for Defining A P P E N D I X Playback Views This appendix describes rules and considerations for designing playback views. Topic Page Summarization level details Designing playback views Table of data item requirements for playback views Additional information about some data items Summarization level details All playback views in a session play back with the same summarization level.
  • Page 172: Raw Playback

    Summarization level details Raw playback This option plays back data as it was collected, using the same sample intervals. Choose this option to view raw data as it was recorded. This is the only option available for playing back snapshot data, such as current SQL statement data and per-process status data.
  • Page 173: Entire Playback

    APPENDIX C Specifications for Defining Playback Views Historical Server returns samples whose time intervals correspond to those of samples in the input sessions. However, samples might be truncated to comply with the start_time or end_time specified, or if overlaps occur across input sessions.
  • Page 174: Playback With User-Defined Intervals

    Summarization level details For example, if the playback session start_time is 3 p.m. and the end_time is 6 p.m., and an input recording session started at 1 p.m. and ended at 9 p.m., Historical Server calculates data item values for the hours between 3 p.m. and 6 p.m.
  • Page 175: Summary Of Summarization Intervals

    APPENDIX C Specifications for Defining Playback Views The playback view can use statistic types different from those in the recorded data, and it can include some estimated and calculated data items not in the original view. See Table C-2 on page 165 for a definitive list of data items that can be converted or added to a playback view.
  • Page 176: Designing Playback Views

    Designing playback views Designing playback views This section describes the following topics: • Rules for specifying input sessions • Relationship of input views to playback views • Rules for defining raw playback views • Rules for defining non-raw playback views Rules for specifying input sessions When you are using multiple input sessions to create a playback session to a file, no time gaps are allowed in input sessions.
  • Page 177: Rules For Defining Views

    APPENDIX C Specifications for Defining Playback Views Playback views are derived from the input views. The name of a playback view must match the name of a view in the input sessions. In the case of multiple input sessions, the view must exist in all of the input sessions, and the view definitions in all of the input sessions must contain exactly the same list of data items and the same list of filters.
  • Page 178 Designing playback views • Any playback view can include these data items: “Timestamp” “Value for Sample” “Timestamp Datim” “Value for Sample” “Elapsed Time” “Value for Sample” “Elapsed Time” “Value for Session” • The column labeled “Valid for Non-raw?” in Table C-2 indicates which result data items are allowed in a non-raw playback view.
  • Page 179: Table Of Data Item Requirements For Playback Views

    APPENDIX C Specifications for Defining Playback Views Table of data item requirements for playback views Table C-2 describes the requirements for including data items in a playback view. Read the previous section for explanations of the columns. Table C-2: Data item requirements for playback views Data item (keys in an input view are Valid for Conditions for...
  • Page 180 Table of data item requirements for playback views Data item (keys in an input view are Valid for Conditions for required in a playback view) non-raw? inclusion Current Stmt Cache Reads Current Stmt Context ID Current Stmt CPU Time Current Stmt Elapsed Time Current Stmt Line Number Current Stmt Locks Granted Immediately Current Stmt Locks Granted After Wait...
  • Page 181 APPENDIX C Specifications for Defining Playback Views Data item (keys in an input view are Valid for Conditions for required in a playback view) non-raw? inclusion Device Writes Valid Full Elapsed Time Valid Full Engine Number (KEY) Valid Value for Sample Host Name Index Logical Reads Valid...
  • Page 182 Table of data item requirements for playback views Data item (keys in an input view are Valid for Conditions for required in a playback view) non-raw? inclusion Net Packet Size Received Valid Calculated from: • Net Packets Received • Net Bytes Received Net Packet Size Sent Valid...
  • Page 183 Specifications for Defining Playback Views APPENDIX C Data item (keys in an input view are Valid for Conditions for required in a playback view) non-raw? inclusion Procedure Header Size Valid Value for Sample Procedure Hit Percent Valid Calculated from: • Procedure Logical Reads •...
  • Page 184: Additional Information About Some Data Items

    Additional information about some data items Data item (keys in an input view are Valid for Conditions for required in a playback view) non-raw? inclusion Time Waited on Lock Timestamp Valid Value for Sample Timestamp Datim Valid Value for Sample Transactions Valid Full...
  • Page 185 APPENDIX C Specifications for Defining Playback Views Using Process ID When a server process terminates, Adaptive Server can reuse its Process ID for a new process. Therefore, the Process ID data item is not guaranteed to uniquely identify a process. The Kernel Process ID data item, however, uniquely identifies a process.
  • Page 186 Additional information about some data items • Procedure Execution Count does not exist in the input view, and • Procedure Elapsed Time exists in the input view with the statistic type “Avg for Sample”, and • The playback session allows estimations. That is, in the command, the allow_estimation hs_create_playback_session parameter was set to...
  • Page 187: Ap Pe Nd Ix D Examples Of Recording Session Views

    Examples of Recording A P P E N D I X Session Views The appendix contains examples of valid views for Historical Server. These views also appear in the views file that was installed in the sample/histserver subdirectory under the installation directory. You may find that some of these views collect exactly the information you need, while others can serve as templates for building the views that you need.
  • Page 188: Cache Performance Summary

    Cache performance summary Topic Page Device I/O performance summary Engine activity Lock performance summary Network activity for recording session Network activity for sample interval Network performance summary Page I/O Procedure cache statistics for recording session Procedure cache statistics for sample interval Procedure page I/O Process activity Process database object page I/O...
  • Page 189: Database Object Lock Status

    APPENDIX D Examples of Recording Session Views Database object lock status This view shows the status of locks on database objects that are held or being requested by Adaptive Server processes, as of the end of the most recent sample interval. Each lock is identified by the name and ID of the object being locked, the name and ID of the database that contains that object, and the page number to which the lock applies (if it is a page lock).
  • Page 190: Data Cache Activity For Individual Caches

    Data cache activity for individual caches "Database Name", "Value for Sample", "Object ID", "Value for Sample", "Object Name", "Value for Sample", "Logical Page Reads", "Value for Sample", "Physical Page Reads", "Value for Sample", "Page Writes", "Value for Sample", "Logical Page Reads", "Value for Session", "Physical Page Reads", "Value for Session", "Page Writes", "Value for Session"...
  • Page 191: Data Cache Statistics For Recording Session

    APPENDIX D Examples of Recording Session Views Data cache statistics for recording session This view represents the overall effectiveness of the combined data caches of the Adaptive Server since the start of the recording session. It shows the percentage of requests for page reads that were satisfied from cache for the recording session.
  • Page 192: Device I/O For Recording Session

    Device I/O for recording session Device I/O for recording session This view represents the I/O activity that occurred on Adaptive Server database devices since the start of the recording session. It identifies each device by name. Device I/O levels are presented in two ways: as counts of total device I/Os, reads and writes since the start of the session, and also as overall rates of total I/Os, reads and writes per second since the session began.
  • Page 193: Device I/O Performance Summary

    APPENDIX D Examples of Recording Session Views Device I/O performance summary This view represents reads and writes to database devices by Adaptive Server, accumulated from the start of the recording session. It shows the overall rate of reads and writes to database devices since the start of the session, as well as the most active database device for that time period and the rate of reads and writes to the most active device.
  • Page 194: Network Activity For Recording Session

    Network activity for recording session Network activity for recording session This view represents the network activity over all of the Adaptive Server network connections since the start of the recording session. It shows the default packet size, the maximum packet size, and both average packet sizes sent and received since the start of the session.
  • Page 195: Network Performance Summary

    APPENDIX D Examples of Recording Session Views "Net Packets Received", "Rate for Sample", "Net Bytes Sent", "Value for Sample", "Net Bytes Received", "Value for Sample", "Net Bytes Sent", "Rate for Sample", "Net Bytes Received", "Rate for Sample" Network performance summary This view represents the rate of Adaptive Server activity over all its network connections during the most recent sample interval.
  • Page 196: Procedure Cache Statistics For Recording Session

    Procedure cache statistics for recording session "Logical Page Reads", "Rate for Session" The count of the page I/Os collected by this view for a given database Note table includes I/Os against indexes on the table, in addition to those performed against the data pages of the table itself.
  • Page 197: Procedure Page I/O

    APPENDIX D Examples of Recording Session Views "Procedure Logical Reads", "Rate for Sample", "Procedure Physical Reads", "Value for Sample", "Procedure Physical Reads", "Rate for Sample" Procedure page I/O This view represents page I/Os that occurred while running stored procedures during the most recent sample interval. For each stored procedure that generated page I/Os during the sample interval, it shows the stored procedure name and ID, together with the name and ID of the database that contains the procedure.
  • Page 198: Process Database Object Page I/O

    Process database object page I/O "Login Name", "Value for Sample", "Process ID", "Value for Sample", "Kernel Process ID", "Value for Sample", "Connect Time", "Value for Session", "Page I/O", "Value for Session", "CPU Time", "Value for Session", "Current Process State", "Value for Sample" Process database object page I/O This view represents the page I/Os by database object for each Adaptive Server process.
  • Page 199: Process Detail For Locks

    APPENDIX D Examples of Recording Session Views Process detail for locks This view shows the status of locks held by or being requested by Adaptive Server processes as of the end of the most recent sample interval. Each lock is identified by the login name, Process ID, and Kernel Process ID of the Adaptive Server process associated with the lock, as well as the name and ID of the object being locked, the name and ID of the database that contains that...
  • Page 200: Process Locks

    Process locks hs_create_view process_detail_io, "Login Name", "Value for Sample", "Process ID", "Value for Sample", "Kernel Process ID", "Value for Sample", "Current Process State", "Value for Sample", "Current Engine", "Value for Sample", "Connect Time", "Value for Session", "CPU Time", "Value for Session", "Page Hit Percent", "Value for Sample", "Page Hit Percent", "Value for Session", "Logical Page Reads", "Value for Session",...
  • Page 201: Process State Summary

    APPENDIX D Examples of Recording Session Views "Kernel Process ID", "Value for Sample", "Page I/O", "Value for Sample", "Page Hit Percent", "Value for Sample", "Logical Page Reads", "Value for Sample", "Physical Page Reads", "Value for Sample", "Page Writes", "Value for Sample" Process state summary This view shows the number of processes that were in each process state at the end of the most recent sample interval.
  • Page 202: Server Performance Summary

    Server performance summary "Physical Page Reads", "Value for Sample", "Page Writes", "Value for Sample" Server performance summary This view represents overall Adaptive Server performance. It shows the number of lock requests per second, the percentage of the sample interval when the Adaptive Server was busy, the number of transactions processed per second, and the number of times the Adaptive Server detected a deadlock during the most recent sample interval.
  • Page 203: Transaction Activity

    APPENDIX D Examples of Recording Session Views "Procedure Execution Count", "Value for Session", "Procedure Elapsed Time", "Avg for Sample", "Procedure Elapsed Time", "Avg for Session" Transaction activity This view details the transaction activity that occurred in Adaptive Server, both for the sample interval and the recording session. hs_create_view transaction_activity, "Transactions", "Value for Sample", "Rows Deleted", "Value for Sample",...
  • Page 204 Transaction activity Historical Server...
  • Page 205: Index

    Index Symbols bulk copy utility. See bcp utility $DSLISTEN $SYBASE 12, 21, 34 .bat file calculations, in playback views charsets directory client connections. See connections client playback 64, 79 accounts commands alarms and See also utilities start-up 11, 23, 34...
  • Page 206 4, 49 ending sessions 50, 86 tables 65, 71, 97 entire playback 61, 159 cut utility environment variables DSLISTEN SYBASE 12, 21, 34 error files -D parameter 10, 21, 69, 90 messages data files 10, 90 option for recording sessions...
  • Page 207 Index hs_recording command hs_shutdown command 35, 39, 83 files hs_status command 24, 85 See also control file hs_terminate_playback command 5, 50, 66, 86 .bat hs_terminate_recording command 49, 74, 86 as playback target data interfaces 12, 13, 14, 21 libctl.cfg sql.ini 12, 16 -i parameter script files...
  • Page 208 Index 21, 34 maximum number of connections 22, 85 22, 35, 38 Monitor Client Library 2, 3 22, 47 Historical Server and start-up 20, 22 Monitor Server 1, 33 11, 22, 35, 38 Adaptive Server and connecting to password Monitor Server name in start-up command Monitor Viewer 1, 3, 4...
  • Page 209 75, 157, 158 -S parameter 22, 47 superuser 11, 22, 34, 38, 47, 85 sample interval 4, 23, 69 Sybase Central 3, 4 sample intervals SYBASE environment variable 12, 21, 34 user-defined in playback script files alarms and User’s Guide...
  • Page 210 Index table column names, in script files tables, creating 71, 97 target of playback session 64, 67 time zones 59, 69 timestamp 23, 170 -U parameter 11, 22, 35, 38 UNIX configuing second server on configuring Historical Server on starting Historical Server stopping on user name user-defined sample intervals...

Table of Contents