Académique Documents
Professionnel Documents
Culture Documents
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
# netstat 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 TCP
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.
IPSENDREDIRECTS SUBNETSARELOCAL
-1 Never forward 0 Only forward when two or more interfaces are up 1 Always forward The default value is 0. Determines whether host should send ICMP redirects when it routes packets. The default value is 1 (True). 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.
tcp_keepidle tcp_keepintvl tcp_keeplen tcp_nodelack tcp_recvspace tcp_sendspace tcp_ttl udp_cksum udp_ttl udp_recvspace udp_sendspace
% 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 by typing: # ndd device variable I.e.: # ndd /dev/ip ip_debug 0 One 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 ip_forwarding Determines the default Time To Live value for standard IP packets. The default value is 255. Determines if the workstation will route packets. This variable can be one of three selections: 0 Never forward 1 Always forward 2 Only forward when two or more interfaces are up The default value is 2. Determines whether the host should send ICMP redirects when it routes packets. The default value is 1 (True).
ip_send_redirects
udp_xmit_hiwat udp_xmit_lowat
Determines the maximum value of the UDP transmit window. The default value is 8192 (8k). Determines the minimum value of the UDP transmit window. The default value is 1024 (1k).
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.
These kernel patches fix a large number of TCP/IP and other network problems. They should be installed on every networked machines.
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.
(Solaris Only)
7.2.1: FAQs
1048 IP interface questions and answers 1202 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 length 6729 UDP checksums for NFS 11416 What are the ARP values set by ndd?
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.
2.
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 %swpocc 20: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&T states that the run queue should always be less than two. Depending on the size of the system, this may be too conservative. Whatever the
critical threshold, longer run queues mean heavier load. Ideally the run 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 should look for I/O or memory problems.
c. d. e.
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.
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 hme_adv_autoneg_cap?X _hme_adv_autoneg_cap: _hme_adv_autoneg_cap: f000000 hme_adv_autoneg_cap?W 0 _hme_adv_autoneg_cap: 0xf000000 hme_adv_autoneg_cap?X _hme_adv_autoneg_cap: _hme_adv_autoneg_cap: 0 hme_adv_100fdx_cap?X _hme_adv_100fdx_cap: _hme_adv_100fdx_cap: f000000 hme_adv_100fdx_cap?W 1 _hme_adv_100fdx_cap: 0xf000000 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
0x0
0x1
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 nvstore ok setenv use-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 as standard with Solaris 2.4 & 2.5 and should be manually copied from patch 101820 if needed. (bug 1194402) Example: force the speed to 100Mbps: Put this in /etc/rc2.d/S69inet /usr/sbin/be_speed be0 100
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 | ---------------+-----+-----+-----+-----+
% /etc/opt/SUNWleo/bin/leoconfig -M <monitor_type> where <monitor_type> is one of 1280_76 1280 x 1024 @ 76 Hz 1280_67 1280 x 1024 @ 67 Hz 1152_76 1152 x 900 @ 76 Hz 1152_66 1152 x 900 @ 66 Hz 1024_76 1024 x 768 @ 76 Hz 1024_60 1024 x 768 @ 60 Hz stereo_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
% 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.
3. un cg14config with the desired resolution. # /usr/kvm/cg14config -r <monitor_type> where <monitor_type> is one of 1152x900@66 1152 x 900 @ 66 Hz 1152x900@76 1152 x 900 @ 76 Hz 1024x800@84 1024 x 800 @ 84 Hz 1280x1024@66 1280 x 1024 @ 66 Hz 1600x1280@66 1600 x 1280 @ 66 Hz 1024x768@70 1024 x 768 @ 70 Hz 1024x768@66 1024 x 768 @ 66 Hz 1024x768@60 1024 x 768 @ 60 Hz 4. Reboot the system.
Replace the <prom_name> above with the device name of the GXplus found in step 3. 6. 7. 8. 9. Save the file and exit vi. Change permissions on the file: # chmod 755 /tmp/1152x900x76 Execute the file: # /tmp/1152x900x76 Reboot the system for the changes to take effect # /usr/sbin/reboot
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. 5. Edit a new script file called /tmp/set_resolution: # vi /tmp/set_resolution Add the following lines to the script file: #!/bin/sh eeprom fcode-debug\?=true eeprom nvramrc='probe-sbus : vsetup <res_codes> ; vsetup <sense_code> " /sbus/<prom_name>" " override" execute-device-method drop install-console banner ' 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:
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. 7. 8. Save the file and exit vi. Change permissions on the file: # chmod 755 /tmp/set_resolution Execute the file: # /tmp/set_resolution 9. Reboot the system for the changes to take effect. # /usr/sbin/reboot
D60886
other
test# cd /devices/sbus@1f,0/SUNW,fas@e,8800000 test# 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,8800000 Test# 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 file test# rm st@4,0: 2 Recreate it using the "drvconfig" command: test# drvconfig test# 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/rmt test# ls -l 0 -rw-r--r-- 1 root other test# file 0 0: empty file test# rm 0 test# tapes test# ls -l 0 lrwxrwxrwx 1 root other
0 Sep 6 10:26 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: Hardware PRODUCT: Tape drives SUNOS RELEASE: Solaris 2.x HARDWARE: Any
# showrev -p | grep 105049-02 Patch: 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
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.)
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.
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 names For 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 |
|_____________________________________________________| | 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 the video 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 | false FFB 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.
-defoverlay true | false FFB 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 | last If 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 | last If 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 | disable If 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 | disable Advertises 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
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.
DEFAULTS For 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 attributes: __________________________________ | ATTRIBUTE TYPE| ATTRIBUTE VALUE| |__________________________________ | Availability | SUNWffbcf | |_______________|_________________| SEE ALSO
mmap(2), attributes(5), fbio(7I), ffb(7D) SunOS 5.6 Last change: 18 Jun 1997 8 ffbconfig(1M)
Maintenance Commands
OpenWindows Desktop Reference Manual SunOS 5.6 Last change: 18 Jun 1997 9
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"
test# cd /dev/rmt test# ls -l 0 lrwxrwxrwx 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,8800000 test# 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,8800000 test# 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 file test# rm st@4,0: 2 Recreate it using the "drvconfig" command: test# drvconfig test# 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/rmt test# ls -l 0 -rw-r--r-- 1 root other 0 Sep 6 10:26 0 test# file 0 0: empty file test# rm 0 test# tapes test# ls -l 0 lrwxrwxrwx 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: Hardware PRODUCT: Tape drives SUNOS RELEASE: Solaris 2.x HARDWARE: Any
(Byte-time) ---------------------------------------------------------------------------ipg1 ipg2 0, 255 0, 255 ipg1 = 8 (default at initialization)1 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
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 the values 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.
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 network 2. threshold for collision rates varies greatly 3. 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 is important to note that this is only one node's perspective of the network while it is transmitting. Depending on your application and protocol, a high collision rate (>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 overall Network 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
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.6s). 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.
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. It then 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 swap consistently indicates that there is a shortfall in memory and/or swap space. You may need to add more physical memory or add more swap space. See entries on how to add and delete swap space and how to monitor your system's CPU activity.
The user cannot determine how many processes are sharing individual pages of memory. This command is for 2.x systems.
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.
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:
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).
what ldd
what /bin/ld /bin/ld: Prints out version info from binary. 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 /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 info -- only for SPARCompilers
nm
version-id of "/opt/SUNWspro/bin/CC": SC2.0.1 showrev showrev -c /bin/ld Prints the revision info for a command.
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 running process. This is one of the series of commands newly introduced in 2.5 that 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 PIOCNMAP ioctl is used to get this info. See the proc(4) man page for a detailed listing of all supported ioctls
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.
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
Here, the permissions are set to 777. This allows everyone to access the tape 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.
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.
# pkginfo | grep SUNWacc system 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/ckpacct 30 2 * * * /usr/lib/acct/runacct 2> /var/adm/acct/nite/fd2log 30 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 generated from the accoutning data. dodisk performs disk accounting functions. 4. Edit the /etc/acct/holidays file to include all holidays. 1/1 7/4 12/25 New Years Day Indep. Day Christmas
master-name slave-no-1 slave-no-2 new_slave If the NIS slave is not in the list, use the procedure in section 3.3 of this document. Otherwise: Run the ypinit script. master-server-ip in the example below must be the 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 by running ypserv: new_slave# ypserv Afterwards, make sure that ypserv and ypbind are both in your /etc/rc.local file and not commented out (SunOS 4.1.x ONLY). Whenever you reboot your machine at this point, NIS should automatically be started.
master server e.g. /usr/etc/yp/ypinit -s master-hostname You can immediately get your machine running as a NIS slave by running ypserv: new-slave # ypserv Afterwards, make sure that ypserv and ypbind are both in your /etc/rc.local file and not commented out (SunOS 4.1.x ONLY). After this, when you reboot your machine, NIS should automatically be started.
The normal method for starting NIS under Solaris, is to give it a list of yp servers. You do this by running ypinit, answering the questions, then rebooting the machine: # ypinit -c If you prefer to start NIS in the less secure broadcast mode, rather than running ypinit, reboot your client machine without running ypinit and it will come up running NIS in broadcast mode.
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 on one of your NIS slaves. You must manually copy the maps. This can be done by copying /var/yp/`domainname`/map.* from the master to /var/yp/`domainname` on each of the slaves using either rcp or ftp.
/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.
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 nis group: 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] files protocols: nis [NOTFOUND=return] files rpc: nis [NOTFOUND=return] files ethers: nis [NOTFOUND=return] files netmasks: nis [NOTFOUND=return] files bootparams: nis [NOTFOUND=return] files publickey: nis [NOTFOUND=return] files netgroup: nis automount: files nis aliases: files nis # for efficient getservbyname() avoid nis services: files nis sendmailvars: files
yppasswd - change your network password in the NIS database. Use just like passwd 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 server Usage: ypset [ -d ypdomain ] [ -h host ] server Example - ypset servername ypwhich - return name of NIS server or map master Usage: 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
vi Quick Reference
While in Command mode: k Move one line upwards l Move one character to the right h Move one character to the left w Move one word to the right W Move one word to the right past punctuation b Move one word to the left B Move one word to the left past punctuation e Move to the end of the current word 1G Move to the beginning of the file H Move to the top of the current screen M Move to the middle of the current screen L Move to the bottom of the current screen Ctrl-G Move to the last line in the file Ctrl-F Move one screen towards the end of the file Ctrl-D Move 1/2 screen towards the end of the file Ctrl-B Move one screen towards the beginning of the file Ctrl-U Move 1/2 screen towards the beginning of the file Ctrl-L Refresh the screen 5G Move to line 5 of the file (5 can be any line number) /string Find text string forward ?string Find text string backward n Find forward next string instance after a string search N 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 file ZZ Save the file exit vi :q! Quit vi but don't save changes x Delete the character at the cursor X Delete the character behind the cursor dd Delete the line the cursor is on 10dd Delete the 10 lines following the cursor yy Yank the current line p Put the yanked line below the current line P Put the yanked line above the current line To enter Input mode: a Insert characters to the right of the cursor A Append characters to the current line i Insert characters to the left of cursor I Insert characters at the beginning of the current line o Add a new line after current line O Insert a new line above the current line In Input mode: <ESC> Return to Command mode
Make sure that the machines have the lp patch 103959 installed.
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
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
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.
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
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 ../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
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 #
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
accept printername enable printername Set up network listeners to print from remote systems: # sacadm -a -p tcp -t listen `nlsadmin -V` -n 9999 -c "/usr/lib/saf/listen tcp" -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` # 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)
# lpadmin -p oldname -c alias_name # accept alias_name destination "alias_name" now accepting requests
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
Control printer functions Define printer functions Spooling directories Move print queues between printers Stop queuing to a printer Stop printing to a printer Start queuing to a printer Start printing to a printer
lpadmin
lpc
terminfo database /etc/printcap /var/spool/lp lpmove reject disable accept enable /var/spool *NA* lpc disable lpc stop lpc enable lpc restart
------------------------------------------------------------------------------
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:
# 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.
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.
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.
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
To: *.err;kern.debug;daemon.debug;mail.crit;user.none
/var/adm/messages
/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, displaying size first. In both cases, just look for the huge file(s) and remove the offending 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 up the file system instead a few very large files. If possible, boot the system in single user mode then cd into each of the directories that are used as mount points. The ls command should not show any files in these unmounted mount points. If files have been placed in a directory that is used as a mount point they will not be seen once a file system is mounted to this directory.
- % 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).
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 on the 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
* force hme into 100 MBit full duplex mode set hme:hme_adv_100fdx_cap=1 * don't negotiate operation mode with the network hub set hme:hme_adv_autoneg_cap=0 ---------If the auto negotiate does not work, then the 100-MB full-duplex mode can 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 100 Mbps? 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
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
OR slave# /etc/init.d/yp stop slave# /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 clients as well.
ypcat passwd responds with error message "can't communicate with ypbind.
"ypcat passwd" returns with error message "can't communicate with ypbind" 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 0022 3. 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.pid Example: ls -l /var/yp/binding/ypbind.pid -r--r--r-- 1 root root 3 Dec 1 07:40 ypbind.pid
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 the whole tape as the command is supposed to. Multiple requests to tcopy with the "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
Man fred.1 Putting this alias in your .cshrc may not be such a bad idea.
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.)
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>
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-devs OK watch-net-all OK nvedit 0: probe-all install-console banner 1: apply transfer-speed=10 <path_to_new_device> 2: <CTRL>-C OK nvstore OK setenv use-nvramrc? true OK reset Then follow the instructions for adding a second network card in the OS.
} Then restart the window manager. The line that says delete is what removes the button.
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".
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 tcp listen lp tcp listen 0 tcp listen lpd SVCTAG
# 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.\
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 Up SUNW,hme0: Link up SOLUTION: 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:
- 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 0 ndd -set /dev/hme adv_100hdx_cap 0 ndd -set /dev/hme adv_10fdx_cap 0 ndd -set /dev/hme adv_10hdx_cap 1 ndd -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-duplex ndd -set /dev/hme adv_100fdx_cap 0 ndd -set /dev/hme adv_100hdx_cap 1 ndd -set /dev/hme adv_10fdx_cap 0 ndd -set /dev/hme adv_10hdx_cap 0 ndd -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 duplex 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 - 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 Solaris
To 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' only CLUSTER=SUNWCXall -- Means 'Entire Distribution + OEM'
A process using shared memory has terminated, but swap space doesn't get reclaimed
A process which uses shared memory has terminated abnormally. During its operation swap space was allocated to handle the shared memory usage. Now that the process is gone, the swap space seems to remain allocated. SOLUTION: The swap space required by the process itself will be reclaimed when the process 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 on the system. A segment may be removed by specifying its ID to the 'ipcrm' command: # ipcrm -m <ID>
Name Default Max What it is --------------- --------------- --------------- ----------------------------shmmax 1048576 (1Meg) 4294967295 (4GB) This is the maximum size of a shared memory segment, or the 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. This is the minimum size of a shared memory segment. There 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. This is the maximum number of 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. This is the maximum number of 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.
shmmin
4294967295 (4GB)
shmseg
32767 (32k)
shmmni
100
2147482647 (2GB)
Shared memory parameters are changed by editing the /etc/system file with lines 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 take effect. All InterProcess Communication (IPC) parameters, including those for shared memory, are checked by doing the following:
$ sysdef -i Look toward the bottom of the output, for something like: * * IPC Shared Memory * 1048576 max shared memory segment 1 min shared memory segment 100 shared memory identifiers 6 max attached shm segments
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
echo echo "Usage: iscda unixfile corefile > your-output-file" echo echo "Examples: iscda unix.3 vmcore.3" echo " iscda /dev/ksyms /dev/mem" echo exit fi # # Make sure we can see the files. # if [ ! -f $1 ] && [ ! $1 = "/dev/ksyms" ] then echo; echo "Unable to locate $1. Exiting." echo; exit fi if [ ! -f $2 ] && [ ! $2 = "/dev/mem" ] then echo; echo "Unable to locate $2. Exiting." echo; exit fi PATH=${PATH}:/etc export 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" in 5.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 this script." exit ;; esac
# # Okay, we are ready! Create and put some stuff into output file. # echo "Working....." cat <<EOC ******************************************************************************
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; exit fi # # # # # #
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 was idle" 0,#(#(<n))&#(#(<n-<e))=n"Next CPU..."n <n>c <n,#(#(<n))&#(#(<n-<e))\$<$WHERE EOC
# # Get initial information from adb # cat <<EOC ************************************ ** Initial information from adb ** ************************************ EOC adb -k $1 $2 <<EOA \$<utsname srpc_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"
,#(*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 **" ="------------" \$<msgbuf EOA cat > $WHERE <<EOC =nn"** System is sun4m architecture - Checking enable_sm_wa **" ="------------------------------------------------------------" cpunodes/s enable_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 <<EOA 0,#(*(utsname+408)-6d000000)\$<$WHERE EOA # # Get process information by using crash. # cat <<EOC ************************************** ** Process information from crash ** ************************************** EOC crash -d $2 -n $1 <<EOC p -e EOC # #
****************************************************** ** Strings output of complete message ring buffer ** ****************************************************** EOC strings $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" in 5.4|5.5*|5.6) cat <<EOC ** Kernel Memory Request Statistics ** ---------------------------------------EOC crash -d $2 -n $1 <<EOC
kmastat EOC ;; 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"n pagesize/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 \$<$WHERE EOA 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"
+/D"Max sem value" +/D"Max adjust on exit" EOC adb -k $1 $2 <<EOA \$<$WHERE EOA 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 \$<$WHERE EOA ## ## 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 ** ************************************ EOC showrev -p cat << EOC **************************************** ** Hardware Configuration Information ** **************************************** EOC prtconf -vp
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 #
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.
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/server setenv ORACLE_HOME /home/htc/app6/dm_ora732/server/app/oracle/product/7.3.2 setenv ORACLE_TERM xsun5 setenv TERM xterm setenv ORACLE_SID finder80 setenv ORACLE_OWNER dm_ora732 setenv TNS_ADMIN $ORACLE_HOME/sqlnetV2 if ( ! $?LD_LIBRARY_PATH ) then setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib else setenv LD_LIBRARY_PATH "$ORACLE_HOME/lib:${LD_LIBRARY_PATH}" endif setenv PATH "$ORACLE_HOME/bin:/usr/local/bin:${PATH}" setenv PRINTER lc2 #Needed for svrmgr 7.3.2.3 umask 022