Sie sind auf Seite 1von 81

04/03/09 Security Level: Internal Use Onl

Topic on Solaris 10

Mo Qiuju /57859
www.huawei.com

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential


Prefac
e
This course is developed on the
basis of common requirement on
knowledge about Solaris 10
operating system for technical
service engineers.
This course is used for engineers
to improve the management and
application capabilities of Solaris
10 operating system.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 2


Study Guide
 The main part of this course is
common operations of Solaris 10
operating system and the
difficulty lies in troubleshooting
on Solaris 10 operating system.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 3


Objective
s
 After completing this course, you should
be able to:
 Know main delivered hardware of the
workstation
 Know the evolvement of Solaris, Sybase and
T2000 and describe differences and features
between solaris10 and solaris8
 Understand common operations, common
maintenance commands and application of basic
tools of Solaris operating system
 Troubleshoot common problems

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 4


Content

 Introduction to server hardware


 Brief introduction to Solaris 10
operating system
 Common operations of Solaris 10
operating system
 Troubleshooting on Solaris 10

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 5


Content

 Introduction to server
hardware
 Models of SUN
 Standard computers of T2000/T2100
 Introduction to hardware and software
of SUN workstation

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 6


The Type of SUN Equipment

Blade2500

Sun Fire V480/V490 Sun Netra240


Sun Fire V880/V890 ( 配套 3310 或 3320 阵列 )

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 7


Configuration Requirement for
T2000/T2100
T2000 Blade 2500,SUN Fire V490S,SUN
Fire V890

T2100 SUN Fire V490 or SUN Fire V890

T2000/T2100 HA System (Sun Netra240+3310 disk array


Cluster)

T2000/T2100 HA System SUN Fire V890 or SUN Fire V490


(VERITAS Hot Standby)

T2000 HA System (VERITAS SUN Fire V890 or SUN Fire V490


Warm Standby)

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 8


Hardware and software of SUN
Workstation

 The basic  Software of SUN


configuration of SUN workstation
workstation includes:  Solaris
 Host  CDE

Color display  Sybase

Keyboard and mouse
 T2000/T2100
 Optional single system
configuration for SUN software
workstation includes: 
T2000/T2100 HA
 CD-ROM system software

Tape drive

Floppy drive

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 9


Question

 Q1: Describe models of SUN workstation.


 Q2: Describe standard workstations equipped with
delivered T2000.
 Q3: Describe basic software and hardware
configurations of SUN workstation.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 10


 In this chapter ,we have learned:
Summ  Models of SUN
ary  Standard computers of
T2000/T2100
 Introduction to hardware and
software of SUN workstation

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 11


Content

 Introduction to server hardware


 Brief introduction to Solaris 10
operating system
 Common operations of Solaris 10
operating system
 Troubleshooting on Solaris 10

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 12


Content

 Brief introduction to Solaris 10


operating system
 System structure and basic concept of
Solaris
 Versions of Solaris and matching
relations with T2000 and Sybase
 Differences between Solaris10 and
Solaris 8

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 13


Brief Introduction of Solaris

 UNIXUNIX genres:
 SUN Solaris ,HP HP-UX, Digital unix, Linux
 Main features:

multi-tasking, multi-users, pipe, powerful Shell, security

protection mechanism, good stability, graphic user interface,

powerful network support, good migrateability

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 14


System Architecture of UNIX
Application Program

sh csh
cpp
 kernel
kernel
vi
 shell(B shell,
Hardware
K shell, C shell)

 Application
Outer Layer Program
Program

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 15


Main Features of UNIX File System
 Tree level or structure

 Service of network file system provided

 Function of creating, copying and deleting file and

file tree

 Dynamic accretion of file

 Security and sharing of file data

 Peripheral (printer, disk etc.) and directory treated

as file

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 16


Structure of Solaris File
System
/

bin dev etc usr opt var cdrom export

csh rc3.d T2000 sybase tmp


sh home

client server
t2000

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 17


UNIX File Permission

- ordinary file
r readable owner
w writable group
x executable other

-rwx r-x r-- 2 reed t2000 32 Oct 17 15:33


a.txt
other
100 4
group
101 5
owner
111 7

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 18


Shell

 The shell sits between you and the operating system, acting as
a command interpreter. It reads your terminal input and
translates the commands into actions taken by the system. The
shell is analogous to command.com in DOS.
 There are several types of shell: B Shell, K Shell, C Shell.
 Sh( B shell) uses the startup file .profile and the default prompt
is $; Csh uses the startup files .cshrc and .login, the default
prompt is %.
 Normally the default shell is Bourne Shell. To change shell, just
input corresponding shell command. For example, input “ksh”
to change to Korn shell in B shell.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 19


Environment Variables
 Environment variables are used to provide information to the
programs you use. The following information are example: display
mode, default editor, terminal type, resource configuration of serial
ports and network cards, login user name, hostname, group name,
path, prompt.
 2 types: global environment and local shell variables. Global
environment variables are available in every Shell, but local shell
variables are available only in one Shell.
 Common environment variables of NMS:

PATH:Paths to be searched for commands

SYBASE:Sybase installation path,normally, SYBASE=/opt/sybase

T2000DBServer:Sybase Server Name

IMAP: T2000 server path, normally, IMAP = /T2000/server
 Query the value of environment variables:

input echo $ environment variable name
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 20

Eg. echo $ IMAP
Version of Solaris
 Solaris 2.6
Stable, 32bit, widely used before.
 Solaris 2.7
Failed version, not used.
 Solaris 2.8
Currently main version, 64bit, stable, widely used in
T2000/T2100.
 Solaris 2.9
Not used.
 Solaris 2.10
The latest version, which T2000/T2100 will switch to, is the main version
now.
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 21
Matching Relations between Solaris and
T2000
 The database since Solaris10 starts to be switched to Sybase12.5.
 The T2000V2R2 and V2R3 start to support Solaris10 and Sybase12.5
as well as Solari8 and Sybase12.0.
 The T2100V2R1 starts to match Solaris10 and Sybase12.5 and no
longer supports Solaris8 abd Sybase11.9.2.
 When the NMS is upgraded, pay attention to the matching relations
with the operating system and database.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 22


Features of Solaris10
 Clear system operation process: Dynamic Tracing
 Wide hardware platforms: New UltraSPARC IV,
 Persistent availability: Predictive Self Healing
 Incomparable security: Process Rights Management,Crypto
Infrastructure
 Optimized utilization: N1 Grid Containers

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 23


Differences between Solaris10 and Solaris8
solaris10 solaris8
CDE V1.6 CDE V1.4
SMC Admintool
container None
Built-in SSH2 None
Dynamic Tracing None
Support x86 None
File position changes. /etc/ftpusers
/etc/ftpd/ftpusers /opt/sybase/interfaces ip
File ip display mode Denoted in hexadecimal format
changes.
/opt/sybase/interfaces ip
denoted in decimal format
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 24
Question

 Q1: Describe the levels of structure of the UNIX file


system.

 Q2: Which versions of the T2000 and T2100 start to


support Solaris 10 respectively? What Sybase
versions match Solaris 10?

 Q3: Where are Solaris 10 and Solaris 8 saved?

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 25


Summ  In this chapter, we have learned:

ary  System structure and basic concept of


Solaris
 Versions of Solaris and matching relations
with T2000 and Sybase
 Differences between Solaris10 and Solaris 8

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 26


Content

 Introduction to server hardware


 Brief introduction to Solaris 10
operating system
 Common operations of Solaris 10
operating system
 Troubleshooting on Solaris 10

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 27


Content

 Common operations of Solaris 10


operating system
 Normal operation for Engineering
 Normal operation for Maintenance
 Use of tools

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 28


Normal operation for Engineering
 Include:
 Start the SUN workstation
 Install the Solaris 10
 Install T2000/T2100 software in Solaris
 Start a terminal window
 Enable/disable ftp or telnet, the use of ftp or telnet
 Control Keys
 File dump and restore
 File compress and uncompress
 Start or shutdown the T2000(T2100) in Solaris
 Power-off and Restart the sun workstation

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 29


