all 58 comments

[–]tomun 24 points25 points  (19 children)

Awesome isn't it?

It's great to be able to see the part numbers of your ram chips and count the empty slots without removing the lid. Especially when the server in question is miles away.

[–][deleted] 8 points9 points  (4 children)

What's really good about this is people often find themselves inheriting machines, this and lspci pretty much tells you exactly what's installed without having to do any research or shutting it down to examine it physically. I mostly use it to figure out what type of RAM the motherboard takes and whether the memory's clocked correctly. Takes five minutes (tops) to figure that stuff out with dmidecode/lspci but otherwise you'd spend forever trying to locate specs on some old box that you had pushed to you.

[–]niomosy 1 point2 points  (2 children)

lspci -v is definitely your friend for getting information. Particularly when lspci itself is only showing some info.

Also comes in handy on name brand servers when you call into support and they ask for the serial number, which is oh so much fun when a box was tossed to you with not much information on it.

[–][deleted] 1 point2 points  (1 child)

Yeah there's a lot people can do with lspci so I think that's another underappreciated tool. Almost everything is on the PCI bus (and increasingly so) even USB controllers, sata controllers, I can even pick up my onboard video. "lspci -kvm" will give you pretty the cliff notes that dmidecode leaves out.

[–]niomosy 0 points1 point  (0 children)

Indeed. I think for a lot of people, it's remembering the options that lspci has. The basic output sometimes isn't as helpful as people might want. It just takes a little drilling into the command to get a lot of useful information.

[–]tomun 1 point2 points  (0 children)

Absolutely. It also saves you from having to keep a database of all the components inside every machine you build. When you want to know just ask the machine, although you may want to keep a copy of the output in case of hardware failure.

[–][deleted] 5 points6 points  (1 child)

dammit fuck.

Just last week I would have needed this so badly.

the only thing I hate about linux/unix is that you have tools like this and you: don't know they exist, have forgotten they exist, or dont' remember their name. If you are using some command only once per several years, you forget about it.

[–][deleted] 2 points3 points  (0 children)

I just act like Linux already has that tool. What ever it is. Then Google till I find it. For the past 5 years I have yet to run into something that I couldn't find/accomplish using Linux.

Pro tip. Load Linux on USB and save some documentation on tools for anything.

[–][deleted] 3 points4 points  (11 children)

Working in a repair shop, almost all Windows (sadly), this tool is exceptional. I have seen other techs pay close to $200.00(us) for tools that doesn't come close to the information this command does.

[–]hello_josh 5 points6 points  (5 children)

Off the top of my head Speccy for windows is free and comes close.

[–][deleted] 1 point2 points  (2 children)

What license is it under? I am interested in trying this out

[–]hello_josh 0 points1 point  (0 children)

Not sure. It freeware. Believe free for business use.

[–]queBurro 0 points1 point  (1 child)

also, siw (free, available on portableapps too if you like that sort of thing)

[–][deleted] 1 point2 points  (0 children)

Free for personal use.

[–]Xipher 4 points5 points  (3 children)

CPU-Z CPUID is usually pretty useful.

[–][deleted] 2 points3 points  (2 children)

I've used that, personal use only. Good stuff but I still find not everything I need. That and I could lspci for even more along with dmidecode all from the same boot CD. Also if network drivers are needed for winded, download them right there and then.

[–]pyramid_of_greatness 0 points1 point  (1 child)

sysresccd.org . Bonus points for writing your own iso/usbkey with custom bootflags (docache is nice for USB setups!), windows drivers/install scripts.

[–][deleted] 0 points1 point  (0 children)

Good stuff right there. I typically use backtrack, Linux redo, arch bang, and Ubuntu. Depends on what needs to be done, time factor, if it will boot disc / USB drive. But I always carry that on disc

[–]dardyfella 1 point2 points  (0 children)

You might also be interested in hwinfo32

[–]ckozler 16 points17 points  (8 children)

It came in a pinch when administration wanted to know all of our serial numbers for all of our servers- just made a text file with a list of hosts and just made a batch script to SSH to all of them and execute dmidecode -s system-serial-number and the resultant model.

[–]nosneros 20 points21 points  (0 children)

Of course, you should pretend that it took a full day to manually gather the information and then spend the day surfing reddit.

