help

124
TCP/IP FAQ and Tip Sheet SunService Tip Sheet for Sun TCP/IP Includes Notes on ndd variables and netstat Revision: 1.9 Date: August 26, 1996 1.0: About TCP/IP 2.0: Debugging TCP/IP 2.1: netstat 2.2: etherfind and snoop 3.0: Common How Tos 3.1: How to Tune Network Variables in SunOS 3.2: How to Tune Network Variables in Solaris 4.0: Some Frequently Asked Questions 4.1: Miscellaneous Questions 4.2: Questions on Ports 4.3: netstat Questions 4.4: Web Server TCP/IP Optimization 5.0: Patches 5.1: SunOS TCP/IP Patches 5.2: Solaris TCP/IP Patches 6.0: Known Bugs & RFEs 6.1: RFEs 7.0: References 7.1: Important Man Pages 7.2: Sunsolve Documents 7.3: Sun Educational Services 7.4: Solaris Documentation 7.5: Third Party Documentation 7.6: RFCs 8.0: Supportability 9.0: Additional Support 1.0: About TCP/IP This Tip Sheet documents a wide variety of information concerning TCP/IP. It is mainly concerned with information on the tuning options available in Sun TCP/IP, as well as a few of the most common questions. Unless you are doing really low level work with TCP/IP, this Tip Sheet probably will not be of much use to you. However, if you are doing low level work, this Tip Sheet will give you some ideas on what you can do with Sun's TCP. A lot of the topics in this Tip Sheet fall under the category of Performance Tuning. This is an area that is normally not covered by SunService. Hopefully, this Tip Sheet will get you started tuning things on your own. If it is insufficient, you should consult Sections 8.0 and 9.0 for how to get help from Sun Consulting Services. 2.0 Debugging TCP-IP 2.1: netstat The netstat program may be used to examine a wide variety of network information. In its most basic form, when run without arguments, netstat will show currently active connections:

Upload: raji-gopraju

Post on 31-Oct-2014

28 views

Category:

Documents


4 download

DESCRIPTION

solsaris

TRANSCRIPT

Page 1: help

TCP/IP FAQ and Tip SheetSunService Tip Sheet for Sun TCP/IPIncludes Notes on ndd variables and netstat Revision: 1.9Date: August 26, 1996 1.0: About TCP/IP2.0: Debugging TCP/IP 2.1: netstat 2.2: etherfind and snoop3.0: Common How Tos 3.1: How to Tune Network Variables in SunOS 3.2: How to Tune Network Variables in Solaris4.0: Some Frequently Asked Questions 4.1: Miscellaneous Questions 4.2: Questions on Ports 4.3: netstat Questions 4.4: Web Server TCP/IP Optimization5.0: Patches 5.1: SunOS TCP/IP Patches 5.2: Solaris TCP/IP Patches6.0: Known Bugs & RFEs 6.1: RFEs7.0: References 7.1: Important Man Pages 7.2: Sunsolve Documents 7.3: Sun Educational Services 7.4: Solaris Documentation 7.5: Third Party Documentation 7.6: RFCs8.0: Supportability9.0: Additional Support

1.0: About TCP/IPThis Tip Sheet documents a wide variety of information concerning TCP/IP. It is mainly concerned with information on the tuning options available in Sun TCP/IP, as well as a few of the most common questions. Unless you are doing really low level work with TCP/IP, this Tip Sheet probably will not be of much use to you. However, if you are doing low level work, this Tip Sheet will give you some ideas on what you can do with Sun's TCP. A lot of the topics in this Tip Sheet fall under the category of Performance Tuning. This is an area that is normally not covered by SunService. Hopefully, this Tip Sheet will get you started tuning things on your own. If it is insufficient, you should consult Sections 8.0 and 9.0 for how to get help from Sun Consulting Services.

2.0 Debugging TCP-IP

2.1: netstat

The netstat program may be used to examine a wide variety of network information. In its most basic form, when run without arguments, netstat will show currently active connections:

Page 2: help

# netstat TCP Local Address Remote Address Swind Send-Q Rwind Recv-Q State -------------------- -------------------- ----- ------ ----- ------ -------localhost.32791 localhost.32796 8192 0 8148 0 CLOSE_WAIT psi.3139 sockem.listen 8760 0 8760 0 ESTABLISHE psi.login sun-soft.1020 4096 0 9112 0 ESTABLI

The most important bits of information here are the local address (local name + local port), the remote address (remote name + remote port) and the State. In many cases, the port number is replaced by a port name, defined by the /etc/services file. The possible states are all defined in the netstat man page. Of particular note is the TIME_WAIT state connections will always wait in that state for a designated amount of time (called the 2MSL time) before the connection is totally shut down. This is to prevent new programs from reusing a port during a period in which packets destined for an older application might arrive there. The netstat -a also shows information as above, and also includes all server processes, which are usually waiting in a LISTEN state (netstat without options only lists active processess, not passively LISTENing processes). One common use for netstat is in debugging, to examine network performance problems which may relate to programs getting stuck in certain states. This is done by examining the states noted in the netstat output above. There are a number of other uses for netstat: netstat -i will show interface information, netstat -p will show arp information and netstat -r will show routing information.

2.2: etherfind and snoop

You can use etherfind (SunOS) and snoop (Solaris) to examine every single packet which goes across the network. They can be useful if you are looking for retransmissions, duplicate ACKs, or other similar problems. The etherfind and snoop man pages explain how to use those utilities to examine the network. SunService also has a separate Tip Sheet (the Miscellaneous Programs Tip Sheet) which outlines some basic uses of etherfind and snoop.

3.0 Common How Tos

3.1: How to Tune Network Variables in SunOS

3.1.1: config Variables

Four variables may be modified in the config file for your kernel (eg. /sys/sun4c/conf/GENERIC). Each of these may be changed by adding a line as follows: options OPTIONNAME =value For example: options IPFORWARDING =-1 The legal options are: DIRECTED_BROADCAST Determines whether to forward broadcasts directed to a specific net or subnet, if that net or

subnet is directly connected to the machine. The default value is 1 (True).IPFORWARDING Determines if the workstation will route packets. This variable can be one of three selections:

Page 3: help

-1 Never forward 0 Only forward when two or more interfaces are up 1 Always forward The default value is 0.

IPSENDREDIRECTS Determines whether host should send ICMP redirects when it routes packets. The default value is 1 (True).

SUBNETSARELOCAL Determines if remote subnets on the same network should be considered local. The default value is 1 (True).

After making any of these changes, config the kernel, and remake it.

3.1.2: in_proto.c Variables

Other Network variables may be modified under SunOS by modifying the file /sys/netinet/in_proto.c. These are each standard C declarations. After modifying them, the kernel must be rebuilt. tcp_default_mss Determines the Maximum Segment Size for nonlocal packets (i.e., packets to be sent to different networks

or subnets). The definition of local may differ, depending on how SUBNETSARELOCAL is set. The default value for tcp_default_mss is 536 bytes.

tcp_keepidle Determines how frequently to test if an idle connection is still alive. The default value is 2 hours.tcp_keepintvl Determines how frequently to check an idle connection, if the first check has failed. The default value is 75

seconds.tcp_keeplen Compatibility variable that must be set to 1 for BSD4.2 compatibility. The default value is 1.tcp_nodelack Determines whether ACKs can be delayed. Default is 0 (Allow ACKs to be delayed). A value of 1 will turn

off delayed ACKs.tcp_recvspace Determines the maximum value of the TCP receive window. The default value is 4096 (4k).tcp_sendspace Determines the maximum value of the TCP transmit window. The default value is 4096 (4k).tcp_ttl Determines the default Time To Live for TCP packets. The default value is 60.udp_cksum Determines whether to checksum UDP packets. The default value is 0 (False). This should usually be

changed to 1 (True) if you are having any troubles with UDP services (ie, NFS, NIS)udp_ttl Determines the default Time To Live for UDP packets. The default value is 60.udp_recvspace Determines the maximum value of the UDP receive window. The default value is 18000 bytes.udp_sendspace Determines the maximum value of the UDP transmit window. The default value is 9000 bytes.

3.2: How to Tune Network Variables in SolarisMost TCP, IP, UDP and ARP tuning in Solaris is done via the ndd command. You can list all of the appropriate variables by supplying ndd with the driver name and a ?, i.e.: % ndd /dev/arp \? % ndd /dev/ip \? % ndd /dev/tcp \? % ndd /dev/udp \? Note: Under Solaris 2.5 or higher, you will need to be root to displaythese variables. You can change ndd variables by supplying the -set option, the variable name, and the value, i.e.: % ndd -set /dev/ip ip_forwarding 0 If you wish ndd variables to get set upon every boot, you should put a line for it in the file /etc/rc2.d/S69inet:

Page 4: help

% cat /etc/rc2.d/S69inet ... # # Set configurable parameters. # ndd -set /dev/tcp tcp_old_urp_interpretation 1 Many variables have two options: 1 (True) and 0 (False). Note: in all of the following examples, the default values for 2.4 are listed. Other OSs may differ, and can always be discovered bytyping: # ndd device variable I.e.: # ndd /dev/ip ip_debug 0One word of warning concerning the ndd variables: They should be considered quite volatile, and might totally change from one release of Solaris to another. Only the variables that are the most useful, or the least likely to change, are listed below. Even these could be potentially modified in new releases of the OS. Unlisted variables, which can be viewed with the ndd command, should be considered even less static.

3.2.1: IP Variables

ip_def_ttl Determines the default Time To Live value for standard IP packets. The default value is 255.

ip_forwarding Determines if the workstation will route packets. This variable can be one of three selections:0 Never forward1 Always forward2 Only forward when two or more interfaces are up The default value is 2.

ip_send_redirects Determines whether the host should send ICMP redirects when it routes packets. The default value is 1 (True).

3.2.2: TCP Variables

tcp_close_wait_interval Despite the misleading name, this variable actually sets the time wait interval (the 2MSL value). The default value is 240000 ms (4 minutes).

tcp_ip_ttl Determines the default Time To Live for TCP/IP packets. The default value is 255.tcp_keepalive_interval Determines how frequently to test if an idle connection is still alive. The default value is 7200000 ms

(2 hours). tcp_mss_def Determines the Maximum Segment Size for nonlocal packets (ie, packets to be sent to different

networks or subnets). The default value is 536 bytes.tcp_recv_hiwat Determines the maximum value of the TCP receive window. The default value is 8192 (8k).tcp_smallest_anon_port Determines the smallest TCP port number that may be used for an anonymous connection. The

default value is 32768.tcp_xmit_hiwat Determines the maximum value of the TCP transmit window. The default value is 8192 (8k).tcp_xmit_lowat Determines the minimum value of the TCP transmit window. The default value is 2048 (2k).

3.2.3: UDP Variablesudp_def_ttl Determines the default Time To Live for UDP packets. The default value is 255.udp_do_checksum Determines whether checksums should be done for UDP packets. The default value is 1 (True).udp_recv_hiwat Determines the maximum value of the UDP receive window. The default value is 8192 (8k).udp_smallest_anon_port Determines the smallest UDP port number that may be used for an anonymous connection. The

default value is 32768.

Page 5: help

udp_xmit_hiwat Determines the maximum value of the UDP transmit window. The default value is 8192 (8k).udp_xmit_lowat Determines the minimum value of the UDP transmit window. The default value is 1024 (1k).

4.0 Some Frequently Asked Questions

4.1: Miscellaneous Questions

Q: What RFCs does Sun TCP/IP follow? A: Sun follows RFC 793 for TCP, RFC 768 for UDP, RFC 791 for IP, and RFC 1122 overall. RFC 1323 is notably not implemented. See section 6.1 for more information. Q: Will TCP/IP kill idle connections? A: No. If a connection goes idle for an extended amount of time, probes will be sent out to verify that the remote machine or connection has not gone down. However, provided that everything is still running, TCP/IP connections should stay live forever.

4.2: Questions on Ports

Q: Why do ports get stuck in the TIME_WAIT state? A: This is due to the 2MSL timeout value, which is a part of the TCP specification. After a connection has been closed by both the client and the server, the port becomes unavailable for a certain amount of time, so that a new program does not inadvertantly get packets that were intended for the old program. On Solaris machines, the 2MSL value may be modified by adjust the /dev/tcp tcp_close_wait_interval ndd variable. See Section 3.2.2. Q: Why do I get "address already in use" when I try and reuse a port which a previous program had used. A1: It could be that the port is still in the TIME_WAIT state (see above). You may confirm this by running netstat, and examining the port in question. If this is the case, simply wait the couple of minutes it will take for the port to get out of the TIME_WAITstate. A2: It could be that the program you are using does not correctly list the port as one that may be reused. Verify that your program is setting the SO_REUSEADDR socket option.

4.3: netstat Questions

Q: Why does netstat hang when I run it? A: This is usually due to an error in name resolution. Run netstat with the -n option to verify that this is the case: % netstat -n % netstat -rnIf you find that netstat does not hang when you run with the -n option, investigate your naming services (DNS, NIS, NIS+) for further problems.

4.4: Web Server TCP/IP Optimization

Q: How do I increase the listen backlog described in my HTTPDdocumentation?

Page 6: help

A: This may be modified only on Solaris machines. On these machines, you will want to adjust the /dev/tcp tcp_conn_req_max variable. Section 3.2 explains how to set ndd variables temporarily or permanently. On Solaris 2.4 or lower, you can use ndd normally to set the listen backlog up to 32, from the default of 5: ndd -set /dev/tcp tcp_conn_req_max 32 By modifying your kernel, you can increase the backlog even higher. echo "tcp_param_arr+14/W 0t128" adb -kw /dev/ksyms /dev/mem ndd -set /dev/tcp tcp_conn_req_max 128 You must make sure that you have at least patch 101945-36 installed before trying this. Values higher than 128 are not suggested. These lines should both go into /etc/rc2.d/S69inet to make the change permanent. On Solaris 2.5 or higher, you can set the listen backlog up to 1024 normally: ndd -set /dev/tcp tcp_conn_req_max 1024 Q: What else can I do to increase Web Server Performance? A: Adjust the listen backlog up, as is suggested in your Web Server documentation. You will probably also want to increase the size of the send, receive and congestion windows: ndd -set /dev/tcp tcp_cwnd_max 65535 ndd -set /dev/tcp tcp_xmit_hiwat 65536 ndd -set /dev/tcp tcp_recv_hiwat 65536 Note that under Solaris 2.5 and higher, tcp_cwnd_max is already set to 65535 by default. Also note that these ndd settings only apply to Solaris.

5.0: Patches

The following is the list of all of the TCP/IP related patches for 4.1.3, 4.1.3_u1, 4.1.4, 5.3 and 5.4. If you are having TCP/IP problems, installing the patches is a good place to start, especially if you recognize the general symptoms noted below. In order for a machine to be stable, all of the recommended patches should be installed as well. The list of recommended patches for your operating system is available from sunsolve1.sun.com.

5.1: SunOS TCP/IP Patches

Patch-ID# SunOS 4.1.1,4.1.2,4.1.3: TCP socket and reset problems 101790-01 SunOS 4.1.3_U1: TCP socket and reset problems Fix some problems regarding TCP resets, and the usage of the getsockopt function. 100584-08 SunOS 4.1.3: TCP Interface Jumbo Patch 102010-02 SunOS 4.1.3_U1: TCP interface Jumbo Patch. Fix a wide variety of problems having to do with TCP connections.

5.2: Solaris TCP/IP Patches

101318-81 SunOS 5.3: Jumbo patch for kernel (includes libc, lockd) 101945-42 SunOS 5.4: jumbo patch for kernel

Page 7: help

These kernel patches fix a large number of TCP/IP and other network problems. They should be installed on every networked machines.

6.0: Known Bugs and RFEs

The following bugs & rfes represent known open issues regarding TCP/IP.

6.1: RFEs

1179428 Request for implementation of RFC 1323 for TCP/IP performance This RFE requests that RFC 1323 be implemented under Solaris, so that performance on satellite or delayed links can be improved.

7.0 References

7.1: Important Man Pages

arpetherfindipndd (Solaris Only)netstatsnooptcpudp

7.2: Sunsolve Documents

The following SunSolve documents may contain some additional information, which is not covered in this Tip Sheet.

7.2.1: FAQs

1048 IP interface questions and answers1202 TCP/IP applications have slow response over asynchronous commu

7.2.2: Infodocs

2194 Internet Protocol Overview (IP and ICMP)2195 Transmission Control Protocol (TCP)

7.2.3: SRDBs

5819 How to set socket keep alive timeout length6729 UDP checksums for NFS11416 What are the ARP values set by ndd?

Page 8: help

7.3: Sun Educational Services

There are no Sun Educational Classes which cover TCP/IP tuning to this level.

7.4: Solaris Documentation

There is no Solaris Documentation which covers TCP/IP tuning to this level.

7.5: Third Party Documentation

_TCP/IP Illustrated, Volume 1_, by W Richard Stevens, published by Addison-Wesley, ISBN 0-201-63346-9 This is a superb book covering TCP/IP. It explains the majority of the terms which are outlined in the above document and gives a really good overview of networking as a whole.

7.6: RFCs

There are a huge number of RFCs which cover TCP/IP and other networking protocols. RFCs are the Internet-written documents that define the specifications of many common networking programs. RFCs can be retrieved from nic.ddn.mil, in the /rfc directory.

8.0: Supportability

SunService is not responsible for the initial configuration of your TCP/IP environment. In addition, SunService can neither diagnose your TCP/IP performance problems nor suggest TCP/IP tuning guidelines. We can help resolve problems where TCP/IP is not behaving correctly, but in such cases the contact must be a system administrator who has a good understanding of TCP/IP.

9.0: Additional Support

For initial configuration, or TCP/IP performance tuning guidelines, please contact your local SunService office for possible consulting offerings. Sun's Customer Relations organization can put you in touch with your local SunIntegration or Sales Office. You can reach Customer Relations at 800-821-4643.

Page 9: help

What to first look at when performance seems to be poorThe "system load average" provides a convenient way to summarize the activity on a system. It is the first statistic you should look at when performance seems to be poor. UNIX defines the load average as the average number of processes in the kernel's run queue during an interval. A "process" is a single stream of instructions. Most programs run as a single process, but some spawn (UNIX terminology: "fork") other processes as they run. A process is in the run queue if it is:

1) Not waiting for any external event (e.g., not waiting for someone to type a character at a terminal).2) Not waiting of its own accord (e.g., the job has not called "wait").3) Not stopped (e.g., the job hasn't been stopped by CTRL-Z).

While the load average is convenient, it may not give you an accurate picture of the system's load. There are two primary reasons for this inaccuracy:

1. The load average counts all jobs waiting for disk I/O as runable. This includes processes that are waiting for disk operations to complete across NFS. If an NFS server is not responding (e.g., if the network is faulty or the server has crashed), a process can wait for hours for an NFS operation to complete. It is considered runnable the entire time even though nothing is happening; therefore, the load average climbs when NFS servers crash, even though the system is not really doing any more work.

2. The load average does not account for scheduling priority. It does not differentiate between jobs that have been "nice'd" (i.e., placed at a lower priority and therefore not consuming much CPU time) or jobs that are running at a high priority. Under Version 4 the load average cannot account for real-time processes. They are the same as everything else, even though they place a much greater load on the CPU.

With Interactive UNIX and no TCP/IP tools, or if you have chosen not to use them, the tool that can be used is "sar -q # #". This gives you information about the system's run queue: the list of jobs that are ready to run at any time.

Here's a typical report from sar -q 5 5:

test test 3.2 2 i386 09/14/94

20:01:02 runq-sz %runocc swpq-sz %swpocc20:01:07 1.0 47 20:01:12 1.0 20 20:01:17 1.0 40 20:01:22 1.0 20 20:01:27 1.0 40

Average 1.0 33

The fields in this report are:

runq-sz The average length of the run queue during this interval. The run queue lists jobs that are in memory and runnable. It does not include jobs that are waiting for I/O or sleeping.

%runocc The percentage of time that the run queue is occupied.

swpq-sz The average length of the swap queue during the interval. This queue lists jobs that are ready to run but can not because they have been swapped out. Many systems (and all version 4 systems) do not report this statistic.

%swpocc The percentage of time that the swap queue is occupied.

The length of the run queue is similar to the BSD load average. AT&Tstates that the run queue should always be less than two. Depending onthe size of the system, this may be too conservative. Whatever the

Page 10: help

critical threshold, longer run queues mean heavier load. Ideally therun queue would be occupied (nonzero) all of the time, minimizing the system's idle time. Of course, this is not likely when the load is low.If the load is high and the run queue spends a lot of time empty, you shouldlook for I/O or memory problems.

How to set speed of Ethernet and duplex mode

The communication mode of the hme interface may be changed to adjust to different environments. In some cases, different modes should be tested; for example, if errors or communication problems occur. To change the mode, please add commands to the /etc/system file, then reboot the system, as described below..

These commands will set the hme interface to half duplex, which is the mode that should be used when talking to a an interface other than a second Sun hme. The hme is capable of full duplex; however, full duplex is not an industry standard at the current time. Successful full duplex communication can only be expected when the controlling software is identical on both sides.

The parameter "hme_adv_100hdx" sets the interface speed to 100Mbit; "hme_adv_10hdx" sets the speed to 10 Mbit. Try this with 10 first, as below. If this is successful, try changing the "100" parameter to value 1, and the "10" parameter to value 0, to increase the speed.

Use the ndd -get utility along with checking the capabilities of the hub/switch/link partner.

SunFastEthernet 2.0 (For on-board FastEthernet, SunSwift Sbus Adaptor, and SunFastEthernet Adaptor 2.0:)

Solaris 2.x allows three ways to set hme driver parameters.

Example: turn off auto negotiation and force 100 MB full duplex:

1. /etc/system additions.

The parameter "hme_64bit_enable" sets the interface communication to 64 bit mode. This should be set as below in almost all cases.

To tune the hme in system as described above:

a. Become superuser.b. Add the following lines to the /etc/system file using a text editor.

set hme:hme_adv_autoneg_cap=0set hme:hme_adv_100hdx_cap=0set hme:hme_adv_10hdx_cap=1set hme:hme_64bit_enable=0

c. Save the /etc/system file.d. Save all files and exit all programs. Exit the windowing system.e. Reboot the system by typing init 6 at the # prompt.

(This halts and reboots the system.)

Use the ndd -get utility along with checking the capabilities of the hub/switch/link partner.

**Note that only half duplex capability is supported at the present, full-duplex connection may not implement the same timing and flow-control. If the link partner is another Sun Fast Ethernet interface.

Example: turn off auto negotiation and force 100 MB full duplex: /etc/system addtions.

Page 11: help

set hme:hme_adv_autoneg_cap=0 set hme:hme_adv_100hdx_cap=0 set hme:hme_adv_100fdx_cap=1

2. Manual ndd commands: # ndd -set /dev/hme adv_autoneg_cap 0 # ndd -set /dev/hme adv_10hdx_cap 0 # ndd -set /dev/hme adv_100fdx_cap 1

Example of setting 2nd hme interface (hme1) to force 100mb half-duplex # ndd -set /dev/hme instance 1 # ndd -set /dev/hme adv_autoneg_cap 0 # ndd -set /dev/hme adv_100hdx_cap 1 # ndd -set /dev/hme adv_100fdx_cap 0

3. Create /kernel/drv/hme.conf

name="hme" class="sbus" reg=0xe, 0x8c00000, 0x00000108, 0xe, 0x8c02000, 0x00002000, 0xe, 0x8c04000, 0x00002000, 0xe, 0x8c06000, 0x00002000, 0xe, 0x8c07000, 0x00000020 adv_autoneg_cap=0 adv_100fdx_cap=1 use_int_xcvr=1 ipg1=10 ipg2=8;

SunOS 4.1.4

hmespeed : usage: %%s interface < auto | 100 | 10 >

example: hmespeed hme1 100

An experienced administrator can change hme device settings for testing purposes by using hmepeed and/or adb.

To adjust fdx 100baseT link negotiation for Sun 4.1.4 systems with an HME board. Using adb, set the following values in /vmunix. You will need to reboot the system for them to take effect.

hme_adv_autoneg_cap = 0 hme_adv_100fdx_cap = 1 root {106)> cp /vmunix /vmunix.old root {107}> adb -w /vmunix[1] hme_adv_autoneg_cap?X _hme_adv_autoneg_cap: _hme_adv_autoneg_cap: f000000[2] hme_adv_autoneg_cap?W 0 _hme_adv_autoneg_cap: 0xf000000 = 0x0[3] hme_adv_autoneg_cap?X _hme_adv_autoneg_cap: _hme_adv_autoneg_cap: 0[4] hme_adv_100fdx_cap?X _hme_adv_100fdx_cap: _hme_adv_100fdx_cap: f000000[5] hme_adv_100fdx_cap?W 1 _hme_adv_100fdx_cap: 0xf000000 = 0x1[6] hme_adv_100fdx_cap?X _hme_adv_100fdx_cap: _hme_adv_100fdx_cap: 1 [enter a ^D to exit from adb] leto:/ root {108}> fastboot

Page 12: help

OpenBoot Prom: the transfer speed can also be set at the OK prompt if needed for diskless client boot.

ok show-devs

------------ /iommu@f,e0000000/sbus@f,e0001000/SUNW,hme@3,8c00000

------------ ok nvedit

0: probe-all install-console banner(return) 1: apply transfer-speed=10/iommu@f,e0000000/sbus@f,e0001000/SUNW,hme@3,8c00000 (Control C) ok nvstoreok setenvuse-nvramrc? true

SunFastEthernet 1.0:

Use the be_speed program which is included in patch# 101820 On Solaris 2.3 command /usr/sbin/be_speed is available. This command can be used to force the interface speed. This be_speed is not deliverd asstandard with Solaris 2.4 & 2.5 and should be manually copied frompatch 101820 if needed. (bug 1194402)

Example: force the speed to 100Mbps:

Put this in /etc/rc2.d/S69inet

/usr/sbin/be_speed be0 100

Page 13: help

What to do if root password is lost.Steps for editing the /etc/shadow file to fix the root password:

1) Insert the Solaris 2.x CD-ROM into the CD-ROM drive.