Hardware of SUN Workstation

 The basic  SUN workstation


configuration of SUN type:
workstation includes:  Ultra60
 Host  Blade2000

Color display  Blade2500

Keyboard and mouse
 Sun Fire V480
 Optional  Sun Fire V490
configuration for SUN  Sun Fire V880
workstation includes:  Sun Fire V890
 CD-ROM

Sun Netra240

Tape drive

Floppy drive

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 30


Software of SUN Workstation

 The software of SUN workstation in default configuration


includes:
 Solaris operating system: the fundamental software of operating
system of SUN workstation

CDE (Common Desktop Environment): providing graphic user
interface

 Additional software needed when SUN workstation is used


in the NM includes:

Sybase database system: providing database service

NM program
 High-Availability software (optional)

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 31


Turning On the Host of SUN
Workstation

 Two ways to turn on the host of Sun workstation:

 Turn on the power switch of the host

 Press the Power button on the top-right corner of the

keyboard

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 32


Installing the Operating System Solaris
10
 Installation Preparations
 Before you install the T2000 system, make sure that the preparations
for the software, hardware and environment are done.
 The T2000's software and hardware running environment is strictly
selected and tested.
 Hardware Installation
 Refer to the OptiX iManager T2000/T2100 Installation Guide
 Installing the Operating System Solaris 10
 Press STOP+A. The ok prompt is displayed.
 Insert the CD/DVD for Solaris 10 Software 1 (01/06 SPARC Platform
Edition).
 Notes:
 Divide disk According to the divided requirement of disk in Installation
Guide
HUAWEI
 More detail CO.,
TECHNOLOGIES installation
LTD. step refer
Huawei to the
Confidential T2000/T2100
Page 33Installation
Install the T2000/T2100 On Unix
a) Confirm the Solaris 10 has been installed
b) Configure the operation system
c) Check the installation software of T2000/T2100 has been
prepared.
d) Install the T2000
e) Install T2000 License
f) Create the shortcut icon for T2000 start
g) Enabling the Northbound Interface (Optional)
h) Creating a Disk Mirror (Optional)
i) Verifying the Installation
More detail installation step refer to the T2000/T2100
Installation Guide
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 34
Terminal Window for Command
Line

 Two ways to open the terminal window:


 Click the terminal window icon on the bottom of the screen (the

name is “this host”)

 Right-click at the blank place of screen, a menu will pop out.

Choose “Hosts” -> “Terminal Console” in the menu

 Two ways to close the terminal window:

 Type command ”exit” behind the prompt in terminal window

 Double click the top-left corner of terminal window

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 35


Startup and Stop telnet/ftp
Server in Solaris10
 Disable/Enable telnet server in Solaris10:
(Only the root user has the right to do it)

# svcadm disable network/telnet
 # svcadm enable network/telnet

 Disable/Enable ftp server in Solaris10:

( Only the root user has the right to do it )


 # svcadm disable network/ftp
 # svcadm enable network/ftp

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 36


Enable ftp and telnet function
 steps
a) enable the ftp and telnet function only by root user
# svcadm enable telnet
# svcadm enable ftp
b) enable telnet connection and enable ftp connection of a special user
#root
enable telnet connection -- Change the /etc/default/login file and add #
before CONSOLE=/dev/console to:
# CONSOLE=/dev/console
enable ftp connection of a special user– Change the /etc/ftpd/ftpusers file
and add # before the user name. To enable ftp connection of the root
user, add # before root: #root

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 37


Disable ftp and telnet
 Procedure
(a) Disable telnet and ftp connection of a special user.
Disable telnet connection—Change the /etc/default/login file and
remove # before #CONSOLE=/dev/console to:
CONSOLE=/dev/console
Disable ftp connection of a special user– Change the
/etc/ftpd/ftpusers file and remove # before the user name. To
disable ftp connection of the root user, remove # before root.
(b) Disable ftp and telnet functions.
Only the root user is authorized to perform this operation.
# svcadm disable telnet
# svcadm disable ftp

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 38


