• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

Sun OBP command

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 92次 | 进入软件测试论坛讨论

领测软件测试网 2. Open Boot Prom
2.1 Overview
The functions provided by the OBP are;
·  Performs the Power On Self-Test (POST) ·  Informs the OS of the hardware configuration
·  Initializes the system and prepares for booting ·  Includes system configuration parameters (prom
variables)
·  Loads and starts the execution of the operating
system (or any standalone Program)
·  Provides diagnostic tools for hardware troubleshooting
2.2 Usage
Some of the more useful commands that can be issued from OpenBoot’s ok prompt are described here.
Refer to the Open-Boot Command Reference Manual for a complete list of commands.
Help for various functional areas of the OpenBoot monitor can be obtained by typing help at the ok
prompt. The help listing will provide a number of OBP key words. These key words can then be used
in the help command to provide further details.
Each workstation contains one or more NVRAM devices which contains unique system ID
information, as well as a set of user-configurable parameters. The NVRAM parameters allow the user
a certain level of flexibility in configuring the system to act in a given manner under a specific set of
circumstances.
Refer to the eeprom(1M) manpage for a description of the parameters. This manpage also describes a
way of setting the parameters from the OS level.
The following commands can be used at the OpenBoot monitor to access the NVRAM parameters.
Command Description
printenv Used to list the NVRAM parameters, along with their default values and current values
setenv pn pv Used to set or modify a parameter.
set-default pn Used to set an individual parameter back to its default value
set-defaults Used to reset all parameters to their default values. (Note that ‘set-defaults’ only affects
parameters that have assigned default values.)
pn parameter name
pv parameter value
2.3 Hardware checks and diagnostics
The following commands are available for testing or checking the system’s hardware. If the ‘diagswitch?’
NVRAM parameter is set to true when the system is powered on, then a Power-On Self Test
(POST) diagnostic will be run. If a terminal is present, on the system’s serial port A (9600,n,8,1),
then the output from the diagnostic can be viewed.
Not all of the commands shown are available on all workstations - OPB revision level dependent
Command Description
test-all Run the diagnostic tests on each device which has provided a self-test
test floppy Run diagnostics on the system’s floppy device
test /memory Run the main memory tests. If the NVRAM parameter ‘diag-switch?’ is set to true, then
all of main memory is tested. If the parameter is false then only the amount of memory
specified in the ‘selftest-#megs’ NVRAM parameter will be tested
test net Test the network connection for the on- board network controller
watch-net Monitor the network attached to the on- board net controller
watch-net-all Monitor the networks attached to the on- board net controller, as well as the network
controllers installed in SBus slots
watch-clock Test the system’s clock function
2.4 System Information
The following commands are available for displaying information about the system.
Not all of the commands shown are available on all workstations - OPB revision level dependent
Command Description
.attributes the name and model field will generally identify the FRU
.enet-addr Display the system’s ethernet address
.idprom Display the formatted contents of the IDPROM
.speed Display CPU and Sbus speeds
.traps Display a list of the SPARC trap types
.version Display the version and date of the PROM
banner Display the Power-On banner
cpu-info Display information about a systems on-board processor
module-info Display information about the system’s processor(s) modules. OBP >2.9
SS5/10/20
firmware-version [ bn ] Display the major and minor CPU firmware version on a EX000 server. (bn
= board number in hex)
probe-scsi Identify the devices attached to the on-board SCSI controller
probe-scsi-all Identify the devices attached to the on-board SCSI controller as well as those
devices which are attached to SBus SCSI controllers
show-attrs Display model, name of system and clock frequency
show-devs [ device path ] show-devs, show-devs /iommu, show-devs /iommu/sbus. Display the devices
the OBP probed. The OPB user device nodes to represent devices. These
device nodes are organized into a tree-like structure. Controller boards
represents the branches, and device nodes the leaves
show-disks Display a list of the device paths for installed SCSI disk controllers
show-displays Display a list of the device paths for installed display devices
show-nets Display a list of the device paths for installed Ethernet controllers
show-sbus Display list of installed SBus devices
show-tapes Display a list of the device paths for installed SCSI tape controllers
show-ttys Display a list of the device paths for tty devices
Note, If you want to traverse the OBP device tree the following commands should be run to obtain
“full”use of the forth toolkit
·  setenv fcode-debug? true
·  setenv diag-switch? true
·  setenv auto-boot? false
·  reset
2.5 Emergency commands
These commands must be typed from the keyboard, they will not work from a console which is
attached via the serial ports. With the exception of the Stop-A command, these commands are issued
by pressing and holding down the indicated keys on the keyboard immediately after the system has
been powered on. The keys must be held down until the monitor has checked their status. The Stop-A
command can be issued at any time after the console display begins, and the keys do not need to be
held down once they’ve been pressed. The Stop-D, Stop-F and Stop-N commands are not allowed
when one of the security modes has been set.
Command Description.
Stop (L1) Bypass the Power-On Self Test (POST). This is only effective if the system has been
placed into the diagnostic mode
Stop-A (L1-A) Abort the current operation and return to the monitor’s default prompt
Stop-D (L1-D) Set the system’s ‘diag-switch?’ NVRAM parameter to ‘true’, which places the system
in diagnostic mode. POST diagnostics, if present, will be run, and the messages will be
displayed via the system’s serial port A
Stop-F (L1-F) Enter the OpenBoot monitor (Forth) before the monitor has probed the system for
devices. Issue the ‘fexit’ command to continue with system initialization
Stop-N (L1-N) Causes the NVRAM parameters to be reset to their default values. Note that not all
parameters have default values
2.6 Line Editor Commands
The following commands can be used while the monitor is displaying the ok prompt. Not all of these
editing commands are available on all workstations.
Type help line at the ok prompt.
Command Description
CTRL-A Place the cursor at the start of line
CTRL-B Move the cursor backward one character
ESC-B Move the cursor backward one word
CTRL-D Erase the character that the cursor is currently highlighting
ESC-D Erase the portion of word from the cursor’s present position to the end of the word
CTRL-E Place the cursor at the end of line
CTRL-F Move the cursor forward one character
ESC-F Move the cursor forward one word
CTRL-H Erase the character preceding the cursor (also use Delete or Back Space)
ESC-H Erase the portion of the word which precedes the cursor (use also CTRL-W)
CTRL-K Erase from the cursor’s present position to the end of the line
CTRL-L Show the command history list
CTRL-N Recall the next command from the command history list
CTRL-P Recall a previous command from the command history list
CTRL-Q Quote the next character (used to type a control character)
CTRL-R Retype the current line
CTRL-U Erase from the cursor’s present position to the beginning of the line
CTRL-Y Insert the contents of the memory buffer into the line, in front (to the left) of the
cursor
2.7 Aliases
Device path can be long and error prone to type. Device aliases are made to make system
administration easy
Command Description
devalias Show the device aliases configured on the system
devalias alias-name Display the device-path of the alias
devalias [ alias-name device-path ] To create temporary device aliases
eg: ok devalias fred /sbus/esp@0,800000/sd@0,0
nvalias [ alias-name device-path ] To create permanent aliases that survive power off
eg: ok nvalias fred /sbus/esp@0,800000/sd@0,0
·  select the controller path to the boot disk
·  ok nvalias alias-name ( ^Y to insert controller path)disk(@target,unit)
To delete a device alias
·  nvunalias

2.8 nvramrc
2.8.1 Nvramrc commands
Command Description
nvedit Enter the NVRAMRC editor. (write to a temporary buffer)
nvrun Execute the contents of the temporary buffer
nvstore Copy the contents of the temporary buffer to NVRAMRC
nvrecover Recover the contents of NVRAMRC if they have been lost as a result of the setdefaults
command. WARNING nvedit deletes backup copy of NVRAMRC
nvalias Store the command “devalias alias device-path” in NVRAMRC
nvunalias Delete the alias from NVRAMRC. (set-defaults will do the same)
nvquit Discard the contents of the tempory buffer
use-nvramrc? Commands in the NVRAMRC are executed during system startup if set to true
2.8.2 Nvedit Editor Commands
Keystroke Description
Control-B Move backward one character
Control-C Exit the editor and return to the OBP
Control-F Move forward one chararcter
Control-H Delete the previous character to the current cursor position
Control-K If at the end of line, join the next line to the current line ( delete next line)
Control-L List all lines
Control-N Move to the next line in the NVRAMRC editing buffer
Control-0 Insert a new line at the current cursor position position and stay on current line
Control-P Move to the previous line in the NVRAMRC editing buffer
delete Delete the previous character
return Insert a new line at the cursor position and advance to the next line

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备2023014753号-2
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网