SlideShare a Scribd company logo
Akadia Information Technology
SUN Free Software
PCNFS installieren
Installation Solaris mit Openwindows (Grafikkarte)
How to Backup a System
Packages (Software die installiert wurde)
Monitor Mode (OK Prompt)
Kernel Analyse
Defaults einstellen
Wichtige Konfigurationsfiles
Admin Kommandos
LAN konfigurieren
IP-Routing konfigurieren
DNS konfigurieren
Anonymous FTP aufsetzen
NFS-Client Konfiguration
NFS-Server Konfiguration
Automounter
Modem konfigurieren
SCSI-Harddisk an SUN Hardware anschliessen
List Solaris Hardware Configuration
Show Swap Space currently installed
Show Operating System Patch Level
How to install a Sun Solaris Jumbo Patch ?
Tracing System Calls
Troubleshooting Solaris Device Files
Short Tips to maintain Sun Solaris
IP-Aliasing for SUN Solaris
Solaris automounter installs filesystems by default in /net
Solaris keyboard utility
Monitoring Performance
Enable file system journaling on Solaris 7 and 8
Solaris Syslog Daemon Debugging
Does each Oracle Process use more than 100M memory ?
Sizing up Solaris Memory with the RMCmem Package
Using Sun Solaris Manuals directly from CD-ROM
Why is the Sun Solaris System Corefile helpful ?
DLT-TAPE UNIT INSTALLATION on Solaris 7/8/9
Reconfigure Devices on Solaris
OpenBoot Diagnostics
Why doesn't my .forward file work
Simple Shell Script to backup your Files
SUN Free Software
Unter http://www.sunfreeware.com findet man "ready to use" Software für SUN Solaris, wie beispielsweise TOP, A
GCC, GDB etc. Download via FTP von: «ftp://nce.sun.ch/pub/freeware/sparc/7»


  PCNFS installieren
CD-ROM Solaris Intranet Extension (siehe auch Solaris Server Intranet Extension Installation)

$ su
$ cd /cdrom/cdrom0/nfsc/sparc
$ pkgadd -d `pwd`


  Installation Solaris mit Openwindows (Grafikkarte)
                Hostname

$ uname -u

                Network Interface

$ ifconfig -a

                /etc/hosts, /etc/netmasks definieren

                Static IP-routes definieren

/etc/rc2.d/S79staticroutes

                CD-ROM rausnehmen

$ eject cdrom

                Disklayout kontrollieren

$ prtvtoc /dev/rdsk/....

                Automounter konfigurieren

/etc/auto_master, /etc/auto_home

                Device File für DAT

/dev/rmt/0l (tar cvf /dev/rmt/0l)
/etc/system definieren konfigurieren (Prestoserve, Oracle, Transtec)

               Logfile der Installation: /var/sadm/system/logs/install_log

               Installation über serielles Terminal an Nullmodem Kabel

OK boot cdrom - w (Terminal an ttya)


  How to Backup a System
$ init 0
OK boot -s
$ fsck -m /dev/dsk/c0t0d0s0 (und übrige Filesysteme)
$ tar cvf /dev/rmt/0l


  Packages (Software die installiert wurde)
Anzeige der installierten Packages

$ pkginfo

Check ob Package SUNWpcnfd correct installiert ist

$ pkgchk -v SUNWpcnfd

Package installieren (Path ist meistens /cdrom/cdrom0/....)

$ pkgadd -d <Path to CDROM> SUNWpcnfd

Das Package SUNWpcnfd entfernen

$ pkgrm SUNWpcnfd


  Monitor Mode (OK Prompt)
In single user mode booten

OK boot -s

Kernel zwingen /devices neu aufzubauen nach dem Anschluss von neuer Hardware

OK boot -r

Detaillierter Bootvorgang
OK boot -v

Vom CD-ROM aus booten: Notboot !

OK boot cdrom

Angeschlossene SCSI-Geräte testen

OK probe-scsi

List System Devices, e.g. SUNW,hme = Sun Fast Ethernet PCI Adapter

OK show-devs

List Network Devices

OK show-nets

Monitoring Network Activity

OK apply watch-net <full path name of the hme interface, see show-devs>

Monitor Variablen ändern, anzeigen

OK eeprom
OK eeprom ttya-mode=38400,8,n,1,h


  Kernel Analyse
Welche Kernel-Module sind geladen ?

$ modinfo

Kernel Konfiguration

/etc/system

Logfile von syslog

/var/adm/messages

Konfiguration des syslog Daemon

/etc/syslog.conf


  Defaults einstellen
Directory mit Default files

/etc/default

Remote root logins erlauben

/etc/default/login

Timezone setzen

/etc/default/init


   Wichtige Konfigurationsfiles
Master-File beim Booten

/etc/inittab

Run-Level Start/Stop Files

/etc/rc?.d

Scripts für Run-Levels

/etc/init.d


   Admin Kommandos
$ shutdown -g0 -i0
$ reboot (entspricht init 6)

   LAN konfigurieren

Konfiguration der LAN-Interfaces

$ ifconfig -a

                Netmask setzen: siehe /etc/netmasks
                Jedes LAN-Interface hat /etc/hostname.le0 mit Hostnamen
                LAN-Setup: /etc/rcS.d/S30rootusr.sh (Interfaces konfigurieren)
                /etc/rc2.d/S72inetsvc (LAN konfigurieren)

Phys Addressen nachschauen

$ arp -a

Net to Media Table
Device     IP Address                       Mask            Flags Phys Addr
------     --------------------             --------------- ----- ---------------
le0        rabbit                           255.255.255.255       00:60:08:57:17:86
le0        quorum                           255.255.255.255 SP    08:00:20:89:27:03
le0        arkum                            255.255.255.255       00:a0:24:4b:60:1c


  IP-Routing konfigurieren
Alle hosts im Netz 193.72.239.0 werden über den Router 193.72.194.201 erreicht.

$ route add net 193.72.239.0 193.72.194.201 1

Der host 146.228.14.10 wird über den Router 193.72.194.100 erreicht. Siehe File /etc/rc2.d/S79staticroutes.

$ route add host 146.228.14.10 193.72.194.100 1

Routing Tabelle kontrollieren

$ netstat -nr


  DNS konfigurieren
Angabe des DNS Nameservers

/etc/resolv.conf

Reihenfolge definieren

/etc/nsswitch.conf


  Anonymous FTP aufsetzen
Siehe Solris2 Administration Seite 103 und ff


  NFS-Client Konfiguration
/etc/vfstab (Soll) --> /etc/mnttab (Ist)
mount -F nfs -o bg,ro,soft gondwana:/usr/software /software

NFS-Server wird in /etc/init.d/nfs.client start gestartet.

Anzeige welche Directories gondwana zum mounten freigegeben hat
dfshares gondwana

RESOURCE SERVER ACCESS TRANSPORT
gondwana:/export/home/zahn gondwana - -
gondwana:/export/home/steiner gondwana - -


  NFS-Server Konfiguration
/etc/dfs/dfstab (Soll) --> /etc/dfs/sharetab

Directory read-only freigeben

$ share -o ro /usr/software

Alle Directories in /etc/dfs/dfstab freigeben

$ shareall

Alle Directories in /etc/dfs/dfstab zurücknehmen

$ unshareall

NFS-Server wird gestartet in

/etc/init.d/nfs.server

Anzeige der freigegbenen lokalen Direcories

$ share

Anzeige welche Clients nutzen welche Directories eines NFS-Servers

$ dfmounts -F nfs gondwana

RESOURCE SERVER PATHNAME CLIENTS
gondwana /export/home/zahn paragon.glue.ch,rabbit.glue.ch


  Automounter
- /etc/auto_master (Master Map konfigurieren)
- /etc/auto_home (Home Direcories verwalten)
- autofs ist ein spezielles Filesystem
- automount -v (Nach einer Aenderung an einer Map ausführen)


  Modem konfigurieren
Siehe spezielles Dokument


  SCSI-Harddisk an SUN Hardware anschliessen
Beispiel: SCSI-Disk Seagate ST150176L, 50MB an SUN Ultra Enterprise 1

               Eintrag in /etc/format.dat vornehmen (Angaben von Lieferanten)

disk_type = "Seagate ST150176L" 
: ctlr = "SCSI" 
: ncyl = 12022 : acyl = 2 : pcyl = 12024 : nhead = 22 : nsect = 369 
: rpm = 7200 : bpt = 188928

               Eintrag /etc/system für Solaris-2 Kernel, System booten

*
* SCSI-Disc Konfiguration
*
set scsi_options=0x20

               Disk anschliessen, SCSI-Adresse kontrollieren, Terminierung

               Unbedingt kontrolieren, dass eine SCSI-Adresse nicht mehrfach belegt ist. Dazu kann meistens hinte
               Tippschalter eingestellt werden. Man beacht, dass in der Regel das letzte Gerät terminiert werden m
               Disk formatieren (nur wenn notwendig !)

               In der Regel muss eine Disk nicht neu formatiert werden, ist dies jedoch notwendig so steht unter So
               format zur Verfügung.

format

AVAILABLE DISK SELECTIONS:

0. c0t0d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
  /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@0,0
1. c0t1d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80>
  /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@1,0
2. c0t2d0 <IBM-DDRS-39130-S71D cyl 8186 alt 2 hd 10 sec 218>
  /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@2,0
3. c0t4d0 <SEAGATE-ST118273N-5764 cyl 7499 alt 2 hd 20 sec 237>
  /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@4,0
4. c0t5d0 <SEAGATE-ST150176LW-0002 cyl 12022 alt 2 hd 22 sec 369>
  /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@5,0

Specify disk (enter its number): 4

format> type

AVAILABLE DRIVE TYPES:
0. Auto configure
1. DDRS-39130
2. Seagate ST118273
3. Seagate ST150176L
4. Quantum ProDrive 80S
5. Quantum ProDrive 105S
6. CDC Wren IV 94171-344
7. SUN0104
8. SUN0207
9. SUN0327
10. SUN0340
11. SUN0424
12. SUN0535
13. SUN0669
14. SUN1.0G
15. SUN1.05
16. SUN1.3G
17. SUN2.1G
18. SUN2.9G
19. IBM-DDRS-39130-S71D
20. SEAGATE-ST118273N-5764
21. SEAGATE-ST150176LW-0002
22. other
Specify disk type (enter its number)[21]: 21

format> format (confirm with "yes")

               Disk partitionieren

Dadurch wird die Disk in logische Teile unterteilt. Jeder teil enthält ein eigenes Filesystem.

format> part

Nun die Partitionierungsdaten eingeben, zB

partition> print

Current partition table (original):
Total disk cylinders available: 2733 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 204 152.15MB (205/0/0) 311600
1 swap wu 205 - 377 128.40MB (173/0/0) 262960
2 backup wm 0 - 2732 1.98GB (2733/0/0) 4154160
3 home wm 378 - 1017 475.00MB (640/0/0) 972800
4 unassigned wm 0 0 (0/0/0) 0
5 unassigned wm 1018 - 1928 676.13MB (911/0/0) 1384720
6 usr wm 1929 - 2732 596.72MB (804/0/0) 1222080
7 unassigned wm 0 0 (0/0/0) 0
Label erzeugen (aktuelle Partitionierung speichern)

partition> label
partition> y
partition> quit
format> quit

               Filesystem erstellen

newfs -v -m 0 /dev/rdsk/c0t5d0s0

Damit wird ein Filesystem mit 0 % Min-Free auf der Partition 0 der Disk an der SCSI-Adresse 5 erstellt.

               Filesystem mounten

Dazu den folgenden Eintrag in /etc/vfstab vornehmen

#device        device         mount FS fsck mount mount
#to mount       to fsck       point type pass at boot options

/dev/dsk/c0t5d0s0 /dev/rdsk/c0t5d0s0 /u02 ufs     6    yes    -


  List Solaris Hardware Configuration
$ /usr/sbin/prtconf


  Show Swap Space currently installed
Multiply the Blocks column by 512

$ swap -l

swapfile       dev swaplo blocks free
/dev/dsk/c0t0d0s1 32,1 16 262944 262944

262944 * 512 = 134 MB


  Show Operating System Patch Level
$ showrev -p

Patch: 105181-16

Note, that Patchlevel 105181-15 is minimal needed for Oracle 8.1.6
How to install a Sun Solaris Jumbo Patch ?
- Download the Patch from: http://sunsolve.sun.com
- Read the README File included in the Patch
- Usually the only thing you have to do is:

$ cd <patch cluster directory>
$ ./install_custer
$ cat /var/sadm/install_data/<luster name>_log
$ showrev -p

Reboot the system


  Tracing System Calls
You can trace system calls with truss on Solaris an strace on Linux

$ truss svrmgrl


  Troubleshooting Solaris Device Files
If you suspect troubles with your Solaris device files, e.g. system doesn't boot after a filesystem check, you may rep
system using the following commands.

Halt the system immediately with the keys STOP-A, you will now see the boot prompt: OK

STOP-A

Reset the machine with

OK reset

Boot the machine with

OK boot -r

The command boot -r will rebuild all devices files according to your attached hardware. If you cannot boot the mac
try the following commands: drvconfig, disks, tapes

drvconfig - configure the /devices directory

