System identification


Often, it is helpful to know which system's savecore files we are looking at. This is especially true when you have a large collection of system crash dumps and don't remember which came from where. How do you sort out which dump came from which system?

In Solaris 1, the name of the system is stored in the kernel as hostname . In Solaris 2, the host name is kept in a structure called utsname . Both hostname and utsname are null- terminated strings ”an array of characters where the last byte contains a zero. Using adb, we can examine those strings.

Yes, if we used the strings command as shown earlier, we might have spotted the system name; however, we wouldn't have been able to identify it as such in the context in which we were viewing it.

Other helpful system identification data can also be easily retrieved by using adb . Depending on the specific flavor of UNIX, this sometimes includes the architecture of the system, the domain name, and the hardware vendor. Let's first get some initial information from a Solaris 1 system crash dump.

Figure 9-1 Displaying initial system information from a Solaris 1 crash
 Hiya...  adb -k vmunix.2 vmcore.2  physmem 3f98  hostname/s  _hostname:  _hostname:    sunny  version/s  _version:  _version:     SunOS Release 4.1.3 (DISKSUITE) #6: Thu Sep 23 17:25:03                BST 1993 Copyright (c) 1983-1992, Sun Microsystems, Inc.  domainname/s  _domainname:  _domainname:  noname  cpu/X  _cpu:  _cpu:         72  sysname/s  _sysname:  _sysname:     SUNW,SPARCstation-10  $q  Hiya... 

Now let's collect similar information from a Solaris 2 system. Remember that Solaris 1 is a BSD-based UNIX, whereas Solaris 2 is an AT&T SVR4-based UNIX. Although the average user may not see a big difference between these two popular flavors of UNIX, the two kernels differ greatly. Therefore, many of the symbol names within the kernel will be unique.

In this example, we will use an adb macro called utsname . We will be discussing macros in greater detail later on. For now, you just need to know that a macro is merely an ASCII file that contains keystrokes we feed adb , rather like UNIX command redirection. The utsname macro displays the same system information that the UNIX uname command with the -a option would show the user.

Figure 9-2 Displaying initial system information from a Solaris 2 crash
 Hiya...  adb -k unix.1 vmcore.1  physmem 1b24  $<utsname  utsname:  utsname:        sys  SunOS  utsname+0x101:  node maugrim  utsname+0x202:  release  5.3  utsname+0x303:  version  Generic  utsname+0x404:  machine  sun4c  hw_provider/s  hw_provider:  hw_provider:    Sun_Microsystems  architecture/s  architecture:  architecture:   sparc  srpc_domain/s  srpc_domain:  srpc_domain:    work.sun.com  $q  Hiya... 

We now know a little bit about the identification of the system with which we are working. We know the name of the system, the hardware architecture on which the CPU is based, the release of UNIX it is running, and the domain, if any, that is in use.



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net