Use ftp to Transfer Files
Application scenario: File transfer is needed between two workstations or
between a workstation and a PC. In this event, the ftp function is
needed. Before using ftp, make sure that the ftp function of two
computers that transfer files to each other is enabled.
Example: Transfer a file from a PC to a workstation
c. “Start” “Run” cmd (necessary for a PC and unnecessary for a
workstation)
d. ftp ip address
e. Type in the user name and password.
f. ftp> ascll (transfer mode: text file in ascll mode; other files in bin mode)
g. ftp>cd /aaa (directory of files in the workstation)
h. ftp>lcd d:\
i. ftp>put bbb (bbb refers to the file name. To obtain a file from the
workstation, replace put with get.)
j. ftp>bye (ftp ends.)

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 39


Use of Telnet

Application scenario: When the workstation server is placed remotely or


the server cannot be randomly used, you need to log in to the server
remotely on the client (PC or workstation) to perform some operations.
After remote login by using the Telnet function, using the workstation
server is the same as using the local workstation.
Procedure for Telnet
c. “Start” “Run” cmd (necessary for a PC and unnecessary for a
workstation)
d. telnet server IP address
e. Type in the user name and password.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 40


Control Keys
 Control+C
Used to break program running abnormally
 Control+D
Used to break system communication
 Control+S
Used to inform terminal of stoping accepting input
 Control+Q
Used to inform terminal of resuming accepting input
 Stop + A
Used to go to OK state

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 41


File dump and restore
 Application scenario
 The tar command combines files into one device or filename for
archiving purposes. The tar command does not compress the files; it
merely makes a large quantity of files more manageable.
 Syntax
 tar [options] [directory file]
 Common Options
 c create an archive (begin writing at the start of the file)
 t table of contents list
 x extract from an archive
 v verbose
 f archive file name
 b archive block size
 Example
 tar cvf aaa.tar aaa (In current directory, dump all the files and sub-
directories in aaa directory to aaa.tar in the current directory)
 tar xvf aaa.tar (restore aaa.tar into the current directory)

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 42


File compress and uncompress
 Application scenario : compress and uncompress of files
 compress and uncompress command
 When a file has been compressed using the compress command, a
suffix of .Z is appended to the file name.
 Syntax

compress [options] [file]
 uncompress [options] [file.Z]
 Example: compress aaa uncompress aaa.Z
 Gzip and gunzip command

Gunzip restores the files originally compressed by gzip. When a file
has been compressed using the gzip command, a suffix of .gz is
appended to the file name.
 Syntax :
 gzip filename gunzip filename or gzip -d filename
 Example:
 gzip aaa gunzip aaa.gz

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 43


File compress and uncompress
 Application scenario : compress and uncompress of files
 Pack and unpack command
 When a file has been compressed using the pack command, a suffix of
.z is appended to the file name.
 Syntax: pack name unpack name
 Example: pack aaa unpack aaa.z

 zip and unzip command



unzip restores the files originally compressed by zip. When a file has
been compressed using the gzip command, a suffix of .zip is
appended to the file name.
 Syntax :
 zip FileName.zip DirName unzip FileName.zip
 Example:

zip aaa.zip aaa unzip aaa.zip

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 44


Start or shutdown the T2000(T2100) in
Solaris
 Steps
 Switch to t2000(t2100) user :su – t2000(t2100)

 Execute “cd /T2000(T2100)/server/bin”


 Execute “./t2000server”(./startserver.sh) to start
T2000(T2100);

Execute “./showt2000server”(./show_server) to check the


running status of T2000 server(T2100 server). If returned value
includes the process and PID for each related process of
T2000(T2100) , that is to say , the T2000 server(T2100 server)
is running.

Execute ”./shutdownserver”(./stopserver.sh) to shutdown


T2000(T2100)
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 45
Power-off and Restart the sun
workstation
 Steps for power-off are as follows:
1) Use “su” to enter the root authority of superuser
2)Excute “sync” several times to write the data from
memory to disk
3) Run “shutdown -y -g0 -i0” to return to “ok” prompt, then
switch off the host, or type command “power-off”, or press
Ctrl+Alt+ Power keys to switch off the system power.
4)Run “shutdown -y -g0 -i5” to power-off directly.
 Methods to restart are as follows:
 Run command “reboot” under superuser root
 Run “init 0” to enter prompt “ok”, then type “boot”

Run “shutdown -y -g0 –i6”

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 46


Normal operation for Maintenance

 Include:
 switch user
 File maintenance
 Display the content of file
 System resource navigation and control
 Modify the hostname
 Configure and query the IP address
 Configure the default network route

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 47


switch user
 Two methods
Method1:su xxx
Method2:su – xxx

Method1 is used to switch user in the current environment


variables;
Method 2 is used to switch user completely .(recommend to
use)
Example:
su – root
User name:root
Password:rootkit
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 48
Directory Navigation and
Control
The UNIX file system is set up like a tree branching out from the root.
The root directory of the system is symbolized by the forward slash (/).
System and user directories are organized under the root. The following
table summarizes some directory navigation commands.

Command/Syntax What it will do


cd [directory] change directory

ls [options] [directory or file] list directory contents or file


permissions
mkdir [options] directory make a directory

pwd print working (current) directory

rmdir [options] directory remove a directory

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 49


Directory Navigation and Control
 Print working (current) directory -- pwd
Example: % pwd
Return value : /T2000/server
 Change directory -- cd
Syntax: cd [directory]
Example:
%cd changes to user's home directory
%cd / changes directory to the system's root
%cd .. goes up one directory level
 make a directory ---mkdir
Syntax: mkdir directory
Example: % mkdir /T2000/client/data
 remove a directory -- rmdir
Syntax: rmdir directory
Example: % rmdir /T2000/client/data

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 50


Directory Navigation and Control --
ls
Ls ---list directory contents
 Syntax: ls [options] [parameter]
 -a lists all files, including those beginning with a dot (.),such as .login
 -l long listing lists the mode, link information, owner, size, last
modification (time). If the file is a symbolic link, an arrow (-->)
precedes the pathname of the linked-to file.
Example: ls –l
Return value: drwxr-xr-x 2 t2000 ems 512 May 3 13:58 T2000/
Explanation :For the directory T2000, it allows the user (owner) t2000
to read, write and execute; other users except t2000 in the UNIX
group assigened to the file to read and execute; users on the
system only to read.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 51


Usage Structure for Command
Line
 Usage structure for command line is:
Command _ [Option] _ [Parameter]

 Several options can be used together for most


commands:

Command _ -[Option 1][Option 2][Option 3][ ...]

For example: ls _– alF

 Options also can be listed separately:

Command _ -[Option 1] _ -[Option 2] _ -


[Option 3] _ -[ ...]

For example: ls _ -a _ -l _– F
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 52
Common Operations

 cd Change directory
 ls List the directory contents, for example: ls -al
 mkdir Create directory
 cp/rcp Copy files
 pwd Present the current working directory
 rmdir Delete directory
 rm Delete file, for example: rm –r /tmp/t2000
 mv Move file or change file name
 man Obtain help information on command
 su Switch user

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 53


File Maintenance Commands
 touch Used to create a file, for example: touch a.txt
 find Recursively search the indicated directory tree to
find files
matching a type or pattern you specify
 grep Search specified string in the whole text file
 chmod Change access authority over file
 chown Change the ownership of a file
 chgrp Change the group of the file
 cat Display the contents of a file with the concatenate
command
 more/less/pg Page through a text file
 head/tail Display the head/tail N lines of a file
 echo Repeat the characters you give to the standard
output, forCO., LTD.
HUAWEI TECHNOLOGIES Huawei Confidential Page 54
System Resource Commands
 df Summarize disk block and file usage, for
