LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-29-2009, 11:38 PM   #1
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174
Blog Entries: 3

Rep: Reputation: 38
Thumbs up All linux guru.. Is there any tool or command ???


Hi Dear All,
I come across a situation which i never thought.
Is there any command in linux or is there any tool in linux which tells is which sever we are using.

For example suppose if i am using IBM servers, or dell server or Hp servers. i just want to know command that tell me right now u r on IBM server.

There are many commands for looking the internal hardware of servers like cpuinfo, memory, hardware info and all that.
 
Old 06-29-2009, 11:47 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Do you know of any way to do this for any OS?

You can find out a lot about a server, but I don't think the actual harware it is running on is part of the information generally made available. Unless it's in the server name.

You can sometimes figure it out from the OS - eg. an AIX machine is probably IBM.

I'm also curious as to why this information woul be useful. What does it matter that the server is an IBM or a DELL? Provided it works. i.e. What is the problem you are trying to solve?

That said, perhaps you need something like this:
http://linux.ittoolbox.com/groups/te...eltype-1456920

... only you want to do it remotely ... so you log in to the server, and execute the cammands? Or do you want to be able to probe a remote server without being the sysadmin?

Last edited by Simon Bridge; 06-29-2009 at 11:52 PM.
 
Old 06-30-2009, 12:51 AM   #3
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174

Original Poster
Blog Entries: 3

Rep: Reputation: 38
Well Simon,
i am agree with ur comments. As per my knowledge i dont find any OS who can do this. Thats why i put this question here for all the masters of linux.

Really as i like others i never thought in past that i come across this type of situation.
Yes i can do remotely all the stuffs that i want. But what if u include this one also.

I hope in future with all are good efforts we are also able to tell this and make the linux proud being the 1st OS who can do this also.

Well best of luck...
 
Old 06-30-2009, 01:04 AM   #4
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174

Original Poster
Blog Entries: 3

Rep: Reputation: 38
Any suggestion on this would be highly appreciated
 
Old 06-30-2009, 01:06 AM   #5
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Whaty do you want the answer to be where someone has built their own with a server mobo, etc.?
 
Old 06-30-2009, 01:43 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
I repeat: Why would this be useful to be able to do?

I cannot think of a reliable way to impliment this across the board - it is always going to be possible to limit the information sent out about the server. After all, all the client cares about is connection data.

If the HW identity matters to a network for some reason then the sysadmin will simply configure the server to send the information.

Also, it was quite hard for me to read your last post. Will you please write more clearly. Thank you.
 
Old 06-30-2009, 02:13 AM   #7
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174

Original Poster
Blog Entries: 3

Rep: Reputation: 38
well Simon,
Think the scenario u have joined the new organization. And u r the new sysadmin there.
Unfortunately ur old sysadmin colleagues left the job. Most of ur servers are remotely
located on different parts of world and u have no idea about the Brand of servers. One day Ur Boss or Manger ask u pls give us the all details of server including brands as well like IBM or Dell or whatever.

Then in this type of scenarios what will we do. How we got these information.

So some times u come across situation like this where u needed these thinks as well.
 
Old 06-30-2009, 02:55 AM   #8
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
Tell him to start booking flights?
 
Old 06-30-2009, 02:59 AM   #9
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174

Original Poster
Blog Entries: 3

Rep: Reputation: 38
How funny????
 
Old 06-30-2009, 08:20 AM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You still seem to be having trouble writing clearly. Here, I'll help - my alterations are in square brackets. Please let me know if I have misunderstood you.
Quote:
One day [your] Boss or Manger ask [you] ["please] give us the all [the] details of [our] server[s,] including brands as well[."]
You are suggesting that the boss just decides to do this for no reason?

I'd ask the boss to explain how it helps the company to know the brands of the existing remote servers - I need this information because the people administering the boxen will ask (see below).

