[Gllug] Dell Service Tag number

devans at presscentre.net devans at presscentre.net
Thu Jun 26 13:41:16 UTC 2003


I guess I should also add that I did uncomment print before I receive 100
emails :) and did'nt receive a a comprehensible serial.  Will send you a
offlist message.

Cheers

On Thu, Jun 26, 2003 at 02:28:14PM +0100, devans at presscentre.net wrote:
> 
> Does'nt appear to work with the PowerEdge 2450. Do we need to add / update the BIOS
> offsets for this model?
> 
> $ sudo ./dell_serial_tag.pl 
> $ ls -l /dev/mem
> crw-r-----    1 root     kmem       1,   1 Apr 11  2002 /dev/mem
> $ uname -a
> Linux myhost.blah.net 2.4.7-10smp #1 SMP Thu Sep 6 17:09:31 EDT 2001 i686 unknown
> 
> 
> Regards
> 
> On Thu, Jun 26, 2003 at 01:09:42PM +0100, Martin A. Brooks wrote:
> > On Thu, 2003-06-26 at 13:48, devans at presscentre.net wrote:
> > > Thanks for your email.  Yes, I came across dmidecode, but on a PowerEdge 2450 it
> > > does'nt appear to work.  I'm not sure why it displays 12345. To my knowledge the
> > > tag has not been changed. 
> > 
> > I had to do this recently in a client's datacentre, the data ends up in
> > $res
> > 
> > 
> > #!/usr/bin/perl
> > # (C) 2000 Geir Inge Jensen
> > #
> > # Rewritten to be more robust on several platforms by Olav Kolbu
> > # 2003/03/13 - Hacked mercilessly by Mart Brooks for LON4
> > 
> > $|=1;
> > 
> > @sets = ([0xfb1e6, 0, 40, -138, 2518],
> >          [0xfa237, 0, 40, -138, 1813],
> >          [0xfa237, 0, 40, -140, 1813],
> >          [0xfaf76, 0, 40, -138, 2534],
> >          [0xfb286, 0, 40, -138, 2502],
> >          [0xfb436, 0, 40, -138, 2486],
> >          [0xf9fd7, 0, 40, -138, 2117],
> >          [0xfb286, 0, 40, -138, 2518],
> >          [0xfa227, 0, 40, -140, 1813],
> >          [0xfa227, 0, 40, -138, 1813]);
> > 
> > @patterns = ('^Dell', '[:print:]', '^\w+$',
> >              '^\d{2}/\d{2}/\d{4}$', '[:print:]');
> > 
> > @header = ('','','','','','') if (-t);
> > 
> > $nl = (-t) ? "\n" : ", ";
> > $/ = "\0";
> > 
> > 
> > open(MEM, "</dev/mem") || die "Unable to open /dev/mem: $!";
> > foreach $set (@sets) {
> >         $res = $header[0] . $hostname;
> >         $bad = $i = 0; seek(MEM, 0, 0);
> >         foreach $offset (@$set) {
> >                 seek(MEM, $offset, 1);
> >                 #printf "\n0x%.8x: " , tell(MEM); $nl = "";
> >                 ($data = <MEM>) =~ s/[ \t\0\r\n]*$//g;
> >                 #print "GOT $data\n";
> >                 if ( $data !~ $patterns[$i] ) {
> >                     $bad = 1;
> >                     last;
> >                 }
> >                 next unless ($i++ || (-t));
> >                 $data =~ s/ROM BIOS PLUS // unless (-t);
> >                 #$res .= $nl . $header[$i] . $data;
> >                 $res.="$data,";
> >         }
> >         last if not $bad;
> > }
> > close(MEM);
> 
> -- 
> Gllug mailing list  -  Gllug at linux.co.uk
> http://list.ftech.net/mailman/listinfo/gllug

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list