SUNScholar/Statistics/Old Versions

Back to Default Statistics

Requirements

 * 1) If you have any existing SOLR data, ensure it is backed up before you begin the conversions below.
 * 2) Also ensure that any optimisations of the SOLR or log data are done before the conversion.

Convert the old log files
I prepared the following bash script to do the conversion.
 * 1) !/bin/sh

cd $HOME/log ITEM=`ls dspace.log.*`
 * 1) echo $ITEM

for i in $ITEM ; do	$HOME/bin/dspace stats-log-converter -i $i -o $i.solr done

After running the script you will have a lot of log files with the .solr extension. This takes quite a while with a lot of log files. Be patient.

Import the converted solr log files
I prepared the following bash script to do the import.
 * 1) !/bin/sh

cd $HOME/log ITEM=`ls *.solr`
 * 1) echo $ITEM

for i in $ITEM ; do	echo "###################################" echo "Importing stats for log file:... $i" $HOME/bin/dspace stats-log-importer -i $i done This takes quite a while with a lot of log files. Be patient.

General Reports
Make sure that you run the stats programs regularly. @daily		$HOME/bin/stat-general @daily		$HOME/bin/stat-report-general @monthly	$HOME/bin/stat-monthly @monthly	$HOME/bin/stat-report-monthly The above must be added to the crontab for the "dspace" user.

Allow normal users to browse the statistics
Edit the following in the DSpace config file.
 * 1) Statistical Report Configuration Settings ######

report.public = true
 * 1) should the stats be publicly available?  should be set to false if you only
 * 2) want administrators to access the stats, or you do not intend to generate
 * 3) any

report.dir = ${dspace.dir}/reports
 * 1) directory where live reports are stored