User Post
1:26 pm January 7, 2009
fatboyslim
Guest
Hello !
I have a question, how to count the number of logins to an application for each user using awstats extra section ?
I am using a custom log format that includes %extra1 parameter which is a user login.
3:40 pm January 7, 2009
Jean-Luc
Admin
posts 815
Hi,
Do you want to count the number of users who login through a given page or do you want to count how many times a given user is logging in ?
Also, what does this %extra1 contain ? Is it the same as the standard AWStats field called %logname ?
2:03 am January 8, 2009
fatboyslim
Guest
Hello,
I would like to count how many times a given user is logging in.
%extra1 is the same as %logname.
LogFormat= "%host %other %logname %time2 %methodurl %refererquot %code %bytesd %extra1"
5:08 am January 8, 2009
Jean-Luc
Admin
posts 815
It can be done, if there exists a URL that is only hit once when you log in. I would try something like this:
ExtraSectionName1="Logins" ExtraSectionCodeFilter1="200 304" ExtraSectionCondition1="URL,\\/url_visit ed when_logging_in" ExtraSectionFirstColumnTitle1="Login name" ExtraSectionFirstColumnValues1="extra1, ^(.+)" ExtraSectionFirstColumnFormat1="%s" ExtraSectionStatTypes1=PL ExtraSectionAddAverageRow1=0 ExtraSectionAddSumRow1=1 MaxNbOfExtra1=20 MinHitExtra1=1
/url_visited when_logging_in must be the URL that gets one hit each time someone logs in.
5:52 am January 8, 2009
fatboyslim
Guest
It works fine, thank you very much.
I am also interested if it is possible to count total time when user is logged into application ?
10:24 am January 9, 2009
Jean-Luc
Admin
posts 815
You cannot measure the length of a session with an extra section.
3:50 am January 10, 2009
fatboyslim
Guest
What about awstats plugins ? Is it possible to use any of them to measure the length of user session ?
2:58 am January 11, 2009
Jean-Luc
Admin
posts 815
3:31 pm January 20, 2009
jockee
Guest
Hi Jean-Luc!
What would a section counting the number of users who login through a given page look like? It would be very useful to us.
Thanks in advance,
Jockee
3:14 am January 21, 2009
Jean-Luc
Admin
posts 815
Hi Jockee,
You can use the extra section above and count the number of lines in the report. I am afraid there is no nicer way to do it, as an extra section can only count pages, hits or data bytes (bandwidth).