Re: Users licensed control in Informix Applications
Posted in 1996
In article <4cmtkb$noh@cssun.mathcs.emory.edu>, m.mejia@server1.codetel.net.do ("Ing. Melvin Perez Cedano") wrote: > >I'm trying to use a good way to control number of users lincenced in my own >informix applications. > >My applications are divided in modules: General Ledger, Accounts Payable, >Payroll ... I would like to check number of users per module. > >The first thing I thought was to update a table with the current number of >users per module each time a program of that module is loaded. The problem >with this is when such program abort abnormally. I have to use some >mechanism for refresh or update the control table. > If you are using UNIX -- You could do it outside of Informix by using the group ID. Everytime a user logs into an application, change their group ID and count the number of 'sh' processes for users in the group. You can either log this information, or compare it to a 'max users' number and dump people out. We currently keep track of the number of 'Informix Only' users in the system, and have the capability to restrict it in the /etc/profile file. If you log in and there are more than <n> users on, and you are an 'Informix Only' user, out you go. We use "COUNT=`who|wc -l`" to get this info. This could easily be modified to extend to counting groups instead of all users. You would have to play with 'ps' and 'grep', but it shouldn't be too difficult. This method has the advantage of not having to process each user through a 'log in/log out' method of control.