Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Getting OS/HW details?

I'd take a look at the perl script memconf and see how it works.  Even 
though it was written for Solaris, it does a decent job on Linux.  It 
does like to be run as root, however.

There is a package lshw on Fedora (among others)  you could look at the 

decode-dimms, a perl script in lm-sensors, is another good source.  It 
also wants to be run as root, and requires eeprom to be loaded.

	Jerry Natowitz
===>    j.natowitz (at)

On 11/02/12 13:09, Scott Ehrlich wrote:
> If I wanted to write a script to obtain distro flavor (Ubuntu, CentOS,
> RH, Mint, BSD, Solaris, etc), major/minor version (5.3, 10.6, etc),
> hardware brand/make/model, at least for starters, what would be the
> best way to attack it?
> This script may or may not assume being run as root.
> Environment is completely heterogeneous, so while I may be using an
> OEM system, my officemate might be using a white box system.
> I think the only assurance might be it be run as /bin/sh so we don't
> have to worry about shells.
> We cannot assume /etc/motd, /etc/issue, or anything else exists in its
> out-of-box state (they could have been replaced with other text).
> I thought about uname -a, but it does not indicate OS distro nor
> version.   Arch can only assist with 32/64 bit.
> Thanks for leads and ideas.
> Scott
> _______________________________________________
> Discuss mailing list
> Discuss at

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /