This is a text-only version of the following page on https://raymii.org:
Title : Simple pygopherd log analyzer
Author : Remy van Elst
Date : 20-03-2019
URL : https://raymii.org/s/software/Simple_pygopherd_log_analyzer.html
Format : Markdown/HTML
Simple log analyzer for pygopherd. Fun if you have a gopherhole and want
statistics. If you ever used [Logwatch] you'll feel at home.
[Github repository here] or just [the script here].
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics.
Please, if you found this content useful, consider a small donation using any of the options below:
://leafnode.nl">I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go che
ck it out!
Consider sponsoring me on Github. It means the world to
me if you show your appreciation and you'll help pay the server costs.
ode=7435ae6b8212">You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $100 credit for 60
* pygopherd (tested with 2.0.18)
* syslog of some kind
* bash 4+
* Clone the git repository or save the shell script somewhere
* Make the script executable (`chmod +x ./pygopherstats.sh`)
* Run it providing one or more logfiles to analyze:
./pygopherstats.sh /var/log/syslog /var/log/syslog.1 ./pygopherstats.sh
If you don't have a central syslog server, use poor man's ssh to get all the log
files from all the servers:
for host in $(dig +short a example.org); do
ssh -l root $host "zgrep pygopherd /var/log/syslog.*";
done 2>/dev/null > gopherlog
### Example report
# pyGopherd log analyzer
From file: /var/log/syslog
Start: Mar 18 06:29:50
End: Mar 18 12:18:23
- Hits: 800
- IP's: 60
# Top Tens
## Most Popular
## Files per IP
10 126.96.36.199 /Site_updates_raymii.org_now_on_gopher.txt
3 188.8.131.52 /About.txt
3 182.259.43.98 /Viewing_PDF_docx_and_odt_files_in_Mutt.txt
2 184.108.40.206 /SpaceCat_Launchpad_v2_an_awesome_little_macropad.txt
2 220.127.116.11 /SpaceCat_Launchpad_v2_an_awesome_little_macropad.txt
2 182.259.43.98 /Split_keyboards_a_five_year_review_including_the_ErgoDox_EZ_Matias_Ergo_Pro_and_Kinesis_Freestyl
2 182.259.43.98 /Site_updates_raymii.org_now_on_gopher.txt
2 18.104.22.168 /About.txt
2 22.214.171.124 /Site_updates_raymii.org_now_on_gopher.txt
2 126.96.36.199 /Site_updates_raymii.org_now_on_gopher.txt
## Gophermaps per IP
52 182.259.43.98 /
32 188.8.131.52 /
8 184.108.40.206 /
7 182.259.43.98 /links
5 220.127.116.11 /links
4 18.104.22.168 /
3 22.214.171.124 /
3 126.96.36.199 /
3 188.8.131.52 /
3 184.108.40.206 /
## Folders per IP
1 182.259.43.98 /links
54 EXCEPTION FileNotFound: '/caps.txt'
25 EXCEPTION TypeError'>: stat()
24 EXCEPTION error'>: [Errno
17 EXCEPTION IndexError'>: string
12 EXCEPTION FileNotFound: '/bout.txt'
2 EXCEPTION FileNotFound: '/mahua/v/20190212/8dfcb2192a5052e5a152b9d8115201af_24f3fa0cbc00474fab1610181191b09c_0.
2 EXCEPTION FileNotFound: '/Hello
1 EXCEPTION FileNotFound: '/links'
1 EXCEPTION FileNotFound: '/ite_updates_raymii.org_now_on_gopher.txt'
1 EXCEPTION FileNotFound: '/favicon.ico'
Simple pygopherlog analyzer by raymii.org
License: GNU GPLv3
All the text on this website is free as in freedom unless stated otherwise.
This means you can use it in any way you want, you can copy it, change it
the way you like and republish it, as long as you release the (modified)
content under the same license to give others the same freedoms you've got
and place my name and a link to this site with the article as source.
This site uses Google Analytics for statistics and Google Adwords for
advertisements. You are tracked and Google knows everything about you.
Use an adblocker like ublock-origin if you don't want it.
All the code on this website is licensed under the GNU GPL v3 license
unless already licensed under a license which does not allows this form
of licensing or if another license is stated on that page / in that software:
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
Just to be clear, the information on this website is for meant for educational
purposes and you use it at your own risk. I do not take responsibility if you
screw something up. Use common sense, do not 'rm -rf /' as root for example.
If you have any questions then do not hesitate to contact me.
See https://raymii.org/s/static/About.html for details.