对 SIP 容器会话存储库进行故障诊断

对 SIP 容器会话存储库进行故障诊断时,可能需要 SIP 会话详细信息以转储到指定跟踪文件。

关于此任务

可以使用 SIP 会话内存转储实用程序来帮助调试关于 SIP 容器会话的问题。SIP 容器使用 SipContainerMBean 方法对 SIP 容器执行多种可维护性类型操作,包括通过 wsadmin 来启动服务器停顿(命令行界面)。此任务描述您可以如何使用 SipContainerMBean 方法来转储 SIP 应用程序会话和 SIP 会话信息(包含在 SIP 容器的内存间会话存储库中)。您可以通过配置 SIPContainerMBean 方法以使用各种跟踪方法来指定要转储到指定的跟踪文件的 SIP 会话详细信息。

使用 wsadmin 脚本编制启动会话转储方法时,缺省情况下,有关会话的请求信息将输出到 SystemOut.log 文件中或者发送到预定义的源中(如果已通过 setDumpMethod 方法设置)。

如果使用简明会话转储方法,那么仅为每个转储方法执行记录会话标识。

如果您使用详细会话转储方法,那么将发生以下情况:
  • 将为每个转储方法执行记录事务用户详细信息以及 SIP 会话详细信息(如果存在)。
  • 转储到跟踪文件的属性仅是 JSR 289 规范允许显示的属性。
  • 详细方法在跟踪文件中记录以下信息:应用名称、调用标识、对话状态、创建时间和属性名称。

每个 SIP 应用程序发生跟踪记录输出;因此,所有 SIP 会话数据结构在记录之前进行排序。 您可以通过将工作分派到低优先级线程从而将 SIPContainerMBean 转储设施用于生产服务器,以便所有转储都在单独线程上,并且跟踪不会影响总体系统的调用处理延迟。

转储可区分创建了 SIP 会话的事务用户与不含 SipSession 对象的事务用户。转储中还以描绘方式包含了以下类型的 SIP 会话:已不存在的会话,不再有效或在跟踪快照时存在的会话。

表 1. 用于转储 SIP 会话信息的简明 SipContainerMBean 方法. 以下简明 SipContainerMBean 方法用于转储 SIP 会话标识。
方法 描述
dumpAllSASIds() 记录所有 SIP 应用程序会话和 SIP 应用程序会话标识。
dumpAllTUSipSessionIds() 记录事务用户 (TU)(如果存在)中的若干事务用户和 SIP 会话标识。
表 2. 用于转储 SIP 会话信息的详细 SipContainerMBean 方法. 以下详细 SipContainerMBean 方法用于转储 SIP 会话详细信息。
方法 描述
dumpAllSASDetails() 记录所有 SIP 应用程序会话和 SIP 应用程序会话标识详细信息。
dumpAllTUSipSessionDetails() 记录事务用户 (TU)(如果存在)中的若干事务用户以及 SIP 会话标识详细信息。
dumpSASDetails(String sasId) 记录 sasId 参数指定的 SIP 应用程序会话的详细信息。
dumpSipSessionDetails(String sessionId) 记录 sessionId 参数指定的 SIP 会话的详细信息。
注: 使用以下信息来帮助分析记录输出:
  • 对于所有记录输出,第一行提供应用程序名称和若干记录。
  • 输出之间的定界符是制表符
  • 会话属性之间的定界符是 ;(分号)。

过程

  1. 启动 wsadmin 脚本编制客户机。
  2. 确定您要使用简明还是详细 SipContainerMBean 方法。
  3. 将变量、应用设置为 SipContainerMBean 方法中的所有对象。 例如:
    • 使用 Jacl:
      set apps [$AdminControl queryNames type=SipContainerMBean,*]
    • Using Jython:
      apps = AdminControl.queryNames('WebSphere:type=SipContainerMBean,*')
    This command returns the following output:
    • Using Jacl:
      wsadmin>set apps [$AdminControl queryNames type=SipContainerMBean,*]
      WebSphere:cell=<cell_name>,version=<WAS_version>,spec=1.0,name=SipContainerMBeanId,mbeanIdentifier=SipContainerMBeanId,
      type=SipContainerMBean,node=<node_name>,process=server1
    • Using Jython:
      wsadmin>apps = AdminControl.queryNames('WebSphere:type=SipContainerMBean,*')
      	wsadmin>print apps
      WebSphere:cell=<cell_name>,version=<WAS_version>,spec=1.0,name=SipContainerMBeanId,mbeanIdentifier=SipContainerMBeanId,
      type=SipContainerMBean,node=<node_name>,process=server1
  4. (Optional) Use the SipContainerMBean method to specify that you want the trace output to go to a specific file. To use the SipContainerMBean method to configure an output method, call the setDumpMethod method before you call the succinct or verbose memory dump methods; for example:
    setDumpMethod(String_method, String_description) 
    The string_method parameter specifies to use an output method of file and the string_description parameter specifies the file path, including the file name. This method returns a string indication for success or failure. This method only supports setting a specific file for printing; for example:
    setDumpMethod("file", “/opt/IBM/output.log”)
    file 参数值指示将跟踪数据记录到文件,/opt/IBM/output.log 指示要记录的文件的完整路径。

    如果不指定此可选方法,那么输出将发送到 SystemOut.log 文件。

  5. 启动您要对 SipContainerMBean 方法使用的 SIP 内存转储实用程序方法。 指定简明或详细 SipContainerMBean 方法之一;例如:
    • 使用 Jacl:
      $AdminControl invoke $apps<method_name>
    • Using Jython:
      AdminControl.invoke (apps, "<method_name>")
  6. (Optional) Obtain a list of all of the SipContainerMBean methods in use. For example:
    • Using Jacl:
      $Help all $apps
    • 使用 Jython:
      print Help.all(apps)
    此命令会返回以下输出:
    Name: WebSphere:cell=<cell_name>,version=<WAS_version>,spec=1.0,name=SipContainerMBeanId,mbeanIdentifier=SipContainerMBeanId,type=SipContainerMBean,node=<node_name>,process=<server_name>
    Description: null
    Class name: javax.management.modelmbean.RequiredModelMBean
    
    Attribute Type Access
    
    Operation
    void quiesce(boolean)
    void setWeight(int)
    int getWeight()
    int dumpAllSASIds()
    int dumpAllTUSipSessionIds()
    int dumpAllSASDetails()
    int dumpAllTUSipSessionDetails()
    int dumpSASDetails(java.lang.String)
    int dumpSipSessionDetails(java.lang.String)
    java.lang.String setDumpMethod(java.lang.String, java.lang.String)
    
    
    Notifications
    sip.container.overloaded 
    sip.container.overload.cleared 
    jmx.attribute.changed 
    
    Constructors

