467,869 Members | 1,448 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,869 developers. It's quick & easy.

accessing hardware information using python

Hello,

I am currently looking to write a utility in python that will monitor
the statis of a RAID card within linux. The card in Question is the LSI
SAS1064 as the tools provided by the vendor to monitor the software
does not suit our requirements.

However I am unsure how to convert dmidecode information like so :

Handle 0x0025
DMI type 10, 6 bytes.
On Board Device Information
Type: SCSI Controller
Status: Enabled
Description: LSI serial-ATA #1
Into anything that I can use to extract information using python? Does
anyone have any ideas or any recommended reading about this matter?

Regards,

Johhny

Jan 20 '06 #1
  • viewed: 2812
Share:
1 Reply
Johhny wrote:
I am currently looking to write a utility in python that will monitor
the statis of a RAID card within linux. The card in Question is the LSI
SAS1064 as the tools provided by the vendor to monitor the software
does not suit our requirements.
What are your requirements?
However I am unsure how to convert dmidecode information like so :

Handle 0x0025
DMI type 10, 6 bytes.
On Board Device Information
Type: SCSI Controller
Status: Enabled
Description: LSI serial-ATA #1


If dmidecode is a command-line program, maybe something using os.popen:

#!/usr/bin/env python
import os

dmiOutput = os.popen("dmidecode", "r")

status = None
for line in dmiOutput:
line = line.strip()
if line.startswith("Status: "):
status = line.split("Status: ", 1)[1]
break

if status is not None:
print "Status is: ", status
else:
print "No status information found"

Jan 20 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Mickel Grönroos | last post: by
6 posts views Thread by Dan Ellis | last post: by
13 posts views Thread by lupher cypher | last post: by
2 posts views Thread by Stephen Corey | last post: by
4 posts views Thread by Grayham | last post: by
1 post views Thread by Florencio Cano | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.