You are not logged in.

#26 2003-10-21 18:44:18

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

Updating is a misleading term.  What actually happens is that on each 'update', all the old data is purged from the database and the new stats are added as if it was your first 'update'.

So, any 'unique' packages would be lost on an update.  Likewise, your gnome2.2 packages would go away after upgrading to gnome 2.4 and updating your stats.


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#27 2003-10-21 19:32:13

terrapin
Member
From: Lockport, IL
Registered: 2003-08-06
Posts: 104

Re: ArchStats: Beta testers wanted

ah.  That's what I thought but was confused.  On my work machine I created a package for Mozilla Firebird called "mozillafirebird-0.7-1".  While looking through the packages at archstats I noticed that quite a few people had the official package "mozilla-firebird-0.7-1".  I removed my package and installed the official one and ran "archstats -u" to update the database.  After the update I visited the website and noticed that "mozillafirebird-0.7-1" was still there which sparked my question.

After reading your response I ran "archstats -d" to see what it was sending.  Looking through the list of packages I noticed that there was no "mozilla" packages listed.  I then ran "pacman -Q" to verify that the package was installed which it was.  Comparing the two lists I noticed that archstats is missing some packages (212 vs ~171).

Any idea why archstats is missing these packages?

Offline

#28 2003-10-21 23:33:01

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

That's wierd!

I just ran similar tests on my system and there were no discrepancies.   I'm running python-2.3.2-1 and pacman-2.6.4-1.  I'm sure you're probably at the same versions, but just in case, you can check that.

I honestly don't know what the difference would be.  The archstats script just calls 'pacman -Q' and uploads the package list.

If you don't mind, try the following and see if you get the same results.

1) at your prompt, type 'pacman -Q | wc -l' to the number of packages installed.

2) at your prompt type 'python' - this takes you into the python interpreter.  At the ">>>" prompt start typing the following:

>>> import os
>>> p = os.popen('/usr/bin/pacman -Q')
>>> pkgs = p.readlines()
>>> len(pkgs)
-your # of packages-

CTRL-D to exit the python interpreter

Let me know how that works.

Thanks,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#29 2003-10-22 13:43:25

terrapin
Member
From: Lockport, IL
Registered: 2003-08-06
Posts: 104

Re: ArchStats: Beta testers wanted

[root@ws552v6846l josephc]# pacman -Q | wc -l
    212
