EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09983
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] ask about irstats
- To: Agung Prasetyo W. <prazetyo@gmail.com>
- Subject: Re: [EP-tech] ask about irstats
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Sun, 16 Feb 2025 22:59:03 +0000
Hi Agung,
As you have a mess of old an new IRStats2, I think the best plan is to replace the Bazaar plugin with the ingredient using the latest version from GitHub. This assumes the EPrints repository you are running is in the 3.4.2 or greater.
First, I would advise making sure you have a database backup or virtual machine snapshot you can revert back to just in case. Then you can remove the Bazaar plugin by clicking Disable and then Uninstall via the Installed tab of the EPrints Bazaar (accessed via the System Tools tab of the Admin menu). This may prompt you with some warning messages about config files being moved elsewhere for safe-keeping. These should not affect any new install but these files may be worth reviewing, in case you have any bespoke configuration you want to retain.
To install as an ingredient you need to checkout (the latest version of https://github.com/eprints/irstats2.git, which should be noted is not yet a full release) to EPRINTS_PATH/ingredients/irstats2 then you need to run the ingredient script to make IRStats2 work as an ingredient:
EPRINTS_PATH/ingredients/irstats2/ingredient make
Then you need to add the irstats2 ingredient to your flavour's inc file (e.g. EPRINTS_PATH/flavours/pub_lib/inc) and reload Apache.
The latest version of IRStats2 on GitHub uses access files rather than the access table to generate usage statistics. You should check that access files have been generated under your archive's var/access/current/ directory (or if they have somehow already been processed under var/access/YEAR/). If you do, you should be able to run:
EPRINTS_PATH/ingredients/irstats2/bin/stats/process_stats ARCHIVE_ID --setup --verbose
Depending on how many access records you have this may take some time. Although improvements means that even if you have tens of millions of records it should only take few hours. When previously at has often taken the best part of a day if not longer.
If you don't have any access files under your archive's var/access/'s sub-directories or do not have files going back as far as you expect. I would run the following command (moving out of the way your current archive's var/access/ directory if it already exists):
EPRINTS_PATH/ingredients/irstats2/bin/stats/import_access_table_tranches ARCHIVE_ID
This will process all the current access records in the access table of your EPrints database and create them in files. (You make want to make sure you have a few gigabytes of disk space for all of these).
Once the above script completes, (it is difficult to predict how long it takes, roughly 15-30 minutes per 10 million records), then you can run the process_stats script as shown above and once it is complete you should end up with full graphs. If you try to access these graphs whilst the script is running they are likely to be incomplete and then will be cached until the process_stats script completes, when it will clear the cache and generate the full graphs for the IRStats2 homepage (i.e. /cgi/stats/report). Other IRStats2 pages will be cached on first request and until the process_stats script runs again. So be sure to make sure you have a daily cron job setup to run this and that you have update the path for this appropriately.
Regards
David Newman
On 15/02/2025 9:48 pm, Agung Prasetyo
W. wrote:
CAUTION: This e-mail originated outside the University of Southampton.Hi David,
I installed from eprints bazaar, but then I update the files from github.
Is it uninstall and install again is the best way for files consistency?
What your suggestion David?
Thank you
Regards,Agung pw
On Sat, Feb 15, 2025, 23:40 David R Newman <drn@ecs.soton.ac.uk> wrote:
Hi Agung,
It sounds like you may have inconsistent versions of the various files that make the IRStats2 plugin. How did you install IRStats2 (from the EPrint Bazaar or from GitHub). Did you install as an ingredient or a Bazaar plugin? Which version or IRStats2 do you have installed and if applicable specifically which changeset to you have checked out from GitHub. Both of the base_url and validate_non_context_param have been added relatively recently but it looks like your version of EPrints/Plugin/Stats/Utils.pm in either /usr/share/eprints/lib/plugins/ or /usr/share/eprints/ingredients/irstats2/plugins/ is out of date and does not have these functions.
Without knowing how you installed (and possibly upgraded IRStats2) it is difficult to advise what to do. It may be sufficient to download the latest version of EPrints/Plugin/Stats/Utils.pm from [1]. However, that may make things more difficult to maintain in the future, as you will have an even more inconsistent version of IRStats2 installed.
Regards
David Newman
[1] https://raw.githubusercontent.com/eprints/irstats2/refs/heads/master/lib/plugins/EPrints/Plugin/Stats/Utils.pm
On 15/02/2025 3:23 pm, Agung Prasetyo W. wrote:
CAUTION: This e-mail originated outside the University of Southampton.CAUTION: This e-mail originated outside the University of Southampton.Hi,
I want to ask something about irstats. I have run the process_stats --setup command, but until the process is complete, the display in irstats only shows the icon and the text loading
Is there something wrong with our process, or is there a file that is not appropriate? We also found an error in apache2.error as follows:
[Fri Feb 14 22:41:07.798499 2025] [:error] [pid 3386824] Undefined subroutine &EPrints::Plugin::Stats::Utils::base_url called at /usr/share/eprints/archives/archive_ID/cgi/stats/set_finder line 47.\n
[Fri Feb 14 22:41:07.857356 2025] [:error] [pid 217829] Undefined subroutine &EPrints::Plugin::Stats::Utils::validate_non_context_param called at /usr/share/eprints/archives/archive_ID/cgi/stats/get line 83.\n
this is also the screenshot
Please help me
Thank you
Regards,Agung PW
*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List *** Archive: https://www.eprints.org/tech.php/ *** EPrints community wiki: https://wiki.eprints.org/
- References:
- [EP-tech] ask about irstats
- From: "Agung Prasetyo W." <prazetyo@gmail.com>
- Re: [EP-tech] ask about irstats
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] ask about irstats
- From: "Agung Prasetyo W." <prazetyo@gmail.com>
- [EP-tech] ask about irstats
- Prev by Date: Re: [EP-tech] Issue with bin/generate_apacheconf during EPrints 3.4.6 Installation on RHEL 9.5
- Next by Date: Re: [EP-tech] Bulk import plugin
- Previous by thread: Re: [EP-tech] ask about irstats
- Next by thread: [EP-tech] Bulk import plugin
- Index(es):