473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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
1 3033
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mickel Grönroos | last post by:
Hi! I'm fiddling with Python for Windows (normally using Linux) and as a part of that I want to try to make a simple word frequency list generator to be used in conjunction with Microsoft Word....
6
by: Dan Ellis | last post by:
Hi, I've been down so many dead ends trying to get something working, so I'm really hoping someone can help out. I need to access an Oracle database running on a Windows server from Python...
5
by: Claudio Grondi | last post by:
Background information: --------------------------------- in order to monitor mainboard sensory data as fan speeds, temperatures, applications like SpeedFan http://www.almico.com/speedfan.php or...
13
by: lupher cypher | last post by:
Hi, I'm trying to access memory directly at 0xb800 (text screen). I tried this: char far* screen = (char far*)0xb8000000; but apparently c++ compiler doesn't know "far" (says "syntax error...
2
by: Stephen Corey | last post by:
How can I access the hardware information of a system, like hard drive(s) model & serial numbers, video card model, etc...? Thanks!
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
4
by: Grayham | last post by:
Hi all I am new to this group so 'Hello All' I have a PC which is running linux and in it have installed a digital satellite card. I would like to write some software to access the card, tune...
1
by: Florencio Cano | last post by:
Hi, I'm looking for a method of gathering information about the system hardware and software installed using Python. I would like to do it in UNIX and in Windows. I think that it would be good in...
0
by: Tim Golden | last post by:
Florencio Cano wrote: For Windows WMI is probably a good bet. TJG
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.