<%! /********************************************************************** ** ** SAP AG Walldorf ** (C) Copyright SAP AG 1999-2010 ** ***********************************************************************/ #include "publicincl/tools.inc" struct wdisp_session_info_type { boolean store_hash; int max_logon_groups; int entry_timeout; int entry_count; int peek_count; int max_count; int mem_usage; boolean overflow_flag; }; struct wdisp_session_entry_type { string sid; string logon_group; int sessionid; string server_inst; string last_used; int use_count; string is_default_server; }; struct wdisp_logon_group_entry_type { int group_index; string sid; string group_name; string default_server_inst; string default_server_last_used; }; %> <% int count, rc, dir, max; string browser, sstr; string tabsel; int i, nr; struct wdisp_session_info_type wdisp_session_info; struct wdisp_session_entry_type wdisp_session_entry[]; struct wdisp_logon_group_entry_type wdisp_logon_group_entry[]; struct icm_sort_type sort_tab[]; const string ssort = "../public/images/sort.gif"; const string sasc = "../public/images/sortasc.gif"; const string sdesc = "../public/images/sortdesc.gif"; string tab_header[3]; string tab_content[3]; string tab_tabsel[3]; tab_header[0] = "Show session dispatching info"; tab_header[1] = "Show logon groups"; tab_header[2] = "Show contents of dispatching table"; tab_tabsel[0] = "tab0"; tab_tabsel[1] = "tab1"; tab_tabsel[2] = "tab2"; browser = __icm_get_browser_type(); dir = __icm_get_form_field ("dir"); sstr = __icm_get_form_field ("sstr"); tabsel = anumenc(__icm_get_form_field ("tabsel")); if (tabsel == "") tabsel = "tab0"; %> Table test
Session Dispatching Monitor Refresh

<% for (nr = 0; nr < 3; nr++) { %> <% } %>
class="sapTbsTabSel"> <%=tab_header[nr]%> <% } else { %> class="sapTbsTab"> <%=tab_header[nr]%> <% } %>
<% if (tabsel == "tab0") { rc = __wdisp_session_hdl (1, wdisp_session_info); if (rc == -1) { %>
No information available
<% } else { %>
 
Max. number of logon groups: <%= wdisp_session_info.max_logon_groups %>  
Logon group support: <%= wdisp_session_info.store_hash %>  
Size of shared memory table: <%= wdisp_session_info.mem_usage %> (Bytes)  
Entry timeout: <%= wdisp_session_info.entry_timeout %> (sec) Purge outdated entries
Max. number of entries: <%= wdisp_session_info.max_count %> <% if (wdisp_session_info.overflow_flag) __output (" (already reached)"); else __output (" (not reached)"); %>  
Current number of entries in table: <%= wdisp_session_info.entry_count %>  
Peek number of entries in table: <%= wdisp_session_info.peek_count %>  
Maximum table entries reached: <%= wdisp_session_info.overflow_flag %>  
<% } } else if (tabsel == "tab1") { count = __wdisp_session_hdl (4, wdisp_logon_group_entry); if (sstr != "") sort (wdisp_logon_group_entry, dir, sstr); sort_tab[0].header = "No."; sort_tab[0].tool = "Sort by index"; sort_tab[0].ffield = "group_index"; sort_tab[1].header = "SID"; sort_tab[1].tool = "Sort by SAP System Id"; sort_tab[1].ffield = "sid"; sort_tab[2].header = "Logon Group Name"; sort_tab[2].tool = "Sort by Logon Group name"; sort_tab[2].ffield = "group_name"; sort_tab[3].header = "Default Server Instance"; sort_tab[3].tool = "Sort by default Server Instance"; sort_tab[3].ffield = "default_server_inst"; max = arraylen(sort_tab); for (i=0; i < max; i++){ sort_tab[i].url = ssort; sort_tab[i].dir = 0; } for (i=0; i < max; i++){ if (sstr == sort_tab[i].ffield){ if (dir == 1) { sort_tab[i].url = sdesc; sort_tab[i].dir = -1; } else if (dir == -1) { sort_tab[i].url = sasc; sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } %> <% max = arraylen(sort_tab); for (i=0;i < max; i++) { %> <% } %> <% for (nr = 0; nr < count; nr++) { %> <% } if (count > 100) { %>
Logon Groups
<%=sort_tab[i].header%> Last usage
<%= wdisp_logon_group_entry[nr].group_index %> <%= wdisp_logon_group_entry[nr].sid %> <%= wdisp_logon_group_entry[nr].group_name %> <%= wdisp_logon_group_entry[nr].default_server_inst %> <%= wdisp_logon_group_entry[nr].default_server_last_used %>
Table Entries
<% } } else { count = __wdisp_session_hdl (2, wdisp_session_entry); if (sstr != "") sort (wdisp_session_entry, dir, sstr); sort_tab[0].header = "SID"; sort_tab[0].tool = "Sort by SAP System Id"; sort_tab[0].ffield = "sid"; sort_tab[1].header = "Logon Group"; sort_tab[1].tool = "Sort by Logon Group"; sort_tab[1].ffield = "logon_group"; sort_tab[2].header = "Session Id Hash"; sort_tab[2].tool = "Sort by Session Id Hash"; sort_tab[2].ffield = "sessionid"; sort_tab[3].header = "Destination Server"; sort_tab[3].tool = "Sort by Destination Server name"; sort_tab[3].ffield = "server_inst"; sort_tab[4].header = "Dispatch Count"; sort_tab[4].tool = "Sort by number of dispatched requests"; sort_tab[4].ffield = "use_count"; max = arraylen(sort_tab); for (i=0; i < max; i++){ sort_tab[i].url = ssort; sort_tab[i].dir = 0; } for (i=0; i < max; i++){ if (sstr == sort_tab[i].ffield){ if (dir == 1) { sort_tab[i].url = sdesc; sort_tab[i].dir = -1; } else if (dir == -1) { sort_tab[i].url = sasc; sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } else sort_tab[i].dir = 1; } %> <% } %> <% for (nr = 0; nr < count; nr++) { %> <% } if (count > 100) { %>
Table Entries
No. <% max = arraylen(sort_tab); for (i=0;i < max; i++) { %> <%=sort_tab[i].header%> Last Used Default Server
<%= nr %> <%= wdisp_session_entry[nr].sid %> <%= wdisp_session_entry[nr].logon_group %> <%= wdisp_session_entry[nr].sessionid %> <%= wdisp_session_entry[nr].server_inst %> <%= wdisp_session_entry[nr].use_count %> <%= wdisp_session_entry[nr].last_used %> <%= wdisp_session_entry[nr].is_default_server %>
Table Entries
<% } } %>