Re: Recognizing Concurrent Users



Shifting to top-posting...

Hi John, I think you could use "last activity" as a proxy for "session end time". After all, if a user logs in at 9:00 AM and last activity is at 1:00 PM, they are "in" at noon.

So, the first idea I gave you should work, substituting "session end" with "last activity". I suggest you try it as is, and you will get concurrent users at noon each day. If you don't understand what's going on, feel free to write back.

If you want a finer level of detail, simply insert more rows into the Evaluations table, say one row for every hour of every day over 2 years.

If you are having trouble building the Evaluations table, here's a hint: Build it in Excel first; plop "ETime" into cell A1, "1/1/2007" into cell A2, and in cell A2, put "=A3 + 1/24". Obviously, you can make the increment as large or small as you wish here. Fill this down substantially far to cover your desired evaluation points. This will create a lot of evaluation points very quickly. Format the column as date + time. Save and close. Next, import the Excel work*** as a table in Access, and off you go.

Now you have oodles of rows that show concurrent users by hour. You can analyze the results, say to find Max concurrent users by Year/Month/Day, or on Wednesdays, or between 2 and 6 PM on Mondays, or however you like.

Hope this helps!


H0MELY wrote:
RE-reading my original entry I realized that I could have been a little clearer...

Unfortunately I do not have the session end time available to me, I wish I did, so the best option I have is going to be last activity. I am lucky because most users logout rather than time out (about 80%) so last activity should work. What I am actually looking for is a maximum concurrent users. In basic terms, I want to know what is the maximum amount of users who were online at the same time (and of course when). It would actually be good if I could do Maximum concurrent users by the month, by the day and by the hour. If I could finagle the data by hours it wouldn't be to hard to get teh other two. I just can't seem to get my head around the dynamic time frame.

Any ideas would be greatly appreciated. Thank you so much for looking and your early suggestions.

-John

"smartin" wrote:

H0MELY wrote:
Thank you in advance for your help. Basically what is happening is that after much harping, my department is going to start analyzing the access statistics from the website. This is good news, but the bad news is that up until recently there were no statistics to get at all and the server is not, and will not, be running any statistical software anytime soon. What is basically being delivered to me is a table that contains Action Date-Time, Session Reference, IP, Browser, USERID, USER, Session Start Date-Time and Action.

What I would like to ascertain is the number of Concurrent Users (users on at the same time). I know this isn't going to be exact, but I think it is important to get an idea. I can easily get session a sessions begin time and last activity. The problem is getting all of teh intersections. In my head I can picture how to do it, I just can't seem to put it into query design. Any assistance would be GREATLY appreciated. One more thing, the date/time stamp fields are formatted like this...6/18/2008 7:10:00 AM. It has caused me a little bit of a headache, so I wanted to be sure and relay that. Thanks again and I can't wait for the responses.

-john
Sorry about your headache.

I may not understand your data, but I do not understand how you will get concurrency information without both start /and end/ times for the session*. I don't see how "last activity" helps.

As long as your timestamps are stored as Date types (irrespective of the formatted display), and assuming you have some way to obtain both session start /and end/ times, the solution is simple. Concurrency is evaluated at a point in time, say noon every day. Create a table with a single column called ETime that contains noon times over several days. One row per evaluation point.

Pseudo-Query: select E.Etime, count (S.SessionID) from Sessions S, Evaluations E where S.StartTime < E.ETime and S.EndTime > E.ETime group by E.Etime;


* After rereading, perhaps you are only concerned about concurrent users right now? Well, you still need to know whether users are logged in now, which means you need to know if their session is still open. If you can get at that, the query is a little different, but not much:

Pseudo-Query: Select count (S.SessionID) from Sessions S where S.StartTime < Now() and S.EndTime Is Null;

HTH

.