example: df -k
 du Report disk space in use, for example: du –k
/usr/t2000
 who Provide a listing of users accessing the
system
 which Display the path of the shell files
 date Configure or display the time and date
 env Display or configure the current environment
variables
 tar Combines files into one file for archiving
purposes
 compress/uncompress Compress/uncompress a file
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 55
 passwd Used to change your password
Checking System Information
 prtdiag Display the hardware information
 uname Display the computer’s information
 hostname Configure or display the hostname
 hostid Display the hostid
 id Display the ID and name of the user and
group
 pkginfo Check the installed software package
 pkginfo –l xxx Check the detailed information of the
software package
 showrev Check the Solaris version, for example:
showrev -p

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 56


Checking System Information
 prtdiag Display the hardware information
 uname Display the computer’s information
 hostname Configure or display the hostname
 hostid Display the hostid
 du Report disk space in use, for example: du –k
/usr/t2000
 id Display the ID and name of the user and group
 pkginfo Check the installed software package
 pkginfo –l xxx Check the detailed information of the software
package
 showrev Check the Solaris version, for example: showrev -p

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 57


System Resource Navigation and
Control
 Query the hardware information
Syntax: prtdiag
Example: %prtdiag
Return value: the clock frequency, the amount of memory , CPU information, I/O
information
 Query the basic information of system
Syntax: uname –a,hostname,hostid
Example: %uname –a
%hostname
%hostid
Return value: the current user name, hostname, hostID,etc.
 Query the information of system patch

Execute showrev –p | grep patch number to query the pacth whether it has
been installed.
Example: #showrev -p | grep 117350
Return value:
Patch: 117350-02 Obsoletes: 116897-01 Requires: 108528-29, 117000-0 Incompatibles:Packages:
SUNWcarx, SUNWcar, SUNWcsr, SUNWpmu, SUNWpmux, SUNWhea

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 58


Controlling Processes
 Generally speaking, a process is a running task. The

UNIX system realizes time-sharing multi-tasks by

controlling, provisioning and storage management of

the processes.

 Every process on a UNIX system has a integer as

process ID, or PID which is exclusive.

 Common commands


ps show status of active processes, for example: ps –ef


kill terminate a process, for example: kill -9 213
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 59
Modifying Hostname
 Modify /etc/nodename file, input the new hostname. If
the new hostname is Primary, input Primary in
nodename file.
 Open /etc/hostname.interface file, change the old
hostname to the new one.

Notes: interface is the name of network card + a


integer, for example: eri + 0 = eri0.
 There is at least one hostname.interface0 file in /etc.
 Modify /etc/inet/hosts and /etc/hosts files, change the
old hostname to the new one.
 Modify /etc/inet/ipnodes files,change the old
hostname to the new one.
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 60
IP Address Configuration
 Temporary configuration of IP address ( invalidated after
restart ):

#ifconfig name of network card device plumb

#ifconfig name of network card device IP netmask up
 Example: #ifconfig bge0 10.77.30.105 255.0.0.0 up

 Permanent configuration of IP address ( validated after restart ):


 Modify /etc/inet/ipnodes file

Modify /etc/hosts file, the content is IP 【 tab 】 character string

Modify /etc/netmasks file, writting the corresponding netmask of IP
 Query the IP address and MAC address

# ifconfig - a
return value:
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
mtu 8232 index 1 inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu
1500 index 2
inet 10.72.86.11 netmask ff000000 broadcast 10.255.255.255 ether
0:3:ba:18:40:62
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 61
Configuration of Default Network Route
 Application scenario: default route is configured in routine
maintenance where one workstation is used to log in to other remote
workstation in different LANs.
 Procedure
a. # route add default 129.9.1.254 1
The parameter route indicates the route management command; add
indicates adding route option; default indicates the default route;
129.9.1.254 indicates the IP address of the internal port of the local
network; 1 refers to the hop number.
b. Run the netstat –nr command to query the added default route in the
system route table. In this event, NEs at other network segments can be
pinged through.
c. To facilitate the system to automatically add the default route when the
system is restarted every time, create the defautrouter file in the /etc
directory and write in the IP address of the relevant route port (take
129.9.1.254 as an example)
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 62
Use of tools

 Include:
 Vi
 Use of Snapshot Tool
 Data Collection Tool
 Smc

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 63


