LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Finding manufacturer of machine/component (https://www.linuxquestions.org/questions/linux-hardware-18/finding-manufacturer-of-machine-component-576972/)

Maverick1182 08-14-2007 07:21 AM

Finding manufacturer of machine/component
 
Hi there, I am currently trying to find a way of telling what machine is running. I have tried lspci and dmesg but these dont give me anything to identify the machine.

I need to do this to create a script to install the right software depending on whether the server/machine it is being run on is a Dell or not.

Does anyone have any suggestions on how I can go about this?

Any help would be greatly appreciated.

b0uncer 08-14-2007 08:00 AM

I don't believe there is a common way. lspci and dmesg offer quite much information from which you can deduce the thing used, but in the end they mainly tell you the chipsets and such, and don't know about packagers (a lot others than just Dell use chipsets or hardware that Dell also uses, so knowing the devices isn't knowing the packager -- but maybe you mean here just the single pieces of hardware, their chipsets etc.)

/proc offers some knowledge too, as a "look-in-the-kernel" hole, but not sure if it's as informative as you want. One method is to collect information from many places (dmesg, lspci, ...) and then programmatically compare that information against some known values and try to figure out if a certain piece of hardware is something or something else.

HappyTux 08-14-2007 10:31 AM

Quote:

Originally Posted by Maverick1182 (Post 2858418)
Hi there, I am currently trying to find a way of telling what machine is running. I have tried lspci and dmesg but these dont give me anything to identify the machine.

I need to do this to create a script to install the right software depending on whether the server/machine it is being run on is a Dell or not.

Does anyone have any suggestions on how I can go about this?

Any help would be greatly appreciated.

You might want to see if lshw will work, if Dell puts their name in the Vendor sting on the motherboard then you should be good to go.

Maverick1182 08-14-2007 10:40 AM

Hi there, I found a solution from someone which seems to work... I thought I would share it with the rest of the community incase it helps anyone else: The solution was to use dmidecode to find the right piece of information eg.

dmidecode | grep "Product Name:" | grep -c "PowerEdge"

Will return "1" if its is a Poweredge. The wonders of linux :)

Thanks for your help anyway.

bijit1709 08-14-2007 01:23 PM

Why don't you try:

Code:

uname -a


All times are GMT -5. The time now is 12:51 PM.