Okay, there has been alot of discussion on this in the other thread, some
of it tangent'd to the original, so, I'm starting off a new thread as a
sort of summary ...
I've been doing some thinking on it this afternoon, and think I've figured
out about the simpliest way of doing it ... it still doesn't deal with
"fakers" and such, but, IMHO, I don't think that that is a *huge* problem
that needs to be addressed ... some might do it for a lark, but, overall,
it just sounds like something that is "more worth then its worth", so over
time, it should eventually balance out ...
Now, the idea is to make this:
a) run on as many boxes as possible
b) not require any special software to be installed on the clients
c) not require any special "registration" by the clients
d) not pull any "sensitive" information
So, here is what I've kinda got it down to ... pseudo-ish code, since I
haven't got the exact syntax worked out *yet* ... specifically, parsing
pciconv to get query strings out of it ...
Now, this is designed to be run *once* per month, per host ... it is also
meant to try, to a certain extent, deal with NAT boxes ... its not
perfect, but, unfortunately, as this whole discussion has shown, there
really is no "perfect" way ...
STEP 1:
fetch -o /tmp/getid http://bsdstats.hub.org/get_id.php
get_id.php will look at the IP that is coming in, search the database, and
if a host already exist, will increment by 1 and return a new id ... all
IPs will have at least one:
IP:1 pair in the database, NAT hosts will have IP:2, IP:3, IP:4, etc ...
STEP 2:
pciconf -lv needs to be parsed, this being the hard step, into a string
that can be sent via HTTP ... this is the hard part because it has to be
done as/in a shell script ... anyone out there *really* good at shell
programming?
What needs to happen is:
[EMAIL PROTECTED]:0:2: class=0x060400 card=0x00000044 chip=0x032a8086 rev=0x09
hdr=0x01
vendor = 'Intel Corporation'
device = '6700PXH PCI Express-to-PCI Express Bridge B'
class = bridge
subclass = PCI-PCI
Needs to be converted into:
device=pcib&vendor=Intel+Corporation&device=6700PXH+PCI+Express-to-PCI+Express+Bridge+B&class=bridge&subclass=PCI-PCI
So that the final query would look something like:
fetch http://bsdstats.hub.org/report.php?id=`cat
/tmp/getid`&device=pcib&vendor=Intel+Corporation&device=6700PXH+PCI+Express-to-PCI+Express+Bridge+B&class=bridge&subclass=PCI-PCI
So there would be one 'fetch' per device listed ...
report.php would take the IP:getid pair, and store one record per device
into the database, from which stats could be very easily generated using
standard SQL queries ...
STEP 3:
fetch http://bsdstats.hub.org/report_sys.php?id=`cat /tmp/getid`&system=`uname
-mr | sed 's/\ /+/g'`
To record the FreeBSD version ...
================
I personally don't think there is anything else useful / non-sensitive
that we'd want to report on ...
Now, the idea is that this would be dump'd into /etc/periodic/monthly, and
/etc/defaults/periodic.conf would have:
monthly_statistics_enable="YES"
monthly_statistics_report_pciconf="YES"
Optimally, we'd love to have everyone report pciconf information, since
knowing what vendors and devices are in use would definitely add more
weight then *just* what version of FreeBSD, but in order to hopefully get
as much "buy into" this as possible, the script should be written to allow
it to be disabled ... again, I can't think of why someone would feel that
that was 'sensitive information', but providing the option to shut it off
is definitely a must ...
How does that sound?
----
Marc G. Fournier Hub.Org Networking Services (http://www.hub.org)
Email . [EMAIL PROTECTED] MSN . [EMAIL PROTECTED]
Yahoo . yscrappy Skype: hub.org ICQ . 7615664
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"