linux.conf.au Presentations
Towards a small, efficient Linux hardware inventory system
Seminar
lsvpd is a serviceability tool written for Linux running on IBM pSeries systems, although it runs on other architectures as well under Linux 2.6. Developed as a look-alike for the AIX tool of the same name, lsvpd includes a hardware inventory database, scanning components that populate the database and a variety of query tools. The focus is on listing Vital Product Data for components as part of hardware service calls - in such cases knowledge of model numbers, engineering versions of circuit boards and microcode versions can be critical in dertermining the the correct fix for a problem. Use of a database, rather than querying hardware directly is an important requirement, since it may not be possible to get required information from a faulty component.
Certain problems with the current version of lsvpd can't be reliably fixed without proper hotplug support. The current version of lsvpd for Linux is a combination of bash scripts and "helper programs" written in C so, due to the large number of processes that are spawned, is unlikely to cope well with a large number of hotplug events in a short amount of time. A decision has been made to "migrate" the current implementation to C - the plan is to make the helper programs incrementally larger so they eventually replace the entire bash implementation. One feature of the current bash implementation is run-time loadable modules that can provide additional functionality depending on available system features, such as sysfs. Implementing this as elegantly in C will be interesting.
The paper/talk will discuss the above in a number of contexts, including:
- The need for a small, efficient hardare inventory system for Linux. Other systems, such as Open Pegasus, also do hardware inventory, and could use a lower-level implementation if it were available and suitable.
- The use of a hardware inventory system as part of a persistent device naming system. This would involve generalising something like the scsi_id program, but would use general VPD values for many different types of devices. A prototype has been implemented using the current implementation of lsvpd.
- Level of success migrating the current implementation to C. Some part of the migration will be complete by the time the paper is due.
- The trend towards writing system utilities in scripting languages. As a servicability tool, lsvpd may be required to help diagnose problems when only a partial system is available - there may be no /usr filesystem.
Martin Schwenke
Martin Schwenke is an Open Source Hacker with the IBM OzLabs Linux Technology Center where, among other things, he works on Linux hardware inventory software. He has experience in Linux technical support, education and system administration. Martin has spoken at recent AUUG, Linux.conf.au and other conferences. In a "past life" he lectured university courses ranging from database fundamentals to operating systems internals, and has also done research on formal software design methods and functional programming. In his spare time Martin plays music and social sports, hacks on Open Source software and spends time with his family. More information is available at http://meltin.net/people/martin/



