Network monitoring system for tracking, billing and recovering licenses5717604Abstract A network monitoring system operates on a computer including processor for running a multi-tasking operating system capable of having active and inactive windows. The computer is connected to a server or a service which provides access to a user application subject to a license restriction. When the user application is associated with the active window, the user application is executed by the processor. A license recovering system includes a display coupled to the processor for displaying a user interface of the operating system. A user prompting device, run by the processor, the display and associated with an inactive window, prompts a user when the the inactive window has been inactive for a period greater than a first predetermined period. A closing device closes the user application when the inactive window has been inactive for a period greater than a second predetermined period. The network monitoring system also includes a real-time billing system for billing the computer user for access time to the user application subject to the license restriction to alleviate problems occurring in shared license pools on a network. The network monitoring system also includes a user priority system which defines user priorities for the application shared on the network. The priority system closes a current user accessing the user application if the priority of a new user requesting access is greater than the priority of the current user or if the application of the current user is idle. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
______________________________________
I. License Monitoring and Recovering Code Structure
______________________________________
A. Declarations
declare Windows .RTM. API functions
declare Windows .RTM. API Constants
declare program global variables
B. Functions
Functions are specifically called in.
Function IsSucces
check program return code after trying to connect to
a network drive and return status
Function DisSuccess
check program return code after trying to disconnect
from a network drive and true status
Function Drive.sub.-- in.sub.-- use
check the active task list for any program using
this drive and return true or false
C. Events
Events can happen at any time
1. QueryUnload
check unload mode
if attempting to unload from the main program, ok
if attempting to unload because windows is exiting, ok
if attempting to unload from anywhere else, display
message to close the running application first.
2. Timer1
every chktime seconds, get the instance of the current
active window
if current active window is not `our` window
increment timer interval
check to see if the elapsed time is grater than
idletime
if so, display idlemessage and set the dialog
to modal if ismodal is true
reset the timer interval and continue
if current window is `our` window, reset the timer
interval and continue
3. Timer2
every chktime seconds, get the instance of the current
active window
if current active window is not `our` window
increment timer interval
check to see if the elapsed time is greater than
closintime
if so, send message to the application to close
reset the timer interval and continue
if current window is `our` window, reset the timer
interval and continue
D. Main
disable timer events; Timer1 and Timer2
initialize local variables
find this program window and hide it from the windows
task list
set up the initialization file string based on the program
path
verify that the initialization file is a valid file
process the command line, checking for errors
parse the command line string for the application name and
optional program startup parameters
check for the special command line word "ABOUT"
if "ABOUT", open the diagnostic dialog box
wait to close dialog and then end program
open the initialization file
read the service variables;
drive the drive letter to map the serve (share)
service the service (share) to attach to
program the program to run
dummy1 username
dummy2 password
ismodal characteristic of idle message dialog box
build the program string from program and drive
build username and password string from dummy1 and
dummy2 if specified
check to see if we are already connected to the service
read the program setup variables;
setupgpgm the setup program to run to install the
application
appnstlfile the file to check for to indicate if the
application is installed
appnstldisk the disk to install the application on
appnstlspace the required disk space to install this
application
check to see if the application is installed by checking for
appnsrlfile
in not installed
if so,
check for the setup program setuppgm and
set the main program to be the setup program
verify enough free space on drive appnstldisk
by checking against size appnstlspace
if not end the program
if installed, read the miscellaneous variables
meterfile the file used to log the connect,
disconnect, terminate and idle times
sound1 the sound played when a drive is
connected to the service
sound2 the sound played when an application
terminates
sound3 the sound played when the drive is dis-
connected from the service
spawnandend a parameter to indicate that the application
will launch another program and
immediately terminate
altworkingdir the path of an alternate working directory
for the application
idletime the allowed application idle time
chktime the frequency of the events; Timer1 and
Timer2
idlemessage the message displayed when the application
has been idle longer than idletime
closintime the allowed maximum idletime before the
application is automatically closed
maxusers the maximum number of users licensed to
run the application
whofile the name of the license file that will
keep track of who and how many users are
using the application
alwhodrive the drive letter of an alternate who file
alwhofile the file name of an alternate license file
alwhoservice the name of the service containing the
alternate license file
close the initialization file
read the DOS environment variable NODE
check for the license file whofile
see if the file whofile exists
if not, create the file and write the sections;
application name and maxusers
if so, check to see if this application name is
registered
if this application name is not registered,
register it
if it is registered, update maxusers
read the application name section, get maxusers
and the number of current users
see if this NODE is registered
if the current users equals maxusers, check for an
alternate license file altwhofile
if an alternate is specified
connect the alternate license server to
altwhoservice
verify the connection by calling function
IsSuccess
if successful continue
if not,
display message indicating no available
licenses
write entry in the meterfile
end program
read the altwhofile to check if current users is less than
maxusers
if so, continue
if not
display message indicating no available
licenses
write entry in the meterfile
attempt to disconnect the drive
verify disconnection by calling DisSuccess
end program
otherwise update the whofile or altwhofile and
continue
if we are not connected, try to connect to the service
verify the connection by calling function IsSuccess
if successful continue
if not
display message indicating connection failure
write entry in the meterfile
end program
if we connect,
play sound1
write entry in meterfile indicating NODE, application
name, status and time
change default drive and directory to altworkingdir if
specified
enable timer events; Timer1 and Timer2
try to run the application
if not
generate message
disconnect drive
end program
shell the application and keep track of it's instance
wait for the application program to exit
if the program has exited, check for spawnandend
if spawnandend, get the spawned windows instance
and keep track of it
disable timer events; Timer1 and Timer2
play sound2
call function Drive.sub.-- in.sub.-- use to see if any other program is
using this drive
if the drive is in use by any other program
if no other copies of this application are still running, up-
date the whofile or altwhofile
update the meterfile
end program
if no other application is using the drive, attempt to dis-
connect it
call function DisSuccess to verify disconnection
play sound3
update the whofile or altwhofile
update the meterfile
end the program
______________________________________
II. INI File The software for license recovering procedure 100 checks for an application name on the command line. Command line parameters can be used after the application name. For example: Command Line: SEAMSTRs Excel C:.backslash.mydata.xls Command Line: SEAMSTRS Word Where SEAMSTRS.TM. or SEAMSTRESS.TM. is the command line name of the network monitoring system. The application name on the command line should match one of the application names in the .INI file. The .INI file specifies the application, services, drive letter, program, install file, set-up program, disk space, username, password, sound files, meter log file, timer interval, idletime, idlemessage and/or message type. For example. the .INI file can have the following format:
______________________________________
A. INI FILE EXAMPLE
›MSInfo!
Drive=j:
service=.backslash..backslash.cwsrv1.backslash.word60a
dummy1=testuser
dummy2=testme
dummy3=test
program=.backslash.msapps.backslash.msinfo.backslash.msifo.exe
Appnstlfile=c:.backslash.joesch.moe
SetupPgm=.backslash.winwword.backslash.setup.exe
Appnstlspace=1000
Sound1=c:.backslash.windows.backslash.tada.wav
Sound2=c:.backslash.windows.backslash.chord.wav
Sound3=c:.backslash.windows.backslash.chimes.wav
MeterFile=zapplictn.mtr
IsMsgModal=false
chktime=60
idletime=1800
idlemessage="Please be considerate of others."
SpawnandEnd=YES
MaxUsers=10
WhoFile=z:.backslash.whofile.who
AltWhoDrive=0:
AltWhoService=.backslash..backslash.fesrv2.backslash.wingrp
AltWhoFile=.backslash.altfile.who
›Word!
Drive=j:
service=.backslash..backslash.cwsrv1.backslash.word60a
. . . etc . . .
{Excel!
. . . etc . . .
›PowerPoint!
. . . etc . . .
______________________________________
B. INI File Parameters 1. Appname The first Keyname is Appname which is preferably a one word name for the application which corresponds to the application name specified on the command line. The Appname will appear as the title on generated message boxes. For example, ›MSInfo!. 2. Drive Drive specifies the drive letter to map to the file service (share). This must be a single letter less than or equal to last drive (in CONFIG.SYS) followed by a colon (:). For example, Drive=J. 3. Service Service specifies the file service (share) name. It should be in .backslash..backslash.server.backslash.service format. For example, service=.backslash..backslash.cwsrv1.backslash.word60. The service can be server 20, service provider 36, or any other network with a shared license pool. 4. Dummy Dummy1 specifies the Username for service connection. This is used for Pathworks.TM. services where the DOS.RTM. use command is; use j .backslash..backslash.server.backslash.service%username password Dummy1 is optional. example; dummy1=testuser Dummy2 specifies the password for service connection. This is used for Pathworks.TM. services where the DOS use command is; use j: .backslash..backslash.server.backslash.service%username password or services where the command is; use j: .backslash..backslash.server.backslash.service password Dummy2 is optional. example; dummy2=testme Dummy3 is truly a dummy variable. It is simply used to throw off nosy users. Dummy3 is optional. example; dummy3=test In this example the fully qualified connection will look like; Drive: Service%Username Password or j: .backslash..backslash.cwsrv1.backslash.word60%testuser testme 5. Program Program specifies the path of the program to execute. Do not include the drive letter. It will be automatically appended to form the full path. Program is required. example; program=.backslash.msapps.backslash.msinfo.backslash.msinfo.exe In this example we will connect j: to service .backslash..backslash.cwsrvl.backslash.word60%.backslash.testuser testme and run the program j:.backslash.msapps.backslash.msinfo.backslash.msinfo.exe 6. Apphstlfile Appnstlfile specifies the path of a file. This file if it exists, indicated that the program is already installed. So after we connect we will run Program. This file and path normally point to a specific file on the users local disk. If this file is not found, then the program has not been installed. So if not found, we will not run Program. For example, Appnstlfile=c:.backslash.joesch.moe. 7. SetupPgm SetupPgm specifies the path of a setup program. If Appnstlfile file did not exist we will run SetupPgm if it exists. This program is usually SETUP.EXE. example; SetupPgm=.backslash.winword.backslash.setup.exe 8. AppNst1Space AppNst1Space specifies the minimum amount of space, in KB, on drive c: required to install (setup) the program. If AppNst1Space is less than the amount of free space on c:, we will run SetupPgm if it exists. This program is usually SETUP.EXE. AppNst1Space is optional. The default is 1000 KB (1 MB). example; AppNst1Space=10000 9. Sound1 Sound1, Sound2 and Sound3 are standard .WAV files that can be used for diagnostics. You must have a media player (sound driver) installed on the PC. Sound1 is played when the service (share) is connected. Sound2 is played when the application terminates. Sound3 is played when the service (share) is disconnected. example; Sound1=c:.backslash.windows.backslash.tada.wav Sound2=c:.backslash.windows.backslash.chord.wav Sound3=c:.backslash.windows.backslash.chimes.wav Sound1, Sound2 and Sound3 are optional. You can use one, two, all or none. 10. Chktime Chktime is the resolution of the timer clock that checks the application. Every Chktime check to see if the application is idle. To check more often decrease Chktime. To check less often increase Cktime. Chktime is specified in seconds. If specified Chktime must be greater than 10 seconds. For example, Chktime=60 checks if the application is idle every minute. 11. Idletime Idletime is the number of seconds that the application can be idle. Idletlme is specified in seconds. If specified Idletime must be greater than Chktime. example; Idletime=1800 Check to see if the application has been idle for 30 minutes. If idle longer than Idletime display Idlemessage. Idlemessage is the text of the message sent to the user when Idletime expires. Chktime, Idletime and Idlemessage all work together and all should be specified or none should be specified. For example, idlemessage="Please be considerate of others." 12. IsMsgModal IsMsgModal indicates whether the idlemessage box is modal or not. If the message is modal than the user must acknowledge the message box before they can proceed in any application. If the message is not modal, the user does not have to acknowledge it to proceed. The default is modal. To disable set IsMsgModal to false. For example, IsMsgModal=false. 13. MeterFile MeterFile is the full path of the meter log file. This file path name should include the drive letter as well. This file is normally created (by this program) on the server as a user read, write file. The meter file can be located at service provider 36, PC 22, or anywhere else. If the file is not found it will be created. The file will contain comma separated information as follows; "Status", "Date&Time", "Node", "message count", "Appname": Where "Status" is 0 for connection rejected 1 for connected; and 2 for disconnect. "Date&Time" is the current date and time. "Node" is a DOS environment variable identifying the node. For example, SET NODE=CTCW from a DOS batch file. "Message count" is a count of idlemessages sent to the user. "Appname" is the application name from Appname above. For example, "2","2:47:18 PM 2/11/94","ctcw","0","Word"; MeterFile=z:applictn.mtr 14. SpawnandEnd SpawnandEnd identifies a situation in which that the main program begins and spawns a second process to do the work and the main program almost immediately terminates. (This special situation can be detected with the diagnostic sound enabled. When the connected sound occurs, the application runs and the terminate sound occurs, even though the application is still running.) If specified, this flag will pick up on the spawned program and keep track, even though the main program terminated. (The only currently known application is PowerPoint 4.0) The default is not enabled (normal). To enable set SpawnandEnd to yes. 15. WhoFile WhoFile is the full path of the license compliance file. This file path name should include the drive letter as well. This file is normally created (by this program) on the server as a user read/write file. This file can be created on at service provider 36, PC 22 or anywhere else. If the file is not found it will be created automatically (done the first time.) The file will contain the following information: ›Appname!; MaxUsers=number; CurrentUsers=number; Node=status; Node=status; etc. where "Appname" is a copy of the application name; "MaxUsers" is a copy of the MaxUsers number (both Appname and MaxUsers are simply copied out of the .INI file); "CurrentUsers" is the number of active nodes; Nodes is a DOS environment variable identifying the user; "status" is: active if the node is currently running Appname and "idle" if the node is no longer running Appname but once did. C. Alternate Files Normally, if the maximum number of users (MaxUsers) are running the application, the next user will be denied connection. By using an alternate file, the program will connect to the alternate file service (share) and check the alternate license file. If there are unused licenses (CurrentUsers<MaxUsers) on the alternate (backup) server, a license copy from the alternate server is used. This allows the creation of a pool of licenses across two servers. For example, server A has 10 copies of a word processor and server B has five copies of a word processor. If the 11th user on server A tries to run Word, the network monitoring system 100 attempts to borrow a license from server B (and/or vice versa) instead of immediately blocking the connection. 1. AltWhoFile AltWhoFile is the path of the backup (alternate) license compliance file. Do not include the drive letter. This file is normally created (by this program) on the server as a user read/write file. This file will be similar to the main WhoFile only it would have been created any application running from the AltWhoService. For example, AltWhoFile=.backslash.altfile.who. 2. AltWhoDrive AltWhoDrive specifies the drive letter to map to the file service (share) containing the alternate backup license file. This must be a single letter less than or equal to last drive (in CONFIG.SYS) followed by a colon. For example, AltWhoDrive=p:. 3. AltWhoService AltWhoService specifies the file service (share) name of the alternate or backup license file (whofile). It should be in .backslash..backslash.server.backslash.service format. This share must have public access. For example, AltWhoService=.backslash..backslash.cwsrv2.backslash.wingrp In use, a network monitoring system according to the invention allows the PC 22 running a multi-tasking operating system to connect and disconnect to application services provided by server 20 or service provider 36. The network monitoring system monitors application usage and creates a log file of application start, stop, connection rejection and set-up events. The network and monitoring system automates application set-up. The network and monitoring system determines if an application is installed, and if not, can call a set-up program to install the application. The network monitoring system checks for required disk space to install the desired application. License recovering procedure 100 of the network monitoring system monitors idletime for an application and allows a system operator to set a first predetermined period. If the application is idle longer than the first predetermined period, a idle reminder message is displayed using a user interface of the multi-tasking operating system. The license recovering system also closes idle applications if the idletime exceeds a second predetermined period (closintime). Thus, the idle reminder message makes the user aware that others may need access to an idle application. If the user ignores the idle reminder message, the license recovering procedure closes the idle application to allow use by other network users. Additionally, the network monitoring system meters the number of concurrent users running an application. If enabled by the system operator, the network monitoring system can check out licenses from a back-up server. The network monitoring system is an algorithm executed by microprocessor 40 of multi-tasking PC 22. In a highly preferred embodiment, the network monitoring system can be written in Microsoft Visual Basic.RTM. using standards Windows.RTM. API calls. Input parameters can be set by an operator using a single .INI file to specify application parameters. The network monitoring system is capable of handling programs requiring command line parameters. The network monitoring system according to the present invention is invisible to the user. The main code is not "visible" from the Windows.RTM. task manager. The code can only be terminated by ending the application or ending Windows.RTM.. The code uses little heap resource. A log file is written in coma separated format and is easily imported into any spreadsheet. The diagnostics use standard .WAV files to indicate service connection, application termination and service disconnection. The network monitoring system allows an operator to have security. The network monitoring system allows for username and/or password protection for shared file services. The username/password protection ensures that this is the only way to access the shared applications. The network monitoring system uses built-in server connection limits which enforces maximum user connections to ensure license compliance. The network monitoring system can also provide license pooling across servers with an alternate license file on a back-up server. IV. Real Time Billing Procerdure While real-time billing a PC for access to a service provider when the PC operates in a terminal mode is known, real-time billing of the PC which operating in a client or workstation mode is not. In FIG. 6, a real-time billing procedure 230 for the network monitoring system is illustrated along with its associated data structure 240 which includes a username timer variable. Real-time billing procedure 230 begins at step 244 where control determines whether an application is opened by the user. If not, control loops until the application is opened by the user. If the application is opened by the user, the username is recorded at the service, in an encrypted or user inaccessible file on PC 22, on server 20, or any other location in step 248. A username timer is started at step 250. Control determines whether the user has terminated the application at step 252. If not, control loops until the user does terminate the application. When the user terminates the application at step 252, control stops the username timer at step 254. In use, a user operating PC 22 opens the application. The network monitoring system of PC 22 generates a connection MeterFile (containing a connection indicator, application name, username, date and time) which is output to an application MeterFile storage located at PC 22, the server 20, the service provider 36, or any other suitable location. The user is connected to a shared application as described above. However, rather than requiring the user to sign out a license, the real-time billing procedure tracks the amount of time the user accesses the application. In other words, the real-time billing procedure tracks the amount of time the application is associated with active and inactive windows of the multi-tasking system. When the user terminates the application, the network monitoring system of PC 22 generates a termination MeterFile (containing a termination indicator, application name, username, date and time) which is output to the application MeterFile storage. Licensing costs can be based on usage. Real-time billing procedure generates user bills based on actual use. Also, users will not be denied access during prime times when other users typically access the application such as when monthly reports are due. Additionally, the network provider will not need to purchase additional license copies. Costs of using the applications can be allocated to the actual users. Software vendors may also benefit from real-time billing. In the past, if all license copies were checked out, one or more users had to wait until a network license was available. The software vendor could not make any more money unless additional network license copies were sold. The cost of the additional license copies may be prohibitive, particularly where use exceeds the number of license copies infrequently, for example only a few days per month. The real-time billing costs of increased use for the users in excess of the licensed number of users during peak use periods may be significantly less than the cost of additional license copies for each additional user. System providers could also have mixed billing systems which have a fixed number of copies. When additional users access the application, the real-time billing procedure can bill for the additional use. Network providers may object to such real-time billing systems because users may not have any incentive to use the applications sparingly. Combining the real-time billing system with the license recovering system provides cost protection which alleviates such problems. V. License Priority Procedure In FIG. 7, a priority license procedure 300 is illustrated along with its associated data structure 310 which includes a user1 priority variable, otheruser priority variable, otheruser status variable and a maxusers variable. Control begins at step 312 where control determines if user1 has requested access to the application. If not, control loops until user1 does request access. If access is requested, control continues with step 314 where control determines if all license copies are being used. The number of license copies is set by the maxusers variable. If not, control returns to step 312. If all license copies are currently being used as determined at step 314, control compares the priority of user1 to otherusers' priority and application status at step 316. If user1 priority is greater than otherusers' priority, or if the user1 priority equals otherusers' priority and the otheruser is inactive as identified at steps 318 and 320, control identifies the other user and closes the application at step 322. Control then grants user1 access to the application at step 326. If neither condition in step 318 and 320 are met, control ends and user1 is denied access. In use, license priority procedure 300 compares the priority of user1 to the priority of otherusers currently using a licensed copy of the application. Both user1's priority and otherusers priorities are defined by the network operator. If user1's priority is greater than the priority of otherusers, license priority procedure 300 terminates one of the other users having the lowest priority and grants access to user1. If user1's priority is equal to the priority of at least one otheruser and the otherusers' application is inactive, license priority procedure 300 terminates the otheruser and grants access to user1. As the trend of having large WAN with many users increases, processing power of service providers who provide access to user applications on the WAN will become more scarce. A service provider providing access to the user application performs the processing and the user operates in a terminal mode. In essence, the user's processor only executes procedures related to input and output of already-processed data from the service provider. As the number of users increases, the service provider will require more and more processing power. As can be appreciated, the network monitoring system of the present invention decreases the demands on the service provider's processor. By having the user execute the user application locally using the user's processor, the connection to the service provider can be decreased or eliminated depending upon the location of the Meterfile, dramatically saving costs of on-line time and processing power of the service provider. As a result, the service provider can allocate the precious processing power to more important tasks, such as sharing large database files, or running more complex applications which are not currently available on personal computers. The various advantages of the present invention will become apparent to those skilled in the art after a study of the foregoing specification and following claims.
|
Same subclass Same class Consider this |
||||||||||
