vaishali
12th July 2004, 10:13
Hi,

We have baan centralized set up.Is it possible to assign location wise licences(hence restricting the usage)? for egs.We have totally 100 licences out of that 5 to be allocated to pune 10 to sahas. By this we would like to restrict location wise usage of licenses. As mentioned above, pune users should not able to use more than 10 logins

Regards,

Vaishali

Steve Johnson
12th July 2004, 20:34
Licensing cannot be partitioned among servers as you want. If your Baan installation is licensed for 100 licenses then any number of servers can point to the license serve and effectively use all 100 licenses. However, if you have Unix you can certainly write simple shell scripts to restrict licensing usage as you want. $BSE/lib/ipc_info contains a pointer to a file in $BSE/bin that will invoke the bshell. Usually that file is $BSE/bin/bshell6.2. Change the file to a new script such as $BSE/bin/bshell6.2.pune and in the shell script count the number of current users and if greater that a value abort and call bshell6.2 if less than or equal to that number. This :) type of scripting to do environment setting, limiting users, etc. is very common.

vaishali
21st July 2004, 07:05
:confused: Hi Steve,

We are using baan4c4,informix7.3,solaris6.2,I have checked in $BSE/bin but there is no file bshell6.2.Bshell6.1 is available but its content not visible.Please guide me how to write the script in this case

Thanks,
Vaishali

Steve Johnson
21st July 2004, 20:41
1. On both pune and sahas servers modify $BSE/lib/ipc_info by adding an entry:
bshell.test s 0 0 p ${BSE}/bin/bshell6.1.sh

2. Create a file in $BSE/bin called bshell6.1.sh with the following lines of script using (say) the "vi" command:

#!/bin/sh
host=`hostname`
num=`ps -ef|grep "bshell6.1"|wc -l`
if [ $host = 'pune' -a $num -lt 5 ]
then ./${BSE}/bin/bshell6.1 $*
fi
if [ $host = 'sahas' -a $num -lt 10 ]
then ./${BSE}/bin/bshell6.1 $*
fi
exit 0


3. Change the permissions of file bshell6.1.sh by executing "chmod" command:
chmod 754 bshell6.1.sh

4. Change the BW login configuration "Bshell" to "bshell.test" and try to log into Baan. You will only be able to log onto pune if there are no more than 4 users, sahas: no more that 9 users. Unfortunately this does not give any response back to the user is the limit is exceeded.

We went a bit further by creating a 4GL session that simply issues a message "Too many users on ...". The bshell script invokes that session in Baan if limits are exceeded. The user clicks OK on the message and immediately exits form Baan. If the session were called "tccomtoomany" it would be invoked in the script as follows (notice logic change also).

#!/bin/sh
host=`hostname`
num=`ps -ef|grep "bshell6.1"|wc -l`
if [ $host = 'pune' -a $num -ge 5 ]
then ./${BSE}/bin/bshell6.1 $* tccomtoomany
exit 0
fi
if [ $host = 'sahas' -a $num -ge 10 ]
then ./${BSE}/bin/bshell6.1 $* tccomtoomany
exit 0
fi
./bshell6.1 $* #OK to invoke normal Baan
exit 0