Bug 7654 - Source Mage Stats
: Source Mage Stats
Status: CLOSED FIXED
Product: Administration
Classification: Unclassified
Component: Unknown
: unspecified
: Other other
: P2 normal
Assigned To: Ladislav Hagara (lace)
http://ledger.sourcemage.org/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-11-19 09:31 UTC by Ladislav Hagara (lace)
Modified: 2008-07-05 22:20 UTC (History)
6 users (show)

See Also:


Attachments
Stat file for checking (10.95 KB, text/plain)
2006-04-10 19:41 UTC, Timothée Lecomte
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ladislav Hagara (lace) 2004-11-19 09:31:23 UTC
Requests or comments about Source Mage Stats?
Please you this Bug.
Comment 1 Eric Sandall 2004-11-23 12:59:13 UTC
Perhaps have the stats script automatically upload the stats to the web page?
This way one could just set a crontab to run the script and not worry about it
after setting their id.
Comment 2 Eric Sandall 2004-11-23 13:11:18 UTC
After registering I'm given an URL to download the admin script, but clicking on
it gives this error:

Not Found

The requested URL /~babca/client.sh was not found on this server.
Apache-AdvancedExtranetServer/2.0.50 (Mandrakelinux/7mdk) mod_ssl/2.0.50
OpenSSL/0.9.7d PHP/4.3.8 Server at dostavnik.web Port 80

If I then login, the smsc.sh script can be downloaded fine.
Comment 3 Eric Sandall 2004-11-23 13:12:43 UTC
Why does the script need root access?

$ sh smsc.sh
Generating unique stats id ...
ID: 0009
Gathering information, wait please ...
Enter the root password, please.
Password:
Enter the root password, please.
Password:
Enter the root password, please.
Password:
Enter the root password, please.
Password:
Enter the root password, please.
Password:
Comment 4 Eric Sandall 2004-11-23 13:14:50 UTC
I cannot get back to the page to upload my stats file without first logging out
and then logging back in (there is no clickable link for it).
Comment 5 Ladislav Hagara (lace) 2004-12-21 16:40:39 UTC
Thanks for comments.

We have just released new version 0.02 of smglstats.sh.
Please download it and try it.

We added support for automatically upload (smglstats.sh curl).
Root access was eliminated (we used "scribe index" and it needed root access).

I hope after Xmas we change design of web pages.
Comment 6 Paul Mahon 2005-02-15 08:11:10 UTC
I got an error on page after after rthe registration form. It was in the middle
of the page and I didn't notice it until I had clicked on something else grrr.
So I can't give any details :(

(id 0013)
Comment 7 Paul Mahon 2005-02-15 08:20:30 UTC
For the password prompt, you may want to use read -s, so it doesn't echo to the
terminal.
Comment 8 Andraž 'ruskie' Levstik 2005-04-07 14:19:09 UTC
Get a better date field.... sheesh YYYY-MM-DD ugghhh ugly....
try something along the lines DD.MM.YYYY
Comment 9 David Kowis 2005-04-07 14:57:35 UTC
If one refreshes the a user's page (the page you get to after clicking on the
button that has the user's id in it) it goes to ID 0000 and contains no information.

Also none of the information is listed other than the date it was uploaded.
From page:
Updating during 24 hours.
Last update: 	Apr 07 2005 21:32:37
Sorcery branch: 	
Sorcery version: 	
CPU: 	
Hostname: 	


