topic on solaris 10
TRANSCRIPT
HUAWEI TECHNOLOGIES CO., LTD.
www.huawei.com
Huawei Confidential
Security Level: Internal Use Only23/4/8
Mo Qiuju /57859
Topic on Solaris 10
HUAWEI TECHNOLOGIES CO., LTD. Page 2Huawei Confidential
Preface
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. Page 3Huawei Confidential
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. Page 4Huawei Confidential
Objectives
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. Page 5Huawei Confidential
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. Page 6Huawei Confidential
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. Page 7Huawei Confidential
The Type of SUN Equipment
Blade2500
Sun Fire V480/V490Sun Fire V880/V890
Sun Netra240( 配套 3310 或 3320 阵列 )
HUAWEI TECHNOLOGIES CO., LTD. Page 8Huawei Confidential
T2000 Blade 2500,SUN Fire V490S,SUN
Fire V890
T2100 SUN Fire V490 or SUN Fire V890
T2000/T2100 HA System (Sun
Cluster)
Netra240+3310 disk array
T2000/T2100 HA System
(VERITAS Hot Standby)
SUN Fire V890 or SUN Fire V490
T2000 HA System (VERITAS
Warm Standby)
SUN Fire V890 or SUN Fire V490
Configuration Requirement for T2000/T2100
HUAWEI TECHNOLOGIES CO., LTD. Page 9Huawei Confidential
Hardware and software of SUN Workstation
The basic configuration of
SUN workstation includes: Host
Color display
Keyboard and mouse
Optional configuration for
SUN workstation includes: CD-ROM
Tape drive
Floppy drive
Software of SUN
workstation
Solaris
CDE
Sybase
T2000/T2100
single system
software
T2000/T2100 HA
system software
HUAWEI TECHNOLOGIES CO., LTD. Page 10Huawei Confidential
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. Page 11Huawei Confidential
Summary
In this chapter ,we have learned:
Models of SUN
Standard computers of T2000/T2100
Introduction to hardware and
software of SUN workstation
HUAWEI TECHNOLOGIES CO., LTD. Page 12Huawei Confidential
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. Page 13Huawei Confidential
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. Page 14Huawei Confidential
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. Page 15Huawei Confidential
System Architecture of UNIX
kernel
shell(B shell,
K shell, C shell)
Application
Program
Hardware
sh csh
cpp
vi
Outer Layer Program
kernel
Application Program
HUAWEI TECHNOLOGIES CO., LTD. Page 16Huawei Confidential
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. Page 17Huawei Confidential
Structure of Solaris File System
bin dev etc opt var cdrom
sh csh rc3.d sybase tmpT2000
client server
usr
/
export
home
t2000
HUAWEI TECHNOLOGIES CO., LTD. Page 18Huawei Confidential
-rwx r-x r-- 2 reed t2000 32 Oct 17 15:33 a.txt
111
101
100
7
5
4other
group
owner
- ordinary filer readablew writablex executable
owner group other
UNIX File Permission
HUAWEI TECHNOLOGIES CO., LTD. Page 19Huawei Confidential
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. Page 20Huawei Confidential
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
Eg. echo $ IMAP
HUAWEI TECHNOLOGIES CO., LTD. Page 21Huawei Confidential
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. Page 22Huawei Confidential
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. Page 23Huawei Confidential
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. Page 24Huawei Confidential
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/ftpd/ftpusersFile ip display mode changes./opt/sybase/interfaces ip denoted in decimal format
/etc/ftpusers/opt/sybase/interfaces ipDenoted in hexadecimal format
HUAWEI TECHNOLOGIES CO., LTD. Page 25Huawei Confidential
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. Page 26Huawei Confidential
Summary
In this chapter, we have learned:
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. Page 27Huawei Confidential
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. Page 28Huawei Confidential
Content
Common operations of Solaris 10
operating system Normal operation for Engineering
Normal operation for Maintenance
Use of tools
HUAWEI TECHNOLOGIES CO., LTD. Page 29Huawei Confidential
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. Page 30Huawei Confidential
Hardware of SUN Workstation
The basic configuration of
SUN workstation includes: Host
Color display
Keyboard and mouse
Optional configuration for
SUN workstation includes: CD-ROM
Tape drive
Floppy drive
SUN workstation
type:
Ultra60
Blade2000
Blade2500
Sun Fire V480
Sun Fire V490
Sun Fire V880
Sun Fire V890
Sun Netra240
HUAWEI TECHNOLOGIES CO., LTD. Page 31Huawei Confidential
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. Page 32Huawei Confidential
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. Page 33Huawei Confidential
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
More detail installation step refer to the T2000/T2100 Installation Guide
HUAWEI TECHNOLOGIES CO., LTD. Page 34Huawei Confidential
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. Page 35Huawei Confidential
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. Page 36Huawei Confidential
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. Page 37Huawei Confidential
Enable ftp and telnet function
steps
a) enable the ftp and telnet function only by root user
# svcadm enable telnet
# svcadm enable ftpb) 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. Page 38Huawei Confidential
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. Page 39Huawei Confidential
Use ftp to Transfer FilesApplication 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
a. “ Start” “Run” cmd (necessary for a PC and unnecessary for a
workstation)
b. ftp ip address
c. Type in the user name and password.
d. ftp> ascll (transfer mode: text file in ascll mode; other files in bin mode)
e. ftp>cd /aaa (directory of files in the workstation)
f. ftp>lcd d:\
g. ftp>put bbb (bbb refers to the file name. To obtain a file from the
workstation, replace put with get.)
h. ftp>bye (ftp ends.)
HUAWEI TECHNOLOGIES CO., LTD. Page 40Huawei Confidential
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
a. “ Start” “Run” cmd (necessary for a PC and unnecessary for a workstation)
b. telnet server IP address
c. Type in the user name and password.
HUAWEI TECHNOLOGIES CO., LTD. Page 41Huawei Confidential
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. Page 42Huawei Confidential
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. Page 43Huawei Confidential
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. Page 44Huawei Confidential
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. Page 45Huawei Confidential
Start or shutdown the T2000(T2100) in Solaris
Steps
a) Switch to t2000(t2100) user :su – t2000(t2100)
b) Execute “cd /T2000(T2100)/server/bin”
c) 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. Page 46Huawei Confidential
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. Page 47Huawei Confidential
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. Page 48Huawei Confidential
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. Page 49Huawei Confidential
Directory Navigation and Control
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
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.
HUAWEI TECHNOLOGIES CO., LTD. Page 50Huawei Confidential
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. Page 51Huawei Confidential
Directory Navigation and Control --lsLs ---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. Page 52Huawei Confidential
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
Command line is sensitive to lowercase or capital.
HUAWEI TECHNOLOGIES CO., LTD. Page 53Huawei Confidential
Common Operations
cd Change directory
ls List the directory contents, for example:
ls -al
mkdir Create directory
cp/rcpCopy 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. Page 54Huawei Confidential
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, for
example: echo $SYBASE
HUAWEI TECHNOLOGIES CO., LTD. Page 55Huawei Confidential
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
passwd Used to change your password
HUAWEI TECHNOLOGIES CO., LTD. Page 56Huawei Confidential
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. Page 57Huawei Confidential
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. Page 58Huawei Confidential
System Resource Navigation and Control
Query the hardware informationSyntax: prtdiag
Example: %prtdiag
Return value: the clock frequency, the amount of memory , CPU information, I/O information
Query the basic information of systemSyntax: uname –a,hostname,hostidExample: %uname –a
%hostname %hostid
Return value: the current user name, hostname, hostID,etc. Query the information of system patchExecute showrev –p | grep patch number to query the pacth whether it has
been installed.Example: #showrev -p | grep 117350Return value:Patch: 117350-02 Obsoletes: 116897-01 Requires: 108528-29, 117000-0 Incompatibles:Packages: SUNWcarx, SUNWcar, SUNWcsr, SUNWpmu, SUNWpmux, SUNWhea
HUAWEI TECHNOLOGIES CO., LTD. Page 59Huawei Confidential
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. Page 60Huawei Confidential
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. Page 61Huawei Confidential
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 ff000000hme0: 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. Page 62Huawei Confidential
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) # vi /etc/defaultrouter
129.9.1.254
HUAWEI TECHNOLOGIES CO., LTD. Page 63Huawei Confidential
Use of tools
Include:
Vi
Use of Snapshot Tool
Data Collection Tool
Smc
HUAWEI TECHNOLOGIES CO., LTD. Page 64Huawei Confidential
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 modeb: cursor go to the beginning of last word
X: delete a word dd: delete an rowi: 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. Page 65Huawei Confidential
Tools --Use of Snapshot Tool
Application scenario: when window snap or screen
snap on a workstation is needed
Procedure
1. Right-click the desktop and choose Application > Snapshot to
enable the snapshot program.
2. Choose Hide the window during snapshot. Click the window to
snap or choose the screen. Snapshot is complete after waiting
for eight seconds.
3. 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. Page 66Huawei Confidential
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. Page 67Huawei Confidential
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. Page 68Huawei Confidential
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. Page 69Huawei Confidential
Summary
In this chapter, we have learned:
Normal operation for Engineering
Normal operation for Maintenance
Use of tools
HUAWEI TECHNOLOGIES CO., LTD. Page 70Huawei Confidential
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. Page 71Huawei Confidential
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. Page 72Huawei Confidential
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
the new desktop.
HUAWEI TECHNOLOGIES CO., LTD. Page 73Huawei 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. Page 74Huawei Confidential
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. Page 75Huawei Confidential
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 mode to check the execution course of the script and analyze the problem.
HUAWEI TECHNOLOGIES CO., LTD. Page 76Huawei Confidential
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. Page 77Huawei Confidential
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 is restarted.
HUAWEI TECHNOLOGIES CO., LTD. Page 78Huawei Confidential
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. Page 79Huawei Confidential
Summary
In this chapter, we have learned:
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. Page 80Huawei Confidential
Summary
In this course, we have learned:
Introduction to server hardware Brief introduction to Solaris 10 oper
ating system Common operations of Solaris 10 o
perating system Troubleshooting on Solaris 10
Thank You
www.huawei.com