SmartMIB Small Solution:

User Sessions Accounting


(SM-SmallSol00034)

Solution’s SOSL Based management process script:

 

The solution defines the following main modules:

 

MainIdentificationMgt:

This is the main module that controls and instantiates the ‘CheckLoggedUsers’ module.

 

MainDefinedUsers:

This is the main module that controls and instantiates the ‘GetDefinedUsers’ module.

 

 

The details of the Main modules and the transient Service modules are provided below:

 


 

MODULE MainIdentificationMgt ();

DESCRIPTION "";

BEGIN

 

            POLL-FREQ

            {

                        MODULE-CALL CheckLoggedUsers ();

 

                        WAIT (1200);

            };

END

 


 

MODULE MainDefinedUsers ();

DESCRIPTION "";

BEGIN

 

            POLL-FREQ

            {

                        MODULE-CALL GetDefinedUsers ();

 

                        WAIT (1200);

            };

END

 


 

MODULE GetDefinedUsers ();

DESCRIPTION "Users information";

BEGIN             

            ALL-DEV BY DEV

            {

                        SET-INDEX svUserTable ( svUserName );

                        SET-INDEX svSessionTable ( svSesUserName );

            };

END

 


 

MODULE CheckLoggedUsers ();

DESCRIPTION "Logged Users";

BEGIN             

 

            ALL-DEV BY DEV

            {

                        DEFINE strUserName  DISPL;

                        DEFINE strLoggedUser  DISPL;

                        DEFINE intLoggedUserStatus  INT;

 

                        WITH-INDEX svUserTable

                        {

                                    DEFINE dbintUserLogStatus  DB INT;

                                    DEFINE dbstrLogDate  DB DISPL;

                                    DEFINE svUserName  DB DISPL;

 

                                    strUserName = svUserName;

 

                                    WITH-INDEX svSessionTable

                                    {

                                                DEFINE svSesUserName  DB DISPL;

 

                                                strLoggedUser = svSesUserName;

 

                                                IF (strUserName == strLoggedUser)           

                                                THEN

                                                        intLoggedUserStatus = 1;

                                                ENDIF;

                                    };

 

                                    IF ( dbintUserLogStatus == 1 AND

                                          intLoggedUserStatus == 0  )

                                    THEN

                                            dbintUserLogStatus = 0;

                                            dbstrLogDate = GETDATE("yyyy/MM/dd  HH:mm:ss");

                                    ELSEIF (  dbintUserLogStatus == 0 AND

                                                 intLoggedUserStatus == 1 )

                                    THEN

                                            dbintUserLogStatus = 1;

                                            dbstrLogDate = GETDATE("yyyy/MM/dd  HH:mm:ss");

                                    ENDIF;

                        };

            };

END

 


User Sessions Accounting Index Page

Previous Page Page 4/6 Next Page


[Small Solutions], [Professional Solutions], [Security Solutions], [Development Solutions]

[Home], [About], [Solutions Center], [NMS Market], [Products & Services],
[Management Technology], [Technical Support], [Contact us], [Site Map]