Welcome to GovStor, Inc.

 
Search
_TOPICS
  Login/Create an Account    

Categories Menu
· All Categories
· About GovStor
· TechTips

Site Navigation
· Home
· Stories Archive
· Topics
· Tracker
· Your Account

Contact Us

GovStor, Inc.

1914 21st Street
Sacramento, CA 95811

(916) 373-9595
(916)373-9522 fax

email

Who's Online
There are currently, 9 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here

Sun SysAdmin News
Currently there is a problem with headlines from this site

TechTips: Volume 8 - Putting unused EPROM entries to good use
Posted on Thursday, June 12 @ 16:01:31 EDT by admin

Tech Tips Archives I read a tip the other day that I thought I'd pass on. One gripe that I often hear is that there is no way to retrieve the serial number of a running Sun system. You can get hostid, MAC address and lots of other information; just not the serial number.

The tip offered a very simple, yet elegant, solution to the problem; add the information to the system EPROM data. The entry "oem-banner" is almost never used and works very well for storing whatever text string the administrator chooses to put there.

The author of the tip, who's name I can't find, used the entry for system the serial number but it could be anything you felt significant. It could be an asset tag, system rack location, phone number of the responsible party; i.e. just about anything. Okay, you get the picture now right?

Here's how you do it. You can modify EPROM information via the OBP or the command line.

ok> setenv oem-banner "Serial 123456789"

or

# eeprom oem-banner="Serial 123456789"

You could also put multiple, delimited entries, into that location and write a small script to parse the output of the eeprom command.

# eeprom oem-banner="123456789#23FGY03#3204N"

     --- cut here ---

#! /bin/csh -f
# getser
# doug.otto@govstor.com 05/21/2003
#
set id=`/usr/sbin/eeprom | /usr/bin/grep oem-banner | /usr/bin/grep -v ? | 
/usr/bin/awk '-F=' '{print $2}'` 
set serial=`/usr/bin/echo $id | /usr/bin/awk'-F#' '{print $1}'` 
set asset=`/usr/bin/echo $id | /usr/bin/awk '-F#' '{print $2}'` 
set loc=`/usr/bin/echo $id | /usr/bin/awk '-F#' '{print $3}'` 
set name=`/usr/bin/uname -n`
printf "System name:	$name"
printf "--------------------------"
printf "Serial number:	$serial"
printf "Asset tag:	$asset"
printf "Rack location:	$loc"

--- cut here ---

Now we run the script and return our information:

# /tmp/getser
     System name: tang
     --------------------------
     Serial number: 123456789
     Asset tag: 23FGY03
     Rack location: 3204N

I hope you find this little tidbit as useful as I have and are able to use it to make a sysadmin's life a little simpler.

Note: Copyright © 2001-2003 GovStor LLC. All rights reserved.


 
Related Links
· More about Tech Tips Archives
· News by admin


Most read story about Tech Tips Archives:
Volume 3.1 - Network Failover with Solaris 8


Article Rating
Average Score: 4
Votes: 6


Please take a second and vote for this article:

Excellent
Very Good
Good
Regular
Bad


Options

 Printer Friendly Printer Friendly

 Send to a Friend Send to a Friend





All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2001-2010 by GovStor, Inc. All rights res.
PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.06 Seconds