Sun N1 System Manager 1.3 Discovery and Administration Guide

Chapter 1 Accessing the N1 System Manager

There are two ways to manage a rack of managed servers using the N1 System Manager:

This chapter contains the following sections:

Accessing the N1 System Manager Through the Command Line

You can access the N1 System Manager using the n1sh command. The default method is to use the n1sh shell, which uses an N1–ok> prompt. The shell mode provides a tab completion feature to navigate through all the command options. See the n1sh man page for details. Type man n1sh from a console in the management server. You don't need to be in the n1sh shell to read the n1sh man page.

The n1sh command provides two other ways to issue management commands. The n1sh -e option, or UNIX® command mode, enables you to type management commands one at a time within a UNIX shell. The n1sh -f option enables you to specify a custom script of management commands to run. See the n1sh man page for details. Type man n1sh from a console in the management server. You don't need to be in the n1sh shell to read the n1sh man page.

For information about command line syntax, keywords, special characters, and general syntax, see Command Line Interface Tips in Sun N1 System Manager 1.3 Command Line Reference Manual.

ProcedureTo Access the N1 System Manager Command Line

The following procedure describes how to access the N1 System Manager command line (the n1sh shell) as a valid user from a remote system. You can also access the command line directly on the management server.

Before You Begin

During management server configuration, the superuser (root) account is set up with all the system default roles added to it (Admin, ReadOnly, and SecurityAdmin). If you want to log in as a valid user other than the superuser account, see To Add an N1 System Manager User.

Steps
  1. Log in to the management server from a remote system.


    $ ssh -l user-name management-server
    

    Where user-name is a valid N1 System Manager user, and management-server is the host name or IP address of the management server.

    You are prompted for a password.

  2. Type a password for the user account.

    The N1–ok> prompt is displayed and you are logged in with your default N1 System Manager role, unless you use the -r option to specify a role for login.

  3. If the N1–ok> prompt does not display, type the following command to access the command line:


    # /opt/sun/n1gc/bin/n1sh [-r role-name]

    The superuser (root) user account typically does not have its login configured to automatically log in to the n1sh shell.

  4. (Optional) To switch to a different N1 System Manager role that has been added to your user account, type the following command:


    N1-ok> set session role role
    

    See set session in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

ProcedureTo Show Your Current Session Role

Your role might affect your ability to access certain features of the N1 System Manager. By default, you are logged into the N1 System Manager with your default role.

See Managing Roles for more details about roles.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line for details.

  2. Show your current session role.


    N1-ok> show session
    

ProcedureTo Switch Your Session Role

If you have more than one role, you can switch between multiple roles to perform tasks that require specific privileges.

See Managing Roles for more details about roles and privileges.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line for details.

  2. Switch to a different session role.


    N1-ok> set session role role
    

    See set session in Sun N1 System Manager 1.3 Command Line Reference Manual for details.

ProcedureTo Exit the N1 System Manager Command Line

Step

    Exit the N1 System Manager command line.


    N1-ok> exit
    

    The n1sh shell is terminated.

ProcedureTo Run a Script of N1 System Manager Commands

The following procedure describes how to run a custom script of N1 System Manager commands that are saved in a file. Return codes are returned for each command. Also, you can specify a comment character (#) at the beginning of the line to indicate that the rest of the line should be ignored.

Steps
  1. Log in to the N1 System Manager.

    See To Access the N1 System Manager Command Line for details.

    If the n1sh shell is your default login shell on the management server, you must change this configuration. Otherwise, you won't be able to run the n1sh command and use the script option.

  2. Run a custom script that contains the N1 System Manager commands.


    # /opt/sun/n1gc/bin/n1sh -f filename
    

    where filename is a fully qualified path to the custom script file.


Example 1–1 n1sh Custom Script File

The following example shows an n1sh script file, which can be run with the n1sh -f command.

# n1sh custom script

show group all 

create group RACK1   
create group RACK2   
create group RACK3   
create group RACK4   
create group RACK5   


add group RACK1 server SERVER1  
add group RACK1 server SERVER2  

add group RACK2 server SERVER3  
add group RACK2 server SERVER4  


add group RACK3 server SERVER5  
add group RACK3 server SERVER6  

add group RACK4 server SERVER7  
add group RACK4 server SERVER8  

add group RACK4 server SERVER9  
add group RACK4 server SERVER10  

add group RACK5 server SERVER11  
add group RACK5 server SERVER12  

show group all

Accessing the N1 System Manager Through the Browser Interface

The N1 System Manager provides a web-based user interface that provides a subset of the command line features. This browser interface also includes the n1sh shell in a command line pane. As you use the browser interface to perform management tasks, the corresponding commands are displayed in the command line pane. The command line pane provides the same features as the n1sh command in shell mode.

ProcedureTo Access the N1 System Manager Browser Interface

The following procedure describes how to log in to the N1 System Manager browser interface through the Sun Web Console.

Before You Begin

During management server configuration, the superuser (root) account is set up with all the system default roles added to it (Admin, ReadOnly, and SecurityAdmin). If you want to log in as a valid user other than the superuser account, see To Add an N1 System Manager User.

The following browsers are supported:

Accessibility features in the N1 System Manager browser interface include descriptions of images and tables, keyboard navigation, and tool tips.


Note –

When the cursor is positioned at the N1-ok> prompt in the Command Line pane, the arrow keys can be used to view only the previous command typed or the next command in the history. To move the cursor to the top of the Command Line pane, press Shift+Tab and then press the up arrow key. To move focus from the Command Line pane to other areas of the browser interface, press Shift+Tab twice.


Help text near the top of most screens describes the purpose of that screen. Brief help text also appears beneath entry fields and associated check boxes, radio buttons, and text entry fields.

Steps
  1. Log in to the Sun Web Console on the management server through the following URL:


    http://management-server
    

    where management-server is the host name or IP address of the management server.

    The browser is automatically redirected to the https://management-server:6789 URL, and the Sun Web Console login page is displayed.

  2. Log in to the Sun Web Console by using your N1 System Manager user name and password.

    The Sun Web Console launch page is displayed.

  3. Click the Sun N1 System Manager link to launch the Sun N1 System Manager browser interface.

    The browser interface is displayed, and you are logged in with your default N1 System Manager role. See Access the N1 System Manager in Sun N1 System Manager 1.3 Introduction for an overview of the browser interface.

  4. (Optional) To switch to a different N1 System Manager role that has been added to your user account, type the following command in the Command Line pane:


    N1-ok> set session role role
    

    See set session in Sun N1 System Manager 1.3 Command Line Reference Manual for details.