Searching the Help
To search for information in the Help, type a word or phrase in the Search box. When you enter a group of words, OR is inferred. You can use Boolean operators to refine your search.
Results returned are case insensitive. However, results ranking takes case into account and assigns higher scores to case matches. Therefore, a search for "cats" followed by a search for "Cats" would return the same number of Help topics, but the order in which the topics are listed would be different.
Search for | Example | Results |
---|---|---|
A single word | cat
|
Topics that contain the word "cat". You will also find its grammatical variations, such as "cats". |
A phrase. You can specify that the search results contain a specific phrase. |
"cat food" (quotation marks) |
Topics that contain the literal phrase "cat food" and all its grammatical variations. Without the quotation marks, the query is equivalent to specifying an OR operator, which finds topics with one of the individual words instead of the phrase. |
Search for | Operator | Example |
---|---|---|
Two or more words in the same topic |
|
|
Either word in a topic |
|
|
Topics that do not contain a specific word or phrase |
|
|
Topics that contain one string and do not contain another | ^ (caret) |
cat ^ mouse
|
A combination of search types | ( ) parentheses |
|
- SA Global Shell
- SA Global File System (OGFS)
- Remote SA Shell (rosh) utility
- Benefits of the Global Shell
- Commands available in the Global Shell
- Differences between the Global Shell and UNIX shells
- Server filtering in the OGFS
- Global Shell tutorial
- Global Shell examples
- Character encoding for the OGFS
- Global Shell error messages
- Remote terminal
Global Shell tutorial
This tutorial covers just a few of the highlights of the OGFS and the Global Shell. After completing this tutorial, you will know how to navigate the directories of the OGFS and how to run commands on managed servers from within the Global Shell. Although the tutorial is organized into steps, after performing step 1, you can perform the remaining steps in any order.
Before starting the tutorial, you need the following capabilities:
- You can log on to the SA Client. As you work through this tutorial, you might find it helpful to compare the stdout of the Global Shell with information displayed by the SA Client.
- Your SA user has Read & Write permissions on at least one managed server. Typically assigned by a security administrator, permissions are discussed in the SA 10.50 Administration Guide.
- Your SA user has all Global Shell permissions on the same managed server. For information on these permissions, see aaa utility.
The example commands in this tutorial operate on a Windows server named abc.opsware.com
. This server belongs to a device group named All Windows Servers. When trying out these commands, substitute abc.opsware.com
with the host name of the managed server you have permission to access. Also, replace jdoe
with your SA user name. If you wish to run the commands on a UNIX managed server, replace ipconfig
with ifconfig
; and replace Administrator
with root
.
Now, let’s get started with the tutorial:
- Open a Global Shell session.
You can open a Global Shell session from within the SA Client. From the Tools menu, select Global Shell. You can also open a Global Shell session from a terminal client running on your desk top. For instructions, see Opening a Global Shell session. - Check your session.
First, enter thewhoami
command, which displays the SA user name for this session:$ whoami
jdoe
You can enter the ps command to view the process status of your Global Shell session. The followingps
command shows the session is running the defaultbash
shell:$ ps
PID TTY TIME CMD
7033 ? 00:00:00 bash
13712 ? 00:00:00 ps
Enter theuname
command, which displays information about the server running the OGFS component of SA:$ uname -a
Linux m171.dev.opsware.com 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 20 05 i686 GNU/Linux
If you log on to a UNIX managed server withrosh
,uname
displays information about that managed server, not the server running the OGFS component. Run theuname
command when you are not sure if you are interacting with the Global Shell or with the shell of a managed server accessed withrosh
. - Confirm your home directory.
Every SA user has a home directory in the OGFS. The home directory has apublic/bin
subdirectory where you can store scripts to be executed by other users running Global Shell sessions. Each SA user also has a personal/tmp
directory for temporary files. You cannot view or modify the/tmp
directories of other users.
The following commands show some information about the directories of thejdoe
user:$ cd
$ pwd
/home/jdoe
$ ls -ld /home/jdoe/public/bin
drwxr-xr-x 2 jdoe jdoe 4096 2006-05-17 17:12 /home/jdoe/
public/bin
$ ls -ld /tmp
drwxrwxrwx 3 root root 4096 2006-06-09 23:37 /tmp - List all managed servers.
The/opsw/Server
directory of the OGFS contains information about the servers managed by SA. This directory is an example of how the OGFS represents objects (in this case servers) of the SAdata model. Behind the scenes, SA stores this information in a database referred to as the Model Repository.
To view the names of the servers managed by SA, enter the following command:$ ls /opsw/Server/@
abc.ospware.com m33.opsware.com gist.opsware.com pal.opsware.com hare.opsware.com qv55.opsware.com
. . . - Examine server information.
Each managed server has a directory structure containing information about that server. Theattr
subdirectory contains text files that describe the server’s attributes. The attribute name matches the file name and the attribute value is the file contents. The followingcat
command lists the OS version of the managed server namedabc.opsware.com
:$ cd /opsw/Server/@/abc.opsware.com
$ cat attr/osVersionMicrosoft Windows 2000 Advanced Server Service Pack 4 Build 2195 (05-02-2006
TheInterface
subdirectory has information about the server’s network interfaces. Here’s an example:$ cat “Interface/Local Area Connection/info”
AdminEnabledFlg: no
CardIndex:
CardSerialNum:
CircuitId:
Collisions:
ConfiguredDuplex: AUTO
ConfiguredSpeed: AUTO
. . . - List the files of a managed server.
In addition to information about managed servers,/opsw/Server
contains directories that correspond to the file systems of those servers. If you have the necessary permissions, in a Global Shell session you can access multiple servers from a single virtual file system, the OGFS.
The following command navigates to file system of theabc.opsware.com
server:$ cd /opsw/Server/@/abc.opsware.com/files
The nextls
command displays OGFS subdirectories that correspond to native users of the managed server. Your security administrator specified these users (login names) when adding OGFS permissions. These are not SA users.$ ls
Administrator LocalSystem
Native users might have different views of the managed server’s file system. Therefore, under each user, the OGFS presents different file systems for each user. The followingcd
command drills down to theProgram Files
directory as seen by theAdministrator
user on the Windows server.$ cd "Administrator/C/Program Files"
$ pwd
/opsw/Server/@/abc.opsware.com/files/Administrator/C/Program Files
Next, list the files in theProgram Files
directory:$ ls -1
Accessories
Common Files
ComPlus Applications
Internet Explorer
Messenger
. . .
Although these files reside in a directory on the managed server’s file system, you are in the OGFS, as shown by the precedingpwd
command. To verify that you are in a Global Shell session (and not in a session running on the managed server), enter the following commands:$ whoami jdoe
$ uname -a
Linux m171.dev.opsware.com 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 2005 i686 GNU/Linux - Copy a file from the OGFS to a managed server.
By entering thecd
command, go to your home directory in the OGFS, for example:$ cd
$ pwd
/home/jdoe
Next, create a simple text file in your home directory:$ echo “this is text” > myfile.txt
$ cat myfile.txt
this is text
Copy the file that you just created to a directory in the file system of a managed server. The following command copiesmyfile.txt
to theC:\temp
directory of theabc.opsware.com
server:$ cp myfile.txt \
/opsw/Server/@/abc.opsware.com\
/files/Administrator/C/temp/afile.txt
Do not copy large files between the OGFS and managed servers. Copy only small files, such as configuration files. - Log on to a managed server with
rosh
.
In the preceding steps, you accessed the file system of a managed server from within a Global Shell session. In this step, from the Global Shell you log on to a managed server withrosh
. After you log in, you interact with the command-line environment (MSDOS or UNIX shell) of the managed server.
The followingrosh
command logs in as Administrator to a Windows managed server namedabc.opsware.com
:$ cd /opsw/Server/@/abc.opsware.com
$ rosh -l Administrator
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
The prompt indicates that you are now in the command-line environment of the managed server. Enter theipconfig
andhostname
commands:C:\WINNT\system32>ipconfig
ipconfig
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection:Connection-specific DNS Suffix . : opsware.com
IP Address. . . . . . . . . . . . : 192.168.8.217
Subnet Mask . . . . . . . . . . . : 255.255.254.0
Default Gateway . . . . . . . . . : 192.168.8.1
C:\WINNT\system32>hostname
hostname
abc
Terminate the remote login with theexit
command:C:\WINNT\system32>exit
Enter theuname
command to verify that you have returned to the Global Shell session:$ uname -a
Linux m171.dev.opsware.com 2.4.21-32.ELsmp #1 SMP Fri Apr 15 21:17:59 EDT 2005 i686 GNU/Linux
- Create a script that runs across servers.
A Global Shell script can iterate within the OGFS and run therosh
command to execute native commands on multiple servers. The example script shown in this step iterates through the servers of the public device group named All Windows Servers. On each server, the script runs theipconfig
command with therosh
command. In this example, substitute your SA user name forjdoe
.
First, return to your home directory in the OGFS:$ cd
$ cd public/bin
$ pwd
/home/jdoe/public/bin
Next, run thevi
editor:$ vi
Invi
, insert the following lines to create abash
script:#!/bin/bash
# This is simple_iterate.sh.
# Change jdoe to your user name.OUTFILE="/home/jdoe/public/bin/ipconfig_all.txt"
rm -f $OUTFILE
cd "/opsw/Group/Public/All Windows Servers/@/Server"
for SERVER_NAME in *
do
echo ---- $SERVER_NAME
echo ---- $SERVER_NAME >> $OUTFILE
rosh -n $SERVER_NAME -l Administrator \
"ipconfig" >> $OUTFILEdone
# Last line in simple_iterate.sh.
Save the file invi
, naming itsimple_iterate.sh
. Quitvi
.
Change the permissions ofsimple_iterate.sh
withchmod
, and then run it:$ chmod 755 simple_iterate.sh
$ ./simple_iterate.sh
---- abc.ospware.com
---- gist.opsware.com
---- hare.opsware.com
---- m33.opsware.com
. . .
As the script runs, it echoes the name of each server tostdout
, and redirects the output of theipconfig
command to theipconfig_all.txt
file. Enter themore
command to view the contents ofipconfig_all.txt
:$ more ipconfig_all.txt
---- abc.ospware.com
Windows 2000 IP Configuration
Ethernet adapter Local Area Connection: . . . - Learn more.
Here are a few suggested tasks for learning more about the OGFS and the Global Shell:- Explore the folders and contents under
/opsw/Library
, comparing them with the Library windows of the SA Client. - If you have NA installed, navigate to the
/opsw/Net*
(network) directories. For descriptions of these directories, see Network directories. - On Windows servers, examine the
registry
andcomplus
directories under/opsw/Server/@/
server-name. - List the files in the
method
directory, also under/opsw/Server/@/
server-name. These files are the executables of the SA Command-Line Interface (OCLI), which enables you to perform SA functions from within the Global Shell. To learn how to run the CLI methods, see the SA 10.50 Developer Guide.
- Explore the folders and contents under
We welcome your comments!
To open the configured email client on this computer, open an email window.
Otherwise, copy the information below to a web mail client, and send this email to hpe_sa_docs@hpe.com.
Help Topic ID:
Product:
Topic Title:
Feedback: