Olivier Nicole wrote: >> 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? > > Why not doing the parsing on the server? > > Is there a limit on the size of an HTTP GET request? If not, the > output of pciconf -v can fit in one single request, done. > > And limiting the number of requests, you also limit the amount of data > xfered. > > I'd also go for: > > pciconf -l | sed s/\ /+/g | sed s/\ /%09/g| sed s/@/%40/g | sed s/:/%3a/g| > sed s/=/%3d/g > > and you get lines like: > > hostb0%40pci0%3a0%3a0%3a%09class%3d0x060000+card%3d0x341a8086+chip%3d0x254c8086+rev%3d0x01+hdr%3d0x00 > none0%40pci0%3a0%3a1%3a%09class%3d0xff0000+card%3d0x341a8086+chip%3d0x25418086+rev%3d0x01+hdr%3d0x00 > > That are almost completely URL encoded. Remains to replace the newline > into %0d, and you are done. Result is one line that is around 2000 > characters.
This is cool and all, but why are the concentration solely on PCI devices? pciconf output doesn't tell you directly what CPUs are in the system or even how many there are. It doesn't tell you exactly what sort of memory or disk drives the system uses -- all of which would be important information that might just persuade hardware manufacturers to provide more FreeBSD support. Surely a condensed version of /var/run/dmesg.boot is more to the point. It's not just about how many machines there are that might use a particular manufacturer's devices either, it's about how much money the users of those machines are prepared to spend. For instance, I could see that a manufacturer of, say, RAID controllers might well be more interested in providing FreeBSD support if they knew there was a pent up demand for using their models in top of the line servers rather than the same number of uses based on cheaper, small scale kit. I could take two identical motherboards stick 1GB of RAM, a single 40GB IDE drive and a low-spec single core processor in one, and in the other I could have two dual core top of the range processors, 8GB ECC RAM and a terabyte of storage using 15k rpm SAS drives. pciconf probably wouldn't distinguish between those two specifications. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW
signature.asc
Description: OpenPGP digital signature