Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation  Back up to About Overview 
  
[+] Expand All
[-] Collapse All

SSR Session Management

Session management scripts track and allow modification of sessions. These scripts are executed on management nodes.

Session Management Scripts

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
FEATURE
AcctAutoStop
SessionTimeout
ClassAttribute
OPTIONAL
UserName
AcctSessionId
TransactionId
NasPortType
NasPort
CallingStationId
CalledStationId
MobileCorrelationId
RADATTR
{Specified by admin -- Customizable Current Sessions Table feature}
PRIVATE
{Specified by admin -- Customizable Current Sessions Table feature}

Syntax

ShowSessions.sh ShowSessions.sh -a ShowSessions.sh -c ShowSessions.sh -o ShowSessions.sh -u username [ startaddr [ endaddr]] ShowSessions.sh startaddr [ endaddr]] ShowSessions.sh -h ShowSessions.sh [-c] -n NASName

Options

Table 96: 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: '5116666cdb03a12ba4dbd40400000000'x
        CreationTime: 2009-05-02 16:15:00 (TZ=+00:00)
    ExpirationTime: 2009-05-03 16:15:00 (TZ=+00:00)
        Ipv4Address: 1.0.0.0
        IpAddrPool: GOLD (1)
        NasName: "1.1.2.2"
            Status: Active (2)
UserConcurrencyId: "0-GOLDUSR"
FEATURE
    AcctAutoStop: (n u l l)
    SessionTimeout: (n u l l)
    ClassAttribute: (n u l l)
OPTIONAL
    UserName: "GOLDUSR"
    AcctSessionId: "0000E2AC"
    TransactionId: '5116666cdb03a12ba4dbd404'x
    NasPortType: ISDN Sync (2)
    NasPort: 58,028
    CallingStationId: "somecaller"
    CalledStationId: "somecallee"
    MobileCorrelationId: (n u l l)
RADATTR
PRIVATE
+ - -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- + (end)
(end)
hadm$- 

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

DelSession.sh [-f] -a DelSession.sh [-f] addr DelSession.sh [-f] uniquesessionid DelSession.sh [-f] -p Poolname [-l limit]DelSession.sh [-f] -n NASName [-l limit] DelSession.sh -h

Options

Table 97: 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

ShowUserConc.sh

The ShowUserConc.sh script enables you to display the contents of the Sbr_UserConcurrency table.

Syntax

ShowUserConc.sh ShowUserConc.sh -a ShowUserConc.sh username ShowUserConc.sh -h

Options

Table 98: 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 99 for a complete list.

Table 99: 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

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"
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

The DelUserConc.sh script enables you to delete a single UserConcurrency ID from the Sbr_UserConcurrency table.

Syntax

DelUserConc.sh DelUserConc.sh userconcurrencyid DelUserConc.sh -h

Options

Table 100: 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.

Modified: 2017-03-07