Difference between revisions of "SUNScholar/Statistics/Old Versions"

From Libopedia
Jump to navigation Jump to search
Line 64: Line 64:
 
==References==
 
==References==
 
*https://wiki.duraspace.org/display/DSDOC3x/Managing+Usage+Statistics#ManagingUsageStatistics-DSpaceLogConverter
 
*https://wiki.duraspace.org/display/DSDOC3x/Managing+Usage+Statistics#ManagingUsageStatistics-DSpaceLogConverter
 +
*https://wiki.duraspace.org/display/DSDOC18/Managing+Usage+Statistics#ManagingUsageStatistics-DSpaceLogConverter

Revision as of 09:22, 31 January 2014

Back to SOLR Statistics

Log file conversion for DSpace versions <= 1.6.2

Convert the old log files

I prepared the following bash script to do the conversion.

#!/bin/sh

cd /home/dspace/log
ITEM=`ls dspace.log.*`
#echo $ITEM

for i in $ITEM ; do
	/home/dspace/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.

#!/bin/sh

cd /home/dspace/log
ITEM=`ls *.solr`
#echo $ITEM

for i in $ITEM ; do
	echo "###################################"
	echo "Importing stats for log file:... $i"
	/home/dspace/bin/dspace stats-log-importer -i $i
done

This takes quite a while with a lot of log files. Be patient.

Statistics for DSpace versions <= 1.5.2

General Reports

Make sure that you run the stats programs regularly.

@daily		/home/dspace/bin/stat-general
@daily		/home/dspace/bin/stat-report-general
@monthly	/home/dspace/bin/stat-monthly
@monthly	/home/dspace/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.

###### Statistical Report Configuration Settings ######

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

# directory where live reports are stored
report.dir = ${dspace.dir}/reports

References