Good concept, needs a bit of refinement, but I like where it's going :)
David
Comment 10 Jindra Urbankova 2005-04-08 03:14:17 UTC
(In reply to comment #10)
Thank you for your comments.

Information about other users and other computer you can see only if they
checked it on edit pages (http://83.240.17.229/~babca/users/edit.php).
Only some information all users must show to all(name, surname, country, update,..).

I know about problem on page http://83.240.17.229/~babca/users/info.php, and i'
am working on removig this problem. The problem happend through the picture.... :-(
Comment 11 Eric Sandall 2005-04-08 09:06:16 UTC
Ummm...your page is using <blink> for the "About" link...
Comment 12 Eric Sandall 2005-04-08 09:07:42 UTC
(In reply to comment #8)
> Get a better date field.... sheesh YYYY-MM-DD ugghhh ugly....
> try something along the lines DD.MM.YYYY

That's the ISO standard for dates, and I like it. :)
Comment 13 Eric Sandall 2005-04-08 09:11:57 UTC
I get this error when trying to download smglstats.sh 0.0.3 (when I'm logged in):
XML Parsing Error: not well-formed
Location: chrome://mozapps/content/downloads/unknownContentType.xul
Line Number 85, Column 3:

And a weird "symbol":
PK(HF)(TF)
Comment 14 Eric Sandall 2005-04-08 09:13:07 UTC
On the http://83.240.17.229/~babca/users/users.php page, it should say "Updated"
instead of "Updating", I think.
Comment 15 Eric Sandall 2005-04-08 09:14:09 UTC
You should use https for the login page.
Comment 16 Eric Sandall 2005-04-08 10:41:23 UTC
(In reply to comment #13)
> I get this error when trying to download smglstats.sh 0.0.3 (when I'm logged in):
> XML Parsing Error: not well-formed
> Location: chrome://mozapps/content/downloads/unknownContentType.xul
> Line Number 85, Column 3:
> 
> And a weird "symbol":
> PK(HF)(TF)

This is a problem with my firefox, not your site, sorry.
Comment 17 Ladislav Hagara (lace) 2005-04-08 11:11:05 UTC
(In reply to comment #11)
> Ummm...your page is using <blink> for the "About" link...

Fixed (only deleted <blink></blink>). 
Jindro, this blink should stop after user click on it.
You can use cookies.
Comment 18 Eric Sandall 2005-04-22 10:22:30 UTC
From a cronjob:

Gathering stats ...

./smglstats.sh: line 57: sorcery: command not found
./smglstats.sh: line 70: gaze: command not found
./smglstats.sh: line 75: gaze: command not found
Trying to upload the file "smglstats_ed74fd87cef2acc5de19d3749cdb6f38"
automatically.
Wait please ..

Might need:
PATH=/usr/sbin:$PATH

In the script?
Comment 19 Eric Sandall 2005-04-22 10:26:56 UTC
On the grimoire table: http://83.240.17.229/~babca/users/grimoire.php

Several grimoires are listed twice (e.g. sandalle, z-rejected, and games).

Grimoire  	Computers
stable 	4
z-rejected 	9
z-rejected 	46
test 	47
stable 	17
devel 	9
games 	9
games 	42
test 	10

And for the second listing (why are there two tables for this? The first is a
listing of the "standard" grimoires and the second "personal"?).

Grimoire  	Computers
documentation 	1
trunk 	1
spells 	2
ckgrimoire 	4
mine 	2
tets 	1
vladbook 	1
e-spell 	2
svk-grimoire 	5
STG 	1
grimoire 	2
andy 	1
sandalle 	4
custom 	1
arcane 	1
	1
personal 	1
home 	1
wip 	1
codex 	3
aaa 	3
j-rejected 	1
john 	1
sandalle 	1
ckgrimoire 	3
mygrimoire 	2
moje 	5
arcane 	1
stuff 	1
xx_myspells 	1
local 	3
dead 	1
vn158 	1
playground 	1
Comment 20 Ladislav Hagara (lace) 2005-04-24 13:35:41 UTC
Added new version of smglstats.sh http://83.240.17.229/~babca/smglstats.sh,
please update to 0.04.
Eric, thanks for PATH info, now we know why some users have been without spells. :-)

How to guarantee all users use new version?
It could be easy if it was part of grimoire (smgl section). May I create spell
"smglstats"?
Where can smglstats store info? Now it use ~/.smglstats (home directory of
user). Can it go to /etc/sorcery/smglstats? It contains password, so it should
have permission 0400. Should smglstats go to /usr/sbin or to /usr/bin? Can
smglstats be run only by root or by any user (problems with permission)? I am
for only root.

Is name smglstats OK or we are supposed to rename it?  
Comment 21 Eric Sandall 2005-04-24 19:44:50 UTC
A spell would be fine (it'd go in the smgl section). As for a name, I'd prefere
something in the vein of sourcemage-stats, but smgl-stats would be fine as well
(for the spell name). The script name should probably match the spell name.

As for storing the stats I say use ~/.smglstats directory to store all of the
information (including the cache file. Currently the cache file uses the current
directory that smglstats.sh is run in, which is incorrect, but I haven't tried
0.4 :)).

The script should install to /usr/bin (since any user should be able to run it,
not just admins, IMO), but if others disagree then /usr/sbin is fine. The
~/.smglstats directory should be created with 0400 permissions, and possibly
always set to that when the script is run (IMO) along with all of the files the
script creates/uses.

Thanks for working on this. :)
Comment 22 Andrew Stitt 2005-05-09 12:34:55 UTC
One minor nit, if someone has no machines the page says "He has not 
computers." I think "not" should be "no".
Comment 23 Eric Sandall 2005-05-15 11:00:37 UTC
When I scroll on the front page the menu stays where it is (which is good), but
the title (logo + "Source Mage Stats") scrolls. That should also be anchored, IMO.
Comment 24 Eric Sandall 2005-05-15 11:02:57 UTC
On the country chart graph I noticed that Germany is listed twice (one 6.2% the
other 2%). There's also United States (31.2%) and a "Unite" (4.1%). Is that
"Unite" also supposed to be "United States"?
Comment 25 Andraž 'ruskie' Levstik 2005-05-15 11:56:22 UTC
The pie chart is unreadable:
the black on black text is almost impossible to read
the colors for the pie chart even though there are the official smgl colors
aren't nice to look at as well(read they burn my eyes) maybe you could change
them to some alternate color maybe a green-red combo?
Comment 26 Andraž 'ruskie' Levstik 2005-05-16 13:13:25 UTC
Much better... though some stuff is still cut short... and I didn't mind having
the smaller percentages shown as well...
Would be nice if there was a color legend on the side with a [color] - country
And drop the names from the pie chart completly
Comment 27 Eric Sandall 2005-05-22 10:16:48 UTC
Another stat that might be interesting is kernel version.
Comment 28 Andraž 'ruskie' Levstik 2005-05-22 23:39:43 UTC
Adding average casting times would be nice. We do have it in the activity log.
Also another suggestions for the app... make use of a subdir either .smgl or
.sourcemage I will be using one of those for quill as well. That way we can have
a uniform place to store the data files...
Comment 29 Ladislav Hagara (lace) 2005-05-23 09:43:52 UTC
Eric, do you think this:
http://83.240.17.229/~babca/users/statistic.php?sort=num+DESC&select=linux ?
Comment 30 Eric Sandall 2005-05-23 11:41:08 UTC
(In reply to comment #29)
> Eric, do you think this:
> http://83.240.17.229/~babca/users/statistic.php?sort=num+DESC&select=linux ?

No, I mean from `uname -r` so that we know what kernel they're actually using,
not which one they may have installed from a spell (if they even use a spell).
Comment 31 Eric Sandall 2005-05-23 11:41:37 UTC
(In reply to comment #28)
> Adding average casting times would be nice. We do have it in the activity log.
> Also another suggestions for the app... make use of a subdir either .smgl or
> .sourcemage I will be using one of those for quill as well. That way we can have
> a uniform place to store the data files...

I would prefer .sourcemage myself. ;)
Comment 32 Andraž 'ruskie' Levstik 2005-05-23 14:06:34 UTC
Note it seems that some of my boxen get doubled... atm it's the one called pi...
can you figure out what's happening...
Comment 33 Eric Sandall 2005-06-18 10:51:54 UTC
On http://ledger.sourcemage.org/users/edit.php, the text "Last time you was
here:" should be "Last time you were here:"
Comment 34 Eric Sandall 2005-06-18 10:53:06 UTC
On http://ledger.sourcemage.org/users/table_users.php, the first two tables are
aligned center and the rest of the tables seem to be tabbed to the right.
Comment 35 Andraž 'ruskie' Levstik 2005-07-07 02:32:26 UTC
Sorry; you select emtpy file or bigger than 200k !!!

This should IMHO be:

Sorry, you have selected an empty file or the file exceeds(s?) the maximum size of 200k.

Btw any progress with using a ~/.sourcemage dir to store all the config data...

And how about that average casting times... the data is there in the activity log...
Comment 36 Andraž 'ruskie' Levstik 2005-07-12 00:19:25 UTC
You might want to add jabber in as well if you've added icq
Comment 37 Jason Flatt 2005-07-19 14:21:21 UTC
It would be nice to be able to sort the users page
(http://ledger.sourcemage.org/users/users.php) by PC count.


--
Comment 38 Eric Sandall 2005-07-22 18:41:03 UTC
Created attachment 4432 [details]
updated patch for lvm in mountall.sh

I have quite a few networked machines, but usually mount my server's /home to
/home.net on the clients. However, at work I mount this to /home on the clients
and I recently tried using smglstats.sh on these machines.

Problem:
They look for an existing ~/.smglstats, and if found, assume that these stats
are for the current machine.

Solution:
Make ~/.smglstats a directory that contains hostname-based files
(SMGL_STATS=~/.smglstats/$HOSTNAME) and set SMGL_STATS to
~/.smglstats/$HOSTNAME. This update also 'migrates' the 'old' ~/.smglstats to
the 'new' format by copying ~/.smglstats to ~/.smglstats/$HOSTNAME (for the
first machine to run the script with the shared file, which may or may not be
the correct machine). I also upped the version to 0.05

--
Comment 39 Eric Sandall 2005-07-22 18:49:44 UTC
Created attachment 4433 [details]
the spell opencv

Thanks to Andrew Levstick for pointing out that in Comment #31 we had agreed to
use ~/.sourcemage/ for SMGL packages. So I've updated the script to use
~/.sourcemage/smglstats/$HOSTNAME, create ~/.sourcemage/smglstats, and move the
old ~/.smglstats to ~/.sourcemage/smglstats/$HOSTNAME.

For reference the two boxes running this script are isp13 and isp38.

--
Comment 40 Paul Mahon 2005-08-04 05:51:07 UTC
The colour for Canada on the graph is the same as the bg colour.

--
Comment 41 Andraž 'ruskie' Levstik 2005-08-25 22:33:14 UTC
Can you fix this(I'm getting it with the new smgl-ledger spell)
Please, update information about this computer by new program
smglstat.sh version 0.04.

--
Comment 42 Arjan Bouter 2005-09-21 18:52:16 UTC
Can you add a filter for the grimoires being scanned?
It's not much use to include stuff from personal (local) grimoires.

And besides, as free time is limited, we shouldn't wet peoples appetite with
spells which may never see the light of day ;)

--
Comment 43 Pavel Vinogradov 2005-09-24 00:45:31 UTC
guys, i can't change identification fields and their show flags. is it a bug?

--
Comment 44 Ladislav Hagara (lace) 2005-09-24 01:05:45 UTC
Sorry, it is probably a bug [Bug 9407].
No time now. :-(


--
Comment 45 Pavel Vinogradov 2005-09-24 01:10:09 UTC
ok i'll wait... ;)

--
Comment 46 Andraž 'ruskie' Levstik 2005-11-03 12:26:01 UTC
I've got the old duplication bug again... this time with my box named ksi... I
have suddenly 6 boxes where I should only have 4
Comment 47 Andraž 'ruskie' Levstik 2005-11-04 03:57:26 UTC
Still got one ksi to many... :(
Comment 48 Eric Sandall 2005-11-29 14:46:33 UTC
Shall we close this bug and open new bugs for each problem as it comes up?
Comment 49 Jaka Kranjc 2005-12-20 14:34:04 UTC
Would be good, but the website part needs a category in the bt.

Bug: Slovenia is listed twice, two counts.
Comment 50 Ladislav Hagara (lace) 2005-12-21 08:24:12 UTC
Yea, I agree with you Eric.
Just need new category in bugzilla.
Comment 51 Jaka Kranjc 2006-02-03 14:34:44 UTC
I run:
lynxlynx sorcery # smgl-ledger curl
Gathering stats ...

Trying to upload the file "/root/.sourcemage/smgl-ledger/
smglstats_7d7afcc28502a33de9f0f8f7d07622a2" automatically.
Wait please ...

The file has been uploaded.

However, my stats don't get updated. :|
Comment 52 Pavel Vinogradov 2006-03-22 15:44:05 UTC
guys, it's me again ;) Uzbekistan had gone!? what happened? 
Comment 53 Timothée Lecomte 2006-04-10 19:40:42 UTC
Hi !
I can't upload anything ...

'smgl-ledger curl' doesn't output any error, but I still have 0 computer in the
website (id : 0101)

If I login to the website (so my login/password are valid btw), I upload the
file manually, and obtains a red message : "Your file uploaded successfully!"
but still on the bottom of the page "You didn't insert any computer."

And I tried to upload a screenshot, I get no error but it doesn't appear in the
users list on my line ...

I'll attach my stat file for checking.
Comment 54 Timothée Lecomte 2006-04-10 19:41:21 UTC
Created attachment 4756 [details]
Stat file for checking
Comment 55 Jaka Kranjc 2006-04-11 06:19:13 UTC
Yep, exactly the same problem as mine.
Comment 56 Ladislav Hagara (lace) 2006-04-11 08:51:20 UTC
:-)
thanks for stats file
we got it, too long hostname (for our database)
we will fix it in database this night (next 5 hours)
so in 6 hours you can try it
Comment 57 Timothée Lecomte 2006-04-11 18:24:01 UTC
Ok, it works (both screenshot and stat file).
Thanks !
Comment 58 Jaka Kranjc 2006-04-12 07:17:04 UTC
i found out what my problem was. I changed my hostname, but the new profile 
didn't get my client info. Once I put those in, it worked for me again, but 
because it's a different hostmask it is identified as a second computer.
Removed it from the webterface. :D
Comment 59 Andraž 'ruskie' Levstik 2007-01-08 05:05:47 UTC
Add UTF-8 encoding to the page...
Comment 60 David Kowis 2008-07-02 22:41:00 UTC
Is any of this stuff still relevant to ledger? Lace?
Comment 61 Ladislav Hagara (lace) 2008-07-05 22:20:08 UTC
Ledger will be rewritten, closing this bug.