khamneda
25th May 2004, 12:59
we have HP-Unix with Baan4. 30 user licence. we want that whenever Mr. A or Mr. B logs in they should always get to login i.e. whenever 28 users are connected whenever 29th user (other than Mr. A or Mr. B) tries to login (s)he must get the "no more licences available". in short, two licences should always be reserved for Mr A and Mr. B

is this possible ..either through baan or some shell script.

Thanks in advance

richard
26th May 2004, 12:22
Hi,

In unix it would be possible with a special bshell.
First test the number of users (like:
ubaan=`/baan/app/bse/bin/licmon6.1 -u | grep "TOTAL" | cut -c39-42`
If more than 28, forbid the connexion for users other than A and B.

Special bshell like:

cd $HOME
$BSE/bin/bshell6.1 $*

Problem: you get two processes for each user instead of one.

regards

baanerp_baanerp
27th May 2004, 07:27
Thanks for your inputs.

Could you please elaborate on how do I forbid in the shell script for Mr. A and Mr. B? (I am an entry level person on bshell programming.)

richard
27th May 2004, 12:55
bshellres (in $BSE/bin and used in bshell name of bw):


#bshellres bshell until 28 users
#
# general settings (BSE, ...)
. /administration/setenv
cd /baan/app/bse/lib

ubaan=`/baan/app/bse/bin/licmon6.1 -u | grep "TOTAL" | cut -c39-42`
if [ $ubaan -gt 28 ]
then
echo "more than 28 users, try later"
else
cd $HOME
$BSE/bin/bshell6.1 $*
fi

ipc_info (in $BSE/lib) line to add:

bshellres s 0 0 p ${BSE}/bin/bshellres


The error message is not clean, but it works.

regards

Hitesh Shah
29th May 2004, 16:26
I did try to limit the users using shell script for quite some time. But I get error 8 in the bw message.

8 ENOEXEC Exec format error
A request is made to execute a file which, although it has
the appropriate permissions, does not start with a valid magic
number (see e.out(F)).

Any clues.What is this magic number. bshell file has permission 755 and owner & group bsp.

jodijk
30th May 2004, 23:22
I did try to limit the users using shell script for quite some time. But I get error 8 in the bw message.

8 ENOEXEC Exec format error
A request is made to execute a file which, although it has
the appropriate permissions, does not start with a valid magic
number (see e.out(F)).

Any clues.What is this magic number. bshell file has permission 755 and owner & group bsp.
is the first line of your script
#!/bin/sh
?

Jos

Hitesh Shah
31st May 2004, 09:04
Thanks . It worked properly.

victor_cleto
31st May 2004, 11:00
Check also this thread: http://www.baanboard.com/baanboard/showthread.php?t=7484&highlight=error+exec
Sometimes the call to the bshell needs an exec (mostly on Solaris it seems?).

manusatsangi
2nd June 2004, 11:13
Hi,
We also have the requirement to restrict the licenses.
But have Windows NT and the solutions here are for Unix.
Can you suggest the solution of the following for Windows NT?
1) Restrict only one login for a user at a time. i.e. if the user logins twice using the same login code, he should get an error message in the second login.
2) Can we restrict no of licenses target company wise. i.e. if we want to give only 2 licenses to users logging into company 110, then how to do it?

Moreover, we have also faced problem in trying to kick-off a user from BaaN.
We normally find the process id from the license monitor and kill the process from task manager. But the user does not get unallocated in the license server. As a result, though the users Bshell terminates, the licence does not get freed up.
Please help me in getting solution of these.

We are on Windows NT.

Regards
Manu

p.cole
2nd June 2004, 14:41
We normally find the process id from the license monitor and kill the process from task manager. But the user does not get unallocated in the license server. As a result, though the users Bshell terminates, the licence does not get freed up.

On Windows you must run the command bshcmd -e <processid> on the Baan server to kill a bshell. The license is then freed when the bshell is killed. e.g.

%BSE%\bin\bshcmd -e 1234

The killing is normally immediate, but if the user is running a heavy query it may take a little while. The code here http://www.baanboard.com/baanboard/showthread.php?t=9763 provides a nice front end within Baan to the bshcmd command