结果

您已将 SIP 会话内存转储实用程序配置为记录您希望对 SIP 应用程序会话和 SIP 会话使用的跟踪信息级别,以帮助您对 SIP 容器的问题进行故障诊断。

示例

以下示例说明当您在单个应用程序服务器配置中使用 SipContainerMBean 方法时 wsadmin 脚本编制命令和跟踪数据输出。
  • 使用简明 dumpAllSASIds 方法:
    • 使用 Jacl:
      $AdminControl invoke $apps dumpAllSASIds
    • Using Jython:
      AdminControl.invoke (apps, "dumpAllSASIds")
    Results in the following information in the SystemOut.log file:
    dump.ids.test.app1	2
    local.1347524282775_8
    local.1347524282775_7
    此信息以下列格式提供:
    [SAS_ID]  
  • 使用详细 dumpAllSASDetails 方法并指定转储输出记录到 /opt/IBM/output.log 文件中:
    • 使用 Jacl:
      $AdminControl invoke $apps setDumpMethod {{FILE} {/opt/IBM/output.log}}
      $AdminControl invoke $apps dumpAllSASDetails
    • 使用 Jython:
      AdminControl.invoke (apps, "setDumpMethod", ["FILE", "/opt/IBM/output.log"])
      AdminControl.invoke (apps, "dumpAllSASDetails")
    在 /opt/IBM/output.log 中生成以下详细信息:
    dump.ids.test.app1	1
    local.1348147884986_2	Sep 20,2012 16:31	DumpSasDetailsAttr; 
    此信息以下列格式提供:
    [SAS_ID]  [CreationTime] [attributes]
  • 使用简明 dumpAllTUSipSessionIds 方法来记录事务用户的数量以及事务用户中的 SIP 会话标识:
    • 使用 Jacl:
      $AdminControl invoke $apps dumpAllTUSipSessionIds
    • Using Jython:
      AdminControl.invoke (apps, "dumpAllTUSipSessionIds")
    Results in the following information in the SystemOut.log file:
    DumpSessionsTest	1
    local.1349965420866_1_0	true	local.1349965420866_1_0_1
    This information is provided in the following format:
    [TU_ID] [hasSIPSession] [SipSessionId] 
  • 使用详细 dumpAllTUSipSessionDetails 方法来记录事务用户以及事务用户中 SIP 会话标识的详细信息:
    • 使用 Jacl:
      $AdminControl invoke $apps dumpAllTUSipSessionDetails
    • Using Jython:
      AdminControl.invoke (apps, "dumpAllTUSipSessionDetails")
    Results in the following information in the SystemOut.log file:
    DumpSessionsTest	1
    local.1349965420866_1_0	true	local.1349965420866_1_0_1	8-8548@9.148.57.128	2	false	INVITE
    	local.1349965420866_1	Jan 24,2013 14:41	TestSSAttr1; TestSSAttr2;
    This information is provided in the following format:
    [TU_ID] [hasSIPSession] [SipSessionId] [Call-Id] [DialogState] [hasOutgoingTransaction] [initialMethod] [SAS_ID]  [CreationTime] [attributes]
  • 使用详细 dumpSASDetails 方法记录由 sasID 参数指定的 SIP 应用程序会话的详细信息。
    • 使用 Jacl:
      $AdminControl invoke $apps dumpSASDetails  $sasId 
    • Using Jython:
      AdminControl.invoke (apps, "dumpSASDetails ", "sasId")
    Results in the following information in the SystemOut.log file:
    local.1358950127352_20	Jan 23,2013 16:19	TestSASAttr1; TestSASAttr2; 
    If the requested session does not exist, an error message is given; for example:
    ERROR: Requested session <local.1358950127352_20> does not exist.
  • Using the verbose dumpSipSessionDetails method to print the details of the SIP session that is specified by the sessionId parameter:
    • Using Jacl:
      $AdminControl invoke $apps dumpSipSessionDetails $sessionId
    • Using Jython:
      AdminControl.invoke (apps, "dumpSipSessionDetails", "sessionId")
    Results in the following information in the SystemOut.log file:
    local.1358950127352_21_20_1	local.1358950127352_21	Jan 23,2013 16:22	TestSSAttr1; TestSSAttr2; 
    If the requested session does not exist, an error message is given; for example:
    ERROR: Requested session <local.1358950127352_21_20_1> does not exist.

指示主题类型的图标 任务主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tsip_troublesipcontainersess
文件名:tsip_troublesipcontainersess.html