Armed with this, and the IP information which I must have to be using these remote machines at all, I can phone or email the server admins and ask them. In fact, a well run system, and I wouldn't run it any other way, will be in regular contact with the remote server admins anyway - if only for billing purposes.

Note: if the bosses expanation is such that he's unlikely to be able to check for himself, I'll just make something up - he's being stupid.

No need to probe the server itself.

But it still begs the question: what possible use is the information?

We don't actually care what the make of the computer is - just how well it does the job. I have network stats to work that out.
 
Old 06-30-2009, 08:57 AM   #11
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
why not just setup a motd or banner at login so you know what you connected to.. pull the info using dmidecode or lspci and paste it on the message file..


Code:
Welcome to Dell Poweredge 1850 Service Tag number ABC123  located in Timbuktu
 
Old 06-30-2009, 09:25 AM   #12
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by farslayer View Post
why not just setup a motd or banner at login so you know what you connected to.. pull the info using dmidecode or lspci and paste it on the message file..
If I understood correctly, the question was how to gather the information initially, not how to display it once gathered.

dmidecode and lspci are pretty effective for that, especially in the hands of an expert.

But (assuming you have the rights to run it as root), gtk-lshw is a lot easier.

The exact information available varies a lot by motherboard model and, as Simon Bridge implied, there are some motherboard models for which the info isn't very informative.

But for a human reading the display of gtk-lshw there should be no trouble distinguishing any major brand server.

So it is probably worth installing and using gtk-lshw on all those servers.

dmidecode or lspci are more likely to already be installed, but it may be less obvious how to find the right part of their output.
lshw (the non GUI version) has all the same info as gtk-lshw, in case you don't have a GUI connection to the remote server. But the info isn't organized with as easy access as gtk-lshw.
 
Old 06-30-2009, 10:06 AM   #13
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
vap16oct1984 acknowledges that
Quote:
There are many commands for looking the internal hardware of servers like cpuinfo, memory, hardware info and all that.
already.

To me the way to get that info is just to have each server set up to deliver it by your favorite method.
You have to have the info in the first place, to set this up - say, when the company bought the hardware. At the initial configuration you set it up.

But vap16oct1984 has proposed a scenario where you are not present to setup the machines, the machines are not local, and the people who set them up are not available, terrorists hold your bosses family hostage and demand that he tell them the brand of each server the company uses within the next 24 hours [1]

Still, I reckon the most reliable way is to ask the server admins (or lie) - someone must be looking after the servers. Accounts archives will be useful too - if the company owns the hardware, there will be a tax invoice for the original purchase. Getting a hardware list and hoping that will help sounds despirate to me... maybe I cannot get the admins on the phone inside the 24 hours and by this time a dangerous chemical agent is poised to be spread over the western seaboard of the USA. [2] However, if the servers are a SaaS then it is likely that you won't be allowed to run HW probes on the machine. There is so much that can go wrong...

Actually I like the idea of billing the company for overseas travel.

--------------------------------------------------------
[1] Why do the terrorists need it? Perhaps their families are held hostage? And so ad infinitum.
[2] It could happen!!!?!
 
Old 06-30-2009, 11:10 AM   #14
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
I got the impression from the first post that he already knew how to manually interrogate the server to obtain the info (using tools like lshw and dmidecode) but he wanted a way that when he connected to the server it would tell him what he connected to.. which is why I suggested the motd. Interrogate, update, be notified on connection..

I think it's obvious the OP's primary language is not english, so it's a bit hard to discern exactly what his ultimate goal might be

as for not finding the info buried in lshw.. you would just query the appropriate -class which is system rather than the entire output.. or you could dump the output to html or xml to bring back locally for viewing/archival

Code:
 it-lenny:~# lshw -c system
it-lenny                  
    description: Tower Computer
    product: OptiPlex 320
    vendor: Dell Inc.
    serial:  123SABC1
    width: 32 bits
    capabilities: smbios-2.3 dmi-2.3 smp
    configuration: administrator_password=enabled boot=normal chassis=tower power-on_password=enabled uuid=44454C4C-3500-1038