2) Once the CD-ROM is in the drive perform, a stop-a command. This will bring the system down to the ok prompt.

3) From the ok prompt perform a single-user boot from the Solaris 2.x installation CD-ROM. ok boot cdrom -s

4) From the root prompt type in this command: # mount /dev/dsk/c0t3d0s0 /a

5) From the root prompt type in this command: # TERM=sun; export TERM

6) Next edit the /etc/shadow file: # vi /a/etc/shadow

7) Usually, the first line of the file is the one to modify. It looks like this: root:c3.yAVmYodWsc:6445:::::: Delete every character between the first and second colons in this line. When you are finished it should look similar to this: root::6445::::::After deleting those characters, perform a write force quit to exit vi. In other words, from command mode type in: :wq! This will quit the document and save the changes.

8) The next step is to unmount the file system. To do this, perform these following commands:# cd /# umount /a 9) Your next and final step is to reboot the system. Once you are prompted for the login, then type the login name. You should

get in automatically. Then change the root password accordingly.

Page 14: help

Sun Framebuffer Resolution GuideFramebuffer Resolution Guide ----------------------------

What follows is a compilation from other sources of what resolutions the Sun Framebuffers support, and how to put the framebuffers in the resolutions. Resolution ZX GT GS GX GX+ TGX TGX+ CG14 A24 ---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1600x1280@66 | | | | | | | yes | yes | | ---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1280x1024@76 | yes | yes | | | | | yes | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1280x1024@67 | yes | yes | | | yes | | yes | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1280x1024@66 | | | | | | | | yes | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1152x900@76 | yes | | yes | yes | yes | yes | yes | yes | yes |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1152x900@66 | yes | | | yes | yes | yes | yes | yes | yes |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1024x800@84 | | | | | | | | yes | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1024x768@77 | | | | | | yes | yes | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1024x768@76 | yes | | | | | | | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1024x768@70 | | | | | | | | yes | yes |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1024x768@66 | | | | | | | | yes | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+1024x768@60 | yes | | | | | yes | yes | yes | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+

Stereo---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+960x680@108 | yes | | | | | | | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+960x680@112 | yes | | | | | | | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+960x680@120 | | yes | | | | | | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+ PAL ---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+770x575@50 | yes | | | | | | | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+ NTSC ---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+640x480@59.94 | yes | yes | | | | | | | |---------------+-----+-----+-----+-----+-----+-----+-----+-----+-----+

A Note about the 13W3 connector and Sun Framebuffers----------------------------------------------------

In addition to the red, green, blue and sync connections, the Sun monitor connector (called 13W3) has several sense pins which allow the monitor to tell the framebuffer what resolutions and frequencies it can handle. The sense pins are pins 3 (S2), 8 (S1) and 9 (S0).

Page 15: help

These are used in combination with pin 4 (GND) to communicate the resolutions to the framebuffer. The table below is a list of how the pins are interpreted. Many of the framebuffers will not allow a user to put them in a mode that the monitor does not support. If trying to put the framebuffer in a particular resolution but it won't go, check to see if the monitor supports the resolution.

Scan Rate Code S2 S1 S0 ---------------+-----+-----+-----+-----+ 1152x900 66hz | 7 | | | | ---------------+-----+-----+-----+-----+ 1152x900 76hz | 6 | | | GND | ---------------+-----+-----+-----+-----+ 1024x768 60hz | 5 | | GND | | ---------------+-----+-----+-----+-----+ 1152x900 76hz | 4 | | GND | GND | ---------------+-----+-----+-----+-----+ 1152x900 66hz | 3 | GND | | | ---------------+-----+-----+-----+-----+ 1280x1024 76hz | 2 | GND | | GND | ---------------+-----+-----+-----+-----+ 1600x1280 76hz | 1 | GND | GND | | ---------------+-----+-----+-----+-----+ 1024x768 77hz | 0 | GND | GND | GND | ---------------+-----+-----+-----+-----+

Changing the ZX resolution

With the ZX a user can temporarily change the screen resolution of a running system and the default resolution of the system.

Temporarily changing the resolution

1. Exit from the window system.2. Become root.% /usr/bin/su

3. Run leoconfig with the desired resolution.

% /etc/opt/SUNWleo/bin/leoconfig -M <monitor_type>where <monitor_type> is one of1280_76 1280 x 1024 @ 76 Hz1280_67 1280 x 1024 @ 67 Hz1152_76 1152 x 900 @ 76 Hz1152_66 1152 x 900 @ 66 Hz1024_76 1024 x 768 @ 76 Hz1024_60 1024 x 768 @ 60 Hzstereo_108 960 x 680 @ 108 Hz (Stereo)stereo_114 960 x 680 @ 114 Hz (Stereo)pal 770 x 575 @ 50 Hz (PAL)ntsc 640 x 480 @ 50 Hz (NTSC)default default resolution, defined by monitor sense pins

Changing the default resolution

1. Become root. % /usr/bin/su

2. Edit the/etc/init.d/leoconfig script file.

Page 16: help

% vi /etc/init.d/leoconfig

3. Search for the "MONTYPE=" string in the file. There is one MONTYPE= line for each available screen configuration. By default, all but one the lines are commented out (with the# character).

4. Comment out the line that specifies the current screen configuration. This is done by placing a # character in front of the MONTYPE= line which has none.

5. Delete the comment character from the line that corresponds to the resolution you desire. The table above describes what the options mean.

6. Save the file and exit the editor.

7. Save all work.

8. Exit from the window system.

9. Reboot the system.

Changing the GT Resolution

With the GT a user can temporarily change the screen resolution of a running system and the default resolution of the system.

Temporarily changing the resolution

1. Exit from the window system.2. Become root.% /usr/bin/su3. Run gtconfig with the desired resolution. % /etc/opt/SUNWgt/bin/gtconfig -M <monitor_type> where <monitor_type> is one of 1280_76 1280 x 1024 @ 76 Hz 1280_67 1280 x 1024 @ 67 Hz stereo 960 x 680 @ 120 Hz Stereo

Changing the default resolution

1. Become root.% /usr/bin/su2. Edit the /etc/init.d/gtconfig script file.% vi /etc/init.d/gtconfig3. Search for the line which contains '/etc/opt/SUNWgt/bin/gtconfig'.

The '/etc/opt/S UNWgt/bin/gtconfig' line contains no parameter to set the monitor resolution. It will be added to the end of the line.

4. Add the desired resolution parameters to the end of the 'gtconfig' line. On the line which contains ' /etc/opt/SUNWgt/bin/gtconfig', before the portion which reads '2>&1' add '-M <monitor_type>' where monitor type is 1280_76, 1280_67 or stereo.

5. Save the file and exit the editor.6. Save all work.7. Exit from the window system.8. Reboot the system.

Page 17: help

Changing the CG14 resolution

With the CG14 user can only change the system default resolution.

Changing the default resolution

1. Exit from the window system.2. Become root. % /usr/bin/su

3. un cg14config with the desired resolution.# /usr/kvm/cg14config -r <monitor_type>where <monitor_type> is one of1152x900@66 1152 x 900 @ 66 Hz1152x900@76 1152 x 900 @ 76 Hz1024x800@84 1024 x 800 @ 84 Hz1280x1024@66 1280 x 1024 @ 66 Hz1600x1280@66 1600 x 1280 @ 66 Hz1024x768@70 1024 x 768 @ 70 Hz1024x768@66 1024 x 768 @ 66 Hz1024x768@60 1024 x 768 @ 60 Hz

4. Reboot the system.

Changing the GX+ resolution

With the GX+ user can only change the system default resolution.

Changing the default resolution

The GX+ tries to come up in a resolution of 1280x1024 if hardware permits. If this is not possible, it will automatically switch to 1152x900. It is sometimes desirable to force the GX+ into the lower resolution. It is not possible to force the GX+ into the higher resolution. Here is how to change to the lower resolution.

1. Exit from the window system.2. Become root.

% /usr/bin/su3. Determine the PROM device name of the installed GXplus. This can be done with the following command:

# devlinks -d 2>&1 | awk -F/ '/entry.*cgsix/{print $NF}' | cut -d, -f1

4. Edit a new script file called /tmp/1152 x900x76: # vi /tmp/1152x900x76

5. Add the following lines to the script file:#! /bin/sheeprom fcode-debug\?=trueeeprom nvramrc='probe-sbus: vsetup " 105561000,71717,76,16,96,208,1152,2,8,33,900" 4 ;vsetup" /sbus/<prom_name>" " override" execute-device-method dropinstall-consolebanner'eeprom use-nvramrc\?=true

Page 18: help

Replace the <prom_name> above with the device name of the GXplus found in step 3.

6. Save the file and exit vi.

7. Change permissions on the file:# chmod 755 /tmp/1152x900x76

8. Execute the file:# /tmp/1152x900x76

9. Reboot the system for the changes to take effect # /usr/sbin/reboot

Changing the TurboGX and TurboGX+ Resolution

With the TurboGX and TurboGX+ user can only change the system default resolution.

Changing the default resolution

1. Exit from the window system.

2. Become root. % /usr/bin/su

3. Determine the PROM device name of the installed TurboGX/TurboGX+. This can be done with the following command:

# devlinks -d 2>&1 | awk -F/ '/entry.*cgsix/{print $NF}' | cut -d, -f1

4. Edit a new script file called /tmp/set_resolution: # vi /tmp/set_resolution

5. Add the following lines to the script file:#!/bin/sheeprom fcode-debug\?=trueeeprom nvramrc='probe-sbus: vsetup <res_codes> ;vsetup <sense_code>" /sbus/<prom_name>" " override" execute-device-method dropinstall-consolebanner'eeprom use-nvramrc\?=true

Replace the <prom_name> above with the device name of the TurboGX/TurboGX+ found in step 3.

Replace <res_codes> above with the following, based on the desired resolution:

" 64125000,48286,60,16,128,160,1024,2,6,29,768,COLOR" 1024x768 @60 " 74250000,56593,70,16,136,136,1024,2,6,32,768,COLOR" 1024x768 @70 " 84375000,62040,77,32,128,176,1024,2,4,31,768,COLOR" 1024x768 @77 " 94500000,61845,66,40,128,208,1152,2,4,31,900,COLOR" 1152x900 @66 " 108000000,71808,76,32,128,192,1152,2,4,31,900,COLOR,0OFFSET" 1152x900 @76 " 117000000,71691,67,16,112,224,1280,2,8,33,1024,COLOR,0OFFSET" 1280x1024@67 " 135000000,81128,76,32,64,288,1280,2,8,32,1024,COLOR,0OFFSET" 1280x1024@76 " 216000000,101890,76,24,216,280,1600,2,8,50,1280,COLOR,0OFFSET" 1600x1280@76

Replace <sense_code> above with the following:

Page 19: help

7 1152x900 @66 6 1152x900 @76 5 1024x768 @60 4 1152x900 @76 3 1152x900 @66 2 1280x1024 @76 1 1600x1280 @76 0 1024x768 @77 Note: The resolutions listed here are not all valid for the TurboGX Please look at table 1 to get the valid resolution for TGX.

6. Save the file and exit vi.7. Change permissions on the file:

# chmod 755 /tmp/set_resolution8. Execute the file:

# /tmp/set_resolution

9. Reboot the system for the changes to take effect.

# /usr/sbin/reboot

Page 20: help

"Tape device not found" troubleshooting tipsProblem:When attempting to use a tape drive (tar, ufsdump, mt .....), user gets the following mesg (or some equivalent):

test% mt -f /dev/rmt/0 status /dev/rmt/0: No such device or address

or

test# mt -f /dev/rmt/0 status/dev/rmt/0: No such file or directory

Solution:There are many possible causes for this type of error message.

First, make sure the hardware is being seen by the system.Halt the OS and use probe-scsi-all at the 'ok' prompt.The tape drive similar to target 4 in the following example should appear:

ok probe-scsi-all/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000Target 3 Unit 0 Disk IBM DPES31080SUN1.05S80B0000654940 0695 00011684G9001 D60886 Target 4 Unit 0 Removable Tape EXABYTE EXB-8505SMBANSH20793 0 6233535 Target 6 Unit 0 Removable Read Only device TOSHIBA XM-4101TASUNSLCD342412/08/94

If the tape drive is not there, there is some type of hardware problem.Check cables, connections, power, conflicting IDs, etc.

Next, if it is possible, after seeing the device with a probe-scsi, boot the system from CD-ROM and try to use it from single-user mode off the CD-ROM. You should be able to do the following:

ok boot cdrom -sw : :# mt -f /dev/rmt/0 statusArchive Python 4mm Helical Scan tape drive: sense key(0x6)= Unit Attention residual= 0 retries= 0 file no= 0 block no= 0

If these results are not seen and you get the "No such device or address" error, it is an indication of a possible hardware problem, since you can be comfortable with the fact that there is no software corruption off of the CD-ROM.

If this does work fine off the CD-ROM but not off the boot drive (make sure both are the same OS level), it is most likely that there is corruption on the drive.

So after you have tested for bad hardware and are comfortable with the fact that the tape drive is good and it is being seen by the system at the hardware level, it is time to look for software causes.

The first place to look is the /dev and /devices directories.In /dev there should be an rmt directory and it should have several entries (links) for the tape drive, for example:

test# cd /dev/rmttest# ls -l 0lrwxrwxrwx 1 root other 50 Aug 15 15:13 0 ->../../devices/sbus@1f,0/SUNW,fas@e,8800000/st@4,0:

Also, check the entry in /devices:

Page 21: help

test# cd /devices/sbus@1f,0/SUNW,fas@e,8800000test# ls -l st@4,0:crw-rw-rw- 1 root sys 33,152 Jul 2 09:38 st@4,0:test# file st@4,0:st@4,0:: character special (33/152)

If either of these entries does not exist or they do not show up as a character special device when using the file command, recreate them.

1. If the file exists but is corrupted (shows up as an ascii file, or empty, etc.), remove it. For example:Test# cd /devices/sbus@1f,0/SUNW,fas@e,8800000Test# ls -l st@4,0:-rw-r--r-- 1 root other 0 Sep 6 10:20 st@4,0:test# file st@4,0:st@4,0:: empty filetest# rm st@4,0:

2 Recreate it using the "drvconfig" command:

test# drvconfigtest# ls -l st@4,0:crw-rw-rw- 1 root sys 33,152 Sep 6 10:23 st@4,0:test# file st@4,0:st@4,0:: character special (33/152)

3. For the /dev/rmt entries, the process is similar, but use the "tapes" command to recreate the link:

test# cd /dev/rmttest# ls -l 0-rw-r--r-- 1 root other 0 Sep 6 10:26 0test# file 00: empty filetest# rm 0test# tapestest# ls -l 0lrwxrwxrwx 1 root other 50 Sep 6 10:28 0 -> ../../devices/sbus@1f,0/SUNW,fas@e,8800000/st@4,0:

4. If just the /dev or /device entries were missing, all that is needed is to execute the drvconfig and/or the tapes command. This is common in the case where the tape device has been added to the system but Solaris was never rebooted with a reconfiguration boot (boot -r).

If either of these problems seemed to be the case, you can now probably use the device with no problems. If not, the st configuration file might be either corrupt or missing. Check /kernel/drv/st.conf.

If it is missing or corrupt, the best solution is to copy the file from the CD-ROM so that you have a known good configuration file. You can also copy it from another machine running the same OS.

If this is a third party (non-Sun) tape drive, make sure that there is an entry for the drive in st.conf. The drive might require a custom driver from the manufacturer. If this is the case, make sure it is installed correctly.

PRODUCT AREA: HardwarePRODUCT: Tape drivesSUNOS RELEASE: Solaris 2.xHARDWARE: Any

Page 22: help

Making a bootable filsystem with installboot (bootblk)Typically, this is done while booted from the Solaris 2.5 CD: ok boot cdrom -sw SPARC EXAMPLES To install a ufs bootblock on slice 0 of target 0 on controller 1, of the platform where the command is being run, use: example# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s0 x86 EXAMPLES To install the ufs bootblock and partition boot program on slice 2 of target 0 on controller 1, of the platform where the command is being run, use: example# installboot /usr/platform/`uname -i`/lib/fs/ufs/pboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t0d0s2 # halt ok boot NOTE: 'uname -i' refers to the Platform Name of your system. For more information on Platform Names and Groups, see one of the following: * SMCC Hardware Platform Guide (for Solaris 2.5) page 22

• SPARC: Installing Solaris Software (for Solaris)

Page 23: help

How do I check and install patches?To determine the patches that you have loaded on your system use the showrev command: # showrev -p Patch: 103582-12 Obsoletes: , Requires:, Incompatibles:, iss_sparc-01 Packages: SUNWcsu, SUNWcsrPatch: 103981-08 Obsoletes: , Requires:, Incompatibles: Packages: SUNWcsuPatch: 104489-03 Obsoletes: , Requires:, Incompatibles: Packages: SUNWtltk, SUNWtltkdPatch: 103566-19 Obsoletes: , Requires:, Incompatibles: Packages: SUNWxwplt, SUNWxwopt, SUNWxwslbPatch: 103461-17 Obsoletes: , Requires:, Incompatibles: Packages: SUNWmfrunPatch: 103959-03 Obsoletes: , Requires:, Incompatibles:, iss_sparc-01 Packages: SUNWscpu, SUNWlpu, SUNWlpsPatch: 103959-06 Obsoletes: , Requires:, Incompatibles:, iss_sparc-01 Packages: SUNWscpu, SUNWlpr, SUNWlpu, SUNWlpsPatch: 103866-02 Obsoletes: , Requires:, Incompatibles:, iss_sparc-01 Packages: SUNWbcpPatch: 103846-02 Obsoletes: Packages: SUNWdtbasPatch: 105049-02 Obsoletes: , Requires:, Incompatibles: Packages: SUNWglrt, SUNWglrtu, SUNWffbgl If you are just looking for a particular patch, you can use the grep command to restrict the ouptut: # showrev -p | grep 105049 Patch: 105049-02 Obsoletes: , Requires:, Incompatibles: Packages: SUNWglrt, SUNWglrtu, SUNWffbgl Any patches you receive from Sun or Geoquest will likely be compressed tarfiles. To install these patches, do the following: 1. Copy the patch to the /var/sadm/patch directory. # cp 105049-02.tar.Z /var/sadm/patch/105049-02.tar.Z 2. Uncompress the patch. # cd /var/sadm/patch# uncompress 105049-02.tar.Z 3. Extract the files from the tarfile. # tar xvf 105049-02.tar.Z 4. cd into the patch's directory. # cd 105049-02 5. Read the README file to check for any special instructions. If there are any special instructions, follow these. Otherwise, just run the installpatch utility provided with the patch.# pwd/var/sadm/patch/105049-02# ./installpatch .

6. Once complete, check to see that the patch is installed.

Page 24: help

# showrev -p | grep 105049-02Patch: 105049-02 Obsoletes: , Requires:, Incompatibles: Packages: SUNWglrt, SUNWglrtu, SUNWffbgl

If later you want to remove the patch,

# cd /var/adm/patch# cd 105049-02# ./backoutpatch 105049-02

Page 25: help

OpenGL, OpenInventor, ffb, graphics, Property Modeling, Ultra-30Property Modeling uses OpenInventor, and the graphics rendering was not working correctly. The machine also has OpenGL 1.1.1 on it.

The error was fixed by patch 105360-11, which among other things is a fix for :

4065302 Hardware Z-Buffering not working on Ultra-30 w/ FFB2 rev -03

This problem has only been seen with a particular graphics card which was installed on Ultra-30's. This card has the following configuration:

# ffbconfig -prconf

--- Hardware Configuration for /dev/fbs/ffb0 ---Type: double-buffered FFB2 with Z-bufferBoard: rev 1 (Vertical)PROM Information: @(#)ffb2.fth 2.2 96/12/16FBC: version 0x2241906dDAC: Brooktree 9068, version 4 (Pac1)3DRAM: Mitsubishi 1309, version 3EDID Data: Available - EDID version 1 revision 0Monitor Sense ID: 0 (Sun 37x29cm RGB color monitor)Monitor possible resolutions: 1024x768x60, 1024x768x70, 1024x768x75, 1152x900x66, 1152x900x76, 1280x1024x67, 1280x1024x76,960x680x112s, 640x480x60Current resolution setting: 1280x1024x76

-----This is different from the new vertical cards as on Ultra-60's, which look like the following :

# ffbconfig -prconf

--- Hardware Configuration for /dev/fbs/ffb0 ---Type: double-buffered FFB2+ with Z-bufferBoard: rev 2 (Vertical)PROM Information: @(#)ffb2p.fth 2.6 97/10/02FBC: version 0x3241906dDAC: Brooktree 9070, version 1 (Pac2)3DRAM: Mitsubishi 130a, version 1EDID Data: Not AvailableMonitor Sense ID: 4 (Sun 19" monitor)Monitor possible resolutions: 1024x768x77, 1024x800x84, 1152x900x66, 1152x900x76, 1280x1024x67, 1280x1024x76, 960x680x112s,960x680x108sCurrent resolution setting: 1280x1024x67

GeoViz workaround on Ultra with Multi-Sync monitorsThis is just a quick note to describe what we did to fix a GeoViz problem. For that system, I noticed when I ran /usr/sbin/ffbconfig -propt that there was not a monitor video mode set for the Creator3D. All we did was set the monitor mode to 1280x1024 @ 76Hz, using:

/usr/sbin/ffbconfig -res 1280x1024x76 now

This needs to be done for both Creator3D's. You can pass a -dev parameter to ffbconfig to set the video mode for the second screen.

Page 26: help

One thing that I have noticed is that, if there are twp Creator3D's in a system, the configuration NEEDS to be the same on both. I have noticed strange behavior on systems where one of them was setup differently from the other.

(Note: They must restart the X-server after changing any options.)

Determining and changing parameters on ffb graphics cards.The following command can be used to view information or adjust some characteristics of an ffb graphics card.

To view the configuration of ffb card:

ffbconfig -dev /dev/fbs/ffb0 -propt

To view hardware configuration:

ffbconfig -dev /dev/fbs/ffb0 -prconf

To change resolution to 1280x1024 at 67 MHz immediately:

ffbconfig -dev /dev/fbs/ffb0 -res 1280x1024@67 now

Maintenance Commands ffbconfig(1M)

NAME ffbconfig - configure the FFB Graphics Accelerator

SYNOPSIS /usr/sbin/ffbconfig [ -dev device-filename ] [ -res video-mode [ now | try ][ noconfirm | nocheck ]] [ -file machine | system ] [ -deflinear true | false ] [ -defoverlay true | false ] [ -linearorder first | last ] [ -overlayorder first | last ] [ -expvis enable | disable ] [ -sov enable | disable ] [ -maxwids n ] [ -propt ] [ -prconf ] [ -defaults ]

/usr/sbin/ffbconfig [ -propt ] [ -prconf ]

/usr/sbin/ffbconfig [ -help ] [ -res ? ]

DESCRIPTION ffbconfig configures the FFB Graphics Accelerator and some of the X11 window system defaults for FFB.

The first form of ffbconfig stores the specified options in the OWconfig file. These options will be used to initialize the FFB device the next time the window system is run on that device. Updating options in the OWconfig file provides persistence of these options across window system sessions and system reboots.

The second and third forms of ffbconfig, which invoke only the -prconf, -propt, -help, and -res? Options do not update the OWconfig file. Additionally, for the third form all other options are ignored.

Options may be specified for only one FFB device at a time. Specifying options for multiple FFB devices requires multiple invocations of ffbconfig.

Only FFB-specific options can be specified through ffbconfig. The normal window system options for specifying default depth, default visual class and so forth are still specified as device modifiers on the openwin command line. See the OpenWindows Desktop Reference Manual for details.

Page 27: help

The user can also specify the OWconfig file that is to be updated. By default, the machine-specific file in the /etc/openwin directory tree is updated. The -file option can be used to specify an alternate file to use. For example, the system-global OWconfig file in the /usr/openwin directory tree can be updated instead.

Both of these standard OWconfig files can only be written by root. Consequently, the ffbconfig program, which is owned by the root user, always runs with setuid root permission.

OPTIONS -dev device-filename

Specifies the FFB special file. The default is /dev/fbs/ffb0. -file machine | system

Specifies which OWconfig file to update. If machine, the machine-specific OWconfig file in the /etc/openwin directory tree is used. If system, the global OWconfig file in the /usr/openwin directory tree is used. If the file does not exist, it is created.

-res video-mode [now | try [noconfirm | nocheck]] Specifies the video mode used to drive the monitor connected to the specified FFB device. video-mode has the format of widthxheightxrate where width is the screen width in pixels, height is the screen height in pixels, and rate is the vertical frequency of the screen refresh.

The s suffix, as in 960x680x112s and 960x680x108s, indicates stereo video modes. The i suffix, as in 640x480x60i and 768x575x50i, indicates interlaced video timing. If absent, non-interlaced timing will be used.

-res (the third form in the SYNOPSIS) also accepts formats with @ (at sign) in front of the refresh rate instead of x. 1280x1024@76 is an example of this format.Some video-modes are supported only on certain revisions of FFB. Also, some video-modes, supported by FFB, may not be supported by the monitor. The list of video-modes supported by the FFB device and the monitor can be obtained by running ffbconfig with the -res ? option The following table lists all possible video modes supported on FFB:

______________________________ | 1024x768x60 | | 1024x768x70 | | 1024x768x75 | | 1024x768x77 | | 1024x800x84 | | 1152x900x66 | | 1152x900x76 | | 1280x800x76 | | 1280x1024x60 | | 1280x1024x67 | | 1280x1024x76 | | 960x680x112s (stereo) | | 960x680x108s (stereo) | | 640x480x60 | | 640x480x60i (interlaced)| | 768x575x50i (interlaced)| | 1440x900x76 (hi-res) | | 1600x1000x66 (hi-res) | | 1600x1000x76i (hi-res) | | 1600x1280x76 (hi-res) | | 1920x1080x72 (hi-res) | | 1920x1200x70 (hi-res) | |_____________________________|

Symbolic namesFor convenience, some video modes have symbolic names defined for them. Instead of the form widthxheightxrate, one of these names may be supplied as the argument to -res. The meaning of the symbolic name "none" is that when the window system is run the screen resolution will be the video mode that is currently programmed in the device.

______________________________________________________ | Name Corresponding Video Mode |

Page 28: help

|_____________________________________________________| | svga 1024x768x60 | | 1152 1152x900x76 | | 1280 1280x1024x76 | | stereo 960x680x112s | | ntsc 640x480x60i | | pal 768x575x50i | | none (video mode currently programmed in device)| |_____________________________________________________|

The -res option also accepts additional, optional arguments immediately following the video mode specification. Any or all of these may be present.

Now Specifies that the FFB device will be immediately programmed to display this video mode, in addition to updating the video mode in the OWconfig file. This option is useful for changing the video mode before starting the window system.

It is inadvisable to use this suboption with ffbconfig while the configured device is being used (for example, while running the window system); unpredictable results may occur. To run ffbconfig with the now suboption, first bring the window system down. If the now suboption is used within a window system session, the video mode will be changed immediately, but the width and height of the affected screen won't change until the window system is exited and reentered. In addition, the system may not recognize changes in stereo mode. Consequently, this usage is strongly discouraged.

noconfirm Instructs ffbconfig to bypass confirmation and and warning messages and to program the requested video mode anyway.

Using the -res option, the user could potentially put the system into an usable state, a state where there is no video output. This can happen if there is ambiguity in the monitor sense codes for the particular code read. To reduce the chance of this, the default behavior of ffbconfig is to print a warning message to this effect and to prompt the user to find out if it is okay to continue. This option is useful when ffbconfig is being run from a shell script.

nocheck Suspends normal error checking based on the monitor sense code. The video mode specified by the user will be accepted regardless of whether it is appropriate for the currently attached monitor. This option is useful if a different monitor is to be connected to the FFB device. Note: Use of this option implies noconfirm as well.

try Programs the specified video mode on a trial basis. The user will be asked to confirm thevideo mode by typing y within 10 seconds. The user may also terminate the trial before 10 seconds are up by typing any character. Any character other than y or RETURN is considered a

no and the previous video mode will be restored and ffbconfig will not change the video mode in the OWconfig file and other options specified will still take effect. If a RETURN is pressed, the user is prompted for a yes or no answer on whether to keep the new video mode. This option implies the now suboption (see the warning note on the now suboption).

-deflinear true | falseFFB possesses two types of visuals: linear and nonlinear. Linear visuals are gamma corrected and nonlinear visuals are not. There are two visuals that have both linear and nonlinear versions: 24-bit TrueColor and 8-bit StaticGray.

-deflinear true sets the default visual to the linear visual that satisfies other specified default visual selection options. Specifically, the default visual selection options are those set by the Xsun (1) defdepth and defclass options. See OpenWindows Desktop Reference Manual for details.

-deflinear false (or if there is no linear visual that satisfies the other default visual selection options) sets the default visual to t the non-linear visual as the default.

This option cannot be used when the -defoverlay option is present, because FFB does not possess a linear overlay visual.

Page 29: help

-defoverlay true | falseFFB provides an 8-bit PseudoColor visual whose pixels are disjoint from the rest of the FFB visuals. This is called the overlay visual. Windows created in this visual will not damage windows created in other visuals. The converse, however, is not true. Windows created in other visuals will damage overlay windows. This visual has 256 maxwids of opaque color values.See -maxwids in OPTIONS.

If -defoverlay is true, the overlay visual will be made the default visual. If -defoverlay is false, the nonoverlay visual that satisfies the other default visual selection options, such as defdepth and defclass, will be chosen as the default visual. See the OpenWindows Desktop Reference Manual for details.

Whenever -defoverlay true is used, the default depth and class chosen on the openwin command line must be 8-bit PseudoColor. If not, a warning message will be printed and the -defoverlay option will be treated as false. This option cannot be used when the -deflinear option is present, because FFB doesn't possess a linear overlay visual.

-linearorder first | lastIf true, linear visuals will come before their non-linear counterparts on the X11 screen visual list for the FFB screen. If false, the nonlinear visuals will come before the linear ones.

-overlayorder first | lastIf true, the depth 8 PseudoColor Overlay visual will come before the non-overlay visual on the X11 screen visual list for the FFB screen. If false, the non-overlay visual will come before the overlay one.

-expvis enable | disableIf enabled, OpenGL Visual Expansion will be activated. Multiple instances of selected visual groups (8-bit PseudoColor, 24-bit TrueColor and so forth) can be found in the screen visual list.

-sov enable | disableAdvertises the root window's SERVER_OVERLAY_VISUALS property. SOV visuals will be exported and their transparent types, values and layers can be retrieved through this property. If -sov disable is specified, the SERVER_OVERLAY_VISUALS property will not be defined. SOV visuals will not be exported. -maxwids n Specifies the maximum number of FFB X channel pixel values that are reserved for use as window IDs (WIDs).

The remainder of the pixel values in overlay colormaps are used for normal X11 opaque color pixels. The reserved WIDs are allocated on a first-come first-serve basis by 3D graphics windows (such as XGL), MBX windows, and windows that have a non-default visual. The X channel codes 0 to (255-n) will be opaque color pixels. The X channel codes (255-n+1) to 255 will be reserved for use as WIDs. Legal values are: 1, 2, 4, 8, 16, and 32.

-defaults Resets all option values to their default values.

-propt Prints the current values of all FFB options in the OWconfig file specified by the -file option for the device specified by the -dev option. Prints the values of options as they will be in the OWconfig file after the call to ffbconfig completes. The following is a typical display using the -propt option:

--- OpenWindows Configuration for /dev/fbs/ffb0 --- OWconfig: machine Video Mode: NONE Default Visual: Non-Linear Normal Visual Visual Ordering: Linear Visuals are last Overlay Visuals are last OpenGL Visuals: disabled SOV: disabled Allocated WIDs: 32

-prconf Prints the FFB hardware configuration. The following is a typical display using the -prconf option:

--- Hardware Configuration for /dev/fbs/ffb0 --- Type: double-buffered FFB2 with Z-buffer Board: rev x

Page 30: help

PROM Information: @(#)ffb2.fth x.x xx/xx/xx FBC: version x DAC: Brooktree 9068, version x 3DRAM: Mitsubishi 1309, version x EDID Data: Available - EDID version 1 revision x Monitor Sense ID: 4 (Sun 37x29cm RGB color monitor) Monitor possible resolutions: 1024x768x60, 1024x768x70, 1024x768x75, 1152x900x66, 1152x900x76, 1280x1024x67, 1280x1024x76, 960x680x112s, 640x480x60 Current resolution setting: 1280x1024x76

-help Prints a list of the ffbconfig command line options, along with a brief explanation of each.

DEFAULTSFor a given invocation of ffbconfig command line if an option does not appear on the command line, the corresponding OWconfig option is not updated; it retains its previous value.

When the window system is run, if an FFB option has never been specified via ffbconfig, a default value is used. The option defaults are listed in the following table:

_______________________________ | Option Default | |______________________________| | -dev /dev/fbs/ffb0| | -file machine | | -res none | | -deflinear false | | -defoverlay false | | -linearorder last | | -overlayorder last | | -expvis enabled | | -sov enabled | | -maxwids 32 | |______________________________|

The default for the -res option of none means that when the window system is run the screen resolution will be the video mode that is currently programmed in the device.

This provides compatibility for users who are used to specifying the device resolution through the PROM. On some devices (for example, GX) this is the only way of specifying the video mode. This means that the PROM ultimately determines the default FFB video mode.

EXAMPLES The following example switches the monitor type to the resolution of 1280 x 1024 at 76 Hz:

example% /usr/sbin/ffbconfig -res 1280x1024x76

FILES /dev/fbs/ffb0 device special file

ATTRIBUTES See attributes(5) for descriptions of the following attri- butes:

__________________________________ | ATTRIBUTE TYPE| ATTRIBUTE VALUE| |__________________________________ | Availability | SUNWffbcf | |_______________|_________________|

SEE ALSO

Page 31: help

mmap(2), attributes(5), fbio(7I), ffb(7D)

SunOS 5.6 Last change: 18 Jun 1997 8

Maintenance Commands ffbconfig(1M)

OpenWindows Desktop Reference Manual

SunOS 5.6 Last change: 18 Jun 1997 9

How to check your graphics card at the PROM level.if you are having problems with your display on a Sun Ultra and you suspect the graphics card, it is possible to run a self-test of the card at the PROM level.

1. First, at the "ok" prompt, type "cd /"2. Then type "ls" to see what you have there. If the card is attached to the PCI bus then cd into the corresponding directory. If not

cd into the directory that corresponds to the model of the graphics card.3. Once in the correct directory, type "words". This should show you a group of commands that you can perform in the directory.

"selftest" should be one of them.4. Type at the "ok" prompt the command "selftest" and the self-diagnostics tool will run. You may notice flashing on the screen

which is the test performing. If you see at the end of the test an OK then the hardware has passed the self-diagnostic tool. If there is an error reading, something is indeed wrong with the graphics card.

Page 32: help

How to install a Network Interface.To install a new network interface:

1) See what interfaces you have available now:

# ifconfig -alo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000 le0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 163.185.82.203 netmask ffffff00 broadcast 163.185.82.255 ether 8:0:20:72:fa:89

2) Remove the old interface if there is one. If you will continue to use the old interface, skip this step.

# ifconfig le0 unplumb

3) Setup new interface.

# ifconfig hme0 plumb# ifconfig hme0 inet [ip address] -trailers netmask 255.255.255.0 broadcast + up

4) Make sure the new interface is available and see if it can access the network.