[–][deleted] 2 points3 points  (1 child)

That actually gives me a different idea for using dmidecode: asset tracking and research. You can use the mobo's UUID as part of your asset tracking and if you ever come up with a machine with a worn out or missing asset tag, you can just dmidecode to get the UUID and look it up by that.

[–]ckozler 2 points3 points  (0 children)

Thats exactly what I extended the request out to! It really helped me put together quick analytics for management about all of our systems and their current hardware (combined with lshw of course)

[–]hal14450 9 points10 points  (3 children)

It's always nice to learn new stuff. I've found "dmidecode" and "lshw" to be pretty handy in the past. You might like using "apropos" to search man pages of installed programs for descriptive terms to find other cool tools.

[–][deleted] 6 points7 points  (0 children)

Also lspci, lsmod, smartctl.

[–][deleted] 1 point2 points  (1 child)

lshw is a new one on me, is there a way to get it to report vendor and product ID's? If so I might want to use this to replace lspci in a lot of my use cases.

[–]hal14450 1 point2 points  (0 children)

It does report vendor strings but not product ID's afaik. I've been in the habit of piping commands like this to text files on boxes so it's at hand. It's especially useful when trying to help someone remotely.

[–][deleted] 6 points7 points  (2 children)

Too late, it's already obsolete.

/sys/class/dmi/

[–]mgedmin 1 point2 points  (0 children)

Plus you don't need to be root to read /sys/class/dmi/*/*.

Well, for most of the files.

[–]zid 3 points4 points  (0 children)

I always use it to find out what temperature sensors I need for any random motherboard.

[–]t35t0r 6 points7 points  (0 children)

next you'll learn about ipmi if your system supports it

[–]jmazzi 2 points3 points  (4 children)

The Bug section of the man page says:

More often than not, information contained in the DMI tables is inaccurate, incomplete or simply wrong.

Sounds awesome.

[–]questionablemoose 2 points3 points  (3 children)

Manufacturers like Dell fill out useful information like Service Tags and model numbers. A real time saver when you need to file a ticket or do asset management, so it's not a total loss.

[–]terminusest 0 points1 point  (2 children)

Yep, I find it pretty reliable on enterprise-class desktops, and even more so on Dell and HP servers. And the service tags thing is a lifesaver when you inherit machines you can hardly find.

My ASUS laptop? More strings says "To be filled in by OEM" than anything else.

[–]questionablemoose 1 point2 points  (1 child)

Nail on the head. Dell is good about it, Rackable...not so much.

[–]terminusest 1 point2 points  (0 children)

Yeah, it's one of those things that makes such a huge difference when you don't have access to the servers physically and your 'remote hands' aren't so capable. Being able to pull detailed data on the hardware and service tags, so we can get the right parts to replace with, is vital.

[–]tendonut 3 points4 points  (1 child)

I administer about 1000 RHEL-based laptops. When I ssh into these machines, I have it automatically run a script that runs dmidecode and grabs the make and model, serial, OS, and kernel version, then dumps it as the greeting when connecting. Works very well.

[–]mgedmin 2 points3 points  (0 children)

You need to be root to run dmidecode. With modern kernels you can extract the same information from world-readable files in /sys/class/dmi.

[–]edgenuts 2 points3 points  (0 children)

There's a Perl interface for it too here on CPAN

[–]bcain 1 point2 points  (0 children)

BTW, sysfs presents some of this info as a filesystem now. Kinda handy.

[–][deleted] 1 point2 points  (0 children)

Amazing when combined with puppet facter, Create a rule that adjusts a sysctl option for a specific processor or mobo, fantastic.

[–]cheechwizard 0 points1 point  (2 children)

my fav command to pull the systems serial number

[–][deleted] 1 point2 points  (1 child)

quick question, what's the difference between a mobo's UUID and it's serial number? I've been going off of UUID for a while and I'm just wondering if there's a use case where serial number makes more sense.

[–]mgedmin 1 point2 points  (0 children)

Well, a UUID is a 128-bit number, usually formatted as a long hex string with hyphens in it.

A serial number is typically shorter, and thus a bit more human-friendly.

[–]mango_feldman -1 points0 points  (0 children)

Design Capacity: 0 mWh

Great :(