The default operation of drvconfig is to create the /devices directory tree that describes, in the filesystem namespac
layout of a particular machine. Hardware devices present on the machine and powered on as well as pseudo-drivers
under /devices. Normally this command is run automatically after a new driver has been installed (with add_drv(1M
system has been rebooted.
disks - creates /dev entries for hard disks attached to the system

Disks creates symbolic links in the /dev/dsk and /dev/rdsk directories pointing to the actual disk device special files
/devices directory tree.

tapes - creates /dev entries for tape drives attached to the system

Tapes creates symbolic links in the /dev/rmt directory to the actual tape device special files under the /devices direc
searches the kernel device tree to see what tape devices are attached to the system.


  Short Tips to maintain Sun Solaris
Here are some short tips for common tasks on SUN Solaris 2.6, 7 and 8

Important SUN Solaris Commands

$ who -r        # Show Run Level
$ /usr/sbin/prtconf # Print the complete system configuration
$ /sbin/mountall -l # Mount all local filesystems.
$ /sbin/init S   # Changing to single user mode

Show currently mounted filesystems

# /etc/mnttab: Contains information about devices that
# are currently mounted. If there are mounted filesystems
# with quotas enabled, display them

if /usr/bin/cut -f 4 /etc/mnttab | 
  /usr/bin/egrep '^quota|,quota' >/dev/null 2>&1; then
  echo 'There are mounted filesystems with quotas enabled'
fi

How to enable system activity data gathering

# You will also need to uncomment the sa entries in
# the system crontab /var/spool/cron/crontabs/sys.
# Refer to the sar(1) and sadc(1m) man pages
# for more information.

$ /usr/bin/su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa`date +%d`"

How a new, unused Solaris system is setup ?

# sysidtool is a suite of five programs that configure a new
# system, or one that has been unconfigured with sys-
# unconfig(1M). The sysidtool programs run automatically at
# system installation, or during the first boot after a
# machine has been successfully unconfigured.
#
# These programs have no effect except at such times, and
# should never be run manually.

# System Files are

cat /etc/nodename
cat /etc/hostname.*
cat /etc/default/init
cat /etc/defaultdomain
cat /etc/inet/hosts
cat /etc/inet/netmasks

How to configure Asynchronous PPP ?

Configure /etc/asppp.cf for the aspppd daemon

$ /usr/sbin/aspppd -d 1

How to get and set TCP/IP driver configuration parameters ?

# Getting Parameters Supported By The TCP Driver
# To see which parameters are supported by the TCP driver,
# use the following command:

$ ndd /dev/tcp ?

# The following command sets the value of the parameter
# ip_forwarding in the IP driver to zero. This disables IP
# packet forwarding.

Disable IP Forwarding

$ /usr/sbin/ndd -set /dev/ip ip_forwarding 0

Enable IP Forwarding (Machine acting as a Router)

$ /usr/sbin/ndd -set /dev/ip ip_forwarding 1

How to set Default Route on Solaris ?

# Configure default routers using the local "/etc/defaultrouter"
# configuration file. The file can contain the hostnames or IP
# addresses of one or more default routers.
#
# The default routes listed in the "/etc/defaultrouter" file will
# replace those added by the kernel during diskless booting. An
# empty "/etc/defaultrouter" file will cause the default route
# added by the kernel to be deleted.
#
# Note that the default router file is ignored if we received routes
# from a DHCP server. Our policy is to always trust DHCP over local
# administration.

# Set Default Route

$ route -n add default <Default Route from /etc/defaultrouter>

# Show Default Route

$ /usr/sbin/route -fn
default 128.128.128.11 done

How to set NIS domainname if locally configured ?

if [ -f /etc/defaultdomain ]; then
  /usr/bin/domainname `cat /etc/defaultdomain`
  echo "NIS domainname is `/usr/bin/domainname`"
fi

RPC (Remote Procedure Call) Configuration

# rpcbind - universal addresses to RPC program number mapper
# rpcinfo - report RPC information

Solaris Keyserv Daemon

# keyserv is a daemon that is used for storing the private
# encryption keys of each user logged into the system. These
# encryption keys are used for accessing secure network ser-
# vices such as secure NFS and NIS+.

$ /usr/sbin/keyserv

How to start the Solaris DNS server "in.named"

# If this machine is configured to be an Internet
# Domain Name System (DNS) server, run the name daemon.
# Start named prior to: route add net host,
# to avoid dns gethostbyname timout delay for
# nameserver during boot.

if [ -f /usr/sbin/in.named -a -f /etc/named.conf ]; then
  echo 'starting internet domain name server.'
  /usr/sbin/in.named &
fi
Where to find syslogd messages ?

Configuration File: /etc/syslog.conf
Message File:     /var/adm/messages


  IP-Aliasing for SUN Solaris
# How to setup IP-Alias on SUN Solaris

1. Setup File /etc/hostname.hme0:1 for the second IP-Address

 cat /etc/hostname.hme0:1

 ldap

2. Insert IP-Address in /etc/hosts

 #
 # Internet host table
 #
 128.128.128.11       ux-portal1    # IP-address on hme0:0
 128.128.128.20       ldap       # IP-alias on hme0:1

3. Start alias IP-Address on Interface in /etc/rc2.d

 S99ipalias -> ../init.d/ipalias

 #!/bin/sh
 # Akadia AG, Arvenweg 4, CH-3604 Thun
 # ----------------------------------------------------------------------
 # File:      ipalias
 #
 # Autor:       Martin Zahn / 10.05.2000
 #
 # Purpose: Setup second IP address on hme0:1
 # ----------------------------------------------------------------------

 if [ -f /etc/hostname.hme0:1 ]
 then
   case "$1" in

    'start') # Start second IP address on hme0:1

           echo "Start multi-homed server for UX-ALIAS1 on hme0:1"
           ifconfig hme0:1 128.128.128.20 up
           ;;
'stop') # Stop second IP address on hme0:1

             echo "Stop multi-homed server for UX-ALIAS1 on hme0:1"
             ifconfig hme0:1 128.128.128.20 down
             ;;
   esac
 fi

4. Check IP-Address on second Interface

 ifconfig -a


  Solaris automounter installs filesystems by default in
The Solaris automount utility installs autofs mount points and associates an automount map with each mount po
autofs file system monitors attempts to access directories within it and notifies the automountd daemon. The d
the map to locate a file system, which it then mounts at the point of reference within the autofs file system. You
map to an autofs mount using an entry in the /etc/auto_master map or a direct map in /etc/auto_dir
system is not accessed within an appropriate interval (five minutes by default), the automountd daemon unmoun
system.

Default Mapping under /net

The mount point /net is by default the location, where automountd mounts NFS filesystems, which are exporte
machines. Lets suppose, that you have the filesystem /home exported on the NFS server saphir, then the (Solari
with an active automounter will automatically mount this NFS filesystem under /net/saphir/.

Mapping using /etc/auto_direct

You probably doesn't want this default behavior. If you insert the following entry in /etc/auto_direct ....

/opt/local     -rw   remote_machine:/local

.... then, the directory /local on the remote machine "remote_machine" will be mounted on the local machine un
/opt/local.


  Solaris keyboard utility
The Solaris utility kbd manipulates the state of the keyboard or display the type of keyboard or change the default
abort sequence effect. Suppose, that you do not want that everybody can halt the the system you must change the d
We also noticed, that the Solaris machines attached to a switch box, using a character terminal on a serial line, may
switch from one machine to the other.

SYNOPSIS

kbd [ -r ] [ -t ] [ -c on|off ]
  [ -a enable|disable ] [ -d keyboard device ]
kbd -i [ -d keyboard device ]

DESCRIPTION

kbd manipulates the state of the keyboard, or displays the keyboard type or allows the default keyboard abort sequ
be changed. The default keyboard device being set is /dev/kbd.

The -i option reads and processes default values for the keyclick and keyboard abort settings from the keyboard de
/etc/default/kbd. Only keyboards that support a clicker respond to the -c option. If you want to turn clicking
add or change the current value of the KEYCLICK variable to the value on in the keyboard default file, /etc/def
as shown here.

KEYCLICK=on

Then, run the command 'kbd -i' to change the current setting. Valid settings for this variable are the values on
values are ignored. If the variable is not specified in the default file, the setting is unchanged.

The keyboard abort sequence (L1-A or STOP-A) on the keyboard and BREAK on the serial console input device o
systems) effect may only be changed by the superuser, using the
-a option. On most systems, the default effect of the keyboard abort sequence is to suspend the operating system an
debugger or the monitor.

If you want to permanently change the software default effect of the keyboard abort sequence, you can add or chang
value of the KEYBOARD_ABORT variable to the
value disable in the keyboard default file, /etc/default/kbd, as shown here.

KEYBOARD_ABORT=disable

Then, run the command 'kbd -i' to change the current setting. Valid settings for this value are the values enable
Other values are ignored. If the variable is not specified in the default file, the setting is unchanged.

OPTIONS

    -i     Set keyboard defaults from the keyboard default file. This option is mutually exclusive with all other
           options except for the -d keyboard device option. This option instructs the keyboard command to read a
           process keyclick and keyboard abort default values from the /etc/default/kbd file. This option c
           only be used by the superuser.
   -r      Reset the keyboard as if power-up.
   -t      Return the type of the keyboard being used.
   -c      On/Off state Turn the clicking of the keyboard on or off.
   -a      Enable/Disable state; Enable or disable the keyboard abort sequence effect.


  Monitoring Performance
This chapter describes procedures for monitoring system performance by using the vmstat, iostat, df, and
commands. This is a list of the step-by-step instructions in this chapter.
How to Display Virtual Memory Statistics (vmstat)

The following example shows the vmstat display of statistics gathered at five-second intervals.

$ vmstat 5

 procs memory         page         disk     faults cpu
r b w swap free re mf pi po fr de sr f0 s3 -- -- in sy cs us sy id
0 0 8 28312 668 0 9 2 0 1 0 0 0 1 0 0 10 61 82 1 2 97
0 0 3 31940 248 0 10 20 0 26 0 27 0 4 0 0 53 189 191 6 6 88
0 0 3 32080 288 3 19 49 6 26 0 15 0 9 0 0 75 415 277 6 15 79
0 0 3 32080 256 0 26 20 6 21 0 12 1 6 0 0 163 110 138 1 3 96
0 1 3 32060 256 3 45 52 28 61 0 27 5 12 0 0 195 191 223 7 11 82
0 0 3 32056 260 0 1 0 0 0 0 0 0 0 0 0 4 52 84 0 1 99

Category Field        Description
         Name
procs                 Reports the following states:
             r        The number of kernel threads in the dispatch queue
             b        Blocked kernel threads waiting for resources
             w        Swapped out LWPs waiting for processing resources to finish
memory                Reports on usage of real and virtual memory:
             swap     Available swap space
             free     Size of the free list
page                  Reports on page faults and paging activity, in units per second:
             re       Pages reclaimed
             mf       Minor and major faults
             pi       Kbytes paged in
             po       Kbytes paged out
             fr       Kbytes freed
             de       Anticipated memory needed by recently swapped-in processes
             sr       Pages scanned by page daemon (not currently in use). If sr does not equal zero, the page
                      daemon has been running.
disk                  Reports the number of disk operations per second, showing data on up to four disks
faults                Reports the trap/interrupt rates (per second):
             in       Interrupts per second
             sy       System calls per second
             cs       CPU context switch rate
cpu                   Reports on the use of CPU time:
             us       User time
sy          System time
          id          Idle time

How to Display System Event Information

Run vmstat -s to show the total of various system events that have taken place since the system was last booted

      0 swap ins
      0 swap outs
      0 pages swapped in
      0 pages swapped out
409376480 total address trans. faults taken
  3075036 page ins
  2601555 page outs
  3812452 pages paged in
  6525552 pages paged out
 11007609 total reclaims
 10927650 reclaims from free list
      0 micro (hat) faults
409376480 minor (as) faults
  2957386 major faults
102738273 copy-on-write faults
 61711047 zero fill page faults
1002562077 pages examined by the clock daemon
    7881 revolutions of the clock hand
 16716370 pages freed by the clock daemon
  4999048 forks
  1138206 vforks
  5747009 execs
741660225 cpu context switches
736047593 device interrupts
528054538 traps
2496638575 system calls
430283487 total name lookups (cache hits 95%)
   81727 toolong
 10484677 user cpu
  9528364 system cpu
443762786 idle cpu
 16281790 wait cpu

How to Display Swapping Statistics

Run vmstat -S to show swapping statistics.

procs memory          page         disk     faults cpu
r b w swap free si so pi po fr de sr m1 m3 m4 m5 in sy cs us sy id
0 0 0 8512 888 0 0 12 21 55 0 417 1 0 0 0 206 1040 308 2 2 96

si = Average number of LWPs swapped in per second
so = Number of whole processes swapped out

How to Display Disk Utilization Information (iostat)

You can display disk activity information by using the iostat command with a time interval. The following exam
statistics gathered every five seconds.

iostat 5

    tty      md1        md3         md4        md5        cpu
tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id
  0 2 10 1 28 2 0 22 0 0 0 1 0 10 2 2 3 92
  0 47 58 7 39 16 2 34 0 0 0 0 0 0 0 2 19 78
  0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 98
  0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 99
  0 16 2 0 22 0 0 0 0 0 0 0 0 0 2 3 1 95
  0 24 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 98

For Each ...            Field Name         Description
Terminal
                        tin                Number of characters in the terminal input queue
                        tout               Number of characters in the terminal output queue
Disk
                        bps                Blocks per second
                        tps                Transactions per second
                        serv               Average service time, in milliseconds
CPU
                        us                 In user mode
                        sy                 In system mode
                        wt                 Waiting for I/O
                        id                 Idle

How to Display Extended Disk Statistics

Run iostat -xtc to get extended disk statistics. This command displays a line of output for each disk.

                       extended device statistics tty   cpu
device     r/s w/s    kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id
md1        0.4 0.9     3.6 6.9 0.0 0.0 27.7 1 1 0 2 2 2 3 92
md3        0.1 0.2     1.0 1.3 0.0 0.0 21.7 0 0
md4        0.0 0.0     0.0 0.0 0.0 0.0 0.0 0 0
md5        0.0 0.0     0.7 0.0 0.0 0.0 9.9 0 0
md8        0.8 0.3     6.7 14.2 0.0 0.0 13.1 0 1
md10        0.2 0.9     1.8 6.8 0.0 0.0 15.5 0 1
md11   0.2 0.9        1.8 6.8 0.0 0.0 14.8 0 1
md30   0.0 0.2        0.5 1.3 0.0 0.0 11.4 0 0
md31   0.0 0.2        0.5 1.3 0.0 0.0 10.2 0 0
md40   0.0 0.0        0.0 0.0 0.0 0.0 0.0 0 0
md41   0.0 0.0        0.0 0.0 0.0 0.0 0.0 0 0
md50   0.0 0.0        0.4 0.0 0.0 0.0 9.4 0 0
md51   0.0 0.0        0.4 0.0 0.0 0.0 7.3 0 0
md80   0.4 0.3        3.3 14.2 0.0 0.0 10.3 0 0
md81   0.4 0.3        3.3 14.2 0.0 0.0 11.7 0 1
sd0  0.6 2.1        6.0 22.8 0.0 0.0 16.3 0 3
sd1  0.6 2.1        6.0 22.8 0.0 0.0 15.2 0 2

Field Name            Description
r/s                   Reads per second
w/s                   Writes per second
Kr/s                  Kbytes read per second
Kw/s                  Kbytes written per second
wait                  Average number of transactions waiting for service (queue length)
actv                  Average number of transactions actively being serviced
svc_t                 Average service time, in milliseconds
%w                    Percentage of time the queue is not empty
%b                    Percentage of time the disk is busy

How to Check CPU Utilization (sar)

Display CPU utilization with the sar -u command. (The sar command without any options is equivalent to sar -u.) A
moment, the processor is either busy or idle. When busy, the processor is in either user or system mode. When idle,
is either waiting for I/O completion or "sitting still" with no work to do.

Measure CPU utilization during 5 secs one time.

sar -u 5 1

Measure CPU utilization during 60 secs 1440 times and write result in file sar.log.

sar -u -o sar.log 60 1440

To later review disk and tape activity from that period:

sar -d -f sar.log

Field Name          Description
%sys                Lists the percentage of time that the processor is in system mode
%user               Lists the percentage of time that the processor is in user mode
%wio              Lists the percentage of time the processor is idle and waiting for I/O completion
%idle             Lists the percentage of time the processor is idle and is not waiting for I/O

A high %wio generally means a disk slowdown has occurred.


     Enable file system journaling on Solaris 7 and 8
Solaris 7 and 8 include a native implementation of file system journaling. This feature, known as "intent logging"
"logging" enables FASTER file system operation and FASTER system boot.

It's trivial to implement and safe to use. The new logging feature is an option to the Unix File System (UFS), which
file system for all disk partitions on SUN servers, except for partitions holding swap space. By default, the journalin
disabled. Logging is enabled on a per file system basis, and it can even be enabled on / (root file system) and other
system partitions.