# ifconfig -alo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000 hme0: flags=863<UP,BROADCAST,NOTRAILERS,RUNNING,MULTICAST> mtu 1500 inet 163.185.82.203 netmask ffffff00 broadcast 163.185.82.255 ether 8:0:20:72:fa:89

# telnet [another machine]

Page 33: help

Troubleshooting a Network Interface1) Check to see if the system thinks the interface is there.

# ifconfig -a lo0: flags=849<UP,LOOPBACK,RUNNING,MULTICAST> mtu 8232 inet 127.0.0.1 netmask ff000000

If all you get is the loopback interface, the interface is not plumbed.

2) Attempt to plumb the interface.

# ifconfig hme0 plumbifconfig: plumb: hme0: no such interface

If the above error is returned, continue to step three. If you get a prompt back with no error, continue with setting up the new interface. These instructions are contained in a separate entry.

3) Perform a reconfiguration boot after you make sure that the network card is installed correctly.

# reboot -- -r

4) Once the system comes back up, see if the device was installed.

# cd /dev# ls -al hme (or le or whatever type of interface you have)lrwxrwxrwx 1 root root 28 Feb 12 07:39 hme -> ../devices/pseudo/clone@0:hme

The device file should be listed and linked to the physical device.

If the device exists, continue to step 5. If the reconfiguration boot did notadd the device, you have a hardware problem.

5) Now make sure the hostname file exists for this interface.

# cd /etc# ls -al hostname*-rw-r--r-- 1 root root 11 Feb 12 08:02 hostname.hme0

If the file does not exist, create it. It contains only the hostname of the machine.

6) Follow the setup steps listed in "Installing a Network Interface"

Page 34: help

"Tape device not found" troubleshooting tipsProblem:When attempting to use a tape drive (tar, ufsdump, mt .....),user gets the following mesg (or some equivalent):

test% mt -f /dev/rmt/0 status /dev/rmt/0: No such device or addressSolution:There are many possible causes for this type of error message.

First, make sure the hardware is being seen by the system.Halt the OS and use probe-scsi-all at the 'ok' prompt.The tape drive similar to target 4 in the following example should appear:

ok probe-scsi-all/iommu@0,10000000/sbus@0,10001000/espdma@5,8400000/esp@5,8800000Target 3 Unit 0 Disk IBM DPES31080SUN1.05S80B0000654940 0695 00011684G9001 D60886 Target 4 Unit 0 Removable Tape EXABYTE EXB-8505SMBANSH20793 0 6233535 Target 6 Unit 0 Removable Read Only device TOSHIBA XM-4101TASUNSLCD342412/08/94 If the tape drive is not there, there is some type of hardware problem.Check cables, connections, power, conflicting IDs, etc.

Next, if it is possible, after seeing the device with a probe-scsi, boot the system from CD-ROM and try to use it from single-user mode off the CD-ROM. You should be able to do the following:

ok boot cdrom -sw : :# mt -f /dev/rmt/0 statusArchive Python 4mm Helical Scan tape drive: sense key(0x6)= Unit Attention residual= 0 retries= 0 file no= 0 block no= 0

If these results are not seen and you get the "No such device or address"error, it is an indication of a possible hardware problem, since you can be comfortable with the fact that there is no software corruption off of theCD-ROM.

If this does work fine off the CD-ROM but not off the boot drive (make sure bothare the same OS level), it is most likely that there is corruption on thedrive.

So after you have tested for bad hardware and are comfortable with the fact that the tape drive is good and it is being seen by the system at the hardwarelevel, it is time to look for software causes.

The first place to look is the /dev and /devices directories.In /dev there should be an rmt directory and it should have several entries(links) for the tape drive, for example:

Page 35: help

test# cd /dev/rmttest# ls -l 0lrwxrwxrwx 1 root other 50 Aug 15 15:13 0 ->../../devices/sbus@1f,0/SUNW,fas@e,8800000/st@4,0:

Also, check the entry in /devices:

test# cd /devices/sbus@1f,0/SUNW,fas@e,8800000test# ls -l st@4,0:crw-rw-rw- 1 root sys 33,152 Jul 2 09:38 st@4,0:test# file st@4,0:st@4,0:: character special (33/152)

If either of these entries does not exist or they do not show up as a character special device when using the file command, recreate them.

1. If the file exists but is corrupted (shows up as an ascii file, or empty, etc.), remove it. For example: test# cd /devices/sbus@1f,0/SUNW,fas@e,8800000test# ls -l st@4,0:-rw-r--r-- 1 root other 0 Sep 6 10:20 st@4,0:test# file st@4,0:st@4,0:: empty filetest# rm st@4,0:

2 Recreate it using the "drvconfig" command:

test# drvconfigtest# ls -l st@4,0:crw-rw-rw- 1 root sys 33,152 Sep 6 10:23 st@4,0:test# file st@4,0:st@4,0:: character special (33/152)

3. For the /dev/rmt entries, the process is similar, but use the "tapes" command to recreate the link:

test# cd /dev/rmttest# ls -l 0-rw-r--r-- 1 root other 0 Sep 6 10:26 0test# file 00: empty filetest# rm 0test# tapestest# ls -l 0lrwxrwxrwx 1 root other 50 Sep 6 10:28 0 -> \ ../../devices/sbus@1f,0/SUNW,fas@e,8800000/st@4,0:

4. If just the /dev or /device entries were missing, all that is needed is to execute the drvconfig and/or the tapes command. This is common in the case where the tape device has been added to the system but Solaris was never rebooted with a reconfiguration boot (boot -r).

If either of these problems seemed to be the case, you can now probably use thedevice with no problems. If not, the st configuration file might be either corrupt or missing. Check /kernel/drv/st.conf.

If it is missing or corrupt, the best solution is to copy the file from theCD-ROM so that you have a known good configuration file. You can also copy it from another machine running the same OS.

Page 36: help

If this is a third party (non-Sun) tape drive, make sure that there is an entryfor the drive in st.conf. The drive might require a custom driver from themanufacturer. If this is the case, make sure it is installed correctly.

PRODUCT AREA: HardwarePRODUCT: Tape drivesSUNOS RELEASE: Solaris 2.xHARDWARE: Any

Page 37: help

The system fails to boot up to multi-user modeOne way of debugging is:

1. ok> boot -s OR boot cdrom -sw

2. # vi /etc/rc2 file

Make sure the terminal type is known to the system, or the vi editor might not work properly. Example using a Sun terminal:

# TERM=sun

# export TERM

3. Insert a line:

set -x

after the #!/sbin/sh line in the /etc/rc2 file.

4. Reboot the system and note all the commands that get executed, and where the system really hangs.

5. You can comment out that line temporarily and reboot the machine OR troubleshoot using the information obtained above.

Page 38: help

Error: whoami and su commands failProblem:When running the "whoami" command, the follow error occurs:

% whoami whoami: no login associated with uid xxxx

The su command also fails:

% su Who are you ?

Solution:he /etc/passwd file is corrupted or missing.

To correct this problem, perform the following steps:

1. If a root window is running, run the halt command in that window.

If there is no access to a root prompt:

% sync;sync (sync the filesystems) % l1-a (bring down the system by holding down the l1 and stop keys)

2. From the "ok" prompt, enter: boot -s

3. From the "#" prompt, enter: csh

4. Enter: set term=sun

5. mv /etc/passwd /etc/passwd.bad (This will fail if /etc/passwd does not exist.)

6. vi /etc/passwd and enter the following line:

root::0:1:Operator:/:/bin/csh

7. Reboot the system.

The system will now come up to a login prompt. Log in as root (there will beno password).

A copy of /etc/passwd should then be restored from dump tapes or copied overfrom another system. If neither of these is possible, use the extract_filescommand to extract the /etc/passwd file from the SunOS media. For example,to extract /etc/passwd from the 4.1.2 cdrom:

1. cd /

2. /usr/etc/install/extract_files sr0 root -f ./etc/passwd

Page 39: help

High collision rate causes on hme interfaceWhen an hme 100 mbyte interface sends packets to an le 10 Mbyte interface, therebe a lot of collisions because the hme device will keep sending out packets ata rate 10 times faster than what the le interface can receive. This highcollision rate doesn't have any bearing on the output/input rate.

To see what is happening in this case, you would have to look at snoopon both the end sending and the end receiving.

The sending end would probably show retransmits (either retransmitted writerequests being sent or retransmitted read requests being received and thecorresponding responses being sent). It will show the entire messagebeing sent, for both write requests and read responses, for whichever isexperiencing the problem.

The receiving end would probably show some, but not all, of the fragmentsarriving for the suffering message.

If it is a write request (i.e., the receiving end, the 10 meg end, is the server), you will see fragments of the write request message arrive. Then, after a timeout, you will see the same write request being retransmitted.

If it is a read response (i.e., the receiving end, the 10 meg end, is the client), you will see the read request go out and fragments of the read response come back. Then, after a timeout, you will see the same read request be retransmitted. Then the same fragments, but not all of the read response, come back.

In either case, it will make it through sometimes and have to be retransmittedsometimes, hence the poor performance.

The problem would occur when you have a 100 meg sender and a 10 meg receiverand are trying to pump data down that one-and -nly connection. At some point, you will overrun the buffering capability of the hub, resulting in theabove senario.

If you have many clients on 10 meg and the server on 100 meg, you probablywon't see this scenario much, because the 100 meg server load will be spread across several of the 10 meg clients. Use snoop to prove that this is whatis happening.

Just reducing the rsize or wsize (depending on which direction the problemis happening) would help indirectly by allowing entire messages tomake it through.

NFS over TCP (e.g. Solaris 2.5 and NFS V3) would completely solve this problembecause you have flow control and no fragments.

See information document HOW TO titled: "Tuning the hme interface to work withslower interfaces" for tuning guidelines.

Page 40: help

Tuning the hme interface to work with slower interfacesIf you have problems with the hme interface dropping off the network or showing high collision rates, try tuning the IPG (Inter-Packet Gap).

Setting any parameters will affect your entire machine and always involves tradeoffs. In general, the defaults set by Solaris are optimal for most situations. SunService cannot recommend parameters; you may want to consider Consulting Services for such customizations.

The default interpacket gap is 9.6 microseconds.

10Mb:IPG1 + IPG2 = 9.6us(8x800ns) + (4x800ns) = 9.6microsec6.4microsec + 3.2microsec

100Mb:(8x80) + (4x80ns) = .96microsec

Sun machines (10 Mbps and 100 Mbps) have the ability to send packets back to back at the IPG. Some foreign ethernet devices cannot cope with the speed and start dropping packets, causing time-outs. Apparently it is not a significant problem on a 10sMbps network, because not every sparc station is fast enough to send back-to-back packets at the IPG rate. UltraSparcs with either 10 Mbps and 100 MBPS ethernet rate can saturate the wire and hose slow interfaces.

_________________________________________________________________________

Platform Notes: The hme Fast Ethernet Device Driver

Inter-Packet Gap Parameters

The Fast Ethernet Parallel Port SCSI (FEPS) ASIC supports programmableInter-Packet Gap (IPG) parameters ipg1 and ipg2. The total IPG is the sum ofipg1 and ipg2. Table 3-2 lists the default values and allowable values forthe inter-packet gap (IPG) parameters, ipg1 and ipg2.

Table 3-2 Read-Write Inter-Packet Gap Parameter Values and Descriptions

----------------------------------------------------------------------------

Parameter Values Description

(Byte-time)----------------------------------------------------------------------------

ipg1 0, 255 ipg1 = 8 (default at initialization)1

ipg2 0, 255 ipg2 = 4 (default at initialization)

----------------------------------------------------------------------------

By default, the driver sets ipg1 to 8 byte-time and ipg2 to 4 byte-time,which are the standard values. (Byte-time is the time it takes to transmit

Page 41: help

one byte on the link, with a link speed of either 100 Mbps or 10 Mbps.)

If your network has systems that use longer IPG (the sum of ipg1 and ipg2)and if those machines seem to be slow in accessing the network, increase thevalues of ipg1 and ipg2 to match the longer IPGs of other machines.

------------------------------------------------------------------------To set the ipg1 to 10 and ipg2 to 5 when you reboot:

1. Become superuser.

2. Add the following lines to the /etc/system file using a text editor:

set hme:hme_ipg1 = 10 set hme:hme_ipg2 = 5

3. Save the /etc/system file.

4. Save all files and exit all programs. Exit the windowing system.

5. Reboot the system by typing init 6 at the # prompt.

The system is halted and then rebooted.

Page 42: help

Calculating collision rates and what they meanThe normal formula to calculate the packet collision rate is:

(collisions/output packets)*100 = collision rate

For example:

# netstat -i 10

input le0 output input (Total) output

packets errs packets errs colls packets errs packets errs colls 135299 1 19240 0 691 135910 1 19851 0 691

691/19240*100 = 3.59 % collision rate

A lot of network adminstrators use the following rough guidelines.

Collision rates < 5% are considered ok. Collision rates > 5% are the first indication of network loading Collision rates > 10% signify an over-loaded network.