Tools --Vi
 Application scenario: vi command is a powerful tool for editing
text file in UNIX, it can create and modify the text file.vi has two
basic modes for manipulating text, command mode and text
entry mode. When you start vi, you will be in command mode
until you enter one of the text entry commands, such as i, a, s,
or o, which are explained in Entering Text with vi.
 To create a file named myfile and open it for editing, use this command:
vi filename
 control command

ESC Key: switch between Command mode and text input mode
b: cursor go to the beginning of last word
X: delete a word dd: delete an row
i: Insert the text at the location before the cursor(insert)
j:Move the cursor to up
k:Move the cursor to down
l:Move the cursor to right
o: insert the text in the next line where the cursor is(open)
:wq ! :Save and exit :w! :Only save, no exit
:q! :Force exit without save
:e ! : reedit the file again without change
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 64
Tools --Use of Snapshot Tool

 Application scenario: when window snap or screen


snap on a workstation is needed
 Procedure
 Right-click the desktop and choose Application > Snapshot to
enable the snapshot program.
 Choose Hide the window during snapshot. Click the window to
snap or choose the screen. Snapshot is complete after waiting
for eight seconds.
 On the graphic viewer, choose File > Save as jpeg. Note: When
typing in the file name, do type in the suffix name like
XXXX.jpg(jpeg).

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 65


Tools--Data Collection Tool
 Application scenario: HA system
 In the /opt/haT2000-veritas-scripts/Monitor directory of
the Veritas HA system, the Veritas_Explorer.pl data
collection script exists. Run the script to check the status
of the HA system and collect data.
 It takes about 10 minutes to complete data collection
and the size of the files is about 8M.
 As some data collected is large, the data should be
divided and then transmitted. The WinRAR function is
available.

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 66


Tool-smc

 Application scenario: graphic interfaces of common operations on the


workstation
admintool in Solaris8 is changed to smc in Solaris10. Compared with
admintool, smc features better expansion performance. smc does not
provide specific functions, but provides interfaces that access these
functions.
a. Assign authority and role for users.
b. Create and carry out the user policy.
c. View the system log and find out abnormal or doubtful log records.
d. Create a mail list.
e. Configure and format the new system disk, including disk partition and
preparation for RAID configuration disk copy.
 Enable the smc tool
#smc
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 67
Question

 Q1: How to open the T2000 or T2100 in the


workstation?

 Q2: How to enable the ftp and telnet functions?

 Q3: How to use the VI editor?

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 68


Summ  In this chapter, we have
ary learned:
 Normal operation for
Engineering
 Normal operation for
Maintenance
 Use of tools

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 69


Content

 Introduction to server hardware


 Brief introduction to Solaris 10
operating system
 Common operations of Solaris 10
operating system
 Troubleshooting on Solaris 10

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 70


Content
 Troubleshooting on Solaris 10

CDE Cannot Be Logged in Normally

The CD Fails to Pop up
 The User Password Is Forgotten
 The SH Script Cannot Be Run.

The workstation does not respond to the
keyboard and mouse

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 71


CDE Cannot Be Logged in Normally.
Problem description:

When a user logs in to CDE, the password is correct, but the system
is down after the desktop is displayed.

Problem cause:

The configuration file of Desktop of the user may be damaged.

Solution:

Two methods are available:


Method 1: Use a terminal to log in. Run “rm -rf .dt” and then re-log in
to CDE.
Method 2: Create a user and copy some configuration files such as
.cshrc, .login, and .dtprofile in the user directory to the new user
directory. Then customize the environment and create action icon for
HUAWEI TECHNOLOGIES Page 72
the new desktop. CO., LTD. Huawei Confidential
The CD Fails to Pop up.

Problem description

