Any way to detect server model?
C. Halstead
chris at sourcelabs.com
Thu Mar 1 11:12:12 CST 2007
Just an FYI, to be more portable you should key off of the DMI type and not the handle. DMI type 1 is the prescribed structure for System Information per the SMBIOS spec. Depending on the implementation the handle used to reference each DMI type may (will) be different, but the types are static.
Cheers,
-chris
---
C. Halstead <chris at sourcelabs.com>
SourceLabs - http://www.sourcelabs.com
Dependable Open Source Systems
----- "Ray Van Dolson" <rvandolson at esri.com> wrote:
> FYI, here's the awk script I ended up writing to pull this information
> out.
> Maybe useful to others down the line.
>
> awk '
> BEGIN { RS = "\nHandle " ; FS = "[, ]" }
> {
> if (substr($1, 0, 6) == "0x0100") {
> match($0, "Product Name: ([^\n]+)")
> rl = RLENGTH
> a = substr($0, RSTART, RLENGTH)
> match(a, ":")
> print substr(a, RSTART+1, rl-RSTART)
> }
> }
> '
>
> Just pipe the output of dmidecode to it. I had to use substr()
> instead of
> using a third argument to match() because the awk in busy box (at
> least the
> one that comes with RHEL4) doesn't support it.
>
> Ray
>
> On Wed, Feb 28, 2007 at 04:42:23PM -0800, Ray Van Dolson wrote:
> > Thanks Thomas! Exactly what I needed.
> >
> > Ray
> >
> > On Wed, Feb 28, 2007 at 06:31:15PM -0600, Thomas_Chenault at dell.com
> wrote:
> > > The model name of the server can be found in the output of
> `dmidecode'
> > > in the `System Information' section.
> > >
> > >
> > > Thomas
>
> _______________________________________________
> Linux-PowerEdge mailing list
> Linux-PowerEdge at dell.com
> http://lists.us.dell.com/mailman/listinfo/linux-poweredge
> Please read the FAQ at http://lists.us.dell.com/faq
More information about the Linux-PowerEdge
mailing list