It is important to note that:

1. a given machine's collision rate does not represent the average for the entire network2. threshold for collision rates varies greatly3. the collision rate is not an indication of actual load on the network (Collisions + Defers)

----------- NOTES

When looking at a system's collisions compared to output packets, it isimportant to note that this is only one node's perspective of the network whileit is transmitting. Depending on your application and protocol, a high collisionrate (>50%%) may not cause a decrease in preceived throughput on a client, but a server may show performance degradation at 5 to 10%%.

It is recommended that a Network Sniffer/ Analyser be used to get an overallNetwork analysis and better problem identification.

Segmentation and/or the use of ethernet switches is normally the solution to a network-wide collision and netload issue.

Some Causes:

1. Normal:

Collisions are normal and necessary in the CSMA/CD ethernet world. The collision rate displayed with netstat for le driver tends to understate the actual load on the network. The qe, be, and hme drivers will report every collision. The threshold for collision rates varies greatly between network nodes and should only be considered a piece of the overall network analysis.

2. Wrong duplex settings: If the 100sMb Switch is set for Half and the Sun hme port is at Full, then lots of Collisions result (invalid configuration). The same is true if Switch

Page 43: help

is at full and hme is at half. This is the usual cause for heavy and late collisions.

3. Characteristic of switched environment:

On Half-Duplex flow control using a 100 Mb ethernet switch, when a 100 Mbps server is transmitting to a 10Mbps client via a switch, the switch will buffer as many frames as possible. When switch buffers are full, a signal is sent to the server to stop transmitting by forcing a collision, which causes the server to back off. The switch also can assert a Carrier Sense, which causes the server to sense as if it is receiving data from the switch and defer the packet transmission.

4. "Ethernet Capture Effect", Fast servers hogging the wire: If slower clients (older/slower) are having collision and deferred packet issues, they may not deal well with the minimum 9.6 µs Inter-Packet Gap of the SunFastEthernet driver. Increasing the IPG values and verifying the lance_mode are set on the hme driver can be used to help resolve the ethernet bus arbitration phenomenon as a result of "fast server" capture effect (sometimes refered to a wire hogging).

5. Late Collisions: A late collision indicates that a collision was detected after the channel's slot time 25.6 µs has elasped, we are still transmitting and someone else started transmitting after the point in time where our packet should have filled the whole network (25.6µs). CSMA/CD dictates that there should not be a collision after 25.6 µs of the packet transfer. Other transmitters should have listened and detected a busy network during the first 25.6 µs slot time of another transmitter.

Page 44: help

Troubleshooting Physical Memory (RAM) and Virtual Memory (swap).Problem:Many problems with a network can be traced to a slow server that has a memoryshortfall. This entry will help you to determine if your machine is getting more load than its memory can support.

Solution:Use sar to monitor paging activity and total available memory: # sar -r 10 10 13:43:07 freemem freeswap13:43:17 1051 77304913:43:27 1053 77459313:43:37 1053 77459313:43:47 1053 77459313:43:57 1053 774593 Average 1053 774284 The above command takes five 10 second samples of the free physical memory(in 4kbyte pages) and free swap (in 512 byte blocks) on the system. Itthen takes an average of the samples and displays this, as well. To compare the freemem value to your total memory, run the dmesg command: # dmesg | grep mem mem = 65536K (0x4000000)avail mem = 61476864 To monitor swap space, use the swap command: # swap -l swapfile dev swaplo blocks free/dev/dsk/c0t3d0s1 32,25 8 819496 726000 This command displays the total number of blocks on each swap device.It also lists the number of blocks on the device that are free to be used.The blocks listed are 512 bytes in size. A slow system which also shows very low values of free memory and swapconsistently indicates that there is a shortfall in memory and/orswap space. You may need to add more physical memory or add more swapspace.

See entries on how to add and delete swap space and how to monitor your system's CPU activity.

How to check how much shared memory is used by systemType the commnad: ipcs -m -a

This is similar to determining how much System V shared memory (shmget(2)) hasbeen allocated. This can be seen this by using "ipcs -a" and looking underthe SEGSZ column. This number is recorded in bytes. The NATTCH column showshow many processes have attached (mapped in using shmat()) to this memory.

Page 45: help

The user cannot determine how many processes are sharing individual pages ofmemory.

This command is for 2.x systems.

Page 46: help

Digitizer setup on Solaris.I. log on to the unix computer as root. > cd /usr/sbin (type the following command) > pmadm -r -p zsmon -s ttyb (this ensures that port b cannot be used as another terminal)II. check to see that the port monitor has indeed been turned off: type: > pmadm -l (you should not see a line with ttyb in it).

III. monitor the status of ttyb by using the eeprom command. > /usr/sbin/eeprom | grep ttyb (the settings should be: ttyb-ignore-cd=true ttyb-mode=9600,8,n,1,-)

IV. if you need to change the prom settings, then it is best to shut down to run level 0, and change these settings using the 'setenv' command at the OK prompt.

V. cd /dev > ls -al ttyb (look at the link filename to ttyb) do a chmod a+rw on the filename -- this changes all permissions so the user, group, and other have rw permissions.

VI. test the digitizer on the serial port-b by using the command: > cat < /dev/ttyb (play with the digitizing mouse and you should get some jibberish and numbers) on the sun monitor's xterm window.

VII. next -- iescon must be set_up: log out of root and log into gqs.

VIII. in 'iescon' select system configuration: a. select 'add a system device record' b. select -- 'graphic input' c. for system device #0 1. device name = /dev/dummy 2. device description: pseudo GTCO 3. device type: large GTCO > min-x = 0 > max-x = 48000 > min-y = 0 > max-y = 36000 > do not bother the other number settings > exit out d. while still in system configuration: select -- add a 'system device record' select -- graphic input for system device #1

Page 47: help

1. device name: /dev/ttyb 2. device description: a real GTCO 3. device type -- large GTCO >min-x = 0 >max-x=48000 >min-y=0 >max-y=36000 (leave other numbers alone) exit out

IX. in iescon, go to VWS configuration. 1. select configure a virtual workstation. 2. select -- add a VWS device record 3. select graphic input 3a. for VWS device #0 a. device name: GRAPHIN0 b. device description: pseudo GTCO c. exit out d. select GRAI 0 e. exit out f. record will be updated

X. still in VWS configuration: 1. select configure a virtual workstation 2. select add a VWS device record. 3. select graphic input 3a. for VWS device #1 a. device name: GRAPHIN1 b. device description: real GTCO 36x48 c. exit out d. select GRAI 1 e. exit out f. record is updated

XI. OK --- we 'must' remember that the GTCO digitizer must be on device record #1 in IES in order for it to function correctly --- the device has been set to this number --- however, device record #0 was added in so that the 'real' digitizer would default to record #1 --- you might want to delete device record #0 in the 'system configuration' and in the VWS configuration --- leaving the device record #0 in causes a hex error #26 -- which may not hurt any thing ---- i deleted record #0 and had no problems.

the GTCO has to be on device #1 because it defaults to a small GTCO on device #0.

Setting serial port for digitizing on Solaris 2.5Problem:

Use the following to setup a digitizer connection to Sun/Solaris 2.5. Thesettings seem to be persistent, allowing login/logout or reboot withouthaving to redo the configuration. Run the CPS-3 tablet validation programas well as used the cat method to validate things. The sequence of some ofthe steps is important, don't get them out of order.

Solution:These steps assume usage of port A (ttya). Use ttyb if connecting to port B.

Page 48: help

1. Login as root.

2. Disable the port monitor using:

pmadm -r -p zsmon -s ttya

This essentially disables usage of the port as another login terminal, disabling any login prompt. To confirm the port monitor is turned off you can use 'pmadm -l'. Or you can view the status using admintool (see below).

Another way to turn off the port monitor is to run admintool:

admintool Select from menus: Browse > Serial Ports Highlight Port a Select from menus: Edit > Delete

One has to be careful when using this program because it can unexpectedly re-activate the port monitor. For example, if you do "Edit > Modify", followed by nothing more than "OK", the port monitor is back on again. So beware! 3. Next, disable the carrier-detect and set the baud rate: eeprom ttya-ignore-cd=true eeprom ttya-mode=9600,8,n,1,- Be careful that this step is done AFTER turning off the port monitor. Turning on or off the port monitor (not sure which) seems to reset the carrier-detect (to false). Note the other communication settings: baud rate (9600), character size (7 or 8 should be ok), parity (n), and stop bits (1). Set according to how your tablet is set up.

You can monitor your current settings using:

eeprom | grep ttya

SunSolve claims the above must be done by halting to the low-level command prompt (where you do a boot) and doing the same thing, but with a slightly different syntax:

setenv ttya-ignore-cd true setenv ttya-mod 9600,8,n,1,-

This is a bit less convenient and the eeprom method appears to work.

4. Check/reset port permissions:

cd /dev (follow links to ttya filename) chmod a+rw <filename>

This sets port access to read-write for levels. This is the default and normally should not have to be changed, though sometimes it gets reset to something more restrictive.

5. Logout and reboot.

6. Login as your user account.

7. Validate the above settings are still in affect by doing:

Page 49: help

pmadm -l eeprom | grep ttya

If they are not, you will have to log back in as root and fix things (i.e., use the low-level method to set the carrier-detect and baud rate).

8. Test the connection by entering:

cat < /dev/ttya

Press the tablet button a few times. Or run the CPS-3 tablet validation program in cadmin (which uses the CPS-3 tablet driver).

Another form of the cat function is:

(stty 9600 cs8 ; cat) < /dev/ttya

Either cat works, then CPS-3 digitizing should work (the 2nd form only affects communication to the xterm).

Page 50: help

How to find out more about a given binary file or executable.Some very useful command in Solaris to find more about a given binary.

All you ever wanted to know of a given binary.

Command Typical use Output Comments ------- ----------- --------- -------------------------------- which which ld /usr/bin/ld Looks at your $path and says which executable you will get.

whereis whereis ld ld: /usr/bin/ld Looks in a bunch of standard places to give you a clue about where something is.

what what /bin/ld /bin/ld: Prints out version info from binary.

ldd ldd /bin/ldd List dynamic dependencies tells you what libraries it wants and where it is expecting to find them. N.B. THIS CAN SAVE YOU MANY PROBLEMS! Run this early; you may get a surprise. ldd /bin/ld -lc.1 => /usr/lib/libc.so.1.10 -ldl.1 => /usr/lib/libdl.so.1.0

file file /bin/ld Makes a guess about file contents Uses /etc/magic, can set up your own sparc demand page dynamically file /bin/ld etc. /bin/ld:

size size /bin/ld How big is an executable? text data bss dec hex 122880 32768 40104 195752 2fca8

nm nm /bin/ld name list -- doesn't have one if stripped nm /usr/lib/libc.so.1.10 000015f8 T .div 00000790 T .mul 00027798 T .ptr_call 000024d8 T .rem 00022c08 T .stret1 etc etc.

version version `which CC` version info -- only for SPARCompilers version-id of "/opt/SUNWspro/bin/CC": SC2.0.1

showrev showrev -c /bin/ld Prints the revision info for a command.

Page 51: help

How to list various memory segments in the address space of a running process.The /usr/proc/bin/pmap command lists out the address space of a runningprocess. This is one of the series of commands newly introduced in 2.5that uses the /proc file system features.

Here is a typical output of a pmap command.

In this example list the addressmap of csh(pid 423).

# /usr/proc/bin/pmap 423

00010000 144K read/exec /bin/csh 00043000 16K read/write/exec /bin/csh 00047000 100K read/write/exec 0004C000 80K [ heap ] EF680000 500K read/exec /usr/lib/libc.so.1 EF70C000 28K read/write/exec /usr/lib/libc.so.1 EF713000 8K read/write/exec EF750000 4K read/exec /usr/lib/libmapmalloc.so.1 EF760000 4K read/write/exec /usr/lib/libmapmalloc.so.1 EF770000 12K read/exec /usr/lib/libintl.so.1 EF782000 4K read/write/exec /usr/lib/libintl.so.1 EF783000 4K read/write/exec EF790000 28K read/exec /usr/lib/libw.so.1 EF7A6000 4K read/write/exec /usr/lib/libw.so.1 EF7B0000 4K read/exec/shared /usr/lib/libdl.so.1 EF7C0000 4K read/write/exec EF7D0000 84K read/exec /usr/lib/ld.so.1 EF7F4000 8K read/write/exec /usr/lib/ld.so.1 EFFF7000 36K read/write/exec EFFF7000 36K [ stack ]

Here is some more information we can find from the above list....

* All the segments that have write enabled use up swap space.

* Many of the shared objects have a large part as read/exec and a small read/write/exec. The larger section is normally the code segment and it does not use up swap.

* Depending on the architecture the location of the heap and stack vary.

* Of course you cannot pmap a process that is not owned by you. root can pmap anyones process.

For those of you who might want to write their own pmap, the PIOCNMAPioctl is used to get this info. See the proc(4) man page for a detailedlisting of all supported ioctls

Page 52: help

How to list all the dynamic libs linked into a given running process.The /usr/proc/bin/pldd command lists out the dynamic library linked into a running process. This is one of the series of command newly introduced in Solaris 2.5 that uses the /proc file system features.

Here is a typical output of a pldd command. In this example list the dynamic libs of csh(pid 423). # /usr/proc/bin/pldd 423 423: /bin/csh /usr/lib/libw.so.1 /usr/lib/libintl.so.1 /usr/lib/libmapmalloc.so.1 /usr/lib/libc.so.1 /usr/lib/libdl.so.1

* For those of you who might want to write their own pmap, the PIOCPSINFO ioctl is used to get this information. See man proc(4) for a detailed listing of all supported ioctls.

How to get a memory image of a running processIt is sometimes necessary to get a memory image of a running process without stopping the process. Solaris has a utility that would do just that. The gcore utility creates a core file for a running process.

Here is an example...The pid of my shell is 10705.

# gcore 10705 gcore: core.10705 dumped # file core.10705 core.10705: ELF 32-bit MSB core file SPARC Version 1, from 'csh'

Note: You can only get the memory image of process owned by you.

How to print the working directory of a running process.The /usr/proc/bin/pwdx command prints the working directory running process. This is one of the series of commands newly introduced in Solaris 2.5 that uses the /proc file system features.

Here is a typical output of a pwdx command.

In this example list the addressmap of csh(pid 423). # /usr/proc/bin/pwdx 423423: /etc/init.d

How to backup into a remote machines tape drive.It is often neccesary to backup into a remote machines tape drive. Here are the commands that can be used to achieve this. Execute this command on the machine you want to backup.

tar cvf - $DIRNAME | rsh $REM dd of=$TAPEDEV

Substitute $DIRNAME with the directory to backup, $REM with the machine name with the tape drive, $TAPEDEV with the tape device.

Note: You must be able to rlogin into the remote machine without a passwd. To do this add the name of your local machine with your user name in the .rhost file in your home directory on the remote machine.

To retrieve the backed up info...

Page 53: help

rsh $REM dd if=$TAPEDEV | tar xvf -

Using tar to move data between disks.Sometimes you may want to quickly move data from one disk to another.The command to do this follows: # cd fromdir; tar cf - . | (cd todir; tar xvpBf -) For example, if you want to move all data on /home/data1 to /home/data2: # cd /home/data1; tar cf - . | (cd /home/data2; tar xvpBf -)

Only root can use tape drive. Users get "write protected" error.Problem:Restrictive permissions can prevent users from using the tape drive.

Solution:This could be a very simple problem. The error points toward a permissions problem restricting access to the tape drive.

Check the permissions on the device you are using. For example, if you are using the tar command to copy a file to tape device /dev/rmt/0, look at the permissions on this device.

# cd /dev/rmt# ls -al 0 lrwxrwxrwx 1 root root 49 Nov 14 1996 0 -> ../../devices/sbus@3,0/SUNW,fas@3,8800000/st@5,0:

Here, the permissions are set to 777. This allows everyone to access thetape drive.

Also follow the link. Make sure permissions are open there, too.

# ls -al ../../devices/sbus@3,0/SUNW,fas@3,8800000/st@5,0:crw-rw-rw- 1 root sys 33,129 May 12 12:45 ../../devices/sbus@3,0/SUNW,fas@3,8800000/st@5,0:

Permissions here are set to 666. This allows all users to access the tape drive.

If write permission is restricted in either /dev/rmt/0 or its link, only root would be able to use the tape device.

Page 54: help

How to manually add a user.1. Edit the /etc/passwd file. Use of this file is as follows:

username:x:userid:groupid:description of user:home directory:shell

For example:test:x:3000:101:tester:/test:/bin/csh

The above entry lists user test with userid 3000, groupid 101, home directory /test, and shell /bin/csh. The "x" in the second field is required to show that this userid is password protected. The encrypted password is stored in the /etc/shadow file.

2. Once you have added an entry for the new user, use the pwconv command to update the /etc/shadow file.

# pwconv

3. Now provide a password for the new user:

# passwd -r files testNew password:Re-enter new password:

4. If you are running NIS, and you are adding this user to the network, you must now update NIS.

# cd /var/yp# make passwd

This will make a new passwd map containing the new user.

Page 55: help

Logical tape devicesThe logical tape number will be zero if you only have one tape drive. Additional tape drives will have logical numbers of 1, 2, 3, etc... The tape density may be l (low), m (medium), h (high), c (compressed), andu (ultra). The default is high, uncompressed. BSD behavior is an option that you will want to use most of the time. Whenreading past an EOF marker on the tape, a BSD device will position the tape head at the beginning of the next record. A non-BSD device will leave the tape head at the EOF marker which is rarely desired. A non-rewinding device will not rewind at the end of ANY operation. This may be desired when saving several files to tape. For example, a rewinding device will rewind the tape after completing a tar command. This is undesired if you want to save several tarfiles to tape. A non-rewindingdevice will perform a "tar cv" command and then not rewind. This way, the next"tar cv" command will append another tarfile to the end of the tape insteadof saving over the previous tarfile.\

How to set up NFS Servers and ClientsFor the Server: 1. Start "/usr/lib/nfs/nfsd -a 256" and "/usr/lib/nfs/mountd". 2. Edit the /etc/dfs/dfstab file. The syntax of the file follows: share -F nfs [-o options] /usr/share/man The options available are read only (ro) and read/write (rw).You set these options as follows: share -F nfs -o ro /usr/share/man # filesystem is read only for all clientsshare -F nfs -o ro=client1:client2 /usr/share/man # read only for clients # listedshare -F nfs -o rw=client1:client2 /usr/share/man # read/write only for clients # listed With no options listed, the filesystem defaults to read/write for all clients. 3. Share the filesystems. # shareall The above command allows nfs clients to mount the filesystems listed in the /etc/dfs/dfstab file. For the Client: 1. Start /usr/lib/nfs/statd and /usr/lib/nfs/lockd. 2. Edit the /etc/vfstab file. The syntax for mounting nfs filesystems follows: server:/usr/share/man - /usr/share/man nfs - yes bg The above entry in /etc/vfstab will mount the directory /usr/share/man from the

Page 56: help

server onto the directory /usr/share/man on the client. Notice that the last entry is bg. This specifies to the client to perform this mount in the background. This will ensure that the client does not get hung at boot time waiting for a response from a slow or down server. For a complete list of options, see the man pages for "mount". 3. Mount the filesystem. # mountall The above command reads the /etc/vfstab file and mounts all filesystems listed.

What filesystems am I currently sharing and who is mounting them?Use the dfshares command to see what a server is sharing.

# dfshares server1 RESOURCE SERVER ACCESS TRANSPORT server1:/export/home/server1/user1 server1 - - server1:/export/home/server1/user2 server1 - - server1:/export/home/server1/user3 server1 - - server1:/export/home/server1/user4 server1 - - server1:/export/home/server1/user5 server1 - - server1:/export/home/server1/sysadm server1 - -

To see who is mounting your shared filesystems, you may use the following commands:

# dfmounts- server1 /usr/share/man client1,client2,client3

Or, to get a listing by clients:

# showmount -a | grep client1client1:/export/home/server1/user4client1:/export/home/server1/user5client1:/export/home/server1/user2client1:/export/home/server1/user3client1:/export/home/server1/user1client1:/export/home/server1/mail

How to check clock speed.The easiest way to check clock speed on any architecture Sun workstation is the command : psrinfo -v.

A standard result is :

> psrinfo -v Processor has been on-line since 05/05/98 07:59:54. The sparc processor operates at 168 MHz, and has a sparc floating point processor.Status of processor 1 as of: 05/21/98 16:08:03 Processor has been on-line since 05/05/98 07:59:58. The sparc processor operates at 168 MHz, and has a sparc floating point processor.

How to set up Accounting.1. Check to see if you have the accounting packages.

Page 57: help

# pkginfo | grep SUNWaccsystem SUNWaccr System Accounting, (Root)system SUNWaccu System Accounting, (Usr) 2. Link the /etc/init.d/acct startup script to the run level scripts. # ln -s /etc/init.d/acct /etc/rc2.d/S22acct# ln -s /etc/init.d/acct /etc/rc0.d/K22acct 3. Add cron entries for adm and root. # vi /var/spool/cron/crontabs/adm 0 * * * * /usr/lib/acct/ckpacct30 2 * * * /usr/lib/acct/runacct 2> /var/adm/acct/nite/fd2log30 7 1 * * /usr/lib/acct/monacct # vi /var/spool/cron/crontabs/root 30 22 * * 4 /usr/lib/acct/dodisk ckpacct, runacct, and monacct all produce accounting reports generatedfrom the accoutning data. dodisk performs disk accounting functions. 4. Edit the /etc/acct/holidays file to include all holidays. 1/1 New Years Day7/4 Indep. Day12/25 Christmas

Page 58: help

How to set up a NIS master server.First, initialize the NIS Makefile:

# cp /usr/lib/NIS.Makefile /var/yp/Makefile

Afterwards, you will want to set your nis-domain. In the example below, simply replace 'example-name' with the name that you have chosen for your nis-domain. Note that this nis-domain name does not have to have any relationship to your DNS domain name. It should simply be a name which is set identically on all your NIS machines. It is actually more secure to use a nis-domain-name that is totally unrelated to your DNS domain.

# domainname example-name # domainname > /etc/defaultdomain

If you are planning on using DNS with NIS, you will need to change the /var/yp/Makefile to reflect this. Near the top of the Makefile, you will find the following lines:

# Set the following variable to "-b" to have NIS servers use the domain name # resolver for hosts not in the current domain. #B=-b B=

In order for DNS to work with NIS, you must change the last two lines, as follows:

B=-b #B=

Finally, you can initialize NIS by running the ypinit script. When ypinit queries you for server names, make sure you include all slave servers that you are planning to set up in the near future:

# cd /var/yp # /usr/etc/yp/ypinit -m

If you wish to immediately start NIS, you can simply start the NIS daemons on your server:

# ypserv # ypbind # ypxfrd

Afterwards, make sure that ypserv, ypbind and ypxfrd are all in your /etc/rc.local file and not commented out.

Whenever you reboot your machine at this point, NIS should automatically be started.

How to set up an NIS slave server.Start off by setting your nis-domain name on your slave. This name(example-name below) must be identical to the nis-domain name on yourNIS master.

# domainname example-name # domainname > /etc/defaultdomain

Start the ypbind daemon:

# ypbind

Verify the NIS master knows about the slave Server# ypcat -k ypservers

Page 59: help

master-nameslave-no-1slave-no-2new_slave

If the NIS slave is not in the list, use the procedure in section3.3 of this document.

Otherwise:

Run the ypinit script. master-server-ip in the example below must bethe ip address of the master server:

new_slave# /usr/etc/yp/ypinit -s master-server-ip

NOTE: If you get the following error from ypinit: "Can't enumerate maps from $master. Please check that it is running" then rerun ypinint and specify the hostname of the master server e.g. /usr/etc/yp/ypinit -s master-hostname

You can immediately get your machine running as a NIS slave byrunning ypserv:

new_slave# ypserv

Afterwards, make sure that ypserv and ypbind are both inyour /etc/rc.local file and not commented out (SunOS 4.1.x ONLY).

Whenever you reboot your machine at this point, NIS shouldautomatically be started.

How to Add a New NIS Slave to an Existing NIS Environment.When you initialize your NIS master, you give it a list of NIS slaves.If you later add additional NIS slaves, or remove one of theseoriginal NIS slaves, you must update the NIS list of slaves. This isdone entirely from the NIS master server. First, you must output thelist of NIS servers:

nis_master# cd /var/yp/`domainname`nis_master# makedbm -u ypservers > /tmp/ypserversnis_master# vi /tmp/ypservers add new slave to bottom of list. (don't change order or format.)nis_master# makedbm /tmp/ypservers ypservers

verify addition via:nis_master# ypcat -k ypservers

now go to the new slave (it must already be a client... ypinit -c)Run the ypinit script. In the example below master-server-ip must bethe ip address of the master server:

new-slave # /usr/etc/yp/ypinit -s master-server-ip

NOTE: If you get the following error from ypinit: "Can't enumerate maps from $master. Please check that it is running" then rerun ypinint and specify the hostname of the

Page 60: help

master server e.g. /usr/etc/yp/ypinit -s master-hostname

You can immediately get your machine running as a NIS slave byrunning ypserv:

new-slave # ypserv

Afterwards, make sure that ypserv and ypbind are both inyour /etc/rc.local file and not commented out (SunOS 4.1.x ONLY).

After this, when you reboot your machine, NIS shouldautomatically be started.

How to set up an NIS client.Start off by setting your nis-domain name. This name (example-namebelow) must be identical to the nis-domain name on your NIS master.Login as the root user then: # domainname example-name # domainname > /etc/defaultdomain

Put the NIS nsswitch file in place.

# cp /etc/nsswitch.nis /etc/nsswitch.conf

If you are using DNS as well, you will want to modify the hosts: line,by adding dns, as follows:

hosts: files nis dns

The normal method for starting NIS under Solaris, is to give it a listof yp servers. You do this by running ypinit, answeringthe questions, then rebooting the machine:

# ypinit -c

If you prefer to start NIS in the less secure broadcast mode, ratherthan running ypinit, reboot your client machine without runningypinit and it will come up running NIS in broadcast mode.

How to remove NIS from a client.To remove NIS from a Solaris client, remove the NIS files as follows: Login as the root user, then: # rm -r /var/yp/binding/`domainname` # rm /etc/defaultdomain

If you just want to temporarily disable NIS, move theobjects to different names, rather than removing them.

Afterwards, you must modify the nsswitch.conf file:

# cp /etc/nsswitch.files /etc/nsswitch.conf

If you are continuing to run DNS, you might want to modify the hosts:line of the nsswitch.conf, by adding dns:

hosts: dns files

Page 61: help

Finally, reboot the machine.

Why does ypxfr refuse to transfer my brand new map when I remake the NIS maps.ypxfr is confused because copies of the new map do not exist onone of your NIS slaves. You must manually copy the maps.This can be done by copying /var/yp/`domainname`/map.* from the masterto /var/yp/`domainname` on each of the slaves using either rcp orftp.

Who are the NIS servers, and which one am I using?The ypservers map contains a list of all the NIS servers servicing your domain.

# ypcat -k ypserversserver1server2server3

The first listing will be the master server. The machines following are theslave servers.

To tell you which of the above machines your machine is contacting forNIS information, use ypwhich.

# ypwhichserver1

NIS managed files.1. Common files managed by NIS: Files Associated Map /etc/bootparams bootparams/etc/ethers ethers.byname ethers.byaddr/etc/group group.byname group.bygid/etc/hosts hosts.byname hosts.byaddr/etc/aliases mail.aliases/etc/netgroup mail.byaddr/etc/netmasks netmasks.byaddr /etc/networks networks.byname networks.byaddr/etc/passwd passwd.byname passwd.byuid/etc/protocols protocols.byname/etc/rpc rpc.bynumber/etc/services services.byname

2. To make sure the clients are looking at these maps (the server's files)instead of local files, look at /etc/nsswitch.conf.

Page 62: help

client# more nsswitch.conf## /etc/nsswitch.nis:## An example file that could be copied over to /etc/nsswitch.conf; it# uses NIS (YP) in conjunction with files.## "hosts:" and "services:" in this file are used only if the# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports. # the following two lines obviate the "+" entry in /etc/passwd and /etc/group.passwd: files nisgroup: files nis # consult /etc "files" only if NIS is down. # The NIS entry makes the client look at the NIS files first.hosts: files nis dns [NOTFOUND=return]networks: nis [NOTFOUND=return] filesprotocols: nis [NOTFOUND=return] filesrpc: nis [NOTFOUND=return] filesethers: nis [NOTFOUND=return] filesnetmasks: nis [NOTFOUND=return] filesbootparams: nis [NOTFOUND=return] filespublickey: nis [NOTFOUND=return] files netgroup: nis automount: files nisaliases: files nis # for efficient getservbyname() avoid nisservices: files nissendmailvars: files

NIS (yp) commands.ypcat - prints out values in an NIS name service map.

Usage: ypcat [-k] [-d domainname] [-t] mapname

Example - ypcat -k passwd ypcat -k ypservers

ypinit - Setup an NIS system.Usage: ypinit [ -c ] [ -m ] [ -s master_server ] Example - ypinit -c master ypinit -s master ypinit -m master

ypmatch - prints the values associated with one or more keys from a NIS map.Usage: ypmatch [ -k ] [ -t ] [ -d domain ] key [ key... ] mname

Example - ypmatch john passwd

Page 63: help

yppasswd - change your network password in the NIS database. Use just likepasswd command.

yppush - transfer NIS map from a NIS server to host. Runs on master server.Usage: yppasswd [ username ]

Example - yppush passwd.byname

ypset - point ypbind at a particular serverUsage: ypset [ -d ypdomain ] [ -h host ] server

Example - ypset servername

ypwhich - return name of NIS server or map masterUsage: ypwhich [ -d domain ] [[ -t ] -m [ mname ] | [ -Vn ] host-name ]

ypxfr - transfer NIS map from a NIS server to host. Runs on slave server.Usage: ypxfr [ -c ] [ -f ] [ -C tid prog server ] [ -d ypdomain ] [ -h host ] [ -s ypdomain ] mapname

Example - ypxfr passwd.byname

make - builds and distributes all NIS maps Example - cd /var/yp make

Page 64: help

How to add external disks without rebooting the system.It is often very convenient to add disks on to a Sun box without having to reboot the machine. This can be done if there is an available controller.

First, while the machine is up and running, plug the SCSI from the external drive or disk pack into the controller on the Sun box. Power on the external disk(s).

Log on to the machine as root and type the following series of commands at the root prompt :

# drvconfig# disks# devlinks# /usr/ucb/ucblinks

You should now be able to see the new disks when you look at the "format" option, and you can proceed with configuring the disk space.

Obtaining detailed information about ffb graphics cardsA simple command for obtaining information about ffb graphics cards is the following :

/usr/sbin/ffbconfig -prconf /dev/fbs/ffb0

This command must be performed as root user on the machine, and the output should look like the following :

# ffbconfig -prconf

--- Hardware Configuration for /dev/fbs/ffb0 ---Type: double-buffered FFB2 with Z-bufferBoard: rev 1 PROM Information: @(#)ffb2.fth 2.2 96/12/16 FBC: version 0x2241906dDAC: Brooktree 9068, version 43DRAM: Mitsubishi 1309, version 3EDID Data: Not AvailableMonitor Sense ID: 4 (Sun 19" monitor)Monitor possible resolutions: 1024x768x77, 1024x800x84, 1152x900x66, 1152x900x76, 1280x1024x67, 1280x1024x76, 960x680x112s, 960x680x108s Current resolution setting: 1280x1024x67

Different ways of changing the refresh rate for video cardsSome sample commands are:

Change the resolution directly at prom by doing the following: ok setenv output-device screen:r1280x1024x76mok boot use eeprom to change 'output-device' to screen:r1280x1024x76m (sample) Or when up and running with some video devices

cg14config -d /dev/cgfourteen0 -r 1280x1024@66 cg14config -d /dev/cgfourtenn0 -r 1280x1024@76

Page 65: help

vi Quick ReferenceWhile in Command mode: k Move one line upwardsl Move one character to the righth Move one character to the leftw Move one word to the rightW Move one word to the right past punctuationb Move one word to the leftB Move one word to the left past punctuatione Move to the end of the current word1G Move to the beginning of the fileH Move to the top of the current screenM Move to the middle of the current screenL Move to the bottom of the current screenCtrl-G Move to the last line in the fileCtrl-F Move one screen towards the end of the fileCtrl-D Move 1/2 screen towards the end of the fileCtrl-B Move one screen towards the beginning of the fileCtrl-U Move 1/2 screen towards the beginning of the fileCtrl-L Refresh the screen5G Move to line 5 of the file (5 can be any line number)/string Find text string forward?string Find text string backwardn Find forward next string instance after a string searchN Find backward next string instance after a string search:g/X/s//x/g Global Search and replace (X=search object x=replace object):r file Import a file into the current file:34 r file Import a file into the current file after line 34:w Write out the file to save changes:w file Write the file to named file:wq Save the file exit vi:w! Force save the fileZZ Save the file exit vi:q! Quit vi but don't save changesx Delete the character at the cursorX Delete the character behind the cursordd Delete the line the cursor is on10dd Delete the 10 lines following the cursoryy Yank the current linep Put the yanked line below the current lineP Put the yanked line above the current line To enter Input mode:a Insert characters to the right of the cursorA Append characters to the current linei Insert characters to the left of cursorI Insert characters at the beginning of the current lineo Add a new line after current lineO Insert a new line above the current line In Input mode:<ESC> Return to Command mode

Page 66: help

The vold.conf fileThe Volume Management daemon(vold) creates and maintains a file system image that contains symbolic names for floppies and CD-ROMs. It creates these names in the /vol directory. The vold daemon reads the /etc/vold.conf configuration file upon startup.

An example vold.conf file follows:

# @(#)vold.conf 1.20 95/01/09 SMI## Volume Daemon Configuration file# # Database to use (must be first)db db_mem.so # Labels supportedlabel dos label_dos.so floppy pcmemlabel cdrom label_cdrom.so cdromlabel sun label_sun.so floppy pcmem # Devices to useuse cdrom drive /dev/rdsk/c*s2 dev_cdrom.so cdrom%duse floppy drive /dev/rdiskette[0-9] dev_floppy.so floppy%duse pcmem drive /dev/rdsk/c*s2 dev_pcmem.so pcmem%d forceload=true # Actionsinsert dev/diskette[0-9]/* user=root /usr/sbin/rmmountinsert dev/dsk/* user=root /usr/sbin/rmmounteject dev/diskette[0-9]/* user=root /usr/sbin/rmmounteject dev/dsk/* user=root /usr/sbin/rmmountnotify rdsk/* group=tty user=root /usr/lib/vold/volmissing -p # List of file system types unsafe to ejectunsafe ufs hsfs pcfs

For vold to automatically mount the CDROM or floppy, this file must appear as above. If you run volcheck and vold does not mount the CDROM or floppy, likely problems are:

1) /usr/sbin/vold is not running.2) Parts of vold.conf are commented out or missing.3) You have killed and restarted /usr/sbin/vold.

In case 3, you must reboot the system and vold will be started on boot.

Page 67: help

pkgadd: ERROR: checkinstall script did not complete successfully

Problem:The following error occurs when trying to install a patchthat uses the 'checkinstall' script:

Generating list of files to be patched... Verifying sufficient filesystem capacity ( exhaustive method) ... Installing patch packages ... pkgadd: ERROR: checkinstall script did not complete successfully. Patch <patch number> has not been applied to this system Installpatch is terminated.

Solution:There are a number of reasons one gets this error message.

A. One reason this happens is that the 'pkgadd' command attempts to run the 'checkinstall' script as the user 'nobody', and that user is unable to access the 'checkinstall' script.

To check this, 1. login as root 2. Enter 'su nobody' 3. Attempt to 'cat' the checkinstall scripts in that patch. For example: cat /tmp/103247-07/SUNWadmap/install/checkinstall

If this 'cat' fails, you've got a permissions problem somewhere in the path to the checkinstall script. And remember, there are a number of checkinstall scripts for every patch, so you should check all of them.

If it is a permissions problem, usually the command

chmod -R og+rx /tmp/103247-01

will help restore the permissions such that the checkinstall script is accessable to the 'nobody' user.

Obviously, the 'nobody' user must exist on the system. If it does not, it should be added back in again.

B. Another reason this happens is that the root user is a 'ksh' user with something in his environment that's getting in the way of 'installpatch'. To check on this problem, you can create a new user named "install". This user should have a uid=0, home directory of /tmp, shell of /sbin/sh. The passwd file should have the entry:

install::0:1:test install:/tmp:/sbin/sh

Then run 'pwconv' to create a shadow entry and then login as 'install' and attempt to perform the patch installation.

C. A final, last resort is to just remove the line in the 'pkgmap' file that refers to the 'checkinstall' script. The 'pkgmap' file can be found in the directory SUNW<xxxx>, which is a sub-directory in the patch directory. This will simply inhibit the 'pkgadd' command from even running the 'checkinstall' script, so it just can't fail. Obviously, this is to be used as a last resort.

Page 68: help

Setting a default route.To create a default route for your network create an /etc/defaultrouter file: # vi /etc/defaultrouter # The only contents of this file is the IP address of the default router. 192.134.80.10 If you look at the contents of the /etc/defaultrouter file, you should only see an IP address: # more /etc/defaultrouter192.134.80.10 Now when the machine reboots, it will see the /etc/defaultrouter file and not start in.routed or in.rdisc.

Page 69: help

How to configure a machine for two monitors.The Xservers file resides under /usr/dt/config. This file is created during theOS installation. You do not want to edit the Xservers file in /usr/dt/config.Instead, create a /etc/dt/config directory and copy Xservers over to this newdirectory. When the system boots, it will look for the existence of/etc/dt/config/Xservers. When the system finds this file, it will overrideanything in /usr/dt/config/Xservers.

The changes to /etc/dt/config/Xservers follow:

1) Go to the bottom of the file. Here is an excerpt:

# Another options of interest here for Sun's Xserver is how to start on # two or more screens. A two screen example follows.## :0 Local local_uid@console root /usr/openwin/bin/X -dev /dev/fb0 -dev /dev/fb1## See the Xsun.1 and Xserver.1 man pages for additional options of # interest.################################################################################# :0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner

2) Comment out the last line and copy the two screen example from above. The bottom of the file should now look like this:

# Another option of interest here for Sun's Xserver is how to start on # two or more screens. A two screen example follows.## :0 Local local_uid@console root /usr/openwin/bin/X -dev /dev/fb0 -dev /dev/fb1## See the Xsun.1 and Xserver.1 man pages for additional options of # interest.################################################################################# # :0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner :0 Local local_uid@console root /usr/openwin/bin/X -dev /dev/fb0 -dev /dev/fb1

3) Save the file and reboot the machine. The second monitor should come up on boot.

Page 70: help

Tape drives and Sun/SGIExabyte 8mm tapes are used to exchange image data between peoplegenerating computer animation and Sun. The most common machines in thisenvironment are Suns and SGI machines. Since Exabyte makes the actualdrives, it would seem that the tapes would be easily exchangeable.However, due to various hardware and software choices made by Sun andSGI, it is not totally straightforward. A discussion of these issuesfollows. 1. Suns always operate their Exabytes in variable-block-size mode. SGI machines are capable of both variable-block-size and fixed-block-size mode, but the default "/dev/tape" and "/dev/nrtape" devices generated by /dev/MAKEDEV are links to the fixed-block devices. Thus, by default, people will use fixed-block mode on SGI machines. For compatibility between machines, use variable-block mode on the SGI. The device name will be something like /dev/rmt/tps0d3nsv, if the default device (which /dev/tape is linked to) is called /dev/rmt/tps0d3ns. Two additional links called /dev/vtape and /dev/nrvtape can be created to make it easier to access the variable-block-mode devices. SGI should make variable-block the default on 8mm; it is on 4mm. Mixing modes (reading fixed-block tape in variable mode or vice versa) will work, in the sense that data can be retrieved, but this either gives horrible performance (each read returns only 1024 bytes) or confuses tar about the size of the records written, causing it to do strange things at the end of tape. 2. Most versions of tar (including the Sun version, and pdtar) have a default blocking factor of twenty. These versions will also automatically determine the blocking factor when reading a tape, provided a sufficiently large initial guess is specified, and they will tell the user what the blocking factor actually is. Tar tapes with a blocking factor of twenty can be read anywhere. The SGI tar, however, defaults to a blocking factor of 256 when writing to 8mm tape. When it reads a tape, it adapts itself to the blocking factor of the tape automatically, without telling the user what that number is. This is fine when writing and reading tapes on SGI machines only. However, on the Sun (at least older ones with VME/SCSI adapters) there is a 16-bit transfer size limit, which means the maximum usable blocking factor for tar is 126 (63 x 1024 bytes). A tape written on the SGI machine, with the default blocking factor, is utterly unusable on the Sun. It is necessary to force tar to use a smaller blocksize on the SGI side in order for the tape to be readable on the Sun. For the above reasons, always specify blocking factors when reading and writing: On the Sun: tar cvfb /dev/nrst1 20 On the SGI: tar cvfb /dev/rmt/tps0d3nrnsv 20 Comments: The SGI driver seems to be able to run an Exabyte in any mode it can operate in, but the defaults are strange. Why fixed-block mode instead of variable? Why not get rid of "byte-swapped" mode entirely? Tar is too clever. The automatic switch to 256 blocking factor is gratuitously incompatible with other versions of tar.

Page 71: help

EXB8705 (Eliant 820) drive Exabyte tapes low density.Assuming the new drive is an EXB8705 (Eliant 820) drive.The 8705 is the replacement for the EXB8505XL. It is faster than the 8505,and compatible with the 8505 with a few EXCEPTIONS. Tape Format Compatibility Note8500 (no compress) Read & Write -8500C (compressed) Read & Write -8200 (no compress) Read ONLY Cartridge MUST be write protected8200C (compressed) NOT Compatible Cartridge NOT usable in this drive If they older tapes were written in 8200 mode, all you need to do is writeprotect the tapes and the drive will READ the tapes. If these tapes werewritten in 8200C format, then the Eliant tape drive will not read or writeto them. To re-use (ie. write data to) these 8200 or 8200C format tapes, you willhave to either re-write them in 8500 or 8500 format using an 8500 classtape drive, or you can erase them with a bulk eraser.

lp log file error numbers.This describes error numbers in the lpsched log /var/lp/logs/requests*ie: 0x0010+0x1000=0x1010 (request accepted by remote system and finished printing successfully) 0x0001 The request was held pending resume 0x0002 The request has a slow filter is running 0x0004 The request's slow filter has finished running 0x0008 The request is on printer 0x0010 The request has finished printing 0x0020 The request held pending userchange 0x0040 The request was cancelled 0x0080 The request should be next to print 0x0100 The request's slow filter or interface failed 0x0200 The Request is in transit to a remote 0x0400 The user is to be notified (alert) 0x0800 A notification (alert) is running 0x1000 The Request accepted on remote system 0x2000 The administrator placedRS_HELD 0x4000 had to change filters 0x8000 temporarily stopped the request

lpsched dies with a segmentation violationRemoved spool files and log files, and restarted the service:

# lpshut# cd /var/spool/lp# rm -r requests temp tmp# cd /var/lp/logs# rm *# /usr/lib/lpschedPrint Service Starting#

Since lpsched remembers its hostname, renamingthe system can cause printing to stall.

Page 72: help

Make sure that the machines have the lp patch 103959 installed.

Solaris 2.x printer MFAQ

1) COMMAND LINE REMOTE PRINTER SETUP:

# lpsystem -t bsd servername (Always use bsd!)

This # lpadmin -p printername -s servername or # lpadmin -p localname -s server\!remotename (different local and remote names)

# lpadmin -p printername -T unknown -I any

# accept printername

# enable printername

2) PRINTER ALIASES:

# lpadmin -p oldname -c alias_name # accept alias_name destination "alias_name" now accepting requests

3) PRINTER CANNOT BE REMOVED, CANNOT DELETE THE QUEUE FILES:

# /usr/sbin/lpshut # cd /var/spool/lp # pwd (verify the directory) # rm -r requests tmp temp # /usr/lib/lpsched (restart the scheduler) # lpadmin -x printername (printer configuration is removed)

4) DISABLE THE BANNER:

To disable the banner pages permanently:

cd /etc/lp/interfaces/your_printername vi your_printername Change line 332 from: nobanner="no" to: nobanner=""

5) CANNOT OPEN THE PRINTER PORT:

If you are getting this message, check the eeprom setting for the port where your printer is attached and the serial port manager settings.

This command will disable logins on the port: lpadmin -p printername -h

Page 73: help

The default for a Solaris system after it is installed allows the serial ports to be used for printers. If Serial Port Manager has been run, the default settings and the eeprom setting might have changed.

Defaults: pmadm -l zsmon ttymon ttya u root /dev/term/b I - /usr/bin/login - 9600 ldterm,ttcompat ttyb login: - tvi925 y #

eeprom | grep ttya ttya-rts-dtr-off=false (Default) ttya-ignore-cd=true (Default) ttya-mode=9600,8,n,1,- (don't change this it has no effect once the system boots) PROBLEM: ttya-ignore-cd=false The "false" is the setting that stops the serial port from being opened. The other eeprom settings for serial ports have no effect once the system is booted. FIX: eeprom ttya-ignore-cd=true Reset it to true and reboot.

pmadm -l Check the Serial Port Manager settings

zsmon ttymon a ux root /dev/term/a b - /usr/bin/login - 9600 ldterm,ttcompat login: - - n #Modem - Bidirectional ^ This flag stops the port from pening.

PROBLEM: The "n" here sets up the port for modem use and allows the port to open only when a modem signal is on pin 8 (Carrier Detect). It must be "y" for printers, and the /dev/term/a must have a "I" after it for initialize only.

FIX: If you check the software carrier box in serial port manager, the y will be set. If you select terminal hardwired and initialize only, the port will be back to defaults except for the eeprom setting mentioned above.

OR: Workaround: delete the service and set eeprom ttya-ignore-cd=true, then reboot, or if you cannot reboot, use /dev/cua/a for the printer device, as this device does not get locked by the Carrier Detect settings.

To change printer Device: lpadmin -p printername -v /dev/cua/a

6) MY POSTSCRIPT PRINTER BLINKS FOR SEVERAL MINUTES BUT NEVER PRINTS: For all Postscript printers attached to a serial or parallel port on a Sun workstation running Solaris 2.x, you must set the printer to ether Postscript or PCL (ASCII). Do not set the printer to Auto. It will not detect the file type being sent and will not print.

Set the file type for the printer on the Sun to ether Postscript or simple (ASCII) to match the printer setting. You will still be able to print ASCII to your Postscript printer and the fonts will look better on ASCII jobs.

Page 74: help

i.e. lpadmin -p printername -T PS -I postscript or lpadmin -p printername -T hplaser -I simple (LaserJet type)

7) WHAT IS THE NAME FOR THE PARALLEL PORT, WHAT CABLE DO I USE?

/dev/bpp0 It is a 26-pin mini-din plug on the Sun identified by these marks //. It is the upper of the two similar looking plugs.

The parallel cable part number is 530-1857-03 for the mini-26 to Centronics.

The other cable that might be used on the parallel port is a 26-pin female mini-din to a female DB-25 P/N 530-1861.

The parallel port on the Serial Parallel Controller is /dev/printers/0. This port requires Patch 101398-06 for Solaris 2.3 and Patch 102121-02 for Solaris 2.4. Solaris 2.5 does not require a patch.

8) HP 4 LASERJET PRINTER SETTINGS FOR SERIAL PORTS:

Verify the printer settings: SERIAL MENU

SERIAL=RS232 * PACING=XON/XOFF * BAUD RATE=9600 * ROBUST XON=OFF * DTR POLARITY=HI *

Verify the cable: cat /etc/hosts > /dev/term/a

This is an ASCII file. You can cat a Postscript file for Postscript printers.

Take the printer off line and press the Form Feed. The Form Feed light should blink and the job should print. If it does not, you have the wrong cable or printer settings. The cable needs pins 2,3 and 7. Pins 2 and 3 must be crossed from one cable end to the other and pin 7 is straight through. This is also called a NULL modem cable.

9) WHAT DO I SET MY PRINTER TYPE TO?

There are three types of printers that are commonly used on Solaris 2.x workstations: Postscript, HP Laserjet compatible and ASCII line printers. For remote printing, always set your printer type to unknown and file content type to any. For local printers of Postscript type, set the printer itself to PS or Postscript only. On the Sun, set the file content type to "postscript" and the printer type to "PS".

Postscript example: lpadmin -p printerName -T PS -I postscript

For HP Laser compatible PCL ASCII type printers, set the printer type to hplaser and the file content type to simple. If you are printing HP PCL files, the printer type must be unknown and file

Page 75: help

content type simple. Then you must run the following command for PCL file to prevent carriage returns at the end of each line in the PCL file: lpadmin -p printerName -o "stty=-opost"

HP PCL example: lpadmin -p printerName -T hplaser -I simple

For ASCII line printers, set the printer type to ibmproprinter or epson2500 and the file type to simple.

Line Printers: lpadmin -p printerName -T ibmproprinter -I simple

10) ONLY ROOT CAN SEND PRINT JOBS:

This problem is caused by network spooling software for a network printer that uses /dev/null for the printer device. The software monitors the queue and spools the print requests over the network to the printer. If the printer setup is modified in any way with Admintool, the printer device (/dev/null) permissions will change to 600 owner lp. Then only root can print and OpenWindows fails to start. ls -l /dev/null lrwxrwxrwx 1 root root 27 Jul 26 20:32 /dev/null -> ../devices/pseudo/mm@0:null ls -l /devices/pseudo/mm@0:null crw------- 1 lp sys 13, 2 Jan 16 18:28 mm@0:null FIX:

chmod 666 /dev/null chown root /dev/null chgrp sys /dev/null

You can change permissions on the link, and it will take effect on the actual file /devices/pseudo/mm@0:null

ls -l /devices/pseudo/mm@0:null crw-rw-rw- 1 root sys 13, 2 Feb 12 16:03 /devices/pseudo/mm@0:null

11) WHERE IS THE PRINTER CONFIGURATION STORED?

The information that used to be in the printcap file is now stored in /etc/lp/printers/printerName/configuration. Do not edit the file by hand, because the information is stored in memory when the lpsched daemon starts up. The file is created by the lpadmin command and can be modified by the same command. The information in the file is useful for debugging print problems. If the file is modified by hand, stop and restart lpsched.

Here is a remote example: Content types: any Printer type: unknown

Page 76: help

Remote: austin

This is a local example: Banner on Content types: postscript Device: /dev/bpp0 Interface: /usr/lib/model/standard Printer type: PS Modules: default

12) WHAT IS THE DIFFERENCE BETWEEN BSD AND S5 PROTOCOLS?

Solaris 2.x systems can receive and send both S5 and BSD print jobs. BSD uses port 515 and S5 uses port 2766. Because S5 will be EOL (end of life) soon, use the BSD protocol and add the following options to the /etc/lp/Systems file.

Change the server entry in /etc/lp/Systems on the client from: server:x:-:bsd:-:n:10:-:-: to: server:x:-:bsd:-:n:10:SVR4-Extensions:-: and restart lpsched.

By default the BSD print protocol has no provisions to pass S5 options across the wire, that is, -o or -T, unless there is specific knowledge of that option. There is an undocumented enhancement to the BSD protocol that allows the passing of arbitrary S5 options.

13) HOW DO I CHANGE THE BAUD RATE FOR MY PRINTER?

# lpadmin -p yourprinter -o "stty=19200"

or for a HP PCL type plotter:

# lpadmin -p plottername -o "stty='19200 -opost'"

14) LOCAL PRINTING WORKS, BUT I CANNOT PRINT FROM A REMOTE TO THIS SYSTEM

Verify the tcp listeners are running: # pmadm -l -p tcp

PMTAG PMTYPE SVCTAG FLGS ID <PMSPECIFIC> tcp listen 0 - root \x00020ACE000000000000000000000000 - c - /usr/lib/saf/nlps_server # tcp listen lp - root - - p - /var/spool/lp/fifos/listenS5 # tcp listen lpd - root \x00020203000000000000000000000000 - p - /var/spool/lp/fifos/listenBSD #

Page 77: help

If these services are not running, set up a local printer on the print server with admintool and delete the local printer. The TCP listeners will now be enabled and will restart if you reboot.

Command line to setup the listeners:

# sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v \ `nlsadmin -V` -n 9999 # pmadm -a -p tcp -s lp -i root -m `nlsadmin -o \ /var/spool/lp/fifos/listenS5` -v `nlsadmin -V`

# pmadm -a -p tcp -s lpd -i root -m `nlsadmin -o \ /var/spool/lp/fifos/listenBSD -A \ '\x00020203000000000000000000000000'` -v `nlsadmin -V`

# pmadm -a -p tcp -s 0 -i root -m `nlsadmin -c \ /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` -v \ `nlsadmin -V`

15) HOW DO I SET UP NETWORK PRINTERS ON SOLARIS?

Use the printer manufacturer's spooling software to install, set up, and maintain printers that have their own ip address. Often the software is available for free from the manufacturer of the network card for the printer. If the software is available in both system V and BSD, get the BSD version. The software has scripts to set up and manage the printer queues. There are a few printers that can speak BSD protocol without software, but these printers will usually report faulted when lpstat is run. Without spooling software, the print jobs will often restart after ten to twenty pages.

16) COMMAND LINE LOCAL PRINTER SETUP

lpadmin -p printername -v /dev/cua/b

chmod 600 /dev/cua/b chown lp /dev/cua/b chgrp lp /dev/cua/b

lpadmin -p printername -T PS -I postscript -h cd /etc/lp/fd Install he filters:

lpfilter -f download -F download.fd lpfilter -f dpost -F dpost lpfilter -f postio -F postio.fd lpfilter -f postior -F postior.fd lpfilter -f postprint -F postprint.fd lpfilter -f postreverse -F postreverse.fd lpfilter -f postdaisy -F postdaisy.fd lpfilter -f postdmd -F postdmd.fd lpfilter -f posttek -F posttek.fd lpfilter -f postplot -F postplot.fd lpfilter -f postmd -F postplot.fd

Page 78: help

accept printername enable printername

Set up network listeners to print from remote systems:

# sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v \ `nlsadmin -V` -n 9999 # pmadm -a -p tcp -s lp -i root -m `nlsadmin -o \ /var/spool/lp/fifos/listenS5` -v `nlsadmin -V`

# pmadm -a -p tcp -s lpd -i root -m `nlsadmin -o \ /var/spool/lp/fifos/listenBSD -A \ '\x00020203000000000000000000000000'` -v `nlsadmin -V`

# pmadm -a -p tcp -s 0 -i root -m `nlsadmin -c \ /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` -v \ `nlsadmin -V`

PRINTING IN LANDSCAPE

To print in landscape, you need a Postscript printer and you must be printing an ASCII file. Files that are already Postscript have their orientation fixed in the Postscript code.

Example: /usr/openwin/bin/mp -l ascii_file (prints 2 pages on 1)

Example: usr/lib/lp/postscript/postprint -pl -l 46 file_ascii | lp (prints 46 lines on a page)

Example: lp -y landscape ascii_file (only works when the printer type is set to postscript on Solaris)

Example: alias land '/usr/lib/lp/postscript/postprint -pl -l 46 !^ | lp' ( C-Shell alias to print landscape)

How to set up a remote printer from the command line.# lpsystem -t bsd servername (Always use bsd!)

This # lpadmin -p printername -s servername or # lpadmin -p localname -s server\!remotename (different local and remote names)

# lpadmin -p printername -T unknown -I any

# accept printername

# enable printername

How to set up a printer alias.Login as the root user and enter the following commands:

Page 79: help

# lpadmin -p oldname -c alias_name # accept alias_name destination "alias_name" now accepting requests

How to permanently disable the banner page on a printer.cd /etc/lp/interfacesvi your_printernameChange line 332 from: nobanner="no" to: nobanner="" or: nobanner="yes"

What do I set my printer type to?There are 3 types of printers that are commonly used on Solaris 2.x workstations: Postscript, HP Laserjet compatible, and ASCII line printers.

For remote printing, always set your printer type to unknown and file content type to any.

For local printers of postscript type, set the printer itself to PS or postscript only. On the Sun, set the file content type to "postscript" and the printer type to "PS".

Postscript example: lpadmin -p printerName -T PS -I postscript

For HP Laser compatible PCL ASCII type printers, set the printer type to hplaser and the file content type to simple.

If you are printing HP PCL files, the printer type must be unknown and file content type simple. Then you must run the following command for PCL file to prevent carriage returns at the end of each line in the PCL file: lpadmin -p printerName -o "stty=-opost"

HP PCL example: lpadmin -p printerName -T hplaser -I simple

For ASCII line printers, set the printer type to ibmproprinter or epson2500 and the file type to simple.

Line Printers: lpadmin -p printerName -T ibmproprinter -I simple

Solaris 2.X / SunOs 4.X printing command comparisonFunction Solaris 2.x SunOS 4.x ------------------------------------------------------------------------------ Print a file on a specified lp -dprinter file lpr -Pprinter file printer Look at the printer queue lpstat -pprinter lpq -Pprinter Remove a job from the queue cancel jobnum lprm -Pprinter jobnum

Page 80: help

Control printer functions lpadmin lpc Define printer functions terminfo database /etc/printcap Spooling directories /var/spool/lp /var/spool Move print queues between lpmove *NA* printers

Stop queuing to a printer reject lpc disable Stop printing to a printer disable lpc stop Start queuing to a printer accept lpc enable Start printing to a printer enable lpc restart ------------------------------------------------------------------------------

What is the difference between BSD and S5 print protocols?Solaris 2.x systems can receive and send both S5 and BSD print jobs. BSD uses port 515 and S5 uses port 2766. Because S5 will be EOL (end of life) soon,use the BSD protocol and add the following options to the /etc/lp/Systems file.

Change the server entry in /etc/lp/Systems on the client from: server:x:-:bsd:-:n:10:-:-: to: server:x:-:bsd:-:n:10:SVR4-Extensions:-: and restart lpsched.

By default the BSD print protocol has no provisions to pass S5 options across the wire, that is, -o or -T, unless there is specific knowledge of that option. There is an undocumented enhancement to the BSD protocol that allows the passing of arbitrary S5 options.

Configuring a Plotter with Solaris Printer Manager or command line.These steps will create a print queue with no filtering by the lp system.Most plotters use a special language. The application used with the plotter generates output in this language. The lp system does not change or format data in a plot job if you set "stty=-opost" for the port andselect printer type unknown and file content type any.

The strategy described below has worked successfully with Hewlett-Packard plotters and Calcomp plotters, as well as plotters that emulate these.

1a. Create the printer queue for the plotter with the Printer Manager, under Admintool.

Page 81: help

Choose the following values:

Printer Type: Unknown

File Contents: Any

Enable Print Queue: Yes

Accept Print Jobs: Yes

1b. Command line for above: lpadmin -p plottername -v /dev/cua/a -T unknown -I any lpadmin -p plottername -h chmod 600 /dev/cua/a chown lp /dev/cua/a chgrp lp /dev/cua/a accept plottername enable plottername

2. Disable the banner on the queue for the plotter that was created in step one. If the banner is not disabled, it will interfere with the plot job.

The most dependable way to turn off the banner is to edit the interface file for the queue. Log in as root and find the interface file that belongs to the queue. This file is in the /etc/lp/interfaces directory, and has the same name as the queue itself.

cd /etc/lp/interfaces # vi plottername

where "plottername" is the name of the print queue.

Within this file, search on "nobanner." By default, this line has a "no" value. Change "no" to "yes."

default: nobanner="no"

after editing: nobanner="yes"

3. If the plotter is on a serial port, verify the port settings. Default settings are 9600 baud, 8 bit word size and no parity. These are the same options as used in a printcap file in the ms line as shown :ms=-parity, cs8, -opost: The -opost is required for printing PCL plot files only.

For a serial port speed higher than 9600 you must add the baud rate to the stty option also. Use the lpadmin command to change the settings if necessary.

For example:

Page 82: help

# lpadmin -p HP_plotter -o "stty=-opost" (All PCL plotters require this)

or: # lpadmin - HP_plotter -o "stty='-opost 19200 cs7'" (This sets 7 bits, even parity 19200 baud, and -opost)

If the plotter is plotting hppcl or hpgl files you must disable opost:

# lpadmin -p HP_plotter -o "stty=-opost"

***** IMPORTANT *******

If you need to modify more than 1 setting with the stty command they MUST be entered at the same time:

# lpadmin -p HP_plotter -o "stty='19200 -opost'"

4. Verify the plotter's hardware setup and cables. Set the plotter to:

Robust xon=off RS232 connection 9600 Baud 8 bits no parity one stop bit xon/xoff flow control DTR polarity Hi Use a cable with pins 2 and 3 crossed and 7 straight through.

5. Test the cable and plotter settings with the cat command: cat file > /dev/cua/a

for stty setting use: (/usr/ucb/stty -opost; cat PCL_file) > /dev/cua/a

Test a plotter at 19200 baud: (/usr/ucb/stty -opost 19200; cat PCL_file) > /dev/cua/a The -opost settings are needed for printing PCL plot files only. If the cat command does not print the file, check the cable and the plotter settings. The cat command must work for printing to be successful.

If cat hangs, check for login on the port. To disable login: lpadmin -p plottername -h (this sets the port for no logins)

The /dev/cua/a device is not affected by the eeprom setting for carrier detect: "ttya-ignore-cd=true". If this setting is false and the printer device is /dev/term/a, the port will not open. Using the /dev/cua/a device eliminates this problem.

Page 83: help

How to print a file in landscape mode.To print in landscape, you need a postscript printer and you must be printing an ASCII file. Files that are already postscript have their orientation fixed in the postscript code.

Example: /usr/openwin/bin/mp -l ascii_file (prints 2 pages on 1)

Example: usr/lib/lp/postscript/postprint -pl -l 46 ascii_file | lp (prints 46 lines on a page)

Example: lp -y landscape ascii_file (only works when the printer type is set to postscript on Solaris)

Example: alias land '/usr/lib/lp/postscript/postprint -pl -l 46 !^ | lp' ( C-Shell alias to print landscape)

Customizing mail printing from CDE's dtmailTo customize printing from the dtmail application, you need to go throughthe following steps:

Note: First and most important, close dtmail (the mailer application) if it is open.

Locally (specific user)=======================1. Using your favorite editor, create the following file: $HOME/.dt/types/dtmail.dt

2. Enter the following lines into this file:

# # Override default Print action for mailboxes # ACTION Print { LABEL Print ARG_TYPE DTMAIL_FILE TYPE COMMAND WINDOW_TYPE NO_STDIO EXEC_STRING sh -c 'dtmailpr -p -f %(File)Arg_1% | mp -m -l | dtlp -u %(File)Arg_1%;' }

3. Modify the EXEC_STRING to include the print commands you want. The current format allows you to print your mail documents in PostScript format (mp -m -l) in landscape mode.

4. Restart dtmail from either the frontpanel/menu, or by typing /usr/dt/bin/dtmail &

Globally========

Page 84: help

1. Issue the command mkdir -p /etc/dt/types This will create the directory listed.

2. Then cp /usr/dt/appconfig/types/C/dtmail.dt /etc/dt/types/dtmail.dt

3. Using your favorite editor, edit the file: /etc/dt/types/dtmail.dt

4. Search for the line "ACTION Print" and change the EXEC_STRING line to whatever you want. You can replace it with the EXEC_STRING listed above step #2 under locally. Save the file.

5. Restart your window manager by clicking on the right mouse button in the background and selecting: Restart Workspace Manager.

6. Start dtmail.

How to set up a Tektronix Phaser 550 printer.A Tektronix Phaser 550 network printer can be integrated within a Solaris or SunOS environment. Unlike other printer manufacturers (HP and QMS)this Tek network printer DOES NOT require any special software for standardUNIX printing (ie.no options). To utilize the special features of the printer (i.e. landscape, color correction) will require installing Tektronix network printer software called "Phaser Print 2.0". This software allows you to add/delete/manage the printer. It also includes a special print command called "tekprint" to specify printer options. Est. $495.00. For more information contact the Textronix hotline (800-835-6100).

This printer supports PS, PCL and HPGL languages and has an Auto modewhich will auto select between languages. To do so you must contact Tektronix for authorization codes. This is free!

The printer's configuration page will show which languages are "NotAuthorized".

Solaris configuration---------------------

1. Assign a hostname for the printer's IP address in /etc/hosts.

<printer's IP addr> tek550

2. Add the printer.

# /bin/sh# lpsystem -t bsd tek550# lpadmin -p phaser -s tek550!<xxxx> -I <yyyy># enable phaser# accept phaser

<xxxx> = AUTO (auto language switching) Note 1. PS (Postscript) PCL (text) HPGL (HP7475A plotter emulation) <yyyy> = postscript

Page 85: help

any (no filtering, printer selects language) Use with AUTO.

Note 1. The printer must be in auto mode and languages authorized by Tektronix. Call Tektronix's hotline for further clarification.

How to use /home locally (not under automounters control).To tell automount to NOT use /home as an automount point, add the -null entry to /home above +auto_master as follows:

cd /etcvi auto_master

in the file add the following line:

/home -null+auto_master...

Then run "automount -v" to have automounter reread the maps.No one should be logged into /home on this system for the changes to take effect.

Automounter giving an insertion failed error.With the use of automounter, ls -l of a automounted directory is giving thefollowing error:

insertion failed: a problem with the filesystem has been detected: filesystem is probably fullSOLUTION:Do a df -k to see if the /var directory is 100% full.

Since the /var/statmon directory contains the locks for NFS, the automount will fail if /var is 100% full.

cd /var/adm and do a ls -al. Most likely the messages file will be large. To reduce the size of the file do a null on the file:

cat /dev/null filename

This will reduce the file to 0 bytes.

Once the /var directory is reduced to less than 100% the automount point (ls -l, etc...) should work fine.

Fixing passwd file problemsRun /usr/bin/pwconv.

How to turn on FTP logging to log all FTP commands.First modify /etc/inetd.conf and add -d and -l to the in.ftpd line:

ftp stream tcp nowait root /usr/sbin/in.ftpd in.ftpd -l -d

then restart inetd (preferably with the inetd -t option).

Next change the /etc/syslog.conf file.

Change the line:*.err;kern.debug;daemon.notice;mail.crit;user.none /var/adm/messages

Page 86: help

To:*.err;kern.debug;daemon.debug;mail.crit;user.none /var/adm/messages

Looking for large files on root filesystem.Some large files are filling up the root file system. Some common placesto check: /tmp: If several large files are here, reboot and they will be cleaned out. /dev: Large files might appear here when trying to write to a device and using the incorrect device name (i.e. /dev/rsto instead of /dev/rst0). /: Look for core files. /var: If var is part of the root partition, check for large administration files in /var/adm. Also, some spool files may be left in the /var/spool directories. Check for other large files (over 1mb) with the command: # find /xxx -size +1000000c -xdev -print or look for a large file (or possibly files) in /xxx modified today: # cd /xxx # find . -fstype 4.2 -mtime 0 -ls This will list in long format all files in /xxx modified today, displayingsize first. In both cases, just look for the huge file(s) and remove theoffending one(s) if they can be removed. For example, remove /dev/nsrto(from above), but not /vmunix. The problem could be that a large group of smaller files are filling upthe file system instead a few very large files. If possible, boot the systemin single user mode then cd into each of the directories that are used asmount points. The ls command should not show any files in these unmountedmount points. If files have been placed in a directory that is used as a mountpoint they will not be seen once a file system is mounted to this directory.

Page 87: help

tar archive created with absolute path.Problem:

What do you do if a tar archive has been created with an absolute path?

If a tar file is created with an absolute pathname,a path that starts with /, it must be restored tothe same location. Example: Of a tar file on tape of the directories below /usr/lib/acct which is an absolute path, that must be restored to /usr/lib/acct. # tar cvf /dev/mt/0 /usr/lib/acct If the files need to be restored to another location for some reason (i.e. not enough space, need to compare the backup with current, etc) the system needs to be fooled. To do this create a link that points from the location the tar wishes to restore to and replace it with a link to the destination of choice. Example: Using the tar file from above restore the files to /extra. # cd /usr/lib # mv acct acct.real ! Save the true version of acct directory # ln -s /extra acct ! Make link called /usr/lib/acct to /extra # tar xvf /dev/rmt/0 ! Restore files to link # rm acct ! Remove link # mv acct.real acct ! replace true acct directory The way to avoid these steps is make all tar backups with relative pathnames, a path that does not start with /. Example: # cd /usr/lib/acct # tar cvf /dev/rmt/0 . ! . is a wildcard for the current directory

Page 88: help

How to switch mouse buttons for a left handed person.The command below will switch the buttons from 1 2 3 to 3 2 1xmodmap -e "pointer = 3 2 1"

Using a Floppy on SolarisFor Solaris 1 (SunOS 4.1.3):

Read/Write a DOS floppy: - Insert diskette - Mount /pcfs - Use directory /pcfs as if it was a unix directory - Eject - Eject (yes, twice) Read a tar file directory:

- Insert diskette - % tar tvf /dev/fd0c - % eject Copy a tar file to disk: - Insert diskette - % tar xvf /dev/fd0c - % eject Format a DOS diskette: - Insert diskette - % fdformat -db mylabel - You can change mylabel for any 12 character word Create a tar archive on diskette: - Insert diskette - % tar cf /dev/fd0c file1 ... - % eject - Remember that tar and DOS are incompatible formats. If you write in tar format to a DOS diskette, the DOS files will be destroyed. A DOS file can safely created on a diskette that is a tar file exactly the same way it can be created on any other disk (tar cf /pcfs/file.tar file1). For Solaris 2.x: Read/write a DOS floppy: - Insert diskette - % volcheck - % cd /floppy/floppy0 - Use as /pcfs on Solaris 1 - % eject Read a tar file directory: - Insert diskette - % volcheck

Page 89: help

- % tar tvf /vol/dev/aliases/floppy0 - % eject Copy a tar file to disk: - Insert diskette - % volcheck - % tar xvf /vol/dev/aliases/floppy0 - % eject Format a DOS diskette: - Insert diskette - % fdformat -dUeb mylabel - You can change mylabel to any twelve-character word. Create a tar archive on diskette: - Insert diskette - % volcheck - % tar cf /vol/dev/aliases/floppy0 file1 ... - % eject - Remember that tar and DOS are incompatible formats. If you write in tar format to a DOS diskette, the DOS files will be destroyed. A DOS file can be created safely on a diskette that is a tar file exactly the same way that it can be created it on any other disk (tar cf /floppy/floppy0/file.tar file1).

Page 90: help

Explanation of Late CollisionsThe phrase "transmit late collision" means that while we are still transmitting,someone else started transmitting after the point in time where our packetshould have filled the whole network (25.6µs). A collision should not haveoccurred because anyone trying to send at almost the same time should have seenour signal and backed off.

Possible causes:

1. Network physical length too big/long (100BaseTX cat5 cable longer than 100Meters); the offending sender is outside the legal diameter of the collision domain (more than 25.6µs away)

2. A Network Driver on the LAN does not check to see if someone else is already sending.

3. A link is in full duplex and should not be, or there is a malfunctioning driver. Is Ethernet Driver in 100Mb half-duplex mode and switch/hub is in full-duplex (auto-negotiation problem)? This is the usual cause for heavy and late collisions.

4. Bad cable (preventing someone from seeing our signal) RX pair problem.

5. Bad Network Interface card/Hub port somewhere on the local network. (Our signal is not getting out or we cannot see the other signals.)

6. Intermittant late collisions could just be a power fluctuation on hub or some other system being powered on.

You may wish to obtain a sniffer to determine the culprit in order to resolvethe issue. You will continue to have network problems until the offending systemis identified and the problem is corrected.

The only way to resolve the problem manually is to trace all the hardware,eliminating systems using a binary search or some similar method. This istime consuming and ususally not practical.

Attached is a more detailed description of a "late collision".

What is a late collision?

A late collision occurs when two devices transmit at the same time, but due to cabling errors (most commonly, excessive network segment length or repeaters between devices) neither detects a collision. The reason this happens is that the time to propagate the signal from one end of the network to another is longer than the time to put the entire packet on the network; hence, the two devices that cause the late collision never see that the other is sending until after it puts the entire packet on the network. Late collisions are detected by the transmitter after the first "slot time" of 64 byte times. They are only detected during transmissions of packets longer than 64 bytes. Its detection is exactly like a normal collision; it just happens "too late."

Typical causes of late collisions are segment cable lengths in excess of the maximum permitted for the cable type, faulty connectors or improper cabling, excessive numbers of repeaters between network devices, and defective Ethernet transceivers or

Page 91: help

controllers. Another difficulty with late collisions is that when they occur for small packets, they cannot be detected by the transmitter. A network suffering a measurable rate of late collisions (on large packets) is also suffering lost small packets. The higher protocols do not cope well with such losses and function at a much reduced speed. A one per cent packet loss is sufficeint to reduce the speed of NFS by 90% with the default retransmission timers. That is a tenfold amplification of the problem. Finally, Ethernet controllers do not retransmit packets lost to late collisions.

Note: More Ethernet statistics and debug information can be collected by turning onthe driver's debug mode and examining netstat-k on Solaris 2.x.

Example for le driver: netstat-k | nawk -v RS="" '/le0/'

Turn on le debug in /etc/system: set le:ledebug=1 Example from hme driver: netstat -k | nawk -v RS="" '/le0/' Turn on hme debug in /etc/system: set hme:hmedebug=1

Network errors with ultra2 on 100/full duplex.Cisco Catalyst 5500 100Mbit switchUltra Enterprise 3000 and 4000Ultra 2

Netstat on U2 shows collisions while full dup switched port.Cisco report FCS errors and runt packets.

Note that the Enterprise class system aren't affecterSOLUTION:The same or a similiar problem occured internal to GeoQuest involvingCisco Catalyst 2501 and 2926 ethernet switches.

