Sun Microsystems, Inc.  Sun System Handbook - ISO 3.4 June 2011 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-1011212.1
Update Date:2010-06-10
Keywords:

Solution Type  Technical Instruction Sure

Solution  1011212.1 :   Sun Fire[TM] Midrange Servers: How to setup Persistent Console logging?  


Related Items
  • Sun Fire E6900 Server
  •  
  • Sun Fire 3800 Server
  •  
  • Sun Fire 6800 Server
  •  
  • Sun Fire E4900 Server
  •  
  • Sun Fire 4800 Server
  •  
  • Sun Fire 4810 Server
  •  
Related Categories
  • GCS>Sun Microsystems>Servers>Midrange Servers
  •  

PreviouslyPublishedAs
215404


Description
Background:

The system controller (SC) of the Sun Fire[TM] Midrange Server does not persistently log the output of the domain console. There are occasions where being able to log the domain console output can be of benefit. It can greatly aid troubleshooting efforts when attempting to understand failures that seem to produce no diagnostic information. This document describes how to enable persistent console logging on the Sun Fire[TM] Midrange Server product family (3800, 4800, 4810, 6800, E4900, and E6900).



Steps to Follow

Instructions to enable console logging:
To log the output of the SC's domain console connection(s), it is required that a logging capable program, such as script or screen, be used to connect to the console. This document will focus on the screen method, as it offers the greatest flexibility.

Setting up SC domain consle logging is usually best done on the server's Admin Workstation. This is the workstation that is connected to the same network as the SC's private network connection. This document assumes that the Admin Workstation that screen will be run from will have IP connectivity to the SC's and that the telnet daemon is enabled on the SC.

In the event that SSH is to be used, the startup script would need to be altered to use SSH. In addition, one cannot SSH directly to a domain console as we can with telnet, so some logic to connect first to the platform, then the console would need to be employed.

First, install the screen package.

The package is available on the Companion CD. The package name is SFWscrn. It is likely that you will also need to install a few of the 'required' packages on which screen depends.

Once screen is installed, the most simple way to start logging is to setup a config file per domain you wish to log.

Then kick off a script that starts the screen process for each domain. Below is an example of how one might set this up.

Create the screenrc files for each domain (One file per domain to be logged)
DomainLogger/var/log/sunfire $ cat DomA.screenrc
log on
logfile DomainA.log
In the same directory, create a startup script that starts the script sessions. See attached script, startscreen, for an example of a script to start the screen sessions off. Note: The attached script is just an example of what we could do. Use what is best for your envrionment.
Additionally, if logging of multiple Midrange servers is required, some additional host logic would be required in the script.
Start the script sessions up
DomainLogger/var/log/sunfire $ ./startscreen
Screen sessions started:
someguy 14232 1 0 10:48:40 ? 0:00 screen -L -dmS DomA -c DomA.screenrc ksh -c while :; do telnet my6800.server
someguy 14255 1 0 10:48:41 ? 0:00 screen -L -dmS DomD -c DomD.screenrc ksh -c while :; do telnet my6800.server
someguy 14240 1 0 10:48:40 ? 0:00 screen -L -dmS DomB -c DomB.screenrc ksh -c while :; do telnet my6800.server
someguy 14248 1 0 10:48:41 ? 0:00 screen -L -dmS DomC -c DomC.screenrc ksh -c while :; do telnet my6800.server
The logfiles will then contain the output of each of the domain consoles.
The domain consoles can be attached to using
screen -r DomA
Once inside screen, you can detach from the screen session without ending the logging session using ^a-d. (Control-a, then type d)
You should see a message that looks like this:
[detached]
The logfiles for each domain will be located in your $LOGDIR directory.
You can now persistently log the output of the console on your Sun[TM] Fire midrange server.
For further details on using screen, see the screen manpage. Optional things that administrators may wish to do includes adding passwords to screen connections, labeling the connections and multiple connections within the one Screen session.

Other packages that are available for this type of console management or logging include:
script, available with solaris. See the manpage for script.
conserver, a free package available from www.conserver.com



Product
Sun Fire E6900 Server
Sun Fire E4900 Server
Sun Fire 6800 Server
Sun Fire 4810 Server
Sun Fire 4800 Server
Sun Fire 3800 Server

sun fire, sunfire, midrange, console, persistent, log, logging, output, domain, domain
console, how to, howto, screen, script
Previously Published As
87760

Attachments
This solution has no attachment
  Copyright © 2011 Sun Microsystems, Inc.  All rights reserved.
 Feedback