Sun N1 System Manager 1.2 Command Line Reference Manual

Chapter 1 Command Line Help

This chapter provides the same help that you can access by using the help command in the command line.

Command Help

help Command

You can get help in the following ways:

The available commands are listed in the following table.

Command 

Description 

add

Add a member to an object or group. 

connect

Connect to a provisionable server's serial console. 

create

Create (or copy) a new object in the N1 System Manager.  

delete

Delete an object from the N1 System Manager. 

discover

Discover new servers to be managed. 

exit

Exit user from the N1-ok> shell.

help

Get help about a command or object. You can also use ? for the help command. Note that help help is not a valid command.

load

Install software on a server or group of servers. 

remove

Remove a member from an object or group. 

reset

Power off and power on a server or group of servers. 

set

Change attributes on a server, a group of servers, or other object. 

show

List summary or detailed information about an object or group.  

start

Enable an object or issue a command, for example, power on and boot a server. 

stop

Disable an object, for example, shut down and power off a server. 

unload

Uninstall software from a server or group of servers. 

The available objects are described in Object Help.

add

This command adds a member to an object or group.

Description

The add command can be used on the following objects: group, osprofile, role, server, and user.

Type help add object for details.

add group

This command adds provisionable servers to an existing server group so you can more easily perform management operations on multiple servers. See create group on how to create a new server group.

Synopsis

Parameters

add osprofile

This command adds a distribution group, disk partition, OS update, or custom installation script to an existing OS profile.

Description

If a distribution group is not specified in an OS profile, the following distribution group is installed by default: Entire Distribution plus OEM Support (Solaris), Everything (Red Hat), or Default Installation (SUSE). At least one partition (root) is required for a valid Solaris profile, and at least two partitions (root and swap) are required for a valid Linux profile.

Synopsis

Parameters

add role

This command adds privileges to an existing role. See create role on how to create a new role.

Synopsis

Parameters

add server

This command adds the N1 System Manager features to a provisionable server.

Description

To benefit from some of the N1 System Management functionality, you must add features to the provisionable servers. The two types of features are base management, which is required for OS updates and remote commands, and OS monitoring, which is required to monitor the OS resource health on the server. When a feature is added, the feature is installed on the provisionable server, the specified agent credentials are set, and the feature becomes supported on the server. In the case of the OS monitoring feature, monitoring is also enabled if not already. The Base Management Supported and OS Monitoring Supported fields in the show server output provide the current support status on a server's features.

After you upgrade the Sun N1 System Manager from a previous release, you can use this command with the upgrade keyword to upgrade the existing features on a provisionable server.

Synopsis

Parameters

add user

This command adds roles to a user. Once added, the user will be able to assume each role and gain the associated privileges.

Synopsis

Parameters

connect

This command connects you to the serial console of a provisionable server.

Description

The connect command can be used on the server object.

Type help connect server for details.

connect server

This command connects you to the serial console of a provisionable server.

Description

You can use the connect server command to monitor installations or perform administration tasks. For most hardware platforms, the first user to log in is given read and write privileges on the serial console, and subsequent user sessions are read-only mode. Some platforms don't allow multiple serial console sessions on the same server. You can exit the serial console at any time through the following escape sequences:

ALOM-based systems # .