In our case, the solution was to apply patch 104212-03 and adjustport settings on the switches. 2501 needed to be set to not auto-sense and force 100Mbit, while the 2926 could be left at auto-senseand 10/100Mbit.

Patch 104212-09 has been applied and they have attempted to modify portattributes to get these error to go away to no avail.

SunSolve documents this problem. The problem sounds the same asthe description of patch 104212; there is a faq for ultra1's notauto sensing:

Setting the following options in /etc/system disables the negotiationand forces the card into 100MBit mode.

--------

Page 92: help

* force hme into 100 MBit full duplex modeset hme:hme_adv_100fdx_cap=1* don't negotiate operation mode with the network hubset hme:hme_adv_autoneg_cap=0

----------

If the auto negotiate does not work, then the 100-MB full-duplex modecan be forced to run at 100-MB, Full-Duplex using the following:

Please try (if using /etc/rc2.d/S99...)

ndd -set /dev/hme instance 0 ndd -set /dev/hme adv_100T4_cap 0 ndd -set /dev/hme adv_100fdx_cap 1 ndd -set /dev/hme adv_100hdx_cap 0 ndd -set /dev/hme adv_10fdx_cap 0 ndd -set /dev/hme adv_10hdx_cap 0 ndd -set /dev/hme adv_autoneg_cap 0

or (if using /etc/system)

set hme:hme_adv_autoneg_cap=0 set hme:hme_adv_100T4_cap=0 set hme:hme_adv_100fdx_cap=1 set hme:hme_adv_100hdx_cap=0 set hme:hme_adv_10fdx_cap=0 set hme:hme_adv_10hdx_cap=0

----------

How do you tell if the hme interface is actually linked up at 10 Mbps or 100Mbps?

Answer:

# ndd -get /dev/hme link_status # ndd -get /dev/hme link_speed # ndd -get /dev/hme link_mode

link_status (read only) 0 for Link Down 1 for Link up

link_speed (read only) 0 for 10 Mbps 1 for 100 Mbps

link_mode (read only) 0 for Half-Duplex mode 1 for Full-Duplex mode

Page 93: help

Installing NIS on Servers and ClientsMaster Server: 1) Install the NIS kit packages. From the appropriate directory on the NIS kit CDROM runmaster# pkgadd -d . 2) Set the domainname. master# domainname geoquest.slb.com 3) Run ypinit for the Master master# /usr/sbin/ypinit -m master Here, "master" is the name of the master server.ypinit will ask you for a list of all servers. This isrequired to build the ypservers map. The slave servers you list should be added immediately after ypinit finishes. 4) Start ypserv. master# reboot OR master# /etc/init.d/yp stopmaster# /etc/init.d/yp start Slave Server: 1) Install the NIS kit packages. From the appropriate directory on the NIS kit CDROM runslave# pkgadd -d . 2) ypserv should be running on the master server. master# ps -ef | grep ypservroot 24106 1 1 Jun 05 ? 89:43 /usr/lib/netsvc/yp/ypserv -d If ypserv is not running, start and stop yp as above. 3) Set the domainname. slave# domainname geoquest.slb.com 4) Run ypinit for the Slave slave# /usr/sbin/ypinit -s master Again, "master" is the master server. 5) Start ypserv. slave# reboot

Page 94: help

OR slave# /etc/init.d/yp stopslave# /etc/init.d/yp start Clients: 1) ypserv should be running on the master and all slaves. 2) Set the domainname. client# domainname geoquest.slb.com 3) Run ypinit for the client. client# ypinit -c master 4) Reboot your client once ypinit completes. ypinit -c must also be run on the servers to make them NIS clientsas well.

Page 95: help

Adding a Slave Server to NIS.On Master Server: master# ypcat -k ypservers > /tmp/ypservers Edit /tmp/ypservers and add the new slave server. Then recreate the ypservers map:master# cd /var/ypmaster# cat /tmp/ypservers | makedbm - /var/yp/`domainname`/ypservers On Slave Server: Install the NIS kit. Run ypinit for the Slave: slave# /usr/sbin/ypinit -s master Start ypserv by rebooting or slave# /etc/init.d/yp stopslave# /etc/init.d/yp start

You will also want to setup the slave as a client of the master:

slave# /usr/sbin/ypinit -c master

ypcat passwd responds with error message "can't communicate with ypbind."ypcat passwd" returns with error message "can't communicate withypbind"

1. Confirmed ypbind process is running.

2. Check permissions of /var/yp/binding/ypbind.pid.ls -l /var/yp/binding/ypbind.pid -r-------- 1 root root 3 Dec 1 07:40 ypbind.pid

Type umask at the prompt.Returned 077. umask should be 022.SOLUTION:

Set umask for root back to 022.

/var/yp/binding/ypbind.pid must be readable by all groups and everyone.

1. su - 2. umask should return 00223. If it does not, type umask 022 to set the umask for root or set it up in the .cshrc or .profile file.

4. chmod 444 /var/yp/binding/ypbind.pidExample:ls -l /var/yp/binding/ypbind.pid -r--r--r-- 1 root root 3 Dec 1 07:40 ypbind.pid

Page 96: help

tcopy only copies the first file of a source tape to target drive.Using Solaris 2.X, tcopy only copies the first file of a tape rather than thewhole tape as the command is supposed to. Multiple requests to tcopy withthe "no rewind devices" option will copy the tape, but take more space on the destination.The tcopy utility uses Berkeley-compatible device names. With Berkeley-compatible device names, tcopy correctly copies the entire tape. Use: tcopy /dev/rmt/1b /dev/rmt/2b rather than : tcopy /dev/rmt/1 /dev/rmt/2

cron jobs are not running.PROBLEM:Te crontab file (in /var/spool/cron/crontabs) has been edited manually.

SOLUTION:To add new entries into the crontab file, crontab -e should be used.

To recover from this problem:

- kill -9 <cron_pid> (where <cron_pid> is the process id of the cron daemon - rm /var/spool/cron/FIFO- restart cron daemon by typing "cron"

How to set the BackSpace key to ^H.To set the BackSpace key to be ^H:

1. In "text windows" (cmdtool, textedit) in your $HOME/.Xdefaults file, add the following line :

Keyboard.DeleteChar: ^H

2. In "tty" windows (shelltool) use the stty command:

stty erase ^H

No manual entry for

This is how to do it.

alias Man 'nroff -man ./\!* | more'

Man fred.1

Putting this alias in your .cshrc may not be such a bad idea.

RPC: Program not registeredWhen trying to mount an NFS file system from an NFS server, the mount fails with the error message:

Page 97: help

mount:<server>:/filesystem not responding: RPC: Program not registered

Solation:The server that you are trying to mount from may not have the rpc.mountd and nfsd daemons running.

NFS mount fails with "RPC: Program not registered" error message.Edit the file /etc/dfs/dfstab in order to make files automatically export on a Solaris system. The standard syntax of lines in that file is:

share -F nfs partition

For example, the following /etc/dfs/dfstab file is for a server that makes available the file systems /usr, /var/spool/mail and /home:

share -F nfs /usr share -F nfs /var/spool/mail share -F nfs /home

You may add normal mount options to these lines, such as ro, rw and root. This is done by preceding the options with a -o flag. These options are fully described in the share man page. The following example shows our /etc/dfs/dfstab file, but this time with the filesystems all being exported read only:

share -F nfs -o ro /usr share -F nfs -o ro /var/spool/mail share -F nfs -o ro /home

If your machine is already exporting filesystems, and you are adding a new one, you should simply run the shareall command to make this new filesystem available:

% shareall

If you have never exported filesystems from this machine before, you need to run the nfs.server script:

% /etc/init.d/nfs.server start

(The NFS Server will come up fine on the next boot, now that an /etc/dfs/dfstab file exists.)

How to pull one file from compressed tar fileIf you need to pull a single executable of a CD that is distributed with compressed tar files, then uncompress:

uncompress -c /cdrom/ies_iesx_905/sun4_level_9p0.tar.Z | tar xvf - iesxprog/synview

This is an example from an IES executable called synview.

How to print wide file (> 80 char) without truncating.The first option is the command below:

/usr/lib/lp/postscript/postprint -p l -l -49 <filename> | lp -d <printername>

Check out the UNIX man file on postprint for additional options.

You can also modify the prologue file for use with mp, but this is more work.It gives the usual "pretty" mp output, with header and user name.

1. cp /usr/openwin/share/xnews/client/mp/mp.pro.ps to your home directory.

Page 98: help

2. In $HOME/mp.pro.ps, change the lines/LandscapeMode false def

to

/LandscapeMode true def

and

%%LineLength 80

to

%%LineLength 160.

3. Then, mp -p $HOME/mp.pro.ps <filename> | lp -d <printername>

Page 99: help

How to tell which processes are keeping a filesystem busy.Sometimes it is not possible to unmount (umount) a filesystem, since the system will complain that that filesystem is busy. A filesystem will be considered busy if there are processes that are using open files on the filesystem.

It is possible to find out which processes have open files on the filesystem you want to unmount. This allows you to contact the owners of the processes, or kill off the offending processes.

The fuser(1M) command will report back on processes that have a file or filesystem open. If you want to see which processes are using a particular filesystem, use the "-c" option with fuser.

% /etc/fuser -c /cdrom/cdrom0 /cdrom/cdrom0: 307c 279c

In this case, processes 307 and 279 are using the cdrom. The "c" means that these processes are using the cdrom as their current directory. An "o" would mean the process had an open file. For other codes, see the man page (man fuser).

It is possible to use fuser to send a SIGKILL signal to all the process using a pariticular filesystem. This is done with the -k option. Note that only root can kill another user's processes.

# fuser -k /cdrom/cdrom0

This would kill processes 307 and 279.

What are the .nfs### files?They are created when an NFS client deletes a file which is open (and therefore cannot really be deleted). Each is renamed to .nfs<some number>.

They get cleaned up by a cron job:

su % crontab -l ... 15 3 * * * /usr/lib/fs/nfs/nfsfind ...

% cat /usr/lib/fs/nfs/nfsfind ... if [ ! -s /etc/dfs/sharetab ]; then exit ; fi

for dir in `awk '$3 == "nfs" {print $1}' /etc/dfs/sharetab` do find $dir -name .nfs\* -mtime +7 -mount -exec rm -f {} \; done

probe-scsi command hanging on an Ultra.To run probe-scsi successfully on an Ultra, set the OBP variable"auto-boot?=true" to "auto-boot?=false".

<ok> setenv auto-boot?=false

then reset the system

<ok> reset

This will reset to the <ok> prompt, now probe-scsi will work, then reset auto-boot? to true if necessary.

Page 100: help

Recreating /dev /devices path_to_inst when there is no backup.When your /dev or /devices directories are corrupted or deleted you won't be able to boot your system. You can recreate them from mini-root as follows:

boot cdrom -swMount your root slice to /acd /tmp/devtar cvfp - . | ( cd /a/dev; tar xvfp - )cd /tmp/devicestar cvfp - . | ( cd /a/devices; tar xvfp - )cd /tmp/root/etccp path_to_inst /a/etc/path_to_insthaltboot

How to disable/enable tpe/hme link tests on Ultra Series.To enable or disable the tpe/hme link test, you must know the device name.

Solution 1: If the system is up, log in as root and do the following:

#more /etc/path_to_inst | grep hme

You should see something like this:

/sbus@3,0/SUNW,hme@,8c00000

The above is to see whether you have hme or not.

(You can do the same for the other device names, too.)

#eeprom nvramrc="probe-all install-console banner apply disable-link-pulse device-name"#eeprom "use-nvramrc?"=true#reboot the system when it is convenient to make the above changes!

NOTE:device-name is the device you want to enable or disable(hme/be/le).

Solution 2: How to do this at the PROM level?

ok nvedit0: probe-all install-console banner1: apply disable-link-pulse device-name

(repeat the above step for the other device names to be added)

press CONTROL-C to exit nvedit.

ok nvstoreok setenv use-nvramrc? true

Forcing a speed of a second ethernet HME cardThis is used where one hme card needs to be on 100mbs net and the other is on a 10mbs net with a hub that does not autonegotiate.SOLUTION:

Page 101: help

At the OK prompt after halting the machine, find the new device path. The command show-devs does this. To ensure the right device use the watch-net-all to see which card is not receiving traffic.

OK show-devsOK watch-net-allOK nvedit 0: probe-all install-console banner 1: apply transfer-speed=10 <path_to_new_device> 2: <CTRL>-COK nvstoreOK setenv use-nvramrc? trueOK reset

Then follow the instructions for adding a second network card in the OS.

Getting CDE to run properly on two monitors.(a) If you are running on one monitor and the graphics look good: 1. vi /etc/dt/config/Xservers 2. Comment out the following line: :0 Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner 3. Uncomment the following line: :0 Local local_uid@console root /usr/openwin/bin/X -dev /dev/fb0 -dev /dev/fb1 4. Type command "cp /etc/dt/config/Xservers /usr/dt/config/Xservers" 5. cd /etc/rc2.d 6. Type command "./S99dtlogin stop" (This will bring you to the terminal setting and will log you out.) 7. Log back in as root, cd /etc/rc2.d, and type ./S99dtlogin start 8. This will launch CDE, now on two screens.

(b) After booting your disk, the dtlogin should show on the screen. Instead the screen flashes white. This usually occurs when CDE had been running on two screen, but now only one monitor is attached.

1. You do NOT need to press <Stop A> 2. If you press return a few times, a login prompt will appear even with the screen's flashing. 3. Log in as root. 4. cd /etc/rc2.d and ./S99dtlogin stop 5. The flashing should stop. 6. cd /etc/dt/config/ and comment out and in the appropriate lines 7. cd /etc/rc2.d and ./S99dtlogin start and log back in CDE should now work properly

How do I modify CDE dashboard?To remove the lock icon from the front panel:

Put this file in $HOME/.dt/types Name this file dtwm.fp

CONTROL Lock{ TYPE icon CONTAINER_NAME Switch CONTAINER_TYPE SWITCH POSITION_HINTS 1 ICON Fplock LABEL Lock PUSH_ACTION LockDisplay HELP_TOPIC FPOnItemLock HELP_VOLUME FPanel DELETE True

Page 102: help

} Then restart the window manager.

The line that says delete is what removes the button.

How to enable/disable CDE on Solaris.Boot the machine in single user mode.

For a Sparc or PowerPC machine do a 'boot -s' at the OpenBoot prompt.

For an Intel machine do a 'b -s' at the "Select (b)oot or (i)nterpreter:" prompt.

After logging in as root, change to the /usr/dt/bin directory. If it isn't available, you may have to mount it. Normally this would be done via a 'mount /usr' command, but this can change according to your partitioning scheme.

To disable the graphical login, use the command: './dtconfig -d' If you are re-enabling the login, after having disabled it before, use the command: './dtconfig -e'

If your graphics adapter is working fine, but you want to disable CDE and the graphical login, you can do that by the command '/usr/dt/bin/dtconfig -kill'. Note that this will kill the dtlogin and anything that is a child of it, so if you do this from within CDE itself you will be logged out of that session. You can then log back in and do the '/usr/dt/bin/dtconfig -d' command.

It is worth checking the man page for dtconfig for its other options. You will probably need to add '/usr/dt/man' to your 'MANPATH' environment variable, before it can be viewed.

What file controls root menu on CDE?$HOME/.dt/dtwmrc

How to check if OpenGL has been installed.In order to run GeoViz on a Sun with Creator 3D Graphics, OpenGL libraries must also be installed.

To check, type in:

/usr/openwin/demo/GL/ogl_install_check

If OpenGL libraries are installed, a spinning colored wheel will be in one window. In another window will be information on the libraries. For fun, hit the space bar.

How to add an Iomega zip drive to a Sun box.In order to attach an Iomega zip drive to a Sun box, it is necessary toperform the following steps:

(1) Add an entry to the /etc/format.dat file.

The entry should read as the following:

disk_type = "Zip 100" : ctlr = SCSI : ncyl = 2406 :acyl = 2 : pcyl = 2408 : nhead = 2 : nsect = 40 : rpm = 3600 : bpt =20480partition = "Zip 100" \ : disk = "Zip 100" : ctlr = SCSI : 2 = 0, 192480

Page 103: help

The format.dat file comes with the Solaris operating system and outlines some default formats for a large variety of disks which may be attached to the system. However, an entry for Iomega zip drives does not come by default with the OS, so we have to add it.

(2) Bring the machine down by becoming root and typing at the root prompt:

# init 0

(3) If the zip drive is to be the end of the SCSI chain, flip the termination switch on the zip drive.

(4) Attach the zip drive to the Sun box.

To make the hardware recognize the device, you should type "reset-all" at the <ok> prompt.

>ok reset-all

(5) You can then check to make sure that the zip drive is seen at the hardware level by typing "probe-scsi-all" at the <ok> prompt.

>ok probe-scsi-all

(6) Once the hardware recognizes the zip drive you should perform a reconfiguration boot of the machine.

ok> boot -r

Once the machine has booted, log in as root.

(7) Perform a "format" command. You should see a disk corresponding to the zip drive target ID.

(8) Label the zip drive. If using the floppy which came with the zip drive, it will be read-only.

(9) You now need to mount the zip drive. Edit the /etc/vold.conf file by commenting out the line starting "usr rmscsi...", which should already be commented out by default.

(10) Kill and restart the vold volume daemon if any changes were made to /etc/vold.conf.

(11) Mount the zip drive as "mount -r -F pcfs /dev/dsk/c<controller>t <target id>d0s2:c /mnt".

IESX colors and fonts wrong.PROBLEM:When launching the IESX application, the background window color is not grey but grey-blueish and fonts look wrong. Also a scroll bar may be out of place.

his is an application default problem.

cd /home/gqs/setup_10pX (where X=current version number)

then

cp GQS IESX /usr/openwin/lib/app-defaults

Restart IESX.

Troubleshooting Sun client 2.x Remote/Network Printer problems.PROBLEM:

Page 104: help

This reference document is based around a Sun client running Solaris 2.x to a remote Sun print server running Solaris 2.x or to a network (ethernet) based printer.SOLUTION:

If you are experiencing problems either configuring a remote printer or a remote printer that has faulted try the following suggestions.Solaris 2.x. You should see three TCP lines. Note: The output below has been abbreviated. # pmadm -l PMTAG PMTYPE SVCTAG tcp listen lp tcp listen 0 tcp listen lpd # sacadm -p tcp -l PMTAG PMTYPE RCNT STATUS COMMAND tcp listen 999 ENABLED /usr/lib/saf/listen tcp # This line MUST say enabled. If not, try removing the port monitor and restarting it. Here's how: sacadm -r -p tcp sacadm -a -p tcp -t listen -c "/usr/lib/saf/listen tcp" -v `nlsadmin -V` -n 999

pmadm -a -p tcp -s 0 -i root -m `nlsadmin -c /usr/lib/saf/nlps_server -A '\x00020ACE000000000000000000000000'` -v `nlsadmin -V` pmadm -a -p tcp -s lp -i root -m `nlsadmin -o /var/spool/lp/fifos/listenS5` -v `nlsadmin -V` pmadm -a -p tcp -s lpd -i root -m `nlsadmin -o /var/spool/lp/fifos/listenBSD -A '\x00020203000000000000000000000000'` -v `nlsadmin -V` sacadm -s -p tcp 3.) Verify there is an active tcp service on the client and the print server. # netstat -a |grep printer *.printer *.* 0 0 0 0 LISTEN 4.) Remove and readd the printer using admintool. Make sure of the spelling of the remote printer and remote print server's hostname.\

Page 105: help

Root can't chmod files on nfs directory.PROLBEM:As the root user I cannot chmod files. They are on a remote disk.This is a security feature. A root user sitting on a remotedisk is effectively user "anonymous" or "nobody" for fileaccess on that disk. Access is prevented by the server.

SOLUTION:

To allow remote root access one must export or share the disk to allow this activity. In the /etc/dfs/dfstab file add the option

anon=0

to the share statement.

Then run unshareall and then shareall to reset the share resource.

This rule goes as well for SGI IRIX but the file is/etc/exports.OR If you do not share the disk from the file server with root permissions, you will not have root access from NFS clients. To ensure that your clients have root access, share the disk in /etc/dfs/dfstab as follows:

share -F nfs -o root=client1,client2,client3 /export/home/server/data1

Or share with root access to all clients,

share -F nfs -o anon=0 /export/home/server/data1

Permission denied or no such file or directory on NFS.If you know a disk is online on the server but a client cannot access that resource, it may need to be unshared and reshared.

SOLUTION:As root:

# unshareall# shareall

This occurs due to bugs and system administrator error. The bug behavior has been fixed for some time.

It is more likely to see this problem if a physical disk has been unmounted and remounted without unsharing and resharing.

Error "can't decode result" when listing files.PROLBEM:You get this error message when trying to list filesin a NFS filesystem, and your client is a Sun and serveris an SGI both using NFS version 3.

SOLATION:This means you have encountered a Sun vs. SGI incompatibility.

To fix, edit on the SGI file server /etc/exports and add to the options field "32bitclients"

For example in the /etc/exports file it reads:

/usr/local #export /usr/local to the world

Page 106: help

change to

/usr/local -32bitclients

and reboot

How can you tell what speed an hme card is using?Some network equipment allows hme interfaces to auto-negotiate a connection at either 10 Mbps or 100 Mbps. How can you tell from the command line what speed the hme interface is using?

SOLUTION:1. Log in as root.

2. ndd /dev/hme link_speed

The hme is connected at 10 Mbps if the command returns 0, 100 Mbps if the command returns 1.

How to configure multiple IP addresses on one physical interface.In order to configure the lance ethernet (le0) device to support more than one ip address, do the following:

1. Create entries in /etc/hosts for each hostname your physical machine will appear as.

128.195.10.31 myhost 128.195.10.46 myhost2 128.195.10.78 myhost3 2. Create /etc/hostname.le0:n files that contain the hostname for the virtual host n. Note that hostname.le0:0 is the same as hostname.le0 /etc/hostname.le0 (Contains name myhost) /etc/hostname.le0:1 (Contains name myhost2) /etc/hostname.le0:2 (Contains name myhost3)

The above changes will cause the virtual hosts to be configured at boot time.

You can also directly enable/modify a logical hosts configuration by running ifconfig directly on one of the logical hosts by using the le0:n naming scheme.

% ifconfig le0:1 up % ifconfig le0:1 129.153.76.72 % ifconfig le0:1 down

Two Ultra60 installed at my client site always complains that its link was up and down all the time.Two Ultra60 installed at my client site always complains that its link was up and down all the time.

SUNW,hme0: 100 Mbps half-duplex Link UpSUNW,hme0: Link upSOLUTION:Recently we had a bad patch cable that would not work on 100baseT, also a card that failed to autonegotiate properly (hw problem). Try a network point from where another workstation works fine at 100fdx, also you can swap the network cards (if not on motherboard).I would suspect the cabling and the card.

The quick hme 10/100 link up/down troubleshooter:

Page 107: help

- Make sure you have SUNWhmd and SUNWhmdu installed (you do)- Check the appropriate patch for your OS version (looks like you did)- Get a console onscreen so you can see the link up/down messages- Use ndd to force 10baseT half-duplex (you say this works)ndd -set /dev/hme adv_100fdx_cap 0ndd -set /dev/hme adv_100hdx_cap 0ndd -set /dev/hme adv_10fdx_cap 0ndd -set /dev/hme adv_10hdx_cap 1ndd -set /dev/hme adv_autoneg_cap 0 #This triggers the change# also you can unplug the cable andd plug it back in- If it does not work it may be the card (motherboard?) or a cable try another card or network point.- use ndd to force 100baseT half-duplexndd -set /dev/hme adv_100fdx_cap 0ndd -set /dev/hme adv_100hdx_cap 1ndd -set /dev/hme adv_10fdx_cap 0ndd -set /dev/hme adv_10hdx_cap 0ndd -set /dev/hme adv_autoneg_cap 0- If it does not work here, it may be the card but usually it is the cabling that is not CAT-5 compliant.- use ndd to force 100baseT full duplexndd -set /dev/hme adv_100fdx_cap 1ndd -set /dev/hme adv_100hdx_cap 0ndd -set /dev/hme adv_10fdx_cap 0ndd -set /dev/hme adv_10hdx_cap 0ndd -set /dev/hme adv_autoneg_cap 0- If it does not work, may be your switch does not support full duplex. You may live with half duplex.- otherwise your problem may be that autonegotiation is not compatible, that happens on a number of switches so you may need to force 100fdx.Can you force the mode on the switch?Can you bypass the cabling and connect with a short cable (more than 1.5m) directly to the switch?

The switch might also be the second most likely cause (the cable being the first). If you have forced the speed and mode on the host but not the switch you can run into some strange behaviour.

Other things you might look at:

Is there an alternate switch available (or can you move the host to a location that uses a different switch)?

Check the firmware on the switch. If it is an older switch it may need upgrading.

Check to see if there are any other systems exhibiting communication problems.

How to find out if we have installed 'Entire Distribution + OEM' for SolarisTo find out if we have installed 'Entire Distribution + OEM',check the following file:'/var/sadm/system/admin/CLUSTER'CLUSTER=SUNWCall -- Means that you have installed 'Entire Distribution' onlyCLUSTER=SUNWCXall -- Means 'Entire Distribution + OEM'

Page 108: help

What do the device options under /dev/rmt mean?hat do the "b", "c", "h", "l", "m", "u" mean that can be appended to a tape device name?From 'man st' -

/dev/rmt/[0- 127][l,m,h,u,c][b][n] where l,m,h,u,c specifies the density (low, medium, high, ultra/compressed), b the optional BSD behavior (see mtio(7I)), and n the optional no rewind behavior. For example, /dev/rmt/0lbn specifies unit 0, low density, BSD behavior, and no rewind.

For 1/2" reel tape devices (HP-88780), the den- sities are: l 800 BPI density m 1600 BPI density h 6250 BPI density c data compression (not supported on all modules)

For 8mm tape devices (Exabyte 8200/8500/8505): l Standard 2 Gbyte format m 5 Gbyte format (8500, 8505 only) h,c 5 Gbyte compressed format (8505 only)

For 4mm DAT tape devices (Archive Python): l Standard format m,h,c data compression

For all QIC (other than QIC-24) tape devices: l,m,h,c density of the tape cartridge type (not all devices can read and write all formats)

For QIC-24 tape devices (Emulex MT-02): l QIC-11 Format m,h,c QIC-24 Format

How to NFS share/mount a CD-ROM1) First, share the resource on the NFS server (the system with the CD-ROM locally).

Edit the /etc/dfs/dfstab file and add the following entry: share -F nfs -o ro /cdrom/cdrom0 Then run the following command:

shareall

If this is the first time that the NFS server has shared out a resource, then do the following to start the nfs server daemons:

/etc/init.d/nfs.server start

2) Now mount the CD-ROM on the remote system.

Run showmount to verify that the NFS server is sharing out the CD-ROM:

showmount -e <NFS-server-name>

Page 109: help

Mount the CD-ROM:

mount -rF nfs <NFS-server-name>:/cdrom/cdrom0 /cdrom

Max file and file system sizes.In Solaris 2.x are file systems limited to 2 GB and are they limited to the size of a physical disk?No, actually the filesystem is limited to 1 terabyte. The Solaris 2.x bundled features allow up to one terabyte file systems, but do not allow a file system to span partitions or disks. DiskSuite/Veritas Volume manager solves this problem, and allows file systems to *grow* and use additional disks/partitions up to 1 Terabyte. Actually, file system size up to 2**64 bytes are allowed.

SVr4 STILL puts a 2 GB limit on *files*.

A process using shared memory has terminated, but swap space doesn't get reclaimedA process which uses shared memory has terminated abnormally. During itsoperation swap space was allocated to handle the shared memory usage. Nowthat the process is gone, the swap space seems to remain allocated.

SOLUTION:The swap space required by the process itself will be reclaimed when theprocess terminates. However, if the shared memory segment(s) used by the process are left on the system after the process is gone, the swap space allocated for them will remain allocated until the shared memory segments are removed.

The shared memory segments can be identified by using, as user 'root':

# ipcs -m

The second column of output displays the ID for each shared memory segment onthe system. A segment may be removed by specifying its ID to the 'ipcrm' command:

# ipcrm -m <ID>

All about Shared Memory Parameters in 2.XThe Solaris 2.X kernel comes configured with defaults for shared memoryparameters which may not be enough for large applications, such as databases.Many database manufacturers, such as Oracle, Sybase and Informix, require thatshared memory parameters be increased to handle their system. In general, anyprogram which makes shared memory system service calls will be affected.

Here are the shared memory parameters, what they are, what their defaultvalues are, and what they represent. Please note that the maxima listedhere are based on values which will fit into their datatype, which is a(4-byte) integer, and are not realistic. Realistic maxima are not easilyfigured, as they must account for many factors, including the amount of kernelmemory required by everything else on the system and the amount of memory thesystem has.

See: http://www.sun.com/sunworldonline/swol-09-1997/swol-09-insidesolaris.html

for more details.

Page 110: help

Name Default Max What it is--------------- --------------- --------------- -----------------------------

shmmax 1048576 (1Meg) 4294967295 This is the maximum size of a shared memory segment, or the (4GB) largest value which can be requested of shmget(2). Setting this value high does not hurt anything, as the resource it controls is not preallocated, but rather is allocated on demand.

shmmin 1 4294967295 This is the minimum size of a shared memory segment. There (4GB) is no need to change this from the default, as doing so will only break code which allocates less than the new shmmin value allows.

shmseg 6 32767 This is the maximum number of (32k) shared memory segments per process. It is used as a high limit, which is checked before another segment is allocated. No resources are preallocated based on its value.

shmmni 100 2147482647 This is the maximum number of (2GB) shared memory identifiers that can exist systemwide. Every shared memory segment has an associated identifier, returned from shmget(). Resources are preallocated based on this value, (112 bytes of kernel memory per identifer + 8 bytes for kernel mutex lock, the eight extra bytes is for 2.5 and above) so do not set it too high.

Shared memory parameters are changed by editing the /etc/system file withlines of the form:

set shmsys:shminfo_variable = value

For example:

set shmsys:shminfo_shmmni = 150

to change shmmni to 150.

After changing the /etc/system file, reboot the system to have it takeeffect.

All InterProcess Communication (IPC) parameters, including those for shared memory, are checked by doing the following:

Page 111: help

$ sysdef -i

Look toward the bottom of the output, for something like:

** IPC Shared Memory*1048576 max shared memory segment size (SHMMAX) 1 min shared memory segment size (SHMMIN) 100 shared memory identifiers (SHMMNI) 6 max attached shm segments per process (SHMSEG)

The values at the left will reflect the values set in the /etc/system file. If the values are zeros, load the shared memory module and try sysdef -i again. Do the following to load the shared memory module:

# modload /kernel/sys/shmsys

How to monitor and control processes on multi cpu machines.PROBLEM:On a multiple CPU system:

1) What conditions prompt a process to move from a very busy to a less busy cpu?2) What tools show connection of a process to a cpu?3) What tuning or tools are available for afinity control?

SOLUTION:

1) From Adrian Cockroft "Sun Performance and Tuning", SunSoft Press page 98:

"The job stays on a CPU's run queue, unless another CPU becomes idle, finds a job that hasn't run for a while on another queue, and migrates the job to its own run queue."

2) Connection of a process to a CPU can be shown with pbind. This however only shows you whether or not a process is bound to a particular CPU. If the process is not bound, you don't know on which CPU it's executing.3) For afinity control, use pbind to bind processes to a particular processor. This does not mean that will be the only process to run on that CPU, only that the process will only run on that CPU.

Other commands of interest:

mpstat - reports per processor statistics

psrinfo - print processor information

psradm - set processors online or offline

Public Domain utility top - shows most active processes The latest version of "top" is available via anonymous FTP from "eecs.nwu.edu" in "/pub/top". Additional modules are in "/pub/top/m".

Page 112: help

Initial system crash dump analysis for Solaris 2.X.The following script can be used to assist in the analysis of Solaris 2.3 and higher system crashes. It may also be used on live systems.

The script is maintained by Sun Microsystems.

#!/bin/sh## Developed by Sun Microsystems, Inc. # 2550 Garcia Avenue # Mountain View, California 94043 # # Copyright (c) 1996, Sun Microsystems, Inc. # # RESTRICTED RIGHTS: Use, duplication or disclosure by the government is # subject to the restrictions as set forth in # subparagraph (c) (1) (ii) of the Rights in Technical Data and Computer# Software Clause as DFARS 252.227-7013 and FAR 52.227-19. # # SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF# THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR# PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES# SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS# SOFTWARE OR ITS DERIVATIVES. # # By using or copying this Software, Licensee agrees to abide by the # intellectual property laws, and all other applicable laws of the U.S., # and the terms of this license. #

# ----------------------------------------------------------------------## iscda -- Script to print out Initial System Crash Dump Analysis## History:## Edit 1 940707 krb First script for Solaris 2.3, Rev 1.0# Edit 2 950220 krb Ported to Solaris 2.4# Edit 3 950830 krb Time to start cleaning this up a bit# Edit 4 960122 cjd Some 2.4 changes; put in more"conditional"# execution of specific commands.# Edit 5 961211 krb More conditionals. Calling this Rev 1.5### Files this script creates:## /tmp/iscda.{pid}## Notes:## This script must be run on the same kernel architecture and# under the same OS as the system crash dump we are analyzing.## ----------------------------------------------------------------------

if [ ! $# = 2 ]then

Page 113: help

echo echo "Usage: iscda unixfile corefile > your-output-file" echo echo "Examples: iscda unix.3 vmcore.3" echo " iscda /dev/ksyms /dev/mem" echo exitfi

## Make sure we can see the files.#if [ ! -f $1 ] && [ ! $1 = "/dev/ksyms" ]then echo; echo "Unable to locate $1. Exiting." echo; exitfiif [ ! -f $2 ] && [ ! $2 = "/dev/mem" ]then echo; echo "Unable to locate $2. Exiting." echo; exitfi

PATH=${PATH}:/etcexport PATH

# Find the release we're dealing with.rel=`echo '$<utsname' | adb -k $1 $2 | grep release | sed 's/^.* //'`## The cpu, thread, and u-area structures differ from release to# release. Set the following variables so that we can get the name# of the running processes later on. (Rev 1.5 edit)#case "$rel" in5.3) Cpu2Thread=8; CpuIdle=c; CpuNext=1c; Thread2Proc=a0; Proc2Cmd=260 ;; 5.4) Cpu2Thread=8; CpuIdle=c; CpuNext=1c; Thread2Proc=a0; Proc2Cmd=268 ;; 5.5*) Cpu2Thread=c; CpuIdle=10; CpuNext=24; Thread2Proc=a8; Proc2Cmd=298 ;; 5.6) Cpu2Thread=24; CpuIdle=10; CpuNext=2c; Thread2Proc=a8; Proc2Cmd=2b0 ;; 5.*) Cpu2Thread=8; CpuIdle=c; CpuNext=1c; Thread2Proc=a0; Proc2Cmd=260 ;; *) echo "Operating system release $rel is not supported by thisscript." exit ;; esac

## Okay, we are ready! Create and put some stuff into output file.#echo "Working....."cat <<EOC

******************************************************************************

Page 114: help

Initial System Crash Dump Analysis Output ISCDA Rev 1.5`date`******************************************************************************

EOC

## We will be creating our own macros for use in adb sessions.# Odds are we will create a unique filename if we use the PID.# If it is not unique, let the user do something about it.#WHERE=/tmp/iscda.$$if [ -f $WHERE ]then echo; echo "File $WHERE already exists. Exiting." echo; exitfi

## The following will get the name of the processes running on each# CPU. The structures from release to release differ, so we use# variables throughout. The variables were computed earlier, above.# (Rev 1.5 edit)# cat > $WHERE <<EOC*(<c+${CpuNext})>n<c+${Cpu2Thread}/X"Thread address"*(<c+${Cpu2Thread})>p<p+${Thread2Proc}/X"Proc address"*(<p+${Thread2Proc})>j<j+${Proc2Cmd}/s.,#((*(<c+${Cpu2Thread}))-(*(<c+${CpuIdle})))="This CPU wasidle"0,#(#(<n))&#(#(<n-<e))=n"Next CPU..."n<n>c<n,#(#(<n))&#(#(<n-<e))\$<$WHEREEOC

## Get initial information from adb#cat <<EOC************************************** Initial information from adb **************************************

EOC

adb -k $1 $2 <<EOA\$<utsnamesrpc_domain/s16t"Domain name"lbolt>a*time-(*<a%0t100)=Y16t"Time of boot"time/Y16t"Time of crash",#(*audit_active)=n"Auditing is not enabled",##(*audit_active)=n"Auditing is enabled"

Page 115: help

,#(*quotas_initialized)=n"Quotas are not enabled",##(*quotas_initialized)=n"Quotas are enabled"=nn"** Panic String **"="--------------------"*panicstr/s=nn"** Stack Backtrace **"="-----------------------"\$c=nn"** Per CPU information **"="---------------------------"ncpus/X"# of CPUs present"ncpus_online/X"# of CPUs online"=nn*cpu_list>c<c>e<c,#(<c)="The cpu_list pointer is NULL. Not a good sign."n<c,#(#(<c))\$<$WHERE=nn"** Stacktrace **"="-----------------"<sp\$<stacktrace=nn="** CPU structures **"="--------------------"\$<cpus=nn="** Msgbuf **"="------------"\$<msgbufEOA

cat > $WHERE <<EOC=nn"** System is sun4m architecture - Checking enable_sm_wa **"="------------------------------------------------------------"cpunodes/senable_sm_wa/D,##(*enable_sm_wa)="Fix to bug 1146924 is installed",#(*enable_sm_wa)="Fix to bug 1146924 is not installed"EOC

adb -k $1 $2 <<EOA0,#(*(utsname+408)-6d000000)\$<$WHEREEOA

## Get process information by using crash.#cat <<EOC

**************************************** Process information from crash ****************************************

EOCcrash -d $2 -n $1 <<EOCp -eEOC

##

Page 116: help

# Get strings output to capture message buffer.#cat <<EOC

******************************************************** Strings output of complete message ring buffer ********************************************************

EOCstrings $2 | head -100

## Additional adb stuff#cat <<EOC

************************* Some Statistics *************************EOC

## Get DNLC statistics. Divide all stats by 1000 for the larger# servers which tend to get odd hit rate percentages out of vmstat# due to using integer arithmetic.#adb -k $1 $2 <<EOA=nn"** Directory Name Lookup Cache Statistics **"="----------------------------------------------"ncsize/D"Directory name cache size"ncstats/D"# of cache hits that we used"+/D"# of misses"+/D"# of enters done"+/D"# of enters tried when already cached"+/D"# of long names tried to enter"+/D"# of long name tried to look up"+/D"# of times LRU list was empty"+/D"# of purges of cache"*ncstats%1000>a*(ncstats+4)%1000>b*(ncstats+14)%1000>c<a+<b+<c>n<a*0t100%<n=D"Hit rate percentage"="(See /usr/include/sys/dnlc.h for more information)"EOA

## Not all stats are available on all releases of the OS, so# back to checking the release before we go on...#case "$rel" in5.4|5.5*|5.6)cat <<EOC** Kernel Memory Request Statistics **----------------------------------------EOCcrash -d $2 -n $1 <<EOC

Page 117: help

kmastatEOC ;;5.*)adb -k $1 $2 <<EOA=nn"** Kernel Memory Request Statistics **"="----------------------------------------"="Small"16t"Large"16t"Outsized"kmeminfo/3X"Owned by kmem"+/3X"Mem allocated"+/3X"# of failures"npagesize/D"Memory page size"="(See /usr/include/sys/sysinfo.h for more information)"=nn"** Streams Statistics **"="--------------------------"="In use"16t"Total"16t"Maximum"16t"Failures"strst/4X"Streams"+/4X"Queues"+/4X"MsgBlks"+/4X"LinkBlks"="(See /usr/include/sys/strstat.h for more information)"EOA ;;*) ;;esac## end of case#

## Print out some of the tunable variables. Do this via macros# so that we don't get alot of symbol not found messages if# the driver was not modloaded for use.#cat > $WHERE <<EOC=nn"** Shared Memory Tuning Variables (if in use) **"="--------------------------------------------------"shminfo_shmmax/D"Max segment size"+/D"Min segment size"+/D"Max identifiers"+/D"Max attached shm segs per proc"EOC

adb -k $1 $2 <<EOA\$<$WHEREEOA

cat > $WHERE <<EOC=nn"** Semaphore Tuning Variables (if in use) **"="----------------------------------------------"seminfo_semmap/D"Entries per map"+/D"Max identifiers"+/D"Max in system"+/D"Max undos"+/D"Max sems per id"+/D"Max ops per semop"+/D"Max undos per proc"+/D"Max bytes in undos"

Page 118: help

+/D"Max sem value"+/D"Max adjust on exit"EOC

adb -k $1 $2 <<EOA\$<$WHEREEOA

cat > $WHERE <<EOC=nn"** Message Queue Tuning Variables (if in use) **"="--------------------------------------------------"msginfo_msgmap/D"Max entries in map"+/D"Max message size"+/D"Max bytes on queue"+/D"Max msg queue ids"+/D"Max segment size (word size multiple)"+/D"Max system message headers"+/d16t"Max msg segments (must be < 32768)"EOC

adb -k $1 $2 <<EOA\$<$WHEREEOA

#### optional - eats up lots of space#################################################panicstring=`echo "*panicstr/s" | adb -k $1 $2 | sed -e '1d' -e 's/^.*//' | head -1`#if [ "$panicstring" = "zero" ] ; then#adb -k $1 $2 << EOA#\$<threadlist#EOA#fi#

rm $WHERE

### Get some basic configuration information which is always## useful.#cat << EOC

************************************** Current patch revision status **************************************EOCshowrev -p

cat << EOC

****************************************** Hardware Configuration Information ******************************************EOCprtconf -vp

Page 119: help

echo "*****"echo "Done!"

############################################## +---------------------------------------------------------------------+# | For more information about system crash dump analysis, refer to |# | the SunSoft Press book, "Panic! UNIX System Crash Dump Analysis", |# | ISBN 0-13-149386-8, published by Prentice Hall. |# +---------------------------------------------------------------------+############################################### end of iscda#

Page 120: help

Cleaning out the ToolTalk databases.PROBLEM:Under certain circumstances, the ToolTalk databases can become corruptedto the extent that the rpc.ttdbserverd daemon will repeatedly crash, orsimply produce many NetISAM errors.

SOLUTIONThis usually manifests itself in messages appearing in /var/adm/messages such as:

/usr/dt/bin/rpc.ttdbserverd: child status changed - core dumped last message repeated twenty timesor: rpc.ttdbserverd[9010]: NetISAM: read failed NetISAM[9010]: Fatal error: read failed - UNIX errno 11 inetd[100]: /usr/dt/bin/rpc.ttdbserverd: Child Status Changed

This condition can occur for a number of reasons (such as having an inconsistent installation, not having the latest patch installed, or after a disk partition has filled up).

However, after such problems are resolved, it is still necessary to clean out the old ToolTalk databases on disk.

This is best accomplished while the system is in a quiescent state (single-user mode), but if this is not possible for some reason, you can do it using the following procedure:

1) Stop the ToolTalk daemon.

Suspend the rpc.ttdbserver program with: kill -TERM <pid-#-of-rpc.ttdbserverd>

Ensure that it has died using the command: ps -aef | grep rpc.ttdbserverd | grep -v grep If it is still running, kill it using the command: kill -KILL <pid-#-of-rpc.ttdbserverd>

However, if it is not running, comment out the line in /etc/inetd.conf so that it looks like:

#100083/1 stream rpc/tcp wait root /usr/dt/bin/rpc.ttdbserverd /usr/dt/bin/rpc.ttdbserverd

and refresh inetd with the command:

kill -HUP <pid-#-of-inetd>

2) Remove all of the TT_DB directories and contents.

It is very important to clean ALL the Tootalk databases otherwise the corruption may remain. To get a list of all possible locations where the TT_DB directories can exist for a host use the command: df -kF ufs | awk '{if (NR>1) print $6 "/TT_DB"}'

Don't worry if some of these don't contain a TT_DB directory; it is just a list of possible locations.

3) Remove the files within the directories that were returned using the rm command with the following format:

rm -f {mount_point}/TT_DB/*

Page 121: help

4) Restart the daemon.

If you editted /etc/inetd.conf, then uncomment the rpc.ttdbserverd line again, and type:

kill -HUP <pid-#-of-inetd>

Otherwise, kill the rpc.ttdbserverd program with:

kill -KILL <pid-#-of-rpc.ttdbserverd> The next request to rpc.ttdbserverd will restart the program and re-create the */TT_DB files as they are needed.

Page 122: help

How to sort ps command output by CPU usage To sort ps output by CPU usage, some of the functionality in the public domain "top" program, do:

% ps -eo pid,pcpu,args | sort +1n | tail

This produces output like:

412 0.1 xterm -fg yellow -bg black 3381 0.1 dtfile -noview20895 0.1 /usr/dist/share/netscape,v4.02/5bin.sun4/netscape 411 0.2 xterm -fg yellow -bg black -g 26x8528778 0.2 srdbtool28781 0.2 sort +1n 405 0.3 dtwm 3 0.5 fsflush28780 0.5 ps -eo pid,pcpu,args317 2.1 /usr/openwin/bin/Xsun :0 -nobanner -auth /var/dt/A:0-57k7B_

Page 123: help

How to start Oracle automatically on rebootFor Finder the startup scripts traditionally have been called dbora, which is in /etc/init.d.

Then two links are made to trigger running this script on boot and shutdown.

ln -s /etc/init.d/dbora /etc/rc2.d/S99dboraln -s /etc/init.d/dbora /etc/rc0.d/K10dbora

These script require the oratab file to be correct since they use dbshut and dbstart scripts that read that to determine the Oracle instances to start.

Here is a sample /var/opt/oracle/oratab on a Solaris machine. # This file is used by ORACLE utilities. It is created by root.sh# and updated by the ORACLE7 and SQL*Net install procedures. ## A colon, ':', is used as the field terminator. A new line terminates# the entry. Lines beginning with a pound sign, '#', are comments.## Entries are of the form:# $ORACLE_SID:$ORACLE_HOME:<N|Y>:## The first and second fields are the system identifier and home# directory of the database respectively. The third field indicates# to the dbstart utility that the database should, "Y", or should not,# "N", be brought up at system boot time.## Multiple entries with the same $ORACLE_SID are not allowed.## ora7gf is NOT started here. It has different startup scripts.# It is only posted here for information: do NOT change the "N".#finder80:/home/htc/app6/dm_ora732/server/app/oracle/product/7.3.2:Yora7gf:/home/htc/app2/gf_ora73/oracle-7.3.2_sun:N

Note the "Y" means start automatically and the "N" means don't start. This would start the finder80 Oracle instance.

This is a sample dbora script that starts the Oracle Listener process as well as any instances posted in the oratab with a "Y".

#!/bin/sh## This file is generated by GeoFrame Install#ORA_HOME1=/home/htc/app6/dm_ora732ORA_HOME2=/home/htc/app6/dm_ora732/server/app/oracle/product/7.3.2ORA_OWNER1=dm_ora732if [ ! -f $ORA_HOME2/bin/dbstart -o ! -d $ORA_HOME2 ]then echo "Oracle startup: cannot start" exitfi case "$1" in 'start') # Start the Oracle databases: su - $ORA_OWNER1 -c $ORA_HOME2/bin/dbstart &

Page 124: help

su - $ORA_OWNER1 -c "source $ORA_HOME1/.orafinder_env; $ORA_HOME2/bin/lsnrctl start" & ;; 'stop') su - $ORA_OWNER1 -c $ORA_HOME2/bin/dbshut & su - $ORA_OWNER1 -c "source $ORA_HOME1/.orafinder_env; $ORA_HOME2/bin/lsnrctl stop" & ;;*) echo "Usage: /etc/init.d/dbora { start | stop }" ;;esac

Note also that it sources an environment file in the UNIX Oracle user's home directory called .orafinder_env. This file sets the paths and environment variables the listener needs to start.

This is a sample of that script, which can be called anything:

setenv ORACLE_BASE /home/htc/app6/dm_ora732/serversetenv ORACLE_HOME /home/htc/app6/dm_ora732/server/app/oracle/product/7.3.2setenv ORACLE_TERM xsun5setenv TERM xtermsetenv ORACLE_SID finder80setenv ORACLE_OWNER dm_ora732setenv TNS_ADMIN $ORACLE_HOME/sqlnetV2if ( ! $?LD_LIBRARY_PATH ) thensetenv LD_LIBRARY_PATH ${ORACLE_HOME}/libelsesetenv LD_LIBRARY_PATH "$ORACLE_HOME/lib:${LD_LIBRARY_PATH}"endifsetenv PATH "$ORACLE_HOME/bin:/usr/local/bin:${PATH}"setenv PRINTER lc2 #Needed for svrmgr 7.3.2.3umask 022

How to start Oracle automatically with GeoFrame script samples.ORACLE_SID=ora7gfexport ORACLE_SIDORACLE_HOME=/home/htc/app2/gf_ora73/oracle-7.3.2_sunexport ORACLE_HOMEPATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ; export PATHPFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.orasvrmgrl << EOFconnect internalshutdown immediateEOFif test $? -eq 0 ; then echo "Database \"${ORACLE_SID}\" shut down."else echo "Database \"${ORACLE_SID}\" not shut down."fi

Note that if shutdown is not sufficient because users keep processes connected to Oracle and don't log off, you may need to change the shutdown line to shutdown immediately.