julia0726
8th March 2006, 08:13
Hi,
Can anybody tell me or have developed a script in which he can determine how many times does a specific user logins to Baan?
thanks
julia
Markus Schmitz
8th March 2006, 08:54
If you want to see the number of current logins, then this should be easy. Lets say the User in Question is called "xxxx". Then you just do:
ps -u xxxx | grep bshell | wc -l
If you want to see the past logins, then you just enable the history in the user data and print the report from baan.
Regards
Markus
ganesh_kapase
8th March 2006, 09:55
julia
Refer BaaN standard session ttaad2402m000 to print user history.
en@frrom
8th March 2006, 15:58
Via ttaad2402m000 you get all the objects that have been activated by the user, thus: many entries per logon. The session is just printing a selected list from the logging file ${BSE}/lib/time.his Logging to this file will happen in case 'history' is selected in the uder data template the user is linked to (ttams1110m000)
A very simple way however, of "customizing" this functionality, is to just write your own session, with the same form as ttaad2402m000, just with one more filtering on the data, that you just look for lines with object (for instance) ottstpoledaem. Like this you can show one record per login.
NOTE: since the logging into time.his is only done after closing a session, this will only show PAST logins; not CURRENT logins. So if you really want to add current logins also, you should add that part to the query...
I would actually write this session if I would have had time for it now, which I don't... So if anyone decides to write it, you can post it here... Otherwise, maybe I will do it some day...
Regards,
En
en@frrom
8th March 2006, 17:06
Oops!!! :o
Sorry whoever read my previous post; just ignore it. I actually just thought of quickly creating this session for others' benefit... so looking at the session, I saw that actually user CAN select specific session (from/to) on form, in other words: the functionality IS present..!
Well, it is of course no beautiful reporting session, details as: total nr. of logins over selected period, average logins per week, etc could be usefull in your case probably, but ok, you can alternate... I would print to Excell, so then you easily have total number of logins, first and last login, etc..
So no need for time-wasting ideas of mine...