Sun Fire(TM) X4000 series systems ESC (

Sun Fire V20z and V40z systems ^E c .

Note that this command is not available in the browser interface's command line, but you can access a server's serial console in the browser interface by choosing Open Serial Console in the Actions menu on a Server's Details page. Also, because this command requires user input, do not use it in a custom N1 System Manager script through the n1sh -f command.

Synopsis

Parameters

create

This command creates a new object in the N1 System Manager. You can also use this command to copy objects that already exist outside N1 System Manager.

Description

The create command can be used on the following objects: firmware, group, notification, os, osprofile, role, update, and user.

Type help create object for details.

See discover for information on adding provisionable servers to the N1 System Manager.

create firmware

This command copies a firmware update to the N1 System Manager. You can then install the firmware update on the provisionable servers.

Synopsis

Parameters

create group

This command creates a new server group, which enables you to group provisionable servers by business or management needs.

Synopsis

Parameters

create notification

This command creates a new notification rule.

Synopsis

Parameters

create os

This command copies an OS image to the management server so it can be installed on the provisionable servers.

Description

You can copy an OS image, called an OS distribution, from ISO files, CDs, or a DVD. Note that N1 System Manager does not support copying Solaris OS CDs and CD ISO files. You must copy a Solaris DVD or DVD ISO file.

A minimum of 3.0 Gbytes should be allocated for each OS distribution you plan to provision.

On a Solaris-based management server, OS distributions are stored as follows:

Linux OS distributions are stored in /var/opt/SUNWscs/share/allstart

Solaris OS distributions are stored in /var/js

On a Linux-based management server, OS distributions are stored as follows:

Linux OS distributions are stored in /var/opt/sun/scs/share/allstart/

Solaris OS distributions are stored in /var/opt/sun/scs/share/allstart/jumpstart/

When copying an OS distribution from multiple installation CDs, you need to run the create os command multiple times with the same OS distribution name. For example, if you are trying to copy an OS distribution that is provided on two CDs, you must insert the first CD, run the create os command, and wait for the job to complete. Once the first job completes, you then must insert the second CD, run the create os command again, and wait for the job to complete. The OS distribution is successfully installed when the second job completes.

When copying the SUSE Linux Enterprise Server 9 SP1 distribution, you must run the create os command multiple times. First, copy the SLES 9 base distribution. When that job finishes, you can then copy the SLES 9 Update 1 distribution.

A default OS profile is automatically created for each newly created OS distribution, with the same name as the OS distribution. The default profile is provided as an example. Most of the time, you will have to update the default profile to match your hardware or it may be easier to just create a new profile. Use the show osprofile osprofile command to see the configuration of an OS profile.

Synopsis

Parameters

create osprofile

This command creates a new OS profile.

Description

In addition to the create osprofile command, you must use the add osprofile command to add distribution groups, partition information, resources, and scripts to the OS profile to make it usable.

You can also use this command to clone (copy) an existing profile. This command must be used if you want to modify or copy a profile that has been used to install a provisionable server.

Synopsis

Parameters

create role

This command creates a new role. Unless privileges are specified, a new role has no privileges added to it by default.

Synopsis

Parameters

create update

This command copies an OS update to the N1 System Manager. You can then install the OS update on the provisionable servers.

Description

You can copy various types of OS updates: RPMs for the Linux operating systems and packages or patches for the Solaris Operating System. By default, the load command installs an OS update using the corresponding native OS commands. However, you can specify an installation script to override the default installation and perform a customized installation. See Managing Packages, Patches and RPMs in the Sun N1 System Manager Administration Guide for more details.

Synopsis

Parameters

create user

This command creates a new N1 System Manager user. The user must already exist on the OS of the management server. Unless roles are specified, a new user has no roles added to it by default.

Synopsis

Parameters

delete

This command deletes an object from the N1 System Manager.

Description

The delete command can be used on the following objects: firmware, group, job, notification, os, osprofile, role, server, update, and user.

Type help delete object for details.

delete firmware

This command deletes a firmware update from the N1 System Manager.

Synopsis

Parameters

delete group

This command deletes a server group. This command will not delete the provisionable servers from the N1 System Manager.

Synopsis

Parameters

delete job

This command deletes jobs.

Synopsis

Parameters

delete notification

This command deletes a notification rule.

Synopsis

Parameters

delete os

This command deletes an OS distribution from the N1 System Manager.

Description

An OS distribution can be deleted if it is currently deployed on a provisionable server. However, you cannot delete an OS distribution until all of its associated OS profiles are deleted from the management server by using the delete osprofile command.

Synopsis

Parameters

delete osprofile

This command deletes an OS profile.

Description

An OS profile can be deleted even if it is currently deployed on a provisionable server. However, you cannot delete a profile that is currently in use, which means it is actively being deployed on a server. The show osprofile command displays if an OS profile is in use or not.

Synopsis

Parameters

delete role

This command deletes a role. You cannot delete a role if it is assigned to a user.

Synopsis

Parameters

delete server

This command deletes servers from the N1 System Manager. The server will no longer appear in the list displayed using the show server all command.

Synopsis

Parameters

delete update

This command deletes an OS update from the N1 System Manager.

Synopsis

Parameters

delete user

This command deletes an N1 System Manager user. This command does not delete the user from the OS of the management server.

Synopsis

Parameters

discover

This command discovers and adds new provisionable servers to be managed by the N1 System Manager.

Description

See Chapter 2 in the Sun N1 System Manager Site Preparation Guide for details on setting up a new provisionable server for discovery.

Each hardware platform requires a minimum set of credentials to be discovered: ALOM-based systems require telnet; Sun Fire V20z and V40z servers require SSH, IPMI, and SNMP; Sun Fire X4000 series systems require SSH and IPMI; and the Sun Fire X2100 server requires IPMI.

Before a server can be discovered, the following conditions must be met:

You must specify the known authentication credentials for the provisionable server, the server must be in a factory-default state (Sun Fire V20z or V40z servers only), or the server must be configured with the default credentials used by the discovery process. See Setting Up Provisionable Servers in the Sun N1 System Manager Site Preparation Guide for the list of system-specific default credentials that the discovery process uses if you do not specify credentials.

The management network IP address for the provisionable server is configured and is network accessible by the N1 System Manager.

Synopsis

Parameters

exit

This command exits you out of the N1–ok> shell. If the N1–ok> shell is your default shell, you will be logged out of the N1 System Manager completely; otherwise, you will be returned to your previous shell on the management server.

Synopsis

load

This command installs software on provisionable servers.

Description

The load command installs an OS distribution (using an OS profile), firmware update, or OS update (packages, patches, and RPMs). The load command can be used on the following objects: group and server.

Type help load object for details.

load group

This command installs software on a group of provisionable servers, such as an OS distribution (through an OS profile), OS update, or firmware update.

Synopsis

Parameters

Install Attributes

The following attributes are temporarily used to boot and install the servers. The N1 System Manager provides default values for all of these attributes. These attributes are only required for a Red Hat Linux or SUSE Linux installation.

Server Configuration Attributes

The following attributes are used to configure the server's network information during the installation. The N1 System Manager provides default values for all of these attributes.

load server

This command installs software on provisionable servers, such as an OS distribution (through an OS profile), OS update, or firmware update.

Synopsis

Parameters

Installation Attributes

The following attributes are temporarily used to install one or more servers. Some attributes can be specified only when installing a single server. The N1 System Manager provides default values for all the attributes that are not single-server specific.

Server Configuration Attributes

The following attributes are used to configure the server's network information during the installation. Some attributes can be specified only when installing a single server. The N1 System Manager provides default values for all the attributes that are not single-server specific.

remove

This command removes a member from an object or group.

Description

The remove command can be used on the following objects: group, osprofile, role, server, and user.

Type help remove object for details.

remove group

This command removes servers from a server group.

Synopsis

Parameters

remove osprofile

This command removes a distribution group, disk partition, OS update, or a custom installation script from an OS profile.

Description

You cannot run this command against a profile that is currently in use, which means it is actively being deployed on a server. The show osprofile command displays if an OS profile is in use or not.

Synopsis

Parameters

remove role

This command removes privileges from a role.

Synopsis

Parameters

remove server

This command removes the OS monitoring or base management feature from a provisionable server.

Description

There are two levels of removing the OS monitoring feature with this command. If you don't specify the uninstall keyword, the OS monitoring feature remains installed on the provisionable server, but the feature is no longer supported and the server's OS can no longer be monitored with N1 System Manager. If you specify the uninstall keyword, the OS monitoring feature is uninstalled from the provisionable server and consequently the OS monitoring feature is no longer supported. Once removed in either instance, the OS resource health state for the server becomes uninitialized.

When you remove the base management feature, the feature is uninstalled from the provisionable server and it is no longer supported. The OS monitoring feature must be uninstalled from a server before the base management feature can be removed.

After you remove a feature, you can always use the add server command to add it back again. The Base Management Supported and OS Monitoring Supported fields in the show server output provide the current status on a server's features.

Synopsis

Parameters

remove user

This command removes roles from a user.

Synopsis

Parameters

reset

This command reboots provisionable servers.

Description

The reset command can be used on the following objects: group and server.

Type help reset object for details.

reset group

This command reboots (power off and power on) a group of provisionable servers. A boot of the operating system typically occurs and is dependant on the server's configuration.

Synopsis

Parameters

reset server

This command reboots (power off and power on) provisionable servers. A boot of the operating system typically occurs and is dependent on the server's configuration.

Synopsis

Parameters

set

This command changes the attributes on an object or group.

Description

The set command can be used on the following objects: firmware, group, notification, os, osprofile, role, server, session, and user.

Type help set object for details.

set firmware

This command changes the attributes of a firmware update.

Synopsis

Parameters

set group

This command changes the name of a server group, or changes the locator lights or monitoring status on a group of servers.

Synopsis

Parameters

set notification

This command changes the name, description, or notification destination for a notification rule.

Synopsis

Parameters

set os

This command changes the name of an OS distribution.

Synopsis

Parameters

set osprofile

This command changes the configuration of an OS profile.

Synopsis

Parameters

A specific list of OS profile attributes is provided separately for each OS, since each OS is different.

Solaris Profile Attributes

Red Hat Linux Profile Attributes

SUSE Linux Profile Attributes

set role

This command changes the description of a role.

Synopsis

Parameters

set server

This command changes the configuration information of a provisionable server or refreshes the N1 System Manager with the server's current settings and status.

Synopsis

Parameters

Configuration Attributes

set session

This command changes the user's role or the output format for the current session.

Synopsis

Parameters

set user

This command changes the default role for a user.

Synopsis

Parameters

show

This command lists summary or detailed information about an object or group.

Description

The show command can be used on the following objects: firmware, group, job, log, notification, os, osprofile, privilege, role, server, session, update, and user.

Type help show object for details.

show firmware

This command lists all the copied firmware updates or detailed information about a firmware update.

Synopsis

Parameters

show group

This command lists all server groups or detailed information about a specific server group.

Synopsis

Parameters

show job

This command lists all jobs, detailed information about a specific job, or jobs based on a specified filter.

Synopsis

Parameters

Date Format

The following date format is used for the endbefore, endafter, startbefore, and startafter options:

[CC]YY[-MM[-DD[Thh[:mm[:ss[Z]]]]]]

show log

This command lists all known events from the N1 System Manager or provisionable servers, detailed information about a specific event, or events based on a specified filter.

Synopsis

Parameters

Date Format

The following date format is used for the after and before options:

[CC]YY[-MM[-DD[Thh[:mm[:ss[Z]]]]]]

show notification

This command lists all notification rules or detailed information about a specific notification rule.

Synopsis

Parameters

show os

This command lists all available OS distributions from the N1 System Manager or detailed information about a specific OS distribution.

Synopsis

Parameters

show osprofile

This command lists all available OS profiles or detailed information about a specific OS profile.

Synopsis

Parameters

show privilege

This command lists all available privileges or detailed information about a specific privilege.

Synopsis

Parameters

show role

This command lists all available roles or the privileges for a specific role.

Synopsis

Parameters

show server

This command lists all the available provisionable servers, a filtered list of provisionable servers, or detailed information for a specific server.

Synopsis

Parameters

show session

This command lists the user's current role in the session.

Synopsis

show update

This lists all the OS updates or detailed information about a specific OS update.

Synopsis

Parameters

show user

This command lists all the available users or detailed information about a specific user.

Synopsis

Parameters

start

This command enables an object or issues a command. For example, you can power on and boot provisionable servers or enable a notification rule.

Description

The start command can be used on the following objects: group, notification, and server.

Type help start object for details.

start group

This command powers on and boots a group of provisionable servers or issues a remote command on a group of servers. You can view the output of the remote command from the associated job that is started.

Synopsis

Parameters

start notification

This command enables or tests a notification rule.

Synopsis

Parameters

start server

This command powers on and boots provisionable servers or issues a remote command remotely on the provisionable servers. You can view the output of the remote command from the associated job that is started.

Synopsis

Parameters

stop

This command disables an object. For example, you can shut down and power off a provisionable server or cancel a job.

Description

The stop command can be used on the following objects: group, job, notification, and server.

Type help stop object for details.

stop group

This command shuts down and powers off a group of provisionable servers.

Synopsis

Parameters

stop job

This command stops a job from running. When a job is stopped, it is in the aborted state.

Synopsis

Parameters

stop notification

This command disables a notification rule.

Synopsis

Parameters

stop server

This command shuts down and powers off provisionable servers.

Synopsis

Parameters

unload

This command uninstalls software from provisionable servers or a group of servers.

Description

The unload command can be used on the following objects: group and server.

Type help unload object for details.

unload group

This command uninstall an OS update from a group of provisionable servers.

Synopsis

Parameters

unload server

This command uninstalls an OS update from provisionable servers.

Synopsis

Parameters

Object Help

This section describes the objects that can be managed by the N1 System Manager commands.

The available objects are listed in the following table.

Object 

Definition 

firmware 

A firmware update for the provisionable servers. 

group  

A group of provisionable servers. 

job 

An asynchronous action initiated and tracked by a user to perform some management task. 

log 

An event generated from a provisionable server or the N1 System Manager. 

notification 

A notification rule created by a user to define when, where, and how to notify an external source, such as a user, of a N1 System Manager event. 

os 

An installable image of an OS, also known as an OS distribution. 

osprofile 

An OS profile, which is a configuration file that defines how to install an OS distribution. 

privilege 

A predefined set of permissions enabling a user to perform certain operations within the N1 System Manager. A privilege may be granted to a user by assigning it to a role and then assigning the role to the user.  

role 

A set of privileges that can be assigned to a N1 System Manager user. The N1 System Manager provides three predefined roles: ReadOnly, SecurityAdmin, and Admin. Authorized users may create customized roles, but users cannot modify the predefined roles.

server 

A provisionable server, which is a server that has been discovered by and can be managed by the N1 System Manager. 

session 

The role and other contextual information that is associated with every active user session. A separate user session is created for each user logged into the browser interface and n1sh command line interface. The browser interface and the browser interface's command line share a common session and hence have a common session role.

update 

An OS update, such as a patch or package for the Solaris operating system or an RPM for the Red Hat operating system. 

user 

A person who is authorized to log into the N1 System Manager.  

firmware

The firmware object is a firmware update for the provisionable servers.

Description

The following commands are available for the firmware object: create, delete, set, and show. You must use the load server or load group commands to install a firmware update.

Type help command object for details on each command.

group

The group object is a group of provisionable servers.

Description

The following commands are available for the group object: add, create, delete, load, remove, reset, set, show, start, stop, and unload.

Type help command object for details on each command.

job

The job object is an asynchronous action that is initiated and tracked by a user to perform some management task.

Description

The following commands are available for the job object: delete, show, and stop.

Type help command object for details on each command.

log

The log object is an event generated from a provisionable server or the N1 System Manager.

Description

The following commands are available for the log object: show.

Type help command object for details on each command.

notification

The notification object is a notification rule created by a user to define when, where, and how to notify an external source, such as a user, of a N1 System Manager event.

Description

The following commands are available for the notification object: create, delete, set, show, start, and stop.

Type help command object for details on each command.

os

The os object is an installable image of an OS, also known as an OS distribution.

Description

The following commands are available for the os object: create, delete, set, and show.

Type help command object for details on each command.

osprofile

The osprofile object is a configuration file that defines how to install an OS distribution.

Description

The following commands are available for the osprofile object: add, create, delete, remove, set, and show. You must use the load server or load group commands to install an OS profile.

Type help command object for details on each command.

privilege

The privilege object is a predefined set of permissions enabling a user to perform certain operations within the N1 System Manager. A privilege may be granted to a user by assigning it to a role and then assigning the role to the user.

Description

The following commands are available for the privilege object: show. You must use the add role and remove role commands to add and remove privileges from a role.

Type help command object for details on each command.

role

The role object is a set of privileges that can be assigned to a N1 System Manager user. The N1 System Manager provides three predefined roles: ReadOnly, SecurityAdmin, and Admin. Authorized users may create customized roles, but they cannot modify the predefined roles.

Description

The following commands are available for the role object: add, create, delete, remove, set, and show. You must use the add user and remove user commands to add and remove roles from a user.

Type help command object for details on each command.

server

The server object is a provisionable server, which is a server that has been discovered by and can be managed by the N1 System Manager.

Description

The following commands are available for the server object: add, connect, delete, load, remove, reset, show, start, stop, and unload. You must use the discover command to discover a provisionable server.

Type help command object for details on each command.

session

The session object is the role and other contextual information that is associated with every active user session. A separate user session is created for each user logged into the browser interface and n1sh command line interface. The browser interface and the browser interface's command line share a common session and hence have a common session role.

Description

The following commands are available for the session object: set and show.

Type help command object for details on each command.

update

The update object is an OS update, such as a patch or package for the Solaris operating system or an RPM for the Red Hat operating system.

Description

The following commands are available for the update object: create, delete, and show. You must use the load server or load group commands to install an OS update.

Type help command object for details on each command.

user

The user object is a person who is authorized to log in to the N1 System Manager.

Description

The following commands are available for the user object: add, create, delete, remove, set, and show.

Type help command object for details on each command.