[josephc@ws552v6846l josephc]$ su
Password:
[root@ws552v6846l josephc]# python
Python 2.3.2 (#1, Oct  3 2003, 12:01:48)
[GCC 3.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> p = os.popen('/usr/bin/pacman -Q')
>>> pkgs = p.readlines()
>>> len(pkgs)
212
>>>
[root@ws552v6846l josephc]# exit
exit
[josephc@ws552v6846l josephc]$ python
Python 2.3.2 (#1, Oct  3 2003, 12:01:48)
[GCC 3.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> p = os.popen('/usr/bin/pacman -Q')
>>> error: /var/lib/pacman/local/bc-1.06-2/desc: Permission denied
 
>>> pkgs = p.readlines()
>>> len(pkgs)
172
>>>
[josephc@ws552v6846l josephc]$

When I run the python code as my normal user I get that access denied error and it hangs there.  I checked the permissions on /var/lib/pacman/local and nothing caught my eye.

drwxr-xr-x    2 root     root         4096 Aug 14 05:30 autoconf-2.57-1
drwxr-xr-x    2 root     root         4096 Oct  9 11:08 automake-1.7.7-1
drwxr-xr-x    2 root     root         4096 Sep 19 08:51 bash-2.05b-8
drwxr-xr-x    2 root     root         4096 Aug 14 06:52 bc-1.06-2
drwxr-xr-x    2 root     root         4096 Sep  2 09:56 bin86-0.16.12-1
drwxr-xr-x    2 root     root         4096 Aug 14 05:30 binutils-2.14-1
drwxr-xr-x    2 root     root         4096 Aug 14 05:30 bison-1.875-1
drwxr-xr-x    2 root     root         4096 Oct 13 07:20 bug-buddy-2.4.0-1
[root@ws552v6846l bc-1.06-2]# ls -l
total 12
-rw-------    1 root     root           56 Sep 22 15:08 depends
-rw-------    1 root     root          241 Sep 22 15:08 desc
-rw-------    1 root     root          114 Sep 22 15:08 files
[root@ws552v6846l bc-1.06-2]#

Offline

#30 2003-10-22 14:03:38

terrapin
Member
From: Lockport, IL
Registered: 2003-08-06
Posts: 104

Re: ArchStats: Beta testers wanted

The problem was the permissions in those subdirectories.  I gave my normal user read rights to those directories and everything works fine now.  Thanks for your help.

[josephc@ws552v6846l josephc]$ python
Python 2.3.2 (#1, Oct  3 2003, 12:01:48)
[GCC 3.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> p = os.popen('/usr/bin/pacman -Q')
>>> pkgs = p.readlines()
>>> len(pkgs)
212
>>>
[josephc@ws552v6846l josephc]$

Offline

#31 2003-10-22 15:37:26

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: ArchStats: Beta testers wanted

That's weird... I wonder what would have caused that...


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#32 2003-10-22 16:27:47

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

terrapin wrote:

The problem was the permissions in those subdirectories.  I gave my normal user read rights to those directories and everything works fine now.  Thanks for your help.

Great news!  I was getting worried that there was some bizarre problem that I would have no clue on how to fix.  I'm glad you opted to fix permissions rather than suggest running archstats as root.  I've got code in the archstats script to prevent root from running it.  Since it tries to write a config file and takes command-line arguments for config file location, it can easily be abused...  :twisted:

Thanks for taking the time to find the problem,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#33 2003-10-22 16:29:49

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: ArchStats: Beta testers wanted

It's good you wrote it like that farphel.  No one trusts your coding ability anyway  wink


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#34 2003-10-23 22:26:30

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

FYI, I added a rc/startup script for ArchStats to the project page.  My primary home system is a laptop and since I don't run it any set standard time, using a cronjob was not the greatest way to keep my stats updated.  I figured a startup script would be the best way to keep my stats current.

Here's the 'vanilla' script.  Edit the ARCHSTATS_CMD and ARCHSTATS_USER variables per your setup, stick the script in /etc/rc.d, make sure it's executable, add the scriptname to /etc/rc.conf DAEMONS line, and you're ready for your next bootup.

#!/bin/bash
                                                                                
. /etc/rc.conf
. /etc/rc.d/functions

# Set this to the 'archstats' client full path adding the '-u' also
#
#ARCHSTATS_CMD='/home/farphel/bin/archstats -u'
ARCHSTATS_CMD=''

# Set this to the username to run the script as.  Note, this user will
# need to have execute permissions set on the archstats script
#
#ARCHSTATS_USER=''
ARCHSTATS_USER=''
                                                                                
case "$1" in
        start)
                stat_busy "Updating ArchStats"
                if [ "$ARCHSTATS_CMD" -a "$ARCHSTATS_USER" ]; then
                        su - $ARCHSTATS_USER -c "$ARCHSTATS_CMD"
                        stat_done
                else
                        stat_fail
                fi
        ;;
        stop)
        ;;
        *)
                echo "usage: $0 {start|stop}"
        ;;
esac
exit 0

This seemed like an easier solution than packaging up 'anacron' or similar...  smile

Cheers,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#35 2003-10-25 11:56:11

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: ArchStats: Beta testers wanted

When cleaning my /var folder I lost my /var/lib/pacman/local thereby not be able to upgrade my system with "pacman -Su". My local package tree is in ArchStats database, how do I get a copy. Or if it can be sent? I am not sure about my registration number (something like 11) but I am the only one with win4lin3-5.2.10c-d package.

Currently I am using my AL-AMLUG LIveCD package tree what has same packages I had except many are missing. From ArchStats list I have to re-install the missing packages or is there another way out?

My email:
rasat@pacific.net.sg

PS
This is a real test for ArchStats smile .

Offline

#36 2003-10-26 13:52:16

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

Hi rasat,

rasat wrote:

My local package tree is in ArchStats database, how do I get a copy. Or if it can be sent?

I might be misunderstanding, but ArchStats doesn't keep a copy of your /var/lib/pacman/local.  It only records the names/versions of the software you have installed.  Basically, all the archstats script does is call 'pacman -Q' and uploads that list.  I'll try and extract the list of software you had installed, but I'm not sure what help that will be to you.  I'll send it to the email address you supplied.

Regarding further features of ArchStats, I was thinking of adding a 'login' section that you would provide your sytem id and password (assuming you made one) that would allow you to review/modify your system stats on-line.  It could also provide relative stats, for example, 'Your system uses kernel 2.4.21: you are the _only_ Arch user with that kernel.' or another example would be with software.  Next to each package you have installed, it could list how many other Arch users also have that package installed.

All of these 'user' features would be a good bit of work to implement.  I'm not sure if there would be enough interest in something like this.  Maybe after I release 'ArchStats' and some people start really using it, I'll put up another poll and ask if there is any interest in these 'user' features.

Cheers,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#37 2003-10-26 16:18:59

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: ArchStats: Beta testers wanted

farphel wrote:

I might be misunderstanding, but ArchStats doesn't keep a copy of your /var/lib/pacman/local.  It only records the names/versions of the software you have installed.

I stated wrongly.... I meant the list of package names. Thanks for sending it. With the help of the list I can copy the missing package folders from current and unofficial to local. If this doesn't work, then I will reinstall.

Offline

#38 2003-10-26 17:06:40

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

Ok, answer me this:  How is it that on the ArchStats 'packages' page, there are 31/33 systems that have python installed.  How are the two systems that don't have python installed, running the archstats script (which of course is written in python!).  The only thing that comes to mind is that two systems are not using the python package, but are using a built-by-hand install?

Can somebody confirm that this is the case, or do I have a bug someplace?

Thnx,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#39 2003-10-26 17:36:19

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: ArchStats: Beta testers wanted

rasat wrote:
farphel wrote:

I might be misunderstanding, but ArchStats doesn't keep a copy of your /var/lib/pacman/local.  It only records the names/versions of the software you have installed.

I stated wrongly.... I meant the list of package names. Thanks for sending it. With the help of the list I can copy the missing package folders from current and unofficial to local. If this doesn't work, then I will reinstall.

There are some files that aren't included in the unofficial/current directories that are included in your local directory, files being one of them.  The only way to get a perfectly working system is to reinstall all of those packages based on the list.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#40 2003-10-26 19:07:21

Mork II
Member
From: Visby, Sweden
Registered: 2003-05-14
Posts: 87

Re: ArchStats: Beta testers wanted

farphel wrote:

Ok, answer me this:  How is it that on the ArchStats 'packages' page, there are 31/33 systems that have python installed.  How are the two systems that don't have python installed, running the archstats script (which of course is written in python!).

I got a bit curious about that as well. The simple aswer is that two people have other versions of python installed. You will see this if you list the packages alphabetically.

Good project by the way. Though maintainers should remeber that python probably isn't as prevalent as arschstats (for obvious reasons) make it out to be smile

Offline

#41 2003-10-27 04:11:26

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: ArchStats: Beta testers wanted

Xentac wrote:

There are some files that aren't included in the unofficial/current directories that are included in your local directory, files being one of them.  The only way to get a perfectly working system is to reinstall all of those packages based on the list.

Not only if not included, but I also noticed the information in local and current/unofficial  is different. Local includes list of files for pacman to unistall, list package files, etc.

In my backup system, from now onward I will include a copy of my /var/lib/pacman/local smile.

Offline

#42 2003-10-27 12:48:57

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

Mork II wrote:
farphel wrote:

Ok, answer me this:  How is it that on the ArchStats 'packages' page, there are 31/33 systems that have python installed.  How are the two systems that don't have python installed, running the archstats script (which of course is written in python!).

I got a bit curious about that as well. The simple aswer is that two people have other versions of python installed. You will see this if you list the packages alphabetically.

Guess I should've tried using the features I programmed into it!  :oops:

As far as using python for the archstats script is concerned, it probably should be written in a language that is more commonly installed on users's systems so that they're not required to install extra packages.  The archstats script requirements are pretty simple; parse files from /proc, make an external call to pacman, and make a HTTP POST to a web server.

I know perl is installed (typically), but what about the extra modules for HTTP chatter (LWP?).  What do perl developers do to pull that stuff in, use CPAN?  If so, that sounds like more of a problem than the current situation where users just need to install additional packages.  Probably the best solution would be to write it in C linking to curl or some other lib for HTTP stuff and distribute it that way.  I suppose it could even statically link against curl so users wouldn't need to install the curl package.

Comments?


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#43 2003-10-27 14:23:15

pmv
Member
From: Helsinki, Finland
Registered: 2003-09-30
Posts: 22

Re: ArchStats: Beta testers wanted

Well now you can see how lousy computer I got at office:

Lowest system memory:          111 MB

Lowest system swap:          232 MB

Slowest recorded CPU (MHz):          350.80

lol

Well it actually works great for what I'm using it... Mainly for reading e-mail and remote controlling couple of servers.

Just glad my home-computer isn't this lame...

Offline

#44 2003-10-27 15:23:00

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: ArchStats: Beta testers wanted

I think python was an excellent choice.  We should force more people to use such an amazing language!


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#45 2003-10-27 15:55:51

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

Python is the best!

Perhaps if more utilities get written in python (namcap already is, right?), then python will be included in 'base' and then there won't be any _extra_ packages to install in order to use archstats... wink


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#46 2003-10-30 16:01:07

terrapin
Member
From: Lockport, IL
Registered: 2003-08-06
Posts: 104

Re: ArchStats: Beta testers wanted

Question regarding "archstats -i".  Does it check to see if a configuration file was already created and edit it or does it just create one?  I ran archstats -i again to change some settings (i wanted to add my email address and a password) and after running it I compared the old .archstats.conf to the new one and the SYSTEM_UID's where different.

previous
SYSTEM_UID = 'x'
current
SYSTEM_UID = 'x'

Which after running archstats -u created a new record for the same machine, I believe.  Can you verify this?  The machine name is ws552v6846l if that helps.

Offline

#47 2003-10-30 18:47:03

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

terrapin wrote:

Question regarding "archstats -i".  Does it check to see if a configuration file was already created and edit it or does it just create one?

If you already have an .archstats.conf file, re-running with '-i' will regenerate the config file but re-use the existing SYSTEM_UID.  If you delete your .archstats.conf file (or move it out of the way), the '-i' will assume you've never configured it and will consequently receive a new SYSTEM_UID from the server (which is what happened to you).  You are correct in assuming that there are now two entries for your system.  From a 'security' point of view - I should delete both of your entries so that nobody knows your SYSTEM_UID.  A malicious user could generate their own .archstats.conf file using your SYSTEM_UID(s) and update your stats!  When I delete your entries, the next time you run archstats, it will give you a new SYSTEM_UID, but preserve your upload options as defined in your current config file, therefore you do not need to re-run with the '-i' switch.

In the future, if you want to re-configure your run-time options, all you need to do is re-run 'archstats -i'.  It will preserve the SYSTEM_UID defined in your existing config file and allow you to update your run-time options.

HTH,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#48 2003-10-30 19:15:33

terrapin
Member
From: Lockport, IL
Registered: 2003-08-06
Posts: 104

Re: ArchStats: Beta testers wanted

I reran "archstats -i" without deleting or moving the new one as I seen your warning not to edit that file  smile  I just copied it "cp .archstats.conf .archstats.test".  Which should have kept the same SYSTEM_UID but they were different when I compared .archstats.conf to the old one .archstats.test

I would try it again but I don't want to jack up your database by creating duplicate records.  Also I believe there might be a third record for my machine in your database.

Offline

#49 2003-10-30 22:14:59

farphel
Forum Fellow
From: New Hampshire - USA
Registered: 2003-09-18
Posts: 250
Website

Re: ArchStats: Beta testers wanted

ACK!  You're right, terrapin!  You've found a bug...  :oops:

I will work on it now and upload a new archstats script that has the behavior I outlined in my previous post.

  EDIT: Ok, the new archstats client (v1.4) is ready for download on the main  BETA test site: http://www.coding-zone.com/archstats.phtml.

Thanks for helping me test this little project out.  I'm working on another 'feature' for the web site that will allow users to browse through the individual systems rather than just viewing relative stats.  It's a quite a bit more coding, but I'm making some progress.  Hopefully in a week or so.

Thanks again,
farphel


Follow the link below, sign up, and accept one promotional offer.  If I can get five suckers (err... friends) to do this, I'll get a free iPod.  Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142

Offline

#50 2003-10-31 19:54:53

kritoke
Member
From: Texas, USA
Registered: 2003-08-01
Posts: 211
Website

Re: ArchStats: Beta testers wanted

For some reason I keep getting permission denied errors when I try to update my stats to the Arch Stats server, I am using version 1.4 of the client.  Here is the output of the error:

[kritoke@archlinux tmp]$ ./archstats -u
error: /var/lib/pacman/local/control-center-2.5.0-1/desc: Permission denied

Kritoke


http://counter.li.org/ Registered Linux User #318963 kritoke@jabber.org

Offline

Board footer

Powered by FluxBB