Compiling usage stats

0
No votes yet

I'm always impressed when I see other schools usage statistics and graphs. Unfortunately, Luminis does not seem to have any built-in tools for gathering an analyzing usage stats. So, I wanted to create this as a place to compile hints and tips.

To get a rundown of unique logins each day, you can run this against your /opt/luminis/logs/session.log file(s):

grep "user login:" session.log | awk '{ print $1 " " $5 }' | sort | uniq | awk '{ print $1 }' | uniq -c

Output will look like this:

94 2008-05-08
90 2008-05-09
26 2008-05-10
10 2008-05-11

(First column is the count of unique user logins for that date. Each user is counted once, no matter how many times they log in.)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

grep session.log

That's is a handy trick thanks.

Along those lines, if you are using Luminis IV, you can enable the tomcat access log by editing $CP_ROOT/products/tomcat/tomcat-cp/conf/server.xml and adding (or uncomment) the log section like this:
Valve className="org.apache.catalina.valves.AccessLogValve"
directory="/mnt/portal/logs" prefix="vmpw2_access_log." suffix=".txt"
pattern="common" resolveHosts="false"

Then use any web log parser to compile stats on the access log.

When I was using Luminis III, I used http://awstats.sourceforge.net to compile stats on the sun web server logs. http://www.mrunix.net/webalizer/ and http://www.analog.cx/ worked pretty well also.

awstats

Your comment got me curious so I went and downloaded the awstats software. After installing and configuring it with the changes you mentioned, I let it run for a while and build some statistics.

Unfortunately, I believe that Google Analytics encompasses the entire scope of this server analyzer software for MUCH less work. I would recommend anyone looking for statistics look to check out Google Analytics first. (If privacy isn't an issue)

Just a suggestion for those that are equally curious about server statistics.

I agree

I agree. Back when I was using AWstats, google analytics hadn't been released yet.

There is one advantage with using a local log parser program though: the ability to combine the resulting data with other data on campus. As far as I know (and I'm just now getting google analytics setup) you can't get your data back in bulk format. I saw the areas where you could download a report, but nothing like a big csv file of the whole set.

For instance, given that I know who the person was because they logged in, if the data is local, I can tag the html request in the log with the persons username. Then using banner data, I can cross-reference that with pop select info, or whatever.

For example, if we setup a special tab to correspond to your student major, I could cross reference the web hits with log in name and major from banner and see which majors were using their new tab.

I am going to use google in addition to a local one for sure though.

session log tweak

This is great.

So does anyone know how to rotate the session.log on a daily basis?

I see in the $CP_WEBINF/config/cplog4j.properites where I can set the MaxFileSize and MaxBackupIndex,
but instead of it rotating based on size, I'd like it to rotate based on the day.

can it do that?

I guess I could set it to a large number - and move it out at 12am every night

weekly rotate

Hi Jon

Here is how we rotate the session.log weekly, it also renames the session.log to session.log.yyyy-ww, check RN-1306 on the support site for further details/options:

log4j.logger.com.pipeline.sm.SessionManager=INFO, session
log4j.additivity.com.pipeline.sm.SessionManager=false

#log4j.appender.session=org.apache.log4j.RollingFileAppender
log4j.appender.session=org.apache.log4j.DailyRollingFileAppender
log4j.appender.session.File=${util.logservice.log4j.directory}/sessionlogs/session.log
#log4j.appender.session.MaxFileSize=1MB
#log4j.appender.session.MaxBackupIndex=2
log4j.appender.session.layout=org.apache.log4j.PatternLayout
log4j.appender.session.layout.ConversionPattern=%d{ISO8601}: %m%n
log4j.appender.session.DatePattern='.'yyyy-ww

Dave

Session roller

Thanks,
I just changed my file - this is great.
Just need to write a script to run that grep and toss it all into a database table somewhere for our portal team to report on.