Background

Solaris UFS logging works by allocating space from the file system's free blocks. Within that space, all metadata ch
file system are written. Metadata includes directory and I-node information but not file data blocks, essentially ever
actual data within the file. So, for example, a "file create" modifies the directory structure and allocates a new I-nod
activities are written to the logging space. Once the metadata changes are made to the logging area, the system is fr
other operations to the file system. In the background, the information in the log is flushed to the file system and up
appropriate directory and I-node structures, completing the file system operations.

The logging data is written sequentially within the log space. It's therefore much faster for the operating system to c
metadata changes via logging and background flushing than by directly modifying the metadata (via random I/O) sp
disk. The size of the logging space is based on the size of the file system, and equals 1 MB per 1 GB of file system
MB. The space is used as a circular log: if the log space is about to fill up, new metadata change requests are pause
is emptied. As changes are moved from the log to the file system, that log space is made available, and new metada
be written to the logging space.

Usually with UFS, if the system crashes during any file system operation, the entire system must have its consisten
the fsck command. That command can take several minutes per file system because it checks all metadata and file d
the structures are correct, free, and used, and that the I-node block counts are correct. It also confirms that the free s
is current, repairs inconsistencies, and occasionally requires manual intervention to fix large problems. Files and ev
can be lost, depending on the operations occurring at the time of the crash.

Because metadata changes are made first to the log space rather than to the file system, the consistency check for a
system after a crash is a simple and fast operation. The system evaluates the logging data and determines which cha
completed against the underlying file system, which had yet to start, and which were in progress. Those completed
started are removed from the log, and those partly completed are either undone or completed. If there's sufficient da
complete the operation, it's completed. Otherwise, the changes made are removed from the underlying file system.

People familiar with database operation will recognize the similarity between database transaction processing and t
here. The end result is that the underlying file system is consistent, and no thorough consistency checking is needed
operation completes in a few seconds per file system.

Using logging
Starting with Solaris 7, there's a new logging option to the mount command and in the /etc/vfstab system configura
Logging only appears in a couple other places within Solaris. The mount command shows which partitions are mou
logging in the options fields for each partition on which logging is enabled. Finally, at system boot time, the fsck ph
partition whether each is stable, logging, or being checked. There are no other status commands available to determ
logging.

A = Device to mount
B = Device to fsck
C = Mount point
D = Filesystem Type
E = Fsck pass (unimportatnt with logging)
F = Mount at boot
G = Mount options

# ------------------------------------------------------------------
#A               B               C      D E F G
# ------------------------------------------------------------------
fd             -              /dev/fd fd - no -
/proc            -              /proc proc - no -
/dev/dsk/c0t0d0s3 -                   -      swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 /                ufs 1 no logging
/dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 2 no logging
/dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1 /var ufs 3 no logging
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /home ufs 4 yes logging
/dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /opt ufs 5 yes logging
/dev/dsk/c0t8d0s0 /dev/rdsk/c0t8d0s0 /u01 ufs 6 yes logging
/dev/dsk/c0t9d0s0 /dev/rdsk/c0t9d0s0 /u02 ufs 7 yes logging
/dev/dsk/c0t10d0s0 /dev/rdsk/c0t10d0s0 /u03 ufs 8 yes logging
/dev/dsk/c0t11d0s0 /dev/rdsk/c0t11d0s0 /u04 ufs 9 yes logging
/dev/dsk/c0t12d0s0 /dev/rdsk/c0t12d0s0 /u05 ufs 10 yes logging
/dev/dsk/c1t13d0s0 /dev/rdsk/c1t13d0s0 /app ufs 11 yes logging
/dev/dsk/c1t14d0s0 /dev/rdsk/c1t14d0s0 /users ufs 12 yes logging
swap               -             /tmp tmpfs - yes -

Logging increases performance, decreases fsck time, removes the risk of a file system corruption, can be used on al
partitions (including root), and is free.


  Solaris Syslog Daemon Debugging
The log system messages daemon syslogd reads and forwards system messages to the appropriate log files and/or u
upon the priority of a message and the system facility from which it originates. The configuration file /etc/syslog.co
where messages are forwarded. The syslogd daemon ignores any faulty entry in /etc/syslog.conf, specially spaces in
are not recognized by syslogd. Therefore always check the entries in /etc/syslog.conf in the debugging mode of sysl

How to check /etc/syslog.conf

# /etc/init.d/syslog stop
# /usr/sbin/syslogd -d
getnets() found 1 addresses, they are: 0.0.0.0.2.2
amiloghost() testing 193.247.121.196.2.2
cfline(*.err;kern.notice;auth.notice    /dev/sysmsg)
cfline(*.err;kern.debug;daemon.notice /var/adm/messages)
cfline(mail.info;mail.debug           /var/log/maillog)

syslogd: line 14: unknown priority name "debug        /var/log/maillog"

cfline(*.alert;kern.err;daemon.err      operator)
cfline(*.alert                 root)
cfline(*.emerg                    *)
cfline(user.err                 /dev/sysmsg)
cfline(user.err                 /var/adm/messages)
cfline(user.alert                root, operator)
cfline(user.emerg                  *)

syslogd: version 1.70
Started: Sat Jan 6 10:11:47 2001
Input message count: system 0, network 0
# Outputs: 10

5 3 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X CONSOLE: /dev/sysmsg
7 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X FILE: /var/adm/messages
X X 6 X X X X X X X X X X X X X X X X X X X X X X UNUSED:
3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: operator
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: root
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X WALL:
X 3 X X X X X X X X X X X X X X X X X X X X X X X CONSOLE: /dev/sysmsg
X 3 X X X X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/messages
X 1 X X X X X X X X X X X X X X X X X X X X X X X USERS: root, operator
X 0 X X X X X X X X X X X X X X X X X X X X X X X WALL:

          Per File Statistics
File                  Tot Dups Nofwd Errs
----                 --- ---- ----- ----
/dev/sysmsg                0      0      0      0
/var/adm/messages              0      0      0    0
     0     0    0     0
operator                0      0      0      0
root                  0      0      0      0
WALL                      0      0      0      0
/dev/sysmsg                0      0      0      0
/var/adm/messages              0      0      0    0
root,operator             0      0      0      0
WALL                      0      0      0      0

syslogd: restarted
off & running....
sys_poll blocking, init_cnt=0
# ^D
# /etc/init.d/syslog start

Line 14 in /etc/syslog.conf are filled up with spaces instead of tabs. Replace the spaces with tabs and syslogd will a
entry in Line 14.


  Does each Oracle Process use more than 100M memo
If you check the oracle process with the OS comand "pmap" or "top", you can see that each oracle process use mor
memory. Is this a problem on the Oracle installation or something else? It seems that pmap counts the SGA size as
memory segment of each oracle process, but we believe the SGA size should be shared.

Output from "top" on our Solaris System with Orcale 8.1.7.0

PID USERNAME THR PRI NICE SIZE RES STATE TIME                       CPU COMMAND
-----------------------------------------------------------------
361 oracle 258 59 0 124M 88M sleep 0:01 0.00% oracle
373 oracle 11 59 0 122M 88M sleep 41:50 0.00% oracle
363 oracle 11 59 0 119M 88M sleep 0:01 0.00% oracle
365 oracle 11 58 0 119M 88M sleep 0:17 0.02% oracle
359 oracle 1 59 0 119M 89M sleep 0:00 0.00% oracle
377 oracle 1 59 0 119M 88M sleep 0:00 0.00% oracle
375 oracle 1 58 0 119M 88M sleep 0:00 0.00% oracle
367 oracle 1 58 0 118M 89M sleep 0:00 0.00% oracle
371 oracle 1 58 0 118M 89M sleep 0:00 0.00% oracle
369 oracle 1 58 0 118M 88M sleep 0:00 0.00% oracle

Memory Allocation for Oracle Processes

On many UNIX platforms and specially on Sun platforms, the text of the Oracle binary and shared libraries are actu
between background processes if these instances share the same ORACLE_HOME. So you need to subtract the sha
oracle binary and the shared libraries in the result of the OS commands.

Even pmap and pmen utilities make mistakes between these memory divisions, and sometimes SGA and text execu
added incorrectly.

Determine the memory used by each Oracle background process on a Solaris

This can be used by anyone who has privleges for the pmap, which can be found in /usr/proc/bin/. First, we need to
process id (PID) of the Oracle background process you wish to determine the memory size for. This is done by issu
following command:

# ps -u oracle -f

  UID    PID PPID C STIME TTY     TIME CMD
oracle   359 1 0 12:26:17 ? 0:00 ora_pmon_DIA3
oracle   361 1 0 12:26:17 ? 0:01 ora_dbw0_DIA3
oracle   363 1 0 12:26:17 ? 0:01 ora_lgwr_DIA3
oracle   365   1   0 12:26:17 ?    0:18 ora_ckpt_DIA3
oracle   367   1   0 12:26:17 ?    0:01 ora_smon_DIA3
oracle   369   1   0 12:26:17 ?    0:00 ora_reco_DIA3
oracle   371   1   0 12:26:17 ?    0:00 ora_snp0_DIA3
oracle   373   1   0 12:26:17 ?   41:50 ora_s000_DIA3
oracle   375   1   0 12:26:17 ?    0:00 ora_d000_DIA3
oracle   377   1   0 12:26:18 ?    0:00 ora_d001_DIA3

Second, you then enter the following commands for the DB Writer process (ora_dbw0_DIA3) with process id = 36
example.

# /usr/proc/bin/pmap 361 | grep "shmid"
80000000 82992K read/write/exec/shared [ shmid=0x2 ]

# /usr/proc/bin/pmap 361 | grep "total"
total 124232K

Then you take the total size: 124232K and subtract the SGA size which the line marked with "shmid=" above, in th
82992K. So, 124232K minus 82992K is 41240K. So, the DBWR background process is approximately 41.2 MB.
steps for all the background processes.


  Sizing up Solaris Memory with the RMCmem Packag
How much memory is needed on SUN Solaris? Explaining memory in Solaris by reviewing the different types of m
introducing a set of tools, the RMCmem package.

Install RMCmem Package

Download the RMCmem tools available from ftp://playground.sun.com/pub/memtool. The package includes a kern
provides extra instrumentation.

# cd /tmp
# zcat RMCmem3.8.2.tar.gz | tar xvf -
# pkgadd -d .

The package is installed in /opt/RMCmem (see README in this directory)

Virtual / Physical Memory Usage

Solaris is a virtual memory system. The total amount of memory that you can use is increased by adding swap spac
If you ever see "out of memory" messages, adding swap space is the usual fix. Performance of the system is very de
how much physical memory (RAM) you have. If you don't have enough RAM to run your workload, performance d
rapidly.

Physical memory usage can be classified into four groups:

               Kernel memory mapped into kernel address space
               Process memory is mapped into a process address space
Filesystem cache memory that is not mapped into any address space
               Free memory that is not mapped into any address space

RMCmem includes a simple command to summarize this:

# /opt/RMCmem/bin/prtmem

Total memory:        989 Megabytes
Kernel Memory:         60 Megabytes
Application:       110 Megabytes
Executable & libs:    42 Megabytes
File Cache:        757 Megabytes
Free, file cache:   11 Megabytes
Free, free:        6 Megabytes

Total physical memory

The total physical memory can be seen using prtconf. Memory is allocated in units called pages, and you can use th
command to see the size in bytes per page:

# /usr/sbin/prtconf | grep Memory
Memory size: 1024 Megabytes

# /usr/bin/pagesize
8192

Kernel memory

Kernel memory is allocated to hold the initial kernel code at boot time, then grows dynamically as new device drive
modules are used. Kernel tables also grow dynamically, unlike some older versions of Unix. As you add hardware a
a system, the kernel will grow. In particular, to keep track of all the memory in a system, the kernel allocates a page

If you have several gigabytes of RAM this table gets quite large. The dynamic kernel memory allocator grabs mem
"slabs," then allocates smaller blocks more efficiently. This means that the kernel tends to grab a bit more memory
using. If there is a severe memory shortage, the kernel unloads unused kernel modules and devices and frees unused
simplest summary of kernel memory usage comes from sar. To show the kernel memory allocation (KMA) activitie
sar for more details).

# sar -k 1

SunOS diamond 5.7 Generic_106541-12 sun4u          04/28/01

sml_mem alloc fail lg_mem alloc fail ovsz_alloc fail
6873088 6044236 0 44818432 43761720 0 11231232                   0

Application process memory

Application processes consist of an address space divided into segments, where each segment maps either to a file,
memory (the swap space), System V shared memory, or a memory mapped device. The mapped files include the co
initialized data for the command and all its shared libraries.

What we really want to know, is the amount of RAM used by each segment. This is shown by the pmem command
RMCmem package.

# /opt/RMCmem/bin/pmem 361

361: ora_dbw0_DIA3
  Kbytes Resident Shared Private Permissions                    Mapped File
   82992 82992 82992                 - read/write/exec [shmid=0x2]
      16    16      8      8 read/exec              libc_psr.so.1
      16    16      8      8 read/exec              libmp.so.2
       8    8     8      - read/write/exec libmp.so.2
........  .. ..       . ............... ...........
     112     80 72           8 read/exec              libelf.so.1
       8    8     8      - read/write/exec libelf.so.1
      16    16      8      8 read/exec              libkvm.so.1
       8    8     8      - read/write/exec libkvm.so.1
-------- ------ ------ ------ ------
  124232 93040 92728 312

Now we can see that the process address space size is 124232 kilobytes; 93040 kilobytes of that are currently reside
memory, wherein 92728 kilobytes are shared with other processes while 312 kilobytes are private. When this co
only the 312 kilobytes of private memory were taken from the free list.

If we now go through all the processes on the system, add up how much private memory they use, and also add in t
memory for each mapped file, we'll know how much application memory is in use. This summary is shown by prtm
in the beginning, and the detail is listed by the memps command in RMCmem.

# /opt/RMCmem/bin/memps

PID Size Resident Shared Private Process
... ....... ...... ...... .... .............
359 118904k 93608k 92800k 808k ora_pmon_DIA3
367 118184k 93152k 92704k 448k ora_smon_DIA3
369 117928k 93120k 92704k 416k ora_reco_DIA3
371 118040k 93136k 92720k 416k ora_snp0_DIA3
365 119040k 93120k 92712k 408k ora_ckpt_DIA3
377 118344k 93080k 92720k 360k ora_d001_DIA3
363 119088k 93056k 92720k 336k ora_lgwr_DIA3
375 118344k 93048k 92720k 328k ora_d000_DIA3
361 124232k 93040k 92728k 312k ora_dbw0_DIA3
373 121608k 93032k 92728k 304k ora_s000_DIA3

Filesystem cache memory

This is the part of memory that is most confusing, as it is invisible. You can only tell it's there if you access the sam
it is quicker the second time.
The RMCmem package adds kernel instrumentation that counts up all the pages for each cached file. The memps -m
lists the files that are cached in order of the amount of memory they're consuming.

One problem is that within the kernel, the file is only known by its inode number and filesystem mount point. The d
pathname for the file may not be known.