After installing Solaris 10 operating system, the engineer press


the popup key under the driver, but the CD fails to pop up.

Solution

Type in the command: eject –f.

Type in ./etc/init.d/volmgt stop to take out the CD.

Run the following command to restore the system:

./etc/init.d/volmgt start

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 73


The User Password Is Forgotten.
If a common user forgets the password, use the root user to
change the password.
(a) Log in to the system as the root user.
(b) Run the passwd command to change the user password.
#passwd user
If the root user password is forgotten, do as follows:
(a) Enter OK and enter the following commands:
#fsck -y /dev/rdsk/c0t0d0s0 (depending on the equipment of the root
partition)
#mount -F ufs /dev/dsk/c0t0d0s0 /mnt
#TERM=ansi; export TERM (if using vi is normal, do not use the
statement.)
#vi /mnt/etc/shadow
(b) Delete the character between the first and second colons after root. This
can delete the password of the root user.
#umount /mnt
#reboot
(c) Use the passwd command to change the password.
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 74
The SH Script Cannot Be Run.
Problem description
The .sh script fails to be run on the workstation. The system
returns a prompt that the script fails to be run.
Problem cause
The user has no enough authority and is not switched to other
relevant user.
The file has no executable authority.
In these two cases, use ls –l XXX.sh (script name) to view the file
attribute.
Solution
In case 1, switch the user or change the script host. If the
executable authority is insufficient, add the executable authority.
If the script is changed on the PC, check whether the transport
mode is correct (ASCII). In addition, use the sh –x xxx.sh
debugging
HUAWEI mode
TECHNOLOGIES to checkHuawei
CO., LTD. the Confidential
execution coursePage
of 75
the script and
The workstation does not respond to
the keyboard and mouse, so it is
nonoperable.
Problem description: The workstation does not respond to the keyboard
and mouse, so it is nonoperable.
Problem cause: The process runs abnormally.
Solution: Find out the abnormal process and kill it or restart the workstation.
Specifically, do as follows:
(a) Connect another computer (laptop computer, PC or workstation) to this
workstation with a network cable. Enter the following command on this
computer:
Telnet the IP address of the workstation.
Follow the prompt to type in the rms user name and relevant password and
then log in to the workstation.
(b) Find out the abnormal process and kill it.
Enter the following command to find out the possible abnormal process and
record the process number:
%ps -ef
Enter the following command to kill the abnormal process:
%kill -9   process number
If the abnormal process is unclear, kill the dtsession process. Then the
workstation interface restarts and enters in the login status.
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 76
The workstation does not respond
to the keyboard and mouse, so it is
nonoperable.
(c) If the workstation is restored after the preceding operations are carried
out, restart NMS in the workstation.
If the system remains abnormal, use the following command to restart
the workstation:
#/usr/sbin/shutdown -y -g0 -i6
Then the system is restarted.
If no computer connects to the workstation onsite or the computer fails to
telnet the workstation due to some reasons, do as follows:
(1) Type in “STOP”+“A”.
(2) When the system displays the “ok” prompt, type in “sync” to restart
the system.

Warning:
The preceding operation is bad to the file system, so it is used only when
there is no other method. Use fsck to check the file system after the
system
HUAWEI is restarted.
TECHNOLOGIES CO., LTD. Huawei Confidential Page 77
Question

 Q1: How to do when the workstation CD fails to pop


up?

 Q2: How to do when the sh script fails to be run?

 Q3: How to do when the user password is


forgotten?

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 78


 In this chapter, we have learned:
Summar  CDE Cannot Be Logged in Normally

y  The CD Fails to Pop up


 The User Password Is Forgotten
 The SH Script Cannot Be Run.
 The workstation does not respond to the
keyboard and mouse

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 79


 In this course, we have learned:
Summa  Introduction to server hardware
ry  Brief introduction to Solaris 10
operating system
 Common operations of Solaris 10
operating system
 Troubleshooting on Solaris 10

HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 80


Thank You
www.huawei.com

Das könnte Ihnen auch gefallen