it-lenny:~# 


it-lenny:~# dmidecode -t system
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x0100, DMI type 1, 27 bytes
System Information
	Manufacturer: Dell Inc.                
	Product Name: OptiPlex 320                 
	Version: Not Specified
	Serial Number: 123ABC1
	UUID: 44454C4C-3500-1038
	Wake-up Type: Power Switch
	SKU Number: Not Specified
	Family: Not Specified

Handle 0x0F00, DMI type 15, 29 bytes
System Event Log
	Area Length: 2049 bytes
	Header Start Offset: 0x0000
	Header Length: 16 bytes
	Data Start Offset: 0x0010
	Access Method: Memory-mapped physical 32-bit address
	Access Address: 0xFFF81000
	Status: Valid, Not Full
	Change Token: 0x0000000F
	Header Format: Type 1
	Supported Log Type Descriptors: 3
	Descriptor 1: POST error
	Data Format 1: POST results bitmap
	Descriptor 2: System limit exceeded
	Data Format 2: System management
	Descriptor 3: Log area reset/cleared
	Data Format 3: None

Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
	Status: No errors detected

it-lenny:~#
Perhaps they are just inventorying the company assets for tax/accounting purposes.. I know I've been asked in the past for a complete list of all assets including hardware and software, so they would have info for Hardware depreciation, and insurance coverage

maybe they are considering standardizing on a single platform and want to see what vendors hardware they have the most of.

Maybe they are trying to find out if the previous sysadmins were buying equipment and having it shipped to their homes..
(a sysadmin friend of mine started at a new job.. the previous admins he replaced were doing the above scheme)

maybe it's just a 'keep the new guy busy for a while' task from the big guy..

Many bosses rarely tell the little guy in the trenches everything about the why's but they certainly tell them what results they expect..
 
Old 07-01-2009, 03:33 AM   #15
vap16oct1984
Member
 
Registered: Jun 2009
Location: INDIA
Distribution: RHEL-5
Posts: 174

Original Poster
Blog Entries: 3

Rep: Reputation: 38
Thanks a lot farslayer,

this is what i am looking for. Now u have got the idea, things that u have described are true.
I have heard a lot of cases like this. I dont know why other Gurus are taking it little and making fun of it here without knowing its importance for a company. This is some of concerns that farslayer describe:-

( Perhaps they are just inventorying the company assets for tax/accounting purposes.. I know I've been asked in the past for a complete list of all assets including hardware and software, so they would have info for Hardware depreciation, and insurance coverage

maybe they are considering standardizing on a single platform and want to see what vendors hardware they have the most of.

Maybe they are trying to find out if the previous sysadmins were buying equipment and having it shipped to their homes.. )

Well the command that u given is really good.
dmidecode -t system
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: OptiPlex 320
Version: Not Specified

But the problem still not resolved completely, look the output of same command i that i run remotely from India and my server located in Canada.

[root@office-pc ~]# dmidecode -t system
# dmidecode 2.7
SMBIOS 2.4 present.

Handle 0x0005, DMI type 1, 27 bytes.
System Information
Manufacturer: ----> LOOK HERE IT BLANK
Product Name:
Version:
Serial Number:

Serial Number: 123ABC1

Simon:- Let me clear u r in linux there is nothing which is not possible. So pls dont make a fun of it. If u don't know pls keep silence. Make ur vision big and do the things that looks
impossible TO OTHERS then we call U A real guru.

Well thanks to all for ur great advice. Hope some more good work must be done on this.

Last edited by vap16oct1984; 07-01-2009 at 03:39 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What command line tool in Linux works like WinZip in windows? toastyjsd Linux - Newbie 5 02-18-2009 04:50 PM
Need a Command GURU 2-tone-joe Linux - Software 4 04-01-2008 10:11 AM
Need 'sed command' guru valnar Linux - General 9 02-27-2007 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration