SSR Session Management
Session management scripts track and allow modification of sessions. These scripts are executed on management nodes.
Session Management Scripts
Session Management Scripts
ShowSessions.sh
ShowSessions.sh
The ShowSessions.sh script enables you to display the contents of the Current Sessions Table, which tracks IP addresses used by customers. Based on your customization, the following Current Sessions Table fields may be displayed:
CORE UniqueSessionId CreationTime ExpirationTime Ipv4Address IpAddrPool NasName Status UserConcurrencyId MobileIpType 3gpp2ReqType WimaxClientType WimaxAcctFlows Ipv6Address FEATURE AcctAutoStop SessionTimeout ClassAttribute OPTIONAL UserName AcctSessionId TransactionId NasPortType NasPort CallingStationId CalledStationId MobileCorrelationId Ipv6InterfaceId Ipv6Prefix NasIpv4Address NasIpv6Address RADATTR {Specified by admin -- Customizable Current Sessions Table feature} PRIVATE {Specified by admin -- Customizable Current Sessions Table feature}
Syntax
Options
Table 97: ShowSessions.sh Options
Option | Description |
---|---|
-a | Displays information for all sessions. |
-c | Displays only the count of the current session. |
-o | Displays the output as an unordered list. If used with a startaddr argument, displays the session with that address only. If used with startaddr and endaddr arguments, displays only those sessions that have addresses between the specified address range. |
-u username | Displays only those sessions for the specified user. |
startaddr | If used without an endaddr argument, only information about sessions the specified address is displayed. If used with an endaddr argument, only information about sessions addresses in the specified address range is displayed. |
endaddr | Specifies that only information about sessions with addresses in the address range between startaddr and endaddr is displayed. You cannot use the endaddr argument without a startaddr argument. |
-n NASName | Displays information about the sessions associated with the specified NAD. If used with the -c option, displays the number of sessions associated with the specified NAD. |
-h | Displays help for the ShowSessions.sh script. |
Example
The following example displays the output of the ShowSessions.sh script and shows the number of current sessions and all of the information for a session:
hadm$- ShowSessions.sh -c Total Sessions: 1. hadm$- ShowSessions.sh -a CurrentSessions: + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + (1) CORE UniqueSessionId: 'e86cb6d3717ab5331c68e6bf2b8ec6ef'x CreationTime: 2017-08-17 12:44:58 (TZ=+00:00) ExpirationTime: 2017-08-18 12:44:58 (TZ=+00:00) Ipv4Address: 10.212.10.17 IpAddrPool: (n u l l) NasName: "LOCALHOST" Status: Active (2) UserConcurrencyId: (n u l l) MobileIpType: 0 3gpp2ReqType: 0 WimaxClientType: 0 WimaxAcctFlows: Ipv6Address: “3333:0000:0000:0000:0000:0000:0000:4444” FEATURE AcctAutoStop: (n u l l) ClassAttribute: '00'x OPTIONAL UserName: "test" AcctSessionId: "1502973868T2gpu" TransactionId: (n u l l) NasPortType: NULL NasPort: 0 CallingStationId: "somecaller" CalledStationId: (n u l l) MobileCorrelationId: (n u l l) Ipv6InterfaceId: (n u l l) Ipv6Prefix: NULL NasIpv4Address: 127.0.0.1 NasIpv6Address: (n u l l) RADATTR WimaxSessionId: (n u l l) AcctMultiSessionId: (n u l l) FunkOuterUserName: (n u l l) PRIVATE + -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + (end) (end) hadm$-
DelSession.sh
DelSession.sh
The DelSession.sh script enables you to delete all sessions, a particular session identified by its IP address or UniqueSessionID, or sessions associated with a specified IP address pool or NAD from the Current Sessions Table. Executing the DelSession.sh script updates address usage statistics in the IpAddrs table.
Syntax
Options
Table 98: DelSession.sh Options
Option | Description |
---|---|
-a | Specifies that you want to delete all sessions from the Current Sessions Table. |
-f | Specifies that you want to force the deletion of the specified session or sessions. Using the -f option is appropriate when SBR Carrier is not running, and you want to delete sessions directly from the database. Note: Do not use the -f option when SBR Carrier is running. Doing so prevents SBR Carrier from performing other cleanup tasks, such as sending Auto Acct. Stop messages. |
addr | Specifies the IP address of the session you want to delete from the Current Sessions Table. |
uniquesessionid | Specifies the ID of the session you want to delete from the Current Sessions Table. Necessary for sessions that do not have an associated address, such as phantom sessions that are not managed by SBR Carrier. |
-p Poolname | Specifies that all sessions associated with the specified IP address pool should be deleted from the Current Sessions Table. |
-n NASName | Specifies that all sessions associated with the specified NAD should be deleted from the Current Sessions Table. |
-l limit | Specifies the number of session entries (associated with provided pool name or NAD) to be deleted in sequential order from the Current Sessions Table. |
-h | Displays help for the DelSession.sh script. |
Example
The following shows all IP addresses and then deletes all sessions.
hadm$- ShowAddrs.sh IpAddrs: +-----------------+-----------------+-------+-------+------------------+ | IpAddress | Pool | Cache | InUse | LastUse | +-----------------+--------------+-------+-------+---------------------+ | 192.168. 0. 8 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 9 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | | 192.168. 0. 10 | B-GOLD | 0 | 0 | 2005-11-02 14:00:11 | | 192.168. 0. 11 | B-GOLD | 0 | 0 | 2005-11-02 13:52:49 | +-----------------+--------------+-------+-------+---------------------+ hadm$- DelSession.sh -af This will delete all sessions; OK? <yes|no> yes This will set all addrs not-InUse; OK? <yes|no> yes SBRs must be offline; OK? <yes|no> yes hadm$- ShowSessions.sh -a CurrentSessions: +------------------------------------------------------------------+ (end)
Usage Notes
You are not prompted to confirm that you want to delete a session when you execute the DelSession.sh script.
User Concurrency Scripts
User Concurrency Scripts
ShowUserConc.sh
ShowUserConc.sh
The ShowUserConc.sh script enables you to display the contents of the Sbr_UserConcurrency table.
Syntax
Options
Table 99: ShowUserConc.sh Options
Option | Description |
---|---|
-a | Displays all user concurrency information. |
username | Displays all entries whose UserConcurrency ID has the specified username (matching is case-insensitive). UserConcurrency ID’s use the format: authtype-username, where authtype identifies an authentication type or method (uses the format number- or proxyname- |
-h | Displays help for the ShowUserConc.sh script. |
Example
The following example displays all of the user concurrency information in the Sbr_UserConcurrency table.
hadm$- ShowUserConc.sh -a UserConcurrency: +---------+--------+ |Id |Count | +---------+--------+ |0-JANE | 1 | |0-JILL | 10 | |0-JOE | 3 | +---------+--------+
The UserConcurrencyID consists of a prefix identifying the authentication method, a hyphen, and the username. The username is the same as the Sbr_UserName field in the Current Sessions Table.
The authentication method prefix specifies the domain/context in which the username is to be interpreted (a managed database of account names). There are two authentication methods:
Enumerated—Identified by an integer in the range 0–999.
Proxy—Identified by a target-name (for simple proxy) or realm-name (for extended proxy).
For example, 0-JANE, 0 indicates a “native user” enumerated authentication method. See Table 100 for a complete list.
Table 100: Enumerated Authentication Methods
Enumerated Prefix | Method Description |
---|---|
0-User | Native user |
13-User | UNIX user |
14-User | UNIX group |
200-User | All generic plug-in authentication methods |
201-User | SIM user |
400-User | LDAP plug-in authentication method |
500-User | TLS plug-in authentication method |
600-User | TTLS plug-in authentication method |
700-User | PEAP plug-in authentication method |
800-User | JDBC plug-in authentication method |
900-User | Oracle plug-in authentication method |
For more details about the UserConcurrencyID, see Managing User Concurrency with Session State Register . Every entry in the Sbr_UserConcurrency table corresponds to an entry in the Current Sessions Table. The Count field of the Sbr_UserConcurrency table is the number of corresponding entries in the Current Sessions Table. For example:
hadm$- ShowSessions.sh -u Jane CurrentSessions: + -- -- - -- -- -- - -- -- -- - -- -- -- - -- -- -- -- -- -- -- -- -- + (1) CORE UniqueSessionId: '73ca98eedb03a12ba4dbd40400000000'x CreationTime: 2009-05-03 15:02:59 (TZ=+00:00) ExpirationTime: 2009-05-04 15:02:59 (TZ=+00:00) Ipv4Address: 1.0.1.76 IpAddrPool: GOLD (1) NasName: "1.1.2.2" Status: Active (2) UserConcurrencyId: "0-JANE" MobileIpType: 0 3gpp2ReqType: 0 WimaxClientType: 0 WimaxAcctFlows: (n u l l) Ipv6Address: “3333:0000:0000:0000:0000:0000:0000:4444” FEATURE AcctAutoStop: (n u l l) SessionTimeout: (n u l l) ClassAttribute: (n u l l) OPTIONAL UserName: "JANE" AcctSessionId: "0000E326" TransactionId: '73ca98eedb03a12ba4dbd404'x NasPortType: ISDN Sync (2) NasPort: 58,150 CallingStationId: "somecaller" CalledStationId: "somecallee" MobileCorrelationId: (n u l l) RADATTR PRIVATE + -- -- -- -- -- -- -- -- -- -- -- -- -- - -- -- -- --- -- -- -- -- + (end)
DelUserConc.sh
DelUserConc.sh
The DelUserConc.sh script enables you to delete a single UserConcurrency ID from the Sbr_UserConcurrency table.
Syntax
Options
Table 101: DelUserConc.sh Options
Option | Description |
---|---|
userconcurrencyid | Deletes the specified entry (if it exists) from the UserConcurrency table. Matching is exact and case-sensitive, with no initial substring match. |
-h | Displays help for the DelUserConc.sh script. |