Information for Riverbed Modeler Users

The remainder of this document contains information for model developers (such as Riverbed Modeler users). The following sections discuss the topics necessary for understanding the internal details of and interfacing to the Server model.

Model Architecture

The following diagram illustrates a typical node model where the Server model resides. The process models used by the Server models reside in the CPU processor.

Figure 527: Process Models Reside in CPU Processor

Process models reside in CPU processor

Table 202: Process Models

Process Model Description
server_definer Contains network wide information such as hardware configuration information, and server independent job definitions.
server_mgr This is the root process of the server module. For Simple CPU modeling, it provides the interface to the oms_resource package.
server_dispatch Spawned by server_mgr, this process is responsible for starting and stopping jobs within the server.
server_cpu Spawned by server_mgr, this process is responsible for managing the server’s CPU resources, such as scheduling and scaling according to processor ratings
server_disk Spawned by server_mgr, this process implements the storage partitions, physical disk simulation, including the disk interfaces and the disk drives.
gna_remote_storage_mgr Spawned by gna_clsvr_mgr on all nodes with “Server: Modeling Method” set to “Detailed Server”
gna_remote_storage_client Spawned by gna_remote_storage_mgr on receiving a request from the server disk process model to initiate access to a remote server’s storage partition
gna_remote_storage_server Spawned by gna_remote_storage_mgr to accept requests to access storage partition from remote clients

Model Interfaces

The following sections discuss the topics necessary for interfacing with the Server model.

Packet Formats

No packets are used by the server models. All network transfers are performed using the custom application models.

ICI Formats

The following table lists the interface control information (ICI) formats used in the Server model suite.

Table 203: ICI Formats

ICI Description
server_dispatch_ici This ICI is used in the server_dispatch process model to pass job information between states.
server_job_ici This ICI is used by the server processes to pass information about an executing job. It is passed between the processes by the OMS_Server package using process interrupts.
server_remote_storage This ICI is used in the server_disk process model to communicated with the gna_remote_storage_client process model.
oms_job_data This ICI is created by the server_dispatch process model to pass job completion information to the submitting process.

Indications

The interface between the server and the application is based on function calls to the OMS_Server package and on indications returned to the application from the server. The commands and indications are identified by symbolic constants defined in the C header file oms_server.h (located in the <models>/std/include directory); any applications that interact with the server model should see this file to obtain these definitions.

The server models currently use just one indication.

Table 204: Indication Descriptions

Indication Description
OMSC_JOB_COMPLETE Indicates that a job (or partial job) has completed.

Application Layer Interfacing

It is strongly recommended that applications access the server’s capabilities only through the Server API. The following table lists the main functions available from this package.

Table 205: API Package Description

ServerT_Job_Table_Handle Server_Get_Job_Table_Handle (Objid node_id)
  • Purpose: Obtain a handle to the job table—this is required for job creation
  • Arguments: Object ID of the server containing the application process
  • Return Value: Handle containing job information needed on all subsequent calls to the API
ServerT_Job_Handle Server_Create_Job (ServerT_Job_Table_Handle job_table_handle, const char *job_name)
  • Purpose: Creates a new job instance
  • Arguments:
    • Handle returned from a call to Server_Get_Job_Table_Handle()
    • The name of a job defined in the server’s job table.
  • Return Value: Handle associated with this job instance
ServerT_Job_Handle Server_Create_Dynamic_Job (ServerT_Job_Table_Handle job_table_handle, const char *job_name, const char *baseline_server, const char *job_class, const char *cpu_time, int priority, const char *page_fault, const char *n_reads, const char *n_writes, const char *read_block_size, const char *write_block_size, List *read_storage_partition_distribution, List *write_storage_partition_distribution)
  • Purpose: For cases where a job’s details are dynamic. When a job goes to completion, it ceases to exist.
  • Arguments:
    • Handle returned from a call to Server_Get_Job_Table_Handle()
    • The name of the job. If the job name exists in the job table, it will use information such as read/write disk distributions. If it doesn’t exist, the name will only be used for statistic reporting
    • The name of the server type on which the measurements were made. If set to OPC_NIL, it will be assumed that the measurements were made on the same type of server as the one containing the application
    • The job class used for job scaling, as defined in the Server Configuration object. This may be OPC_NIL only if the baseline_server is set to OPC_NIL
    • A distribution string describing the CPU requirements of this job
    • The processing priority of the job from 0 (lowest) to 9 (highest)
    • A distribution string describing the page fault count of this job
    • A distribution string defining the number of disk read operations performed by this job
    • A distribution string defining the number of disk write operations performed by this job
    • A distribution string defining the size of disk read operations performed by this job
    • A distribution string defining the size of disk write operations performed by this job
    • List containing the names of the storage partition and their associated access weight for read
    • List containing the names of the storage partition and their associated access weight for write
  • Return Value: Handle associated with this job instance
Boolean Server_Job_Handle_Valid (ServerT_Job_Handle job_instance)
  • Purpose: Check if the job instance handle is valid.
  • Arguments: Handle associated with a job instance
  • Return Value: TRUE if the job handle is valid, FALSE otherwise I
void Server_Process_Job (ServerT_Job_Handle job_instance, Prohandle calling_proc, void* job_data)
  • Purpose: Execute a job to completion
  • Arguments:
    • Handle associated with a job instance
    • Process which receives a process interrupt upon job completion. The interrupt code will have a value of OMSC_JOB_COMPLETE
    • Information to be passed to the interrupted process
  • Return Value: None
void Server_Process_Partial_Job (ServerT_Job_Handle job_instance, Prohandle calling_proc, void* job_data, double execution_units, double total_execution_units)
  • Purpose: Executes a portion of a job
  • Arguments:
    • Handle associated with a job instance
    • Process which receives a process interrupt when the job segment completes. The interrupt code will have a value of OMSC_JOB_COMPLETE
    • Information to be passed to the interrupted process
    • Numerator of the job fraction to be completed
    • Denominator of the job fraction to be completed
  • Return Value: None
void Server_Close_Job (ServerT_Job_Handle job_handle)
  • Purpose: Complete a job instance. Writes any outstanding statistics and frees resources associated with the job.
  • Arguments: Handle associated with a job instance
  • Return Value: None
void Server_Abort_Job (ServerT_Job_Handle job_handle)
  • Purpose: Abort a job instance and clean up resources associated with it.
  • Arguments: Handle associated with a job instance
  • Return Value: None

Using the package requires including “server_api.h” in your process header block, and declaring “server_support” as an external file.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com