Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 2006 09:33:06 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: BSDstats: Just added - Vendor Stats
Message-ID:  <44F2AA42.4050209@infracaninophile.co.uk>
In-Reply-To: <20060828081109.GA99053@server.idefix.loc>
References:  <20060826223927.I82634@hub.org> <20060828081109.GA99053@server.idefix.loc>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigE483FD88D8054427C094ED48
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Matthias Fechner wrote:

> * Marc G. Fournier <freebsd@hub.org> [26-08-06 22:43]:
>> Figuring that for the purposes of these stats, "driver stats" might be=
 too=20
>> fine, I've just added a page breaking down hardware use by Vendor,=20
>> eliminating the driver ... (ie. 161 3com devices in use, etc) ... ther=
e is=20
>> a bug in the stats query used for this one, where I'm showing some 'bl=
ank=20
>> lines' for devices ... not sure if its a missing device in pci_dev.txt=
 or=20
>> not, will investigate further ...
>=20
> is it possible to see what the program transmit?
> I can only see that it transfers anything but not what.

You can run:

   sh -x /usr/local/etc/periodic/300.bsdstats

to get a trace of what happens while the script is running.  It's not
exactly the clearest, but amongst that output you can see the calls to
/usr/bin/fetch that upload the information -- this sort of thing:

+ /usr/bin/fetch -qo /dev/null http://bsdstats.org/scripts/report_devices=
=2Ephp?key=3DXXXXXXXXXXXXXXXXXXXXXXXXX&dev[]=3Dagp0:30991106:060000&dev[]=
=3Dpcib1:b0991106:060400&dev[]=3Dpcm0:011113f6:040100&dev[]=3Dde0:0009101=
1:020000&dev[]=3Dsym0:00201000:010000&dev[]=3Dsym1:00201000:010000&dev[]=3D=
isab0:30741106:060100&dev[]=3Datapci0:05711106:01018a&dev[]=3Duhci0:30381=
106:0c0300&dev[]=3Duhci1:30381106:0c0300&dev[]=3Duhci2:30381106:0c0300&de=
v[]=3Dnvidia0:032210de:030000

Or you can change the 'do_fetch' subroutine to just echo what it would
send:

happy-idiot-talk:~:% diff -u /usr/local/etc/periodic/monthly/300.statisti=
cs /tmp/300.statistics=20
--- /usr/local/etc/periodic/monthly/300.statistics      Mon Aug 28 09:27:=
25 2006
+++ /tmp/300.statistics Mon Aug 28 09:29:53 2006
@@ -93,7 +93,7 @@
 }
=20
 do_fetch () {
-    /usr/bin/fetch -qo /dev/null "http://$checkin_server/scripts/$1"
+    echo /usr/bin/fetch -qo /dev/null "http://$checkin_server/scripts/$1=
"
 }
=20
=20
	Cheers,

	Matthew


--=20
Dr Matthew J Seaman MA, D.Phil.                       7 Priory Courtyard
                                                      Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey         Ramsgate
                                                      Kent, CT11 9PW


--------------enigE483FD88D8054427C094ED48
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE8qpJ8Mjk52CukIwRCPT5AJ9lUrIPdiA0uHdtRCC4d5a56TAS8gCePOQM
rYvj15KS4jqKaYRrIXS+hho=
=l/ds
-----END PGP SIGNATURE-----

--------------enigE483FD88D8054427C094ED48--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44F2AA42.4050209>