Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working on a module for Condor that will collect hardware information so that we can use realistic numbers to compute power savings, etc. The difficulty is that I don't maintain most of the client systems, so I have to write this with no assumptions as to what may or may not be installed on the system and I can't do anything that requires root access.

I've looked at various utilities (lshal, lshw, hwinfo, etc) and none of them seem to be universal across both Debian- and RedHat-based systems. I have neither the authority nor the desire to force other departments on campus to have one of those packages installed.

dmidecode seems to be pretty universal, but it's not helpful without root privileges. I haven't been able to find any files in /proc that contain the system manufacturer and model. Is there something I'm missing or do I need to try to get all of the distributed admins to install one of the aforementioned utilities?

share|improve this question

You're going to need dmidecode to get that info-and even that isn't going to guarantee you can get the correct hardware info. It should work for Dell and HP server machines, but everything outside of their gets kind of dicey.

share|improve this answer
I've found DMIdecode works pretty well on any server/workstation grade hardware. The ulta-cheap consumer grade equipment, not so much. DMIDecode also runs on BSD systems and a variety of other *nix (YMMV). – Chris S Jul 14 '10 at 19:19
dmidecode is a great tool, but entirely unhelpful for me in this case, since the Condor process does not run as root. The only way it would work is if I got the administrators of the machines this will run on to make dmidecode setuid, which sounds like a bad idea. – Ben Cotton Jul 14 '10 at 19:28
Then you're up a creek. You're going to need something to decode the data stored in the BIOS and you need to be running as root to get to that data. The other option is to allow them to set the make/model in your app so you can make some guesses as to the amount of power its using. – Josh Budde Jul 14 '10 at 19:36

It's a bit second-hand, but you might try running 'dmesg' and seeing if anything interesting is there. Doesn't (usually) require root privs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.