[Wellington-pm] Hardware and Perl
Lesley Longhurst
lrw at clear.net.nz
Wed Jun 13 19:32:52 PDT 2012
On 14/06/12 14:08, Grant McLean wrote:
> On Thu, 2012-06-14 at 11:03 +1200, Lesley Longhurst wrote:
>> Hi Mongers,
>>
>> Does anyone know a good* module for getting information about the
>> capabilities of CD/DVD/Blu-Ray drives? The methods we've been using to
>> date are not working too well with the transition to virtualisation.
> I'm afraid I don't know of such a thing.
Oh well, it was worth a crack. I was kind of hoping for one of those
"aha" moments like the time I was told about Data::Dumper ... but I know
I was being optimistic. Never mind. :-)
> If I were looking to get that information I'd probably start by parsing
> the output of lshw. But that might be what you're doind already - you
> didn't say.
Various things along those lines. /proc/sys/dev/cdrom/info is the first
port of call, supplemented with info found under /sys/block/foo. This
approach has served well enough until now but /proc/sys/dev/cdrom/info
is not being correctly populated under VMware. It shows that the device
exists but doesn't get the capabilities. I think perhaps we're missing a
driver.
> We had a brief chat on the #wellington.pm channel on irc.perl.org and
> the only other suggestion that came up was perhaps your problems are due
> to running inside a VM where you can't get access to the information
> (once again, wild speculation in the face of little information).
Thanks to everyone for trying. Perhaps I should hop on that channel myself.
> If you do find an awesome solution then by all means tell us :-)
I don't think "awesome" is the right word, but in addition to the above
we use the output "cdrec dev=foo -prcap", and I've recently discovered
dvd+rw-mediainfo which reports on media in the drive.
--
Lesley Walker Longhurst
Linux Systems Administrator
Opus International Consultants Ltd
More information about the Wellington-pm
mailing list