The RMCmem package tries to solve this problem by catching file names as files are opened (by interposing on the
code) and making an inode-to-name lookup cache in the kernel. This cache size is limited (to 8192 entries by defau
may have been opened before the kernel module was loaded, so it can't always find the name.

# memps -m

 Size InUse E/F Filename

21064k 21064k F /usr (inode 540488)
 8184k 824k F /usr (inode 260922)
 7752k 7752k F /usr (inode 540429)
 7480k 7480k F /usr (inode 540428)
 7480k 7480k F /usr (inode 540427)
 6896k 6896k F /usr (inode 540450)
 .... .... . .... ...... ......

... and so on down to lots of files ...

# cd /usr
# find . -inum 540488
./local/jdbc/ora817/old/libserver8.a

More infos about the RMCmem package can be found here as PDF


  Using Sun Solaris Manuals directly from CD-ROM
Solaris 8:

cd /cdrom/sol_8_doc
./ab2cd            (Start)
http://quorum:8888         (Using the Doc online)
./ab2cd stop         (Stop)

Solaris 7:

cd /cdrom/sol_7_1199_doc
./ab2cd            (Start)
http://diamond:8888        (Using the Doc online)
./ab2cd stop         (Stop)


  DLT-TAPE UNIT INSTALLATION on Solaris 7/8/9
Installation Instructions will cover the installation of the DLT tape peripheral hardware and configuration of the sys
communicate with the DLT tape peripheral. In this example we use a «QUANTUM DLT7000».

The Solaris system must have the appropriate SCSI interface for DLT drive to attached to, a SCSI single-ended DL
attached only to a SCSI single-ended interface. The same is true for SCSI differential attachment. Solaris includes a
efficiently communicate with SCSI tape drives, such as the DLT tape peripheral.

Perform the installation as follows:

Shut down your Sun workstation/server and power off the machine and all scsi-devices. Connect the DLT to the scs
good cables and make sure the bus is terminated correctly. Set the scsi-id; id 4 or 5 are the most common to use.

If possible use a separate or underutilized SCSI bus for the DLT. Running the tape drive on the same bus as the disk
never let you achieve any good throughput. You bought the DLT because of performance didn't you ?

1.    STOP-A (L1-A)                               Power on the devices/machine again and halt the boot process with

                                                  (or press the BREAK key if you have an ASCII
                                                  console).
2.    probe-scsi-all                              Verify that the drive is connected properly.

                                                  Note: output from probe-scsi will not always be correct if you
                                                  enter the PROM monitor by breaking the boot process!
3.    boot -rv                                    Boot the system and log in as root. When booting you should see a
                                                  message similar to these: "st1: ".
4.    cd /kernel/drv                              Change directory to /kernel/drv.

                                                  Edit the st.conf file by adding the following:
      tape-config-list="QUANTUM DLT7000","Quantum DLT7000","DLT7-data";
      DLT7-data = 1,0x38,0,0x8639,4,0x82,0x83,0x84,0x85,3;

tape-config-list="<DLT tape unit>","<DLT reference name>","<DLTdata>"

                 tape-config-list is a variable defined by a series of tape configuration parameters listed belo

                 <DLT tape unit> is the vendor and product ID string for the DLT device.

                  Depending on the DLT tape peripheral you are installing, you must insert the appropriate vendor an
                 for
                  <DLT tape unit> as described in the following table:

       DLT Tape Product                                      <DLT tape unit>
       DLT7000                                               QUANTUM DLT7000 (Total string character
                                                             count, including spaces, must equal 15).

                 <DLT reference name> is a name you select that the system will use to identify the DLT devic
                 reference does not change the DLT product ID. When the system boots, the reference name will be d
list of peripheral devices recognized by the system.

              <DLT-data> is a variable containing a series of additional DLT device configuration information. Yo
              name in place of the <DLT data> string. You will continue editing the st.conf file by defining the
              selected for <DLT data>. The definition depends on the DLT tape peripheral you are installing. F
              series unit add the following line:

              1,0x38,0,0x8639,4,0x82,0x83,0x84,0x85,3;

<DLT data> contains 10 parameters and are described following:

1           The first parameter, is the version number and should not change.
0x38        The second parameter, designates the DLT tape type as defined in
            /usr/include/sys/mtio.h.

            #define MT_ISOTHER 0x36 /* generic other type of tape drive */
            #define MT_ISDLT 0x38 /* sun: SCSI DLT tape drive */
0           The third parameter is the block size. Since the DLT tape drive uses variable block size, this value
            should be zero.
0x8639      The fourth parameter, 0x8639, is a summation of values that represent selected device options. The
            table below lists the options and the corresponding value:

            Option                                      Value

            ST_VARIABLE                                 0x0001
            ST_BSF                                      0x0008
            ST_BSR                                      0x0010
            ST_LONG_ERASE                               0x0020
            ST_NOWS_EOD                                 0x0200
            ST_NLOADABLE                                0x0400
            ST_NO_RECSIZE_LIMIT                         0x8000

            The man st page has more information about these and other possible device options. For certain
            applications, it may be necessary to consider adding or removing one or more of the device
            options.
4           The fifth parameter, 4, defines the number of densities. The maximum definable number of
            densities is 4.
0x82        The sixth, seventh, eighth and ninth parameter are used for system selection of tape densities. Use
0x83        these values for a DLT 7000 Tape Drive.
0x84
0x85
3           The tenth parameter defines which density the system will use as the default density. The sixth,
            seventh, eighth and ninth parameters in the <DLT data>string are referenced by the system as 0, 1,
            2 and 3, respectively. The 3 value for the tenth parameter selects the 0x85 density code as the
            system default density.

After editing the st.conf file, reboot the system:
5.   shutdown-i0-g0                       Reboot the System
     boot -rv                             The -r switch in the boot command enables a kernel compile and includes
                                          creation of device special files used for communication with the DLT devi
                                          The -v switch enables verbose mode display of system bootup. With verbo
                                          mode, the system should indicate that the DLT tape peripheral is attached
                                          displaying the <DLT reference name>string you selected.
6.   mt -t /dev/rmt/0 status              Enter the following command to verify the installation:

                                          Vendor 'TANDBERG' Product 'DLT7000 ' tape drive:
                                          sense key(0x0)= No Additional Sense residual= 0
                                          retries= 0 file no= 0 block no= 0

The target drive designations assigned by Solaris may take on values higher than already established in the /dev/r
This is not a problem but during a boot -rv, Solaris does not remove tape device files for drives that are no long
the system. This can increase the effort in locating the device file for the configured drive, however, this can be min
deleting the tape device files:

rm /dev/rmt/*

then either boot the system with a:

boot -rv

or issue the following at the command line prompt:

drvconfig -i st; tapes

If the DLTtape is the only drive on the system, it's target assignment should be zero. The Solaris man pages have m
on drvconfig and tapes.


     Reconfigure Devices on Solaris
If you remove or add a device on Solaris then the devices files must be recreated, either with boot -rv or devfs
example to renumber the logical tape drive devices do the following: Tape drives were numbered beginning with /d
instead of /dev/rmt/0. The physical devices pointed to by the logical /dev/rmt/[012] devices no longer existed, and w
renumber the valid devices beginning at /dev/rmt/0.

           1. Cleanup non-existent tape drive devices with devfsadm.

                # devfsadm -C -c tape -v

           2. Remove all /dev/rmt logical links.

                # rm -f /dev/rmt/*

           3. Recreate all /dev/rmt logical links with devfsadm
# devfsadm -c tape -v

devfsadm

devfsadm(1M) maintains the /dev and /devices namespaces. It replaces the previous suite of devfs administration to
drvconfig(1M), disks(1M), tapes(1M), ports(1M), audlinks(1M), and devlinks(1M).

OPTIONS

The following options are supported:

-C                                   Cleanup mode. Prompt devfsadm to cleanup dangling /dev links that are not normally
                                     removed. If the -c option is also used, devfsadm only cleans up for the listed devices'
                                     classes.
-c device_class                      Restrict operations to devices of class device_class. Solaris defines the following value
                                     for device_class: disk, tape, port, audio, and pseudo. This option may be specified
                                     more than once to specify multiple device classes.


      OpenBoot Diagnostics
The Solaris operating system gets the jumpstart for its booting from a hardware-level interface called the OpenBoo
OBP for short. OpenBoot at its heart has an interactive command interpreter with a varied set of functions. OBP is
which is stored in the socketed startup PROM of the computer and consists of two parts, the PROM and the NVRA

As stated earlier while the PROM acts as the interface for access to diagnostics and drivers, the NVRAM consists o
user defined parameters. Non Volatile information like the system identification information, device aliases etc are
NVRAM.The OpenBoot PROM is programmable and can be programmed based on Forth, which is an interactive
programming language much like shell scripting.

The main tasks performed by the OpenBoot firmware are:

                  Initializing and Testing system hardware ( POST , power on self test)
                  Interactive Debugging
                  Management of NVRAM Parameters
                  Start the Operating System boot

Useful commands at OK prompt.
Dignostics :                                   boot                                         General
banner                                         boot - boot kernel from default device.      printenv
this command shows the following systems       Factory default is to boot                   Display all variables and current values.
hardware informatiion : Model, architecture,   from DISK if present, otherwise from NET.
processor,keyboard, openboot version, Serial                                                setenv <variable>
no. ethernet address & host id.                boot net - boot kernel from network          Set variable to the given   value.
                                               boot cdrom - boot kernel from CD-ROM
test floppy - test floppy disk drive           boot disk1:h - boot from disk1 partition h   set-default <variable>
test net - test network loopbacks              boot tape - boot default file from tape      Reset the value of variable to the factory default
test scsi - test scsi interface                boot disk myunix -as - boot myunix from
test-all test for all devices with selftest    disk with flags "-as"                        set-defaults
method                                                                                      Reset variable values to the factory defaults.

watch-clock
Show ticks of real-time clock
watch-net
                                               DEVALIAS
Monitor network broadcast packets

watch-net-all                                   ok>show-devs
Monitor broadcast packets on all net interfaces ok cd /pci@1f,4000/scsi@3
                                               ok .properties
probe-scsi
                                               ok ls
Show attached SCSI devices
                                               f00809d8 tape
                                               f007ecdc disk
probe-scsi-all
                                               ok .speed
Show attached SCSI devices for all host
                                               CPU Speed : 200.00MHz
adapters- internal & external.
                                               UPA Speed : 100.00MHz
                                               PCI Bus A : 66Mhz
                                               PCI Bus B : 33Mhz
Key Sequences
These commands are disabled if the PROM security is on. Also, if your system has   full security enabled, you cannot apply any of the suggested
commands unless you have the password to get to the ok prompt.
Stop –
 Bypass POST. This command does not depend on security-mode. (Note: some systems bypass POST as a default; in such cases, use             Stop-D t
start POST.)
Stop-A Abort.
Stop-D - Enter diagnostic mode (set diag-switch? to true).
Stop-F - Enter Forth on TTYA instead of probing. Use   exit to continue with the initialization sequence. Useful if hardware is broken.
Stop-N Reset NVRAM contents to default values.


Start an OpenBoot Diagnostics

<STOP A>
OK setenv diag-switch? true
OK setenv auto-boot? false
OK reset-all

OK test-all or obdiag

Configure Graphics Console (e.g. Sun XVR-100 Graphics Accelerator) instead of serial TTYA

OK show-displays
Select the graphics accelerator, e.g. b

OK nvalias mydev <CTRL-Y>
OK setenv output-device mydev
OK setenv use-nvramrc? true
OK reset-all


  Why doesn't my .forward file work?
Overview

If you are having problems where you have created a $HOME/.forward file in your home directory to forward e
account to another and it just won't forward them?

Set correct Permissions

First make sure the file isn't group or world writable.
-rwxrwxr-x 1 zahn dba 0 Jan 9 12:17 .forward # wrong
-rwxr-xr-x 1 zahn dba 0 Jan 9 12:17 .forward # OK

Lastly, make sure your home directory isn't group or world writable.

drwxrwxr-x 14 zahn dba 4096 Jan 9 12:20 zahn # wrong
drwxr-xr-x 14 zahn dba 4096 Jan 9 12:20 zahn # OK


  Simple Shell Script to backup your Files
Overview

A backup strategy is more complex than creating a redundant copy of disk storage and considering the strategy a su
successful backup strategy must detail how the backup media are rotated, how the media are archived, how the syst
recovered, and what the backup software will do to create the backup. Although all parts of the backup strategy are
important, this tip will focus on the backup script and will detail a flexible backup script that uses built-in Solaris so
which create a reliable local backup of a Solaris machine.

Introduction

The backup script will accomplish the following goals:

                        Create a backup archive that is as easy to restore a single file as it is to restore an entire file s
                        The backup script will run autonomously. The only human intervention will be to swap medi
                        output.
                        The filesystems or directories to backup can be specified in the script. Using automounter yo
                        specify remote filesystems.
                        The script will create a detailed log of the backup.
                        The script will send an abbreviated email summary of the backup to the administrator.
                        After a successful backup, the script will verify to some extent the contents of the backup me
                        The backup script will be able to run on any Solaris 2.6 or greater machine without modifica

Tools used

We use the well known utilities TAR, GZIP and DD, because they are available on any Unix system. They are ver
and simple to use. In case of an emergency it is important to have a simple way to restore, independent of complex
incompatible software releases.

Magnetic Tape Control

The utility MT sends commands to a tape drive. Many of these commands are familiar, but some are not. The script will use
commands.

                        rewind – rewind the tape
                        rewoffl – rewind the tape and eject it (go offline)
                        eom – space to end of recorded media on tape
                        weof – write count EOF marks at current position on tape
                        status – display current status of tape
Script

Click here for the Shell Script

More Related Content

PDF
Step by step migration ufs to zfs file system on solaris 10
PDF
Fedora Atomic Workshop handout for Fudcon Pune 2015
PDF
Install tomcat 5.5 in debian os and deploy war file
DOCX
How to recover password on the cisco catalyst fixed configuration layer 2&lay...
DOCX
Lamp configuration u buntu 10.04
PDF
Web Server Free Bsd
PDF
Aix5[1].3+hacmp+oracle9 i+weblogic8.1安装实施报告
PPT
101 4.3 control mounting and unmounting of filesystems
Step by step migration ufs to zfs file system on solaris 10
Fedora Atomic Workshop handout for Fudcon Pune 2015
Install tomcat 5.5 in debian os and deploy war file
How to recover password on the cisco catalyst fixed configuration layer 2&lay...
Lamp configuration u buntu 10.04
Web Server Free Bsd
Aix5[1].3+hacmp+oracle9 i+weblogic8.1安装实施报告
101 4.3 control mounting and unmounting of filesystems

What's hot (20)

PDF
12040 pswdrec-2900xl
DOCX
Component pack 6006 install guide
ODP
Linux Kernel Crashdump
PDF
Linux Common Command
PPT
Lecture 20 presentation
PDF
Dev ops
PDF
Alta disponibilidad en GNU/Linux
ODP
Proxy arp
TXT
TXT
Cluster setup multinode_aws
PPTX
Creating "Secure" PHP applications, Part 2, Server Hardening
DOCX
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
PPTX
RPM (LINUX)
PDF
How to mount and unmount filesystem
PDF
Instalar PENTAHO 5 en CentOS 6
PDF
How to train your L3DSR with PBR - MEMO -
PDF
How to twist a IPv6 over Bluetooth (6lowpan)
ODP
Triangle OpenStack meetup 09 2013
PPT
Apache
DOC
Most frequently used unix commands for database administrator
12040 pswdrec-2900xl
Component pack 6006 install guide
Linux Kernel Crashdump
Linux Common Command
Lecture 20 presentation
Dev ops
Alta disponibilidad en GNU/Linux
Proxy arp
Cluster setup multinode_aws
Creating "Secure" PHP applications, Part 2, Server Hardening
HP-UX 11iv3 How to Change Root Volume Group Name vg00 by Dusan Baljevic
RPM (LINUX)
How to mount and unmount filesystem
Instalar PENTAHO 5 en CentOS 6
How to train your L3DSR with PBR - MEMO -
How to twist a IPv6 over Bluetooth (6lowpan)
Triangle OpenStack meetup 09 2013
Apache
Most frequently used unix commands for database administrator
Ad

Similar to Solaris (20)

DOCX
Add and configure lu ns in solaris
PDF
ONOS SDN Controller - Clustering Tests & Experiments
DOCX
Linux lv ms step by step
PPT
PDF
005 skyeye
PDF
Mirroring the root_disk under solaris SVM
PDF
x86_64 Hardware Deep dive
PPT
Andresen 8 21 02
PDF
Docker and friends at Linux Days 2014 in Prague
PDF
Hacking the swisscom modem
PDF
Salesforce at Stacki Atlanta Meetup February 2016
PDF
JomaSoft VDCF - Solaris Private Cloud
PDF
Oracle (Sun) Server hardware Open Boot PROM quick reference
PPTX
Vagrant, Ansible, and OpenStack on your laptop
PPTX
Programming OpenRISC on Altera De0_nano
PDF
EF09-Installing-Alfresco-components-1-by-1.pdf
PDF
Snort296x centos6x 2
PDF
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce
PPTX
Stacki - The1600+ Server Journey
PPT
Ch12 system administration
Add and configure lu ns in solaris
ONOS SDN Controller - Clustering Tests & Experiments
Linux lv ms step by step
005 skyeye
Mirroring the root_disk under solaris SVM
x86_64 Hardware Deep dive
Andresen 8 21 02
Docker and friends at Linux Days 2014 in Prague
Hacking the swisscom modem
Salesforce at Stacki Atlanta Meetup February 2016
JomaSoft VDCF - Solaris Private Cloud
Oracle (Sun) Server hardware Open Boot PROM quick reference
Vagrant, Ansible, and OpenStack on your laptop
Programming OpenRISC on Altera De0_nano
EF09-Installing-Alfresco-components-1-by-1.pdf
Snort296x centos6x 2
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce
Stacki - The1600+ Server Journey
Ch12 system administration
Ad

More from Ganesh Kumar Veerla (15)

DOC
Boot prom basics
DOC
Chapter 12 user roles
DOC
Chapter 6 polices
DOC
Chapter 5 HP OVOw Node management
DOC
Chapter 3 HP OVOW architecture
DOC
Chapter 2 hp ovo service driven management
PDF
PPTX
Hp open view(hp ov)
PDF
Windows command line_sheet_v1
DOC
imp websites for solaris and linux
DOC
Managerof managerarchitecture
PPT
Hp open view
PPTX
Nsm overview
PPTX
Ovo and nnm work flow at ahcc
Boot prom basics
Chapter 12 user roles
Chapter 6 polices
Chapter 5 HP OVOw Node management
Chapter 3 HP OVOW architecture
Chapter 2 hp ovo service driven management
Hp open view(hp ov)
Windows command line_sheet_v1
imp websites for solaris and linux
Managerof managerarchitecture
Hp open view
Nsm overview
Ovo and nnm work flow at ahcc

Recently uploaded (20)

PDF
01-Introduction-to-Information-Management.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Insiders guide to clinical Medicine.pdf
PDF
Basic Mud Logging Guide for educational purpose
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PPTX
Pharma ospi slides which help in ospi learning
PDF
Classroom Observation Tools for Teachers
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
master seminar digital applications in india
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Cell Types and Its function , kingdom of life
01-Introduction-to-Information-Management.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Insiders guide to clinical Medicine.pdf
Basic Mud Logging Guide for educational purpose
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Renaissance Architecture: A Journey from Faith to Humanism
FourierSeries-QuestionsWithAnswers(Part-A).pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Cell Structure & Organelles in detailed.
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Pharma ospi slides which help in ospi learning
Classroom Observation Tools for Teachers
Week 4 Term 3 Study Techniques revisited.pptx
master seminar digital applications in india
102 student loan defaulters named and shamed – Is someone you know on the list?
Cell Types and Its function , kingdom of life

Solaris

  • 1. Akadia Information Technology SUN Free Software PCNFS installieren Installation Solaris mit Openwindows (Grafikkarte) How to Backup a System Packages (Software die installiert wurde) Monitor Mode (OK Prompt) Kernel Analyse Defaults einstellen Wichtige Konfigurationsfiles Admin Kommandos LAN konfigurieren IP-Routing konfigurieren DNS konfigurieren Anonymous FTP aufsetzen NFS-Client Konfiguration NFS-Server Konfiguration Automounter Modem konfigurieren SCSI-Harddisk an SUN Hardware anschliessen List Solaris Hardware Configuration Show Swap Space currently installed Show Operating System Patch Level How to install a Sun Solaris Jumbo Patch ? Tracing System Calls Troubleshooting Solaris Device Files Short Tips to maintain Sun Solaris IP-Aliasing for SUN Solaris Solaris automounter installs filesystems by default in /net Solaris keyboard utility Monitoring Performance Enable file system journaling on Solaris 7 and 8 Solaris Syslog Daemon Debugging Does each Oracle Process use more than 100M memory ? Sizing up Solaris Memory with the RMCmem Package Using Sun Solaris Manuals directly from CD-ROM Why is the Sun Solaris System Corefile helpful ? DLT-TAPE UNIT INSTALLATION on Solaris 7/8/9 Reconfigure Devices on Solaris OpenBoot Diagnostics Why doesn't my .forward file work Simple Shell Script to backup your Files
  • 2. SUN Free Software Unter http://www.sunfreeware.com findet man "ready to use" Software für SUN Solaris, wie beispielsweise TOP, A GCC, GDB etc. Download via FTP von: «ftp://nce.sun.ch/pub/freeware/sparc/7» PCNFS installieren CD-ROM Solaris Intranet Extension (siehe auch Solaris Server Intranet Extension Installation) $ su $ cd /cdrom/cdrom0/nfsc/sparc $ pkgadd -d `pwd` Installation Solaris mit Openwindows (Grafikkarte) Hostname $ uname -u Network Interface $ ifconfig -a /etc/hosts, /etc/netmasks definieren Static IP-routes definieren /etc/rc2.d/S79staticroutes CD-ROM rausnehmen $ eject cdrom Disklayout kontrollieren $ prtvtoc /dev/rdsk/.... Automounter konfigurieren /etc/auto_master, /etc/auto_home Device File für DAT /dev/rmt/0l (tar cvf /dev/rmt/0l)
  • 3. /etc/system definieren konfigurieren (Prestoserve, Oracle, Transtec) Logfile der Installation: /var/sadm/system/logs/install_log Installation über serielles Terminal an Nullmodem Kabel OK boot cdrom - w (Terminal an ttya) How to Backup a System $ init 0 OK boot -s $ fsck -m /dev/dsk/c0t0d0s0 (und übrige Filesysteme) $ tar cvf /dev/rmt/0l Packages (Software die installiert wurde) Anzeige der installierten Packages $ pkginfo Check ob Package SUNWpcnfd correct installiert ist $ pkgchk -v SUNWpcnfd Package installieren (Path ist meistens /cdrom/cdrom0/....) $ pkgadd -d <Path to CDROM> SUNWpcnfd Das Package SUNWpcnfd entfernen $ pkgrm SUNWpcnfd Monitor Mode (OK Prompt) In single user mode booten OK boot -s Kernel zwingen /devices neu aufzubauen nach dem Anschluss von neuer Hardware OK boot -r Detaillierter Bootvorgang
  • 4. OK boot -v Vom CD-ROM aus booten: Notboot ! OK boot cdrom Angeschlossene SCSI-Geräte testen OK probe-scsi List System Devices, e.g. SUNW,hme = Sun Fast Ethernet PCI Adapter OK show-devs List Network Devices OK show-nets Monitoring Network Activity OK apply watch-net <full path name of the hme interface, see show-devs> Monitor Variablen ändern, anzeigen OK eeprom OK eeprom ttya-mode=38400,8,n,1,h Kernel Analyse Welche Kernel-Module sind geladen ? $ modinfo Kernel Konfiguration /etc/system Logfile von syslog /var/adm/messages Konfiguration des syslog Daemon /etc/syslog.conf Defaults einstellen
  • 5. Directory mit Default files /etc/default Remote root logins erlauben /etc/default/login Timezone setzen /etc/default/init Wichtige Konfigurationsfiles Master-File beim Booten /etc/inittab Run-Level Start/Stop Files /etc/rc?.d Scripts für Run-Levels /etc/init.d Admin Kommandos $ shutdown -g0 -i0 $ reboot (entspricht init 6) LAN konfigurieren Konfiguration der LAN-Interfaces $ ifconfig -a Netmask setzen: siehe /etc/netmasks Jedes LAN-Interface hat /etc/hostname.le0 mit Hostnamen LAN-Setup: /etc/rcS.d/S30rootusr.sh (Interfaces konfigurieren) /etc/rc2.d/S72inetsvc (LAN konfigurieren) Phys Addressen nachschauen $ arp -a Net to Media Table
  • 6. Device IP Address Mask Flags Phys Addr ------ -------------------- --------------- ----- --------------- le0 rabbit 255.255.255.255 00:60:08:57:17:86 le0 quorum 255.255.255.255 SP 08:00:20:89:27:03 le0 arkum 255.255.255.255 00:a0:24:4b:60:1c IP-Routing konfigurieren Alle hosts im Netz 193.72.239.0 werden über den Router 193.72.194.201 erreicht. $ route add net 193.72.239.0 193.72.194.201 1 Der host 146.228.14.10 wird über den Router 193.72.194.100 erreicht. Siehe File /etc/rc2.d/S79staticroutes. $ route add host 146.228.14.10 193.72.194.100 1 Routing Tabelle kontrollieren $ netstat -nr DNS konfigurieren Angabe des DNS Nameservers /etc/resolv.conf Reihenfolge definieren /etc/nsswitch.conf Anonymous FTP aufsetzen Siehe Solris2 Administration Seite 103 und ff NFS-Client Konfiguration /etc/vfstab (Soll) --> /etc/mnttab (Ist) mount -F nfs -o bg,ro,soft gondwana:/usr/software /software NFS-Server wird in /etc/init.d/nfs.client start gestartet. Anzeige welche Directories gondwana zum mounten freigegeben hat
  • 7. dfshares gondwana RESOURCE SERVER ACCESS TRANSPORT gondwana:/export/home/zahn gondwana - - gondwana:/export/home/steiner gondwana - - NFS-Server Konfiguration /etc/dfs/dfstab (Soll) --> /etc/dfs/sharetab Directory read-only freigeben $ share -o ro /usr/software Alle Directories in /etc/dfs/dfstab freigeben $ shareall Alle Directories in /etc/dfs/dfstab zurücknehmen $ unshareall NFS-Server wird gestartet in /etc/init.d/nfs.server Anzeige der freigegbenen lokalen Direcories $ share Anzeige welche Clients nutzen welche Directories eines NFS-Servers $ dfmounts -F nfs gondwana RESOURCE SERVER PATHNAME CLIENTS gondwana /export/home/zahn paragon.glue.ch,rabbit.glue.ch Automounter - /etc/auto_master (Master Map konfigurieren) - /etc/auto_home (Home Direcories verwalten) - autofs ist ein spezielles Filesystem - automount -v (Nach einer Aenderung an einer Map ausführen) Modem konfigurieren
  • 8. Siehe spezielles Dokument SCSI-Harddisk an SUN Hardware anschliessen Beispiel: SCSI-Disk Seagate ST150176L, 50MB an SUN Ultra Enterprise 1 Eintrag in /etc/format.dat vornehmen (Angaben von Lieferanten) disk_type = "Seagate ST150176L" : ctlr = "SCSI" : ncyl = 12022 : acyl = 2 : pcyl = 12024 : nhead = 22 : nsect = 369 : rpm = 7200 : bpt = 188928 Eintrag /etc/system für Solaris-2 Kernel, System booten * * SCSI-Disc Konfiguration * set scsi_options=0x20 Disk anschliessen, SCSI-Adresse kontrollieren, Terminierung Unbedingt kontrolieren, dass eine SCSI-Adresse nicht mehrfach belegt ist. Dazu kann meistens hinte Tippschalter eingestellt werden. Man beacht, dass in der Regel das letzte Gerät terminiert werden m Disk formatieren (nur wenn notwendig !) In der Regel muss eine Disk nicht neu formatiert werden, ist dies jedoch notwendig so steht unter So format zur Verfügung. format AVAILABLE DISK SELECTIONS: 0. c0t0d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80> /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@0,0 1. c0t1d0 <SUN2.1G cyl 2733 alt 2 hd 19 sec 80> /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@1,0 2. c0t2d0 <IBM-DDRS-39130-S71D cyl 8186 alt 2 hd 10 sec 218> /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@2,0 3. c0t4d0 <SEAGATE-ST118273N-5764 cyl 7499 alt 2 hd 20 sec 237> /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@4,0 4. c0t5d0 <SEAGATE-ST150176LW-0002 cyl 12022 alt 2 hd 22 sec 369> /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@5,0 Specify disk (enter its number): 4 format> type AVAILABLE DRIVE TYPES:
  • 9. 0. Auto configure 1. DDRS-39130 2. Seagate ST118273 3. Seagate ST150176L 4. Quantum ProDrive 80S 5. Quantum ProDrive 105S 6. CDC Wren IV 94171-344 7. SUN0104 8. SUN0207 9. SUN0327 10. SUN0340 11. SUN0424 12. SUN0535 13. SUN0669 14. SUN1.0G 15. SUN1.05 16. SUN1.3G 17. SUN2.1G 18. SUN2.9G 19. IBM-DDRS-39130-S71D 20. SEAGATE-ST118273N-5764 21. SEAGATE-ST150176LW-0002 22. other Specify disk type (enter its number)[21]: 21 format> format (confirm with "yes") Disk partitionieren Dadurch wird die Disk in logische Teile unterteilt. Jeder teil enthält ein eigenes Filesystem. format> part Nun die Partitionierungsdaten eingeben, zB partition> print Current partition table (original): Total disk cylinders available: 2733 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 0 - 204 152.15MB (205/0/0) 311600 1 swap wu 205 - 377 128.40MB (173/0/0) 262960 2 backup wm 0 - 2732 1.98GB (2733/0/0) 4154160 3 home wm 378 - 1017 475.00MB (640/0/0) 972800 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 1018 - 1928 676.13MB (911/0/0) 1384720 6 usr wm 1929 - 2732 596.72MB (804/0/0) 1222080 7 unassigned wm 0 0 (0/0/0) 0
  • 10. Label erzeugen (aktuelle Partitionierung speichern) partition> label partition> y partition> quit format> quit Filesystem erstellen newfs -v -m 0 /dev/rdsk/c0t5d0s0 Damit wird ein Filesystem mit 0 % Min-Free auf der Partition 0 der Disk an der SCSI-Adresse 5 erstellt. Filesystem mounten Dazu den folgenden Eintrag in /etc/vfstab vornehmen #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options /dev/dsk/c0t5d0s0 /dev/rdsk/c0t5d0s0 /u02 ufs 6 yes - List Solaris Hardware Configuration $ /usr/sbin/prtconf Show Swap Space currently installed Multiply the Blocks column by 512 $ swap -l swapfile dev swaplo blocks free /dev/dsk/c0t0d0s1 32,1 16 262944 262944 262944 * 512 = 134 MB Show Operating System Patch Level $ showrev -p Patch: 105181-16 Note, that Patchlevel 105181-15 is minimal needed for Oracle 8.1.6
  • 11. How to install a Sun Solaris Jumbo Patch ? - Download the Patch from: http://sunsolve.sun.com - Read the README File included in the Patch - Usually the only thing you have to do is: $ cd <patch cluster directory> $ ./install_custer $ cat /var/sadm/install_data/<luster name>_log $ showrev -p Reboot the system Tracing System Calls You can trace system calls with truss on Solaris an strace on Linux $ truss svrmgrl Troubleshooting Solaris Device Files If you suspect troubles with your Solaris device files, e.g. system doesn't boot after a filesystem check, you may rep system using the following commands. Halt the system immediately with the keys STOP-A, you will now see the boot prompt: OK STOP-A Reset the machine with OK reset Boot the machine with OK boot -r The command boot -r will rebuild all devices files according to your attached hardware. If you cannot boot the mac try the following commands: drvconfig, disks, tapes drvconfig - configure the /devices directory The default operation of drvconfig is to create the /devices directory tree that describes, in the filesystem namespac layout of a particular machine. Hardware devices present on the machine and powered on as well as pseudo-drivers under /devices. Normally this command is run automatically after a new driver has been installed (with add_drv(1M system has been rebooted.
  • 12. disks - creates /dev entries for hard disks attached to the system Disks creates symbolic links in the /dev/dsk and /dev/rdsk directories pointing to the actual disk device special files /devices directory tree. tapes - creates /dev entries for tape drives attached to the system Tapes creates symbolic links in the /dev/rmt directory to the actual tape device special files under the /devices direc searches the kernel device tree to see what tape devices are attached to the system. Short Tips to maintain Sun Solaris Here are some short tips for common tasks on SUN Solaris 2.6, 7 and 8 Important SUN Solaris Commands $ who -r # Show Run Level $ /usr/sbin/prtconf # Print the complete system configuration $ /sbin/mountall -l # Mount all local filesystems. $ /sbin/init S # Changing to single user mode Show currently mounted filesystems # /etc/mnttab: Contains information about devices that # are currently mounted. If there are mounted filesystems # with quotas enabled, display them if /usr/bin/cut -f 4 /etc/mnttab | /usr/bin/egrep '^quota|,quota' >/dev/null 2>&1; then echo 'There are mounted filesystems with quotas enabled' fi How to enable system activity data gathering # You will also need to uncomment the sa entries in # the system crontab /var/spool/cron/crontabs/sys. # Refer to the sar(1) and sadc(1m) man pages # for more information. $ /usr/bin/su sys -c "/usr/lib/sa/sadc /var/adm/sa/sa`date +%d`" How a new, unused Solaris system is setup ? # sysidtool is a suite of five programs that configure a new # system, or one that has been unconfigured with sys- # unconfig(1M). The sysidtool programs run automatically at # system installation, or during the first boot after a # machine has been successfully unconfigured.
  • 13. # # These programs have no effect except at such times, and # should never be run manually. # System Files are cat /etc/nodename cat /etc/hostname.* cat /etc/default/init cat /etc/defaultdomain cat /etc/inet/hosts cat /etc/inet/netmasks How to configure Asynchronous PPP ? Configure /etc/asppp.cf for the aspppd daemon $ /usr/sbin/aspppd -d 1 How to get and set TCP/IP driver configuration parameters ? # Getting Parameters Supported By The TCP Driver # To see which parameters are supported by the TCP driver, # use the following command: $ ndd /dev/tcp ? # The following command sets the value of the parameter # ip_forwarding in the IP driver to zero. This disables IP # packet forwarding. Disable IP Forwarding $ /usr/sbin/ndd -set /dev/ip ip_forwarding 0 Enable IP Forwarding (Machine acting as a Router) $ /usr/sbin/ndd -set /dev/ip ip_forwarding 1 How to set Default Route on Solaris ? # Configure default routers using the local "/etc/defaultrouter" # configuration file. The file can contain the hostnames or IP # addresses of one or more default routers. # # The default routes listed in the "/etc/defaultrouter" file will # replace those added by the kernel during diskless booting. An # empty "/etc/defaultrouter" file will cause the default route # added by the kernel to be deleted.
  • 14. # # Note that the default router file is ignored if we received routes # from a DHCP server. Our policy is to always trust DHCP over local # administration. # Set Default Route $ route -n add default <Default Route from /etc/defaultrouter> # Show Default Route $ /usr/sbin/route -fn default 128.128.128.11 done How to set NIS domainname if locally configured ? if [ -f /etc/defaultdomain ]; then /usr/bin/domainname `cat /etc/defaultdomain` echo "NIS domainname is `/usr/bin/domainname`" fi RPC (Remote Procedure Call) Configuration # rpcbind - universal addresses to RPC program number mapper # rpcinfo - report RPC information Solaris Keyserv Daemon # keyserv is a daemon that is used for storing the private # encryption keys of each user logged into the system. These # encryption keys are used for accessing secure network ser- # vices such as secure NFS and NIS+. $ /usr/sbin/keyserv How to start the Solaris DNS server "in.named" # If this machine is configured to be an Internet # Domain Name System (DNS) server, run the name daemon. # Start named prior to: route add net host, # to avoid dns gethostbyname timout delay for # nameserver during boot. if [ -f /usr/sbin/in.named -a -f /etc/named.conf ]; then echo 'starting internet domain name server.' /usr/sbin/in.named & fi
  • 15. Where to find syslogd messages ? Configuration File: /etc/syslog.conf Message File: /var/adm/messages IP-Aliasing for SUN Solaris # How to setup IP-Alias on SUN Solaris 1. Setup File /etc/hostname.hme0:1 for the second IP-Address cat /etc/hostname.hme0:1 ldap 2. Insert IP-Address in /etc/hosts # # Internet host table # 128.128.128.11 ux-portal1 # IP-address on hme0:0 128.128.128.20 ldap # IP-alias on hme0:1 3. Start alias IP-Address on Interface in /etc/rc2.d S99ipalias -> ../init.d/ipalias #!/bin/sh # Akadia AG, Arvenweg 4, CH-3604 Thun # ---------------------------------------------------------------------- # File: ipalias # # Autor: Martin Zahn / 10.05.2000 # # Purpose: Setup second IP address on hme0:1 # ---------------------------------------------------------------------- if [ -f /etc/hostname.hme0:1 ] then case "$1" in 'start') # Start second IP address on hme0:1 echo "Start multi-homed server for UX-ALIAS1 on hme0:1" ifconfig hme0:1 128.128.128.20 up ;;
  • 16. 'stop') # Stop second IP address on hme0:1 echo "Stop multi-homed server for UX-ALIAS1 on hme0:1" ifconfig hme0:1 128.128.128.20 down ;; esac fi 4. Check IP-Address on second Interface ifconfig -a Solaris automounter installs filesystems by default in The Solaris automount utility installs autofs mount points and associates an automount map with each mount po autofs file system monitors attempts to access directories within it and notifies the automountd daemon. The d the map to locate a file system, which it then mounts at the point of reference within the autofs file system. You map to an autofs mount using an entry in the /etc/auto_master map or a direct map in /etc/auto_dir system is not accessed within an appropriate interval (five minutes by default), the automountd daemon unmoun system. Default Mapping under /net The mount point /net is by default the location, where automountd mounts NFS filesystems, which are exporte machines. Lets suppose, that you have the filesystem /home exported on the NFS server saphir, then the (Solari with an active automounter will automatically mount this NFS filesystem under /net/saphir/. Mapping using /etc/auto_direct You probably doesn't want this default behavior. If you insert the following entry in /etc/auto_direct .... /opt/local -rw remote_machine:/local .... then, the directory /local on the remote machine "remote_machine" will be mounted on the local machine un /opt/local. Solaris keyboard utility The Solaris utility kbd manipulates the state of the keyboard or display the type of keyboard or change the default abort sequence effect. Suppose, that you do not want that everybody can halt the the system you must change the d We also noticed, that the Solaris machines attached to a switch box, using a character terminal on a serial line, may switch from one machine to the other. SYNOPSIS kbd [ -r ] [ -t ] [ -c on|off ] [ -a enable|disable ] [ -d keyboard device ]
  • 17. kbd -i [ -d keyboard device ] DESCRIPTION kbd manipulates the state of the keyboard, or displays the keyboard type or allows the default keyboard abort sequ be changed. The default keyboard device being set is /dev/kbd. The -i option reads and processes default values for the keyclick and keyboard abort settings from the keyboard de /etc/default/kbd. Only keyboards that support a clicker respond to the -c option. If you want to turn clicking add or change the current value of the KEYCLICK variable to the value on in the keyboard default file, /etc/def as shown here. KEYCLICK=on Then, run the command 'kbd -i' to change the current setting. Valid settings for this variable are the values on values are ignored. If the variable is not specified in the default file, the setting is unchanged. The keyboard abort sequence (L1-A or STOP-A) on the keyboard and BREAK on the serial console input device o systems) effect may only be changed by the superuser, using the -a option. On most systems, the default effect of the keyboard abort sequence is to suspend the operating system an debugger or the monitor. If you want to permanently change the software default effect of the keyboard abort sequence, you can add or chang value of the KEYBOARD_ABORT variable to the value disable in the keyboard default file, /etc/default/kbd, as shown here. KEYBOARD_ABORT=disable Then, run the command 'kbd -i' to change the current setting. Valid settings for this value are the values enable Other values are ignored. If the variable is not specified in the default file, the setting is unchanged. OPTIONS -i Set keyboard defaults from the keyboard default file. This option is mutually exclusive with all other options except for the -d keyboard device option. This option instructs the keyboard command to read a process keyclick and keyboard abort default values from the /etc/default/kbd file. This option c only be used by the superuser. -r Reset the keyboard as if power-up. -t Return the type of the keyboard being used. -c On/Off state Turn the clicking of the keyboard on or off. -a Enable/Disable state; Enable or disable the keyboard abort sequence effect. Monitoring Performance This chapter describes procedures for monitoring system performance by using the vmstat, iostat, df, and commands. This is a list of the step-by-step instructions in this chapter.
  • 18. How to Display Virtual Memory Statistics (vmstat) The following example shows the vmstat display of statistics gathered at five-second intervals. $ vmstat 5 procs memory page disk faults cpu r b w swap free re mf pi po fr de sr f0 s3 -- -- in sy cs us sy id 0 0 8 28312 668 0 9 2 0 1 0 0 0 1 0 0 10 61 82 1 2 97 0 0 3 31940 248 0 10 20 0 26 0 27 0 4 0 0 53 189 191 6 6 88 0 0 3 32080 288 3 19 49 6 26 0 15 0 9 0 0 75 415 277 6 15 79 0 0 3 32080 256 0 26 20 6 21 0 12 1 6 0 0 163 110 138 1 3 96 0 1 3 32060 256 3 45 52 28 61 0 27 5 12 0 0 195 191 223 7 11 82 0 0 3 32056 260 0 1 0 0 0 0 0 0 0 0 0 4 52 84 0 1 99 Category Field Description Name procs Reports the following states: r The number of kernel threads in the dispatch queue b Blocked kernel threads waiting for resources w Swapped out LWPs waiting for processing resources to finish memory Reports on usage of real and virtual memory: swap Available swap space free Size of the free list page Reports on page faults and paging activity, in units per second: re Pages reclaimed mf Minor and major faults pi Kbytes paged in po Kbytes paged out fr Kbytes freed de Anticipated memory needed by recently swapped-in processes sr Pages scanned by page daemon (not currently in use). If sr does not equal zero, the page daemon has been running. disk Reports the number of disk operations per second, showing data on up to four disks faults Reports the trap/interrupt rates (per second): in Interrupts per second sy System calls per second cs CPU context switch rate cpu Reports on the use of CPU time: us User time
  • 19. sy System time id Idle time How to Display System Event Information Run vmstat -s to show the total of various system events that have taken place since the system was last booted 0 swap ins 0 swap outs 0 pages swapped in 0 pages swapped out 409376480 total address trans. faults taken 3075036 page ins 2601555 page outs 3812452 pages paged in 6525552 pages paged out 11007609 total reclaims 10927650 reclaims from free list 0 micro (hat) faults 409376480 minor (as) faults 2957386 major faults 102738273 copy-on-write faults 61711047 zero fill page faults 1002562077 pages examined by the clock daemon 7881 revolutions of the clock hand 16716370 pages freed by the clock daemon 4999048 forks 1138206 vforks 5747009 execs 741660225 cpu context switches 736047593 device interrupts 528054538 traps 2496638575 system calls 430283487 total name lookups (cache hits 95%) 81727 toolong 10484677 user cpu 9528364 system cpu 443762786 idle cpu 16281790 wait cpu How to Display Swapping Statistics Run vmstat -S to show swapping statistics. procs memory page disk faults cpu r b w swap free si so pi po fr de sr m1 m3 m4 m5 in sy cs us sy id 0 0 0 8512 888 0 0 12 21 55 0 417 1 0 0 0 206 1040 308 2 2 96 si = Average number of LWPs swapped in per second
  • 20. so = Number of whole processes swapped out How to Display Disk Utilization Information (iostat) You can display disk activity information by using the iostat command with a time interval. The following exam statistics gathered every five seconds. iostat 5 tty md1 md3 md4 md5 cpu tin tout kps tps serv kps tps serv kps tps serv kps tps serv us sy wt id 0 2 10 1 28 2 0 22 0 0 0 1 0 10 2 2 3 92 0 47 58 7 39 16 2 34 0 0 0 0 0 0 0 2 19 78 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 98 0 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 99 0 16 2 0 22 0 0 0 0 0 0 0 0 0 2 3 1 95 0 24 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 98 For Each ... Field Name Description Terminal tin Number of characters in the terminal input queue tout Number of characters in the terminal output queue Disk bps Blocks per second tps Transactions per second serv Average service time, in milliseconds CPU us In user mode sy In system mode wt Waiting for I/O id Idle How to Display Extended Disk Statistics Run iostat -xtc to get extended disk statistics. This command displays a line of output for each disk. extended device statistics tty cpu device r/s w/s kr/s kw/s wait actv svc_t %w %b tin tout us sy wt id md1 0.4 0.9 3.6 6.9 0.0 0.0 27.7 1 1 0 2 2 2 3 92 md3 0.1 0.2 1.0 1.3 0.0 0.0 21.7 0 0 md4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 md5 0.0 0.0 0.7 0.0 0.0 0.0 9.9 0 0 md8 0.8 0.3 6.7 14.2 0.0 0.0 13.1 0 1 md10 0.2 0.9 1.8 6.8 0.0 0.0 15.5 0 1
  • 21. md11 0.2 0.9 1.8 6.8 0.0 0.0 14.8 0 1 md30 0.0 0.2 0.5 1.3 0.0 0.0 11.4 0 0 md31 0.0 0.2 0.5 1.3 0.0 0.0 10.2 0 0 md40 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 md41 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 md50 0.0 0.0 0.4 0.0 0.0 0.0 9.4 0 0 md51 0.0 0.0 0.4 0.0 0.0 0.0 7.3 0 0 md80 0.4 0.3 3.3 14.2 0.0 0.0 10.3 0 0 md81 0.4 0.3 3.3 14.2 0.0 0.0 11.7 0 1 sd0 0.6 2.1 6.0 22.8 0.0 0.0 16.3 0 3 sd1 0.6 2.1 6.0 22.8 0.0 0.0 15.2 0 2 Field Name Description r/s Reads per second w/s Writes per second Kr/s Kbytes read per second Kw/s Kbytes written per second wait Average number of transactions waiting for service (queue length) actv Average number of transactions actively being serviced svc_t Average service time, in milliseconds %w Percentage of time the queue is not empty %b Percentage of time the disk is busy How to Check CPU Utilization (sar) Display CPU utilization with the sar -u command. (The sar command without any options is equivalent to sar -u.) A moment, the processor is either busy or idle. When busy, the processor is in either user or system mode. When idle, is either waiting for I/O completion or "sitting still" with no work to do. Measure CPU utilization during 5 secs one time. sar -u 5 1 Measure CPU utilization during 60 secs 1440 times and write result in file sar.log. sar -u -o sar.log 60 1440 To later review disk and tape activity from that period: sar -d -f sar.log Field Name Description %sys Lists the percentage of time that the processor is in system mode %user Lists the percentage of time that the processor is in user mode
  • 22. %wio Lists the percentage of time the processor is idle and waiting for I/O completion %idle Lists the percentage of time the processor is idle and is not waiting for I/O A high %wio generally means a disk slowdown has occurred. Enable file system journaling on Solaris 7 and 8 Solaris 7 and 8 include a native implementation of file system journaling. This feature, known as "intent logging" "logging" enables FASTER file system operation and FASTER system boot. It's trivial to implement and safe to use. The new logging feature is an option to the Unix File System (UFS), which file system for all disk partitions on SUN servers, except for partitions holding swap space. By default, the journalin disabled. Logging is enabled on a per file system basis, and it can even be enabled on / (root file system) and other system partitions. Background Solaris UFS logging works by allocating space from the file system's free blocks. Within that space, all metadata ch file system are written. Metadata includes directory and I-node information but not file data blocks, essentially ever actual data within the file. So, for example, a "file create" modifies the directory structure and allocates a new I-nod activities are written to the logging space. Once the metadata changes are made to the logging area, the system is fr other operations to the file system. In the background, the information in the log is flushed to the file system and up appropriate directory and I-node structures, completing the file system operations. The logging data is written sequentially within the log space. It's therefore much faster for the operating system to c metadata changes via logging and background flushing than by directly modifying the metadata (via random I/O) sp disk. The size of the logging space is based on the size of the file system, and equals 1 MB per 1 GB of file system MB. The space is used as a circular log: if the log space is about to fill up, new metadata change requests are pause is emptied. As changes are moved from the log to the file system, that log space is made available, and new metada be written to the logging space. Usually with UFS, if the system crashes during any file system operation, the entire system must have its consisten the fsck command. That command can take several minutes per file system because it checks all metadata and file d the structures are correct, free, and used, and that the I-node block counts are correct. It also confirms that the free s is current, repairs inconsistencies, and occasionally requires manual intervention to fix large problems. Files and ev can be lost, depending on the operations occurring at the time of the crash. Because metadata changes are made first to the log space rather than to the file system, the consistency check for a system after a crash is a simple and fast operation. The system evaluates the logging data and determines which cha completed against the underlying file system, which had yet to start, and which were in progress. Those completed started are removed from the log, and those partly completed are either undone or completed. If there's sufficient da complete the operation, it's completed. Otherwise, the changes made are removed from the underlying file system. People familiar with database operation will recognize the similarity between database transaction processing and t here. The end result is that the underlying file system is consistent, and no thorough consistency checking is needed operation completes in a few seconds per file system. Using logging
  • 23. Starting with Solaris 7, there's a new logging option to the mount command and in the /etc/vfstab system configura Logging only appears in a couple other places within Solaris. The mount command shows which partitions are mou logging in the options fields for each partition on which logging is enabled. Finally, at system boot time, the fsck ph partition whether each is stable, logging, or being checked. There are no other status commands available to determ logging. A = Device to mount B = Device to fsck C = Mount point D = Filesystem Type E = Fsck pass (unimportatnt with logging) F = Mount at boot G = Mount options # ------------------------------------------------------------------ #A B C D E F G # ------------------------------------------------------------------ fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/dsk/c0t0d0s3 - - swap - no - /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no logging /dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 2 no logging /dev/dsk/c0t0d0s1 /dev/rdsk/c0t0d0s1 /var ufs 3 no logging /dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /home ufs 4 yes logging /dev/dsk/c0t0d0s5 /dev/rdsk/c0t0d0s5 /opt ufs 5 yes logging /dev/dsk/c0t8d0s0 /dev/rdsk/c0t8d0s0 /u01 ufs 6 yes logging /dev/dsk/c0t9d0s0 /dev/rdsk/c0t9d0s0 /u02 ufs 7 yes logging /dev/dsk/c0t10d0s0 /dev/rdsk/c0t10d0s0 /u03 ufs 8 yes logging /dev/dsk/c0t11d0s0 /dev/rdsk/c0t11d0s0 /u04 ufs 9 yes logging /dev/dsk/c0t12d0s0 /dev/rdsk/c0t12d0s0 /u05 ufs 10 yes logging /dev/dsk/c1t13d0s0 /dev/rdsk/c1t13d0s0 /app ufs 11 yes logging /dev/dsk/c1t14d0s0 /dev/rdsk/c1t14d0s0 /users ufs 12 yes logging swap - /tmp tmpfs - yes - Logging increases performance, decreases fsck time, removes the risk of a file system corruption, can be used on al partitions (including root), and is free. Solaris Syslog Daemon Debugging The log system messages daemon syslogd reads and forwards system messages to the appropriate log files and/or u upon the priority of a message and the system facility from which it originates. The configuration file /etc/syslog.co where messages are forwarded. The syslogd daemon ignores any faulty entry in /etc/syslog.conf, specially spaces in are not recognized by syslogd. Therefore always check the entries in /etc/syslog.conf in the debugging mode of sysl How to check /etc/syslog.conf # /etc/init.d/syslog stop # /usr/sbin/syslogd -d
  • 24. getnets() found 1 addresses, they are: 0.0.0.0.2.2 amiloghost() testing 193.247.121.196.2.2 cfline(*.err;kern.notice;auth.notice /dev/sysmsg) cfline(*.err;kern.debug;daemon.notice /var/adm/messages) cfline(mail.info;mail.debug /var/log/maillog) syslogd: line 14: unknown priority name "debug /var/log/maillog" cfline(*.alert;kern.err;daemon.err operator) cfline(*.alert root) cfline(*.emerg *) cfline(user.err /dev/sysmsg) cfline(user.err /var/adm/messages) cfline(user.alert root, operator) cfline(user.emerg *) syslogd: version 1.70 Started: Sat Jan 6 10:11:47 2001 Input message count: system 0, network 0 # Outputs: 10 5 3 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X CONSOLE: /dev/sysmsg 7 3 3 5 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 X FILE: /var/adm/messages X X 6 X X X X X X X X X X X X X X X X X X X X X X UNUSED: 3 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: operator 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 X USERS: root 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 X WALL: X 3 X X X X X X X X X X X X X X X X X X X X X X X CONSOLE: /dev/sysmsg X 3 X X X X X X X X X X X X X X X X X X X X X X X FILE: /var/adm/messages X 1 X X X X X X X X X X X X X X X X X X X X X X X USERS: root, operator X 0 X X X X X X X X X X X X X X X X X X X X X X X WALL: Per File Statistics File Tot Dups Nofwd Errs ---- --- ---- ----- ---- /dev/sysmsg 0 0 0 0 /var/adm/messages 0 0 0 0 0 0 0 0 operator 0 0 0 0 root 0 0 0 0 WALL 0 0 0 0 /dev/sysmsg 0 0 0 0 /var/adm/messages 0 0 0 0 root,operator 0 0 0 0 WALL 0 0 0 0 syslogd: restarted off & running.... sys_poll blocking, init_cnt=0
  • 25. # ^D # /etc/init.d/syslog start Line 14 in /etc/syslog.conf are filled up with spaces instead of tabs. Replace the spaces with tabs and syslogd will a entry in Line 14. Does each Oracle Process use more than 100M memo If you check the oracle process with the OS comand "pmap" or "top", you can see that each oracle process use mor memory. Is this a problem on the Oracle installation or something else? It seems that pmap counts the SGA size as memory segment of each oracle process, but we believe the SGA size should be shared. Output from "top" on our Solaris System with Orcale 8.1.7.0 PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND ----------------------------------------------------------------- 361 oracle 258 59 0 124M 88M sleep 0:01 0.00% oracle 373 oracle 11 59 0 122M 88M sleep 41:50 0.00% oracle 363 oracle 11 59 0 119M 88M sleep 0:01 0.00% oracle 365 oracle 11 58 0 119M 88M sleep 0:17 0.02% oracle 359 oracle 1 59 0 119M 89M sleep 0:00 0.00% oracle 377 oracle 1 59 0 119M 88M sleep 0:00 0.00% oracle 375 oracle 1 58 0 119M 88M sleep 0:00 0.00% oracle 367 oracle 1 58 0 118M 89M sleep 0:00 0.00% oracle 371 oracle 1 58 0 118M 89M sleep 0:00 0.00% oracle 369 oracle 1 58 0 118M 88M sleep 0:00 0.00% oracle Memory Allocation for Oracle Processes On many UNIX platforms and specially on Sun platforms, the text of the Oracle binary and shared libraries are actu between background processes if these instances share the same ORACLE_HOME. So you need to subtract the sha oracle binary and the shared libraries in the result of the OS commands. Even pmap and pmen utilities make mistakes between these memory divisions, and sometimes SGA and text execu added incorrectly. Determine the memory used by each Oracle background process on a Solaris This can be used by anyone who has privleges for the pmap, which can be found in /usr/proc/bin/. First, we need to process id (PID) of the Oracle background process you wish to determine the memory size for. This is done by issu following command: # ps -u oracle -f UID PID PPID C STIME TTY TIME CMD oracle 359 1 0 12:26:17 ? 0:00 ora_pmon_DIA3 oracle 361 1 0 12:26:17 ? 0:01 ora_dbw0_DIA3 oracle 363 1 0 12:26:17 ? 0:01 ora_lgwr_DIA3
  • 26. oracle 365 1 0 12:26:17 ? 0:18 ora_ckpt_DIA3 oracle 367 1 0 12:26:17 ? 0:01 ora_smon_DIA3 oracle 369 1 0 12:26:17 ? 0:00 ora_reco_DIA3 oracle 371 1 0 12:26:17 ? 0:00 ora_snp0_DIA3 oracle 373 1 0 12:26:17 ? 41:50 ora_s000_DIA3 oracle 375 1 0 12:26:17 ? 0:00 ora_d000_DIA3 oracle 377 1 0 12:26:18 ? 0:00 ora_d001_DIA3 Second, you then enter the following commands for the DB Writer process (ora_dbw0_DIA3) with process id = 36 example. # /usr/proc/bin/pmap 361 | grep "shmid" 80000000 82992K read/write/exec/shared [ shmid=0x2 ] # /usr/proc/bin/pmap 361 | grep "total" total 124232K Then you take the total size: 124232K and subtract the SGA size which the line marked with "shmid=" above, in th 82992K. So, 124232K minus 82992K is 41240K. So, the DBWR background process is approximately 41.2 MB. steps for all the background processes. Sizing up Solaris Memory with the RMCmem Packag How much memory is needed on SUN Solaris? Explaining memory in Solaris by reviewing the different types of m introducing a set of tools, the RMCmem package. Install RMCmem Package Download the RMCmem tools available from ftp://playground.sun.com/pub/memtool. The package includes a kern provides extra instrumentation. # cd /tmp # zcat RMCmem3.8.2.tar.gz | tar xvf - # pkgadd -d . The package is installed in /opt/RMCmem (see README in this directory) Virtual / Physical Memory Usage Solaris is a virtual memory system. The total amount of memory that you can use is increased by adding swap spac If you ever see "out of memory" messages, adding swap space is the usual fix. Performance of the system is very de how much physical memory (RAM) you have. If you don't have enough RAM to run your workload, performance d rapidly. Physical memory usage can be classified into four groups: Kernel memory mapped into kernel address space Process memory is mapped into a process address space
  • 27. Filesystem cache memory that is not mapped into any address space Free memory that is not mapped into any address space RMCmem includes a simple command to summarize this: # /opt/RMCmem/bin/prtmem Total memory: 989 Megabytes Kernel Memory: 60 Megabytes Application: 110 Megabytes Executable & libs: 42 Megabytes File Cache: 757 Megabytes Free, file cache: 11 Megabytes Free, free: 6 Megabytes Total physical memory The total physical memory can be seen using prtconf. Memory is allocated in units called pages, and you can use th command to see the size in bytes per page: # /usr/sbin/prtconf | grep Memory Memory size: 1024 Megabytes # /usr/bin/pagesize 8192 Kernel memory Kernel memory is allocated to hold the initial kernel code at boot time, then grows dynamically as new device drive modules are used. Kernel tables also grow dynamically, unlike some older versions of Unix. As you add hardware a a system, the kernel will grow. In particular, to keep track of all the memory in a system, the kernel allocates a page If you have several gigabytes of RAM this table gets quite large. The dynamic kernel memory allocator grabs mem "slabs," then allocates smaller blocks more efficiently. This means that the kernel tends to grab a bit more memory using. If there is a severe memory shortage, the kernel unloads unused kernel modules and devices and frees unused simplest summary of kernel memory usage comes from sar. To show the kernel memory allocation (KMA) activitie sar for more details). # sar -k 1 SunOS diamond 5.7 Generic_106541-12 sun4u 04/28/01 sml_mem alloc fail lg_mem alloc fail ovsz_alloc fail 6873088 6044236 0 44818432 43761720 0 11231232 0 Application process memory Application processes consist of an address space divided into segments, where each segment maps either to a file, memory (the swap space), System V shared memory, or a memory mapped device. The mapped files include the co
  • 28. initialized data for the command and all its shared libraries. What we really want to know, is the amount of RAM used by each segment. This is shown by the pmem command RMCmem package. # /opt/RMCmem/bin/pmem 361 361: ora_dbw0_DIA3 Kbytes Resident Shared Private Permissions Mapped File 82992 82992 82992 - read/write/exec [shmid=0x2] 16 16 8 8 read/exec libc_psr.so.1 16 16 8 8 read/exec libmp.so.2 8 8 8 - read/write/exec libmp.so.2 ........ .. .. . ............... ........... 112 80 72 8 read/exec libelf.so.1 8 8 8 - read/write/exec libelf.so.1 16 16 8 8 read/exec libkvm.so.1 8 8 8 - read/write/exec libkvm.so.1 -------- ------ ------ ------ ------ 124232 93040 92728 312 Now we can see that the process address space size is 124232 kilobytes; 93040 kilobytes of that are currently reside memory, wherein 92728 kilobytes are shared with other processes while 312 kilobytes are private. When this co only the 312 kilobytes of private memory were taken from the free list. If we now go through all the processes on the system, add up how much private memory they use, and also add in t memory for each mapped file, we'll know how much application memory is in use. This summary is shown by prtm in the beginning, and the detail is listed by the memps command in RMCmem. # /opt/RMCmem/bin/memps PID Size Resident Shared Private Process ... ....... ...... ...... .... ............. 359 118904k 93608k 92800k 808k ora_pmon_DIA3 367 118184k 93152k 92704k 448k ora_smon_DIA3 369 117928k 93120k 92704k 416k ora_reco_DIA3 371 118040k 93136k 92720k 416k ora_snp0_DIA3 365 119040k 93120k 92712k 408k ora_ckpt_DIA3 377 118344k 93080k 92720k 360k ora_d001_DIA3 363 119088k 93056k 92720k 336k ora_lgwr_DIA3 375 118344k 93048k 92720k 328k ora_d000_DIA3 361 124232k 93040k 92728k 312k ora_dbw0_DIA3 373 121608k 93032k 92728k 304k ora_s000_DIA3 Filesystem cache memory This is the part of memory that is most confusing, as it is invisible. You can only tell it's there if you access the sam it is quicker the second time.
  • 29. The RMCmem package adds kernel instrumentation that counts up all the pages for each cached file. The memps -m lists the files that are cached in order of the amount of memory they're consuming. One problem is that within the kernel, the file is only known by its inode number and filesystem mount point. The d pathname for the file may not be known. The RMCmem package tries to solve this problem by catching file names as files are opened (by interposing on the code) and making an inode-to-name lookup cache in the kernel. This cache size is limited (to 8192 entries by defau may have been opened before the kernel module was loaded, so it can't always find the name. # memps -m Size InUse E/F Filename 21064k 21064k F /usr (inode 540488) 8184k 824k F /usr (inode 260922) 7752k 7752k F /usr (inode 540429) 7480k 7480k F /usr (inode 540428) 7480k 7480k F /usr (inode 540427) 6896k 6896k F /usr (inode 540450) .... .... . .... ...... ...... ... and so on down to lots of files ... # cd /usr # find . -inum 540488 ./local/jdbc/ora817/old/libserver8.a More infos about the RMCmem package can be found here as PDF Using Sun Solaris Manuals directly from CD-ROM Solaris 8: cd /cdrom/sol_8_doc ./ab2cd (Start) http://quorum:8888 (Using the Doc online) ./ab2cd stop (Stop) Solaris 7: cd /cdrom/sol_7_1199_doc ./ab2cd (Start) http://diamond:8888 (Using the Doc online) ./ab2cd stop (Stop) DLT-TAPE UNIT INSTALLATION on Solaris 7/8/9
  • 30. Installation Instructions will cover the installation of the DLT tape peripheral hardware and configuration of the sys communicate with the DLT tape peripheral. In this example we use a «QUANTUM DLT7000». The Solaris system must have the appropriate SCSI interface for DLT drive to attached to, a SCSI single-ended DL attached only to a SCSI single-ended interface. The same is true for SCSI differential attachment. Solaris includes a efficiently communicate with SCSI tape drives, such as the DLT tape peripheral. Perform the installation as follows: Shut down your Sun workstation/server and power off the machine and all scsi-devices. Connect the DLT to the scs good cables and make sure the bus is terminated correctly. Set the scsi-id; id 4 or 5 are the most common to use. If possible use a separate or underutilized SCSI bus for the DLT. Running the tape drive on the same bus as the disk never let you achieve any good throughput. You bought the DLT because of performance didn't you ? 1. STOP-A (L1-A) Power on the devices/machine again and halt the boot process with (or press the BREAK key if you have an ASCII console). 2. probe-scsi-all Verify that the drive is connected properly. Note: output from probe-scsi will not always be correct if you enter the PROM monitor by breaking the boot process! 3. boot -rv Boot the system and log in as root. When booting you should see a message similar to these: "st1: ". 4. cd /kernel/drv Change directory to /kernel/drv. Edit the st.conf file by adding the following: tape-config-list="QUANTUM DLT7000","Quantum DLT7000","DLT7-data"; DLT7-data = 1,0x38,0,0x8639,4,0x82,0x83,0x84,0x85,3; tape-config-list="<DLT tape unit>","<DLT reference name>","<DLTdata>" tape-config-list is a variable defined by a series of tape configuration parameters listed belo <DLT tape unit> is the vendor and product ID string for the DLT device. Depending on the DLT tape peripheral you are installing, you must insert the appropriate vendor an for <DLT tape unit> as described in the following table: DLT Tape Product <DLT tape unit> DLT7000 QUANTUM DLT7000 (Total string character count, including spaces, must equal 15). <DLT reference name> is a name you select that the system will use to identify the DLT devic reference does not change the DLT product ID. When the system boots, the reference name will be d
  • 31. list of peripheral devices recognized by the system. <DLT-data> is a variable containing a series of additional DLT device configuration information. Yo name in place of the <DLT data> string. You will continue editing the st.conf file by defining the selected for <DLT data>. The definition depends on the DLT tape peripheral you are installing. F series unit add the following line: 1,0x38,0,0x8639,4,0x82,0x83,0x84,0x85,3; <DLT data> contains 10 parameters and are described following: 1 The first parameter, is the version number and should not change. 0x38 The second parameter, designates the DLT tape type as defined in /usr/include/sys/mtio.h. #define MT_ISOTHER 0x36 /* generic other type of tape drive */ #define MT_ISDLT 0x38 /* sun: SCSI DLT tape drive */ 0 The third parameter is the block size. Since the DLT tape drive uses variable block size, this value should be zero. 0x8639 The fourth parameter, 0x8639, is a summation of values that represent selected device options. The table below lists the options and the corresponding value: Option Value ST_VARIABLE 0x0001 ST_BSF 0x0008 ST_BSR 0x0010 ST_LONG_ERASE 0x0020 ST_NOWS_EOD 0x0200 ST_NLOADABLE 0x0400 ST_NO_RECSIZE_LIMIT 0x8000 The man st page has more information about these and other possible device options. For certain applications, it may be necessary to consider adding or removing one or more of the device options. 4 The fifth parameter, 4, defines the number of densities. The maximum definable number of densities is 4. 0x82 The sixth, seventh, eighth and ninth parameter are used for system selection of tape densities. Use 0x83 these values for a DLT 7000 Tape Drive. 0x84 0x85 3 The tenth parameter defines which density the system will use as the default density. The sixth, seventh, eighth and ninth parameters in the <DLT data>string are referenced by the system as 0, 1, 2 and 3, respectively. The 3 value for the tenth parameter selects the 0x85 density code as the system default density. After editing the st.conf file, reboot the system:
  • 32. 5. shutdown-i0-g0 Reboot the System boot -rv The -r switch in the boot command enables a kernel compile and includes creation of device special files used for communication with the DLT devi The -v switch enables verbose mode display of system bootup. With verbo mode, the system should indicate that the DLT tape peripheral is attached displaying the <DLT reference name>string you selected. 6. mt -t /dev/rmt/0 status Enter the following command to verify the installation: Vendor 'TANDBERG' Product 'DLT7000 ' tape drive: sense key(0x0)= No Additional Sense residual= 0 retries= 0 file no= 0 block no= 0 The target drive designations assigned by Solaris may take on values higher than already established in the /dev/r This is not a problem but during a boot -rv, Solaris does not remove tape device files for drives that are no long the system. This can increase the effort in locating the device file for the configured drive, however, this can be min deleting the tape device files: rm /dev/rmt/* then either boot the system with a: boot -rv or issue the following at the command line prompt: drvconfig -i st; tapes If the DLTtape is the only drive on the system, it's target assignment should be zero. The Solaris man pages have m on drvconfig and tapes. Reconfigure Devices on Solaris If you remove or add a device on Solaris then the devices files must be recreated, either with boot -rv or devfs example to renumber the logical tape drive devices do the following: Tape drives were numbered beginning with /d instead of /dev/rmt/0. The physical devices pointed to by the logical /dev/rmt/[012] devices no longer existed, and w renumber the valid devices beginning at /dev/rmt/0. 1. Cleanup non-existent tape drive devices with devfsadm. # devfsadm -C -c tape -v 2. Remove all /dev/rmt logical links. # rm -f /dev/rmt/* 3. Recreate all /dev/rmt logical links with devfsadm
  • 33. # devfsadm -c tape -v devfsadm devfsadm(1M) maintains the /dev and /devices namespaces. It replaces the previous suite of devfs administration to drvconfig(1M), disks(1M), tapes(1M), ports(1M), audlinks(1M), and devlinks(1M). OPTIONS The following options are supported: -C Cleanup mode. Prompt devfsadm to cleanup dangling /dev links that are not normally removed. If the -c option is also used, devfsadm only cleans up for the listed devices' classes. -c device_class Restrict operations to devices of class device_class. Solaris defines the following value for device_class: disk, tape, port, audio, and pseudo. This option may be specified more than once to specify multiple device classes. OpenBoot Diagnostics The Solaris operating system gets the jumpstart for its booting from a hardware-level interface called the OpenBoo OBP for short. OpenBoot at its heart has an interactive command interpreter with a varied set of functions. OBP is which is stored in the socketed startup PROM of the computer and consists of two parts, the PROM and the NVRA As stated earlier while the PROM acts as the interface for access to diagnostics and drivers, the NVRAM consists o user defined parameters. Non Volatile information like the system identification information, device aliases etc are NVRAM.The OpenBoot PROM is programmable and can be programmed based on Forth, which is an interactive programming language much like shell scripting. The main tasks performed by the OpenBoot firmware are: Initializing and Testing system hardware ( POST , power on self test) Interactive Debugging Management of NVRAM Parameters Start the Operating System boot Useful commands at OK prompt. Dignostics : boot General banner boot - boot kernel from default device. printenv this command shows the following systems Factory default is to boot Display all variables and current values. hardware informatiion : Model, architecture, from DISK if present, otherwise from NET. processor,keyboard, openboot version, Serial setenv <variable> no. ethernet address & host id. boot net - boot kernel from network Set variable to the given value. boot cdrom - boot kernel from CD-ROM test floppy - test floppy disk drive boot disk1:h - boot from disk1 partition h set-default <variable> test net - test network loopbacks boot tape - boot default file from tape Reset the value of variable to the factory default test scsi - test scsi interface boot disk myunix -as - boot myunix from test-all test for all devices with selftest disk with flags "-as" set-defaults method Reset variable values to the factory defaults. watch-clock Show ticks of real-time clock
  • 34. watch-net DEVALIAS Monitor network broadcast packets watch-net-all ok>show-devs Monitor broadcast packets on all net interfaces ok cd /pci@1f,4000/scsi@3 ok .properties probe-scsi ok ls Show attached SCSI devices f00809d8 tape f007ecdc disk probe-scsi-all ok .speed Show attached SCSI devices for all host CPU Speed : 200.00MHz adapters- internal & external. UPA Speed : 100.00MHz PCI Bus A : 66Mhz PCI Bus B : 33Mhz Key Sequences These commands are disabled if the PROM security is on. Also, if your system has full security enabled, you cannot apply any of the suggested commands unless you have the password to get to the ok prompt. Stop – Bypass POST. This command does not depend on security-mode. (Note: some systems bypass POST as a default; in such cases, use Stop-D t start POST.) Stop-A Abort. Stop-D - Enter diagnostic mode (set diag-switch? to true). Stop-F - Enter Forth on TTYA instead of probing. Use exit to continue with the initialization sequence. Useful if hardware is broken. Stop-N Reset NVRAM contents to default values. Start an OpenBoot Diagnostics <STOP A> OK setenv diag-switch? true OK setenv auto-boot? false OK reset-all OK test-all or obdiag Configure Graphics Console (e.g. Sun XVR-100 Graphics Accelerator) instead of serial TTYA OK show-displays Select the graphics accelerator, e.g. b OK nvalias mydev <CTRL-Y> OK setenv output-device mydev OK setenv use-nvramrc? true OK reset-all Why doesn't my .forward file work? Overview If you are having problems where you have created a $HOME/.forward file in your home directory to forward e account to another and it just won't forward them? Set correct Permissions First make sure the file isn't group or world writable.
  • 35. -rwxrwxr-x 1 zahn dba 0 Jan 9 12:17 .forward # wrong -rwxr-xr-x 1 zahn dba 0 Jan 9 12:17 .forward # OK Lastly, make sure your home directory isn't group or world writable. drwxrwxr-x 14 zahn dba 4096 Jan 9 12:20 zahn # wrong drwxr-xr-x 14 zahn dba 4096 Jan 9 12:20 zahn # OK Simple Shell Script to backup your Files Overview A backup strategy is more complex than creating a redundant copy of disk storage and considering the strategy a su successful backup strategy must detail how the backup media are rotated, how the media are archived, how the syst recovered, and what the backup software will do to create the backup. Although all parts of the backup strategy are important, this tip will focus on the backup script and will detail a flexible backup script that uses built-in Solaris so which create a reliable local backup of a Solaris machine. Introduction The backup script will accomplish the following goals: Create a backup archive that is as easy to restore a single file as it is to restore an entire file s The backup script will run autonomously. The only human intervention will be to swap medi output. The filesystems or directories to backup can be specified in the script. Using automounter yo specify remote filesystems. The script will create a detailed log of the backup. The script will send an abbreviated email summary of the backup to the administrator. After a successful backup, the script will verify to some extent the contents of the backup me The backup script will be able to run on any Solaris 2.6 or greater machine without modifica Tools used We use the well known utilities TAR, GZIP and DD, because they are available on any Unix system. They are ver and simple to use. In case of an emergency it is important to have a simple way to restore, independent of complex incompatible software releases. Magnetic Tape Control The utility MT sends commands to a tape drive. Many of these commands are familiar, but some are not. The script will use commands. rewind – rewind the tape rewoffl – rewind the tape and eject it (go offline) eom – space to end of recorded media on tape weof – write count EOF marks at current position on tape status – display current status of tape
  • 36. Script Click here for the Shell Script