Sie sind auf Seite 1von 24

4/3/12

SUN Solaris Tips

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 F

Unter http://www.sunfreeware.com findet man "ready to use" Software fr SUN Solaris, wie beispielsweise TOP, AMANDA, GCC, GDB etc. Download via FTP von: ftp://nce.sun.ch/pub/freeware/sparc/7

PCNFS
CD-ROM Solaris Intranet Extension (siehe auch Solaris Server Intranet Extension Installation) $s u $c /do/do0ns/pr d crmcrm/fcsac $pgd - `w` kad d pd

I
Hostname

S
$uaenm u Network Interface $icni fofg a

(G

/etc/hosts, /etc/netmasks definieren Static IP-routes definieren .akadia.com/ser ices/solaris_tips.html

1/24

4/3/12

SUN Solaris Tips

Static IP-routes definieren /t/c./7sairue ecr2dS9ttcots CD-ROM rausnehmen $eetcrm jc do Disklayout kontrollieren $pttc/e/dk.. rvo dvrs/.. Automounter konfigurieren /t/uomse,/t/uohm ecat_atr ecat_oe Device File fr DAT /e/m/l(a cf/e/m/l dvrt0 tr v dvrt0) /etc/system definieren konfigurieren (Prestoserve, Oracle, Transtec) Logfile der Installation: /var/sadm/system/logs/install_log Installation ber serielles Terminal an Nullmodem Kabel O bo crm-w(emnla ty) K ot do Tria n ta

$ii 0 nt O bo K ot s $fc - /e/s/0000(n bieFlssee sk m dvdkctds ud rg ieytm) $trcf/e/m/l a v dvrt0

P
$pgno kif

(S
Anzeige der installierten Packages

Check ob Package SUNWpcnfd correct installiert ist $pgh - SNpnd kck v UWcf Package installieren (Path ist meistens /cdrom/cdrom0/....) $pgd - <aht CRM SNpnd kad d Pt o DO> UWcf Das Package SUNWpcnfd entfernen $pgmSNpnd kr UWcf

(OK P

In single user mode booten O bo K ot s Kernel zwingen /devices neu aufzubauen nach dem Anschluss von neuer Hardware O bo K ot r Detaillierter Bootvorgang O bo K ot v Vom CD-ROM aus booten: Notboot ! O bo crm K ot do Angeschlossene SCSI-Gerte testen O poess K rb-ci
.akadia.com/ser ices/solaris_tips.html 2/24

4/3/12

SUN Solaris Tips

List System Devices, e.g. SUNW,hme = Sun Fast Ethernet PCI Adapter O so-es K hwdv List Network Devices O so-es K hwnt Monitoring Network Activity O apywthnt<ulpt nm o teheitrae seso-es K pl ac-e fl ah ae f h m nefc, e hwdv> Monitor Variablen ndern, anzeigen O epo K erm O epo ty-oe3408n1h K erm tamd=80,,,,

A
Welche Kernel-Module sind geladen ? $mdno oif Kernel Konfiguration /t/ytm ecsse Logfile von syslog /a/d/esgs vrammsae Konfiguration des syslog Daemon /t/ylgcn ecsso.of

D
Directory mit Default files /t/eal ecdfut Remote root logins erlauben /t/eal/oi ecdfutlgn Timezone setzen /t/eal/nt ecdfutii

Master-File beim Booten /t/nta eciitb Run-Level Start/Stop Files /t/c. ecr?d Scripts fr Run-Levels /t/ntd ecii.

K
$sudw -0-0 hton g i $rbo (nsrctii 6 eot etpih nt )

LAN
Konfiguration der LAN-Interfaces $icni fofg a Ntakste:see/t/emss ems ezn ih ecntak .akadia.com/ser ices/solaris_tips.html
3/24

4/3/12

SUN Solaris Tips Ntakste:see/t/emss ems ezn ih ecntak

JdsLNItraeht/t/otael0mtHsnmn ee A-nefc a echsnm.e i otae LNStp /t/c./3rours (nefcskniuirn A-eu: ecrSdS0ots.h Itrae ofgree) /t/c./7iesc(A kniuirn ecr2dS2ntv LN ofgree) Phys Addressen nachschauen $apr a Ntt MdaTbe e o ei al Dvc I Ades eie P drs Ms ak FasPy Ad lg hs dr --- ---------- --------------------- ---------- ------- -- ------l0 e rbi abt 25252525 5.5.5.5 0:00:71:6 06:85:78 l0 e qou urm 25252525S 5.5.5.5 P 0:02:92:3 80:08:70 l0 e akm ru 25252525 5.5.5.5 0:02:b6:c 0a:44:01

IP-R
Alle hosts im Netz 193.72.239.0 werden ber den Router 193.72.194.201 erreicht. $rueadnt137.3. 137.9.0 1 ot d e 9.2290 9.21421 Der host 146.228.14.10 wird ber den Router 193.72.194.100 erreicht. Siehe File /etc/rc2.d/S79staticroutes. $rueadhs 16281.0137.9.0 1 ot d ot 4.2.41 9.21410 Routing Tabelle kontrollieren $nttt-r esa n

DNS
Angabe des DNS Nameservers /t/eovcn ecrsl.of Reihenfolge definieren /t/swthcn ecnsic.of

A NFS-C

FTP
Siehe Solris2 Administration Seite 103 und ff

/t/ftb(ol ->/t/ntb(s) ecvsa Sl) - ecmta It mut- ns- b,osf gnwn:ursfwr /otae on F f o gr,ot odaa/s/otae sfwr NFS-Server wird in /etc/init.d/nfs.client start gestartet. Anzeige welche Directories gondwana zum mounten freigegeben hat dsae gnwn fhrs odaa RSUC SRE ACS TASOT EORE EVR CES RNPR gnwn:epr/oezh gnwn -odaa/xothm/an odaa gnwn:epr/oesenrgnwn -odaa/xothm/tie odaa

NFS-S

/t/f/ftb(ol ->/t/f/hrtb ecdsdsa Sl) - ecdssaea Directory read-only freigeben $sae- r /s/otae hr o o ursfwr Alle Directories in /etc/dfs/dfstab freigeben $sael hral Alle Directories in /etc/dfs/dfstab zurcknehmen
.akadia.com/ser ices/solaris_tips.html 4/24

4/3/12

SUN Solaris Tips Alle Directories in /etc/dfs/dfstab zurcknehmen

$usael nhral NFS-Server wird gestartet in /t/ntdnssre ecii./f.evr Anzeige der freigegbenen lokalen Direcories $sae hr Anzeige welche Clients nutzen welche Directories eines NFS-Servers $dmut - nsgnwn fons F f odaa RSUC SRE PTNM CINS EORE EVR AHAE LET gnwn /xothm/anprgngu.hrbi.lec odaa epr/oezh aao.lec,abtgu.h

A
/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 ausfhren)

M
Siehe spezielles Dokument

SCSI-H

SUN H

Beispiel: SCSI-Disk Seagate ST150176L, 50MB an SUN Ultra Enterprise 1 Eintrag in /etc/format.dat vornehmen (Angaben von Lieferanten) ds_ye="egt S107L \ iktp Saae T516" :cl ="CI \ tr SS" :ny =102:ay =2:py =104:ned=2 :net=39\ cl 22 cl cl 22 ha 2 sc 6 :rm=70 :bt=182 p 20 p 898 Eintrag /etc/system fr Solaris-2 Kernel, System booten * *SS-icKniuain CIDs ofgrto * stss_pin=x0 e ciotos02 Disk anschliessen, SCSI-Adresse kontrollieren, Terminierung Unbedingt kontrolieren, dass eine SCSI-Adresse nicht mehrfach belegt ist. Dazu kann meistens hinten am Gert ein Tippschalter eingestellt werden. Man beacht, dass in der Regel das letzte Gert terminiert werden muss. Disk formatieren (nur wenn notwendig !) In der Regel muss eine Disk nicht neu formatiert werden, ist dies jedoch notwendig so steht unter Solaris das Utility format zur Verfgung. fra omt AALBEDS SLCIN: VIAL IK EETOS 0 ctd <U21 cl23 at2h 1 sc8> . 000 SN.G y 73 l d 9 e 0 /bs1,/sdae8000epe8000s@, su@f0epm@,400/s@,800/d00 1 ctd <U21 cl23 at2h 1 sc8> . 010 SN.G y 73 l d 9 e 0 /bs1,/sdae8000epe8000s@, su@f0epm@,400/s@,800/d10 2 ctd <B-DS310S1 cl88 at2h 1 sc28 . 020 IMDR-93-7D y 16 l d 0 e 1> /bs1,/sdae8000epe8000s@, su@f0epm@,400/s@,800/d20 3 ctd <EGT-T123-74cl79 at2h 2 sc27 . 040 SAAES187N56 y 49 l d 0 e 3> /bs1,/sdae8000epe8000s@, su@f0epm@,400/s@,800/d40 4 ctd <EGT-T516W00 cl102at2h 2 sc39 . 050 SAAES107L-02 y 22 l d 2 e 6> /bs1,/sdae8000epe8000s@, su@f0epm@,400/s@,800/d50 Seiyds (ne isnme) 4 pcf ik etr t ubr: .akadia.com/ser ices/solaris_tips.html
5/24

4/3/12

SUN Solaris Tips Seiyds (ne isnme) 4 pcf ik etr t ubr:

fra>tp omt ye AALBEDIETPS VIAL RV YE: 0 At cniue . uo ofgr 1 DR-93 . DS310 2 SaaeS187 . egt T123 3 SaaeS107L . egt T516 4 QatmPorv 8S . unu rDie 0 5 QatmPorv 15 . unu rDie 0S 6 CCWe I 91134 . D rn V 47-4 7 SN14 . U00 8 SN27 . U00 9 SN37 . U02 1.SN30 0 U04 1.SN44 1 U02 1.SN55 2 U03 1.SN69 3 U06 1.SN.G 4 U10 1.SN.5 5 U10 1.SN.G 6 U13 1.SN.G 7 U21 1.SN.G 8 U29 1.IMDR-93-7D 9 B-DS310S1 2.SAAES187N56 0 EGT-T123-74 2.SAAES107L-02 1 EGT-T516W00 2.ohr 2 te Seiyds tp (ne isnme)2] 2 pcf ik ye etr t ubr[1: 1 fra>fra (ofr wt "e" omt omt cnim ih ys) Disk partitionieren Dadurch wird die Disk in logische Teile unterteilt. Jeder teil enthlt ein eigenes Filesystem. fra>pr omt at Nun die Partitionierungsdaten eingeben, zB priin pit atto> rn Cretpriintbe(rgnl: urn atto al oiia) Ttlds clnesaalbe 23 +2(eevdclnes oa ik yidr vial: 73 rsre yidr) Pr TgFa ClnesSz Bok at a lg yidr ie lcs 0ro w 0-24121M (0//)310 ot m 0 5.5B 2500 160 1sa w 25-37184M (7//)226 wp u 0 7 2.0B 1300 690 2bcu w 0-23 19G (7300 4510 akp m 72 .8B 23//) 146 3hm w 38-11 450M (4//)920 oe m 7 07 7.0B 6000 780 4uasge w 00(//)0 nsind m 000 5uasge w 11 -12 661M (1//)1870 nsind m 08 98 7.3B 9100 342 6urw 12 -23 567M (0//)1200 s m 99 72 9.2B 8400 228 7uasge w 00(//)0 nsind m 000 Label erzeugen (aktuelle Partitionierung speichern) priin lbl atto> ae priin y atto> priin qi atto> ut fra>qi omt ut Filesystem erstellen nws- - 0/e/dkctds ef v m dvrs/0500 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 #eie dvc #omut t on
.akadia.com/ser ices/solaris_tips.html

dvc eie t fc o sk

mut F on S pit tp on ye

fc mut sk on mut on ps a bo otos as t ot pin


6/24

4/3/12

SUN Solaris Tips

/e/s/0500/e/dkctds /0 dvdkctds dvrs/0500 u2

us f

ys e

L S

S S
$sa wp l

H S

$/s/bnptof ursi/rcn

Multiply the Blocks column by 512

safl wpie dvsal bok e wpo lcs fe re /e/s/00013, dvdkctds 21 1 224 224 6 694 694 224 *52=14M 694 1 3 B

O
$sorvhwe p Pth 158-6 ac: 0111

Note, that Patchlevel 105181-15 is minimal needed for Oracle 8.1.6

- 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: $c <ac cutrdrcoy d pth lse ietr> $.isalcse /ntl_utr $ct/a/amisaldt/lse nm>lg a vrsd/ntl_aa<utr ae_o $sorvhwe p Reboot the system

S
$tussrgl rs vmr

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

If you suspect troubles with your Solaris device files, e.g. system doesn't boot after a filesystem check, you may repair the solaris system using the following commands. Halt the system immediately with the keys STOP-A, you will now see the boot prompt: OK SOTPA Reset the machine with O rst K ee Boot the machine with O bo K ot r The command boot -r will rebuild all devices files according to your attached hardware. If you cannot boot the machine, you can try the following commands: , , - configure the /devices directory The default operation of drvconfig is to create the /devices directory tree that describes, in the filesystem namespace, the hardware layout of a particular machine. Hardware devices present on the machine and powered on as well as pseudo-drivers are represented under /devices. Normally this command is run automatically after a new driver has been installed (with add_drv(1M)) and the system has been rebooted. - 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 .akadia.com/ser ices/solaris_tips.html

7/24

4/3/12

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

- 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 directory tree. Tapes searches the kernel device tree to see what tape devices are attached to the system.

S
I

T
SUN S C

Here are some short tips for common tasks on SUN Solaris 2.6, 7 and 8

$woh r #So RnLvl hw u ee $/s/bnptof#Pittecmlt sse cniuain ursi/rcn rn h opee ytm ofgrto $/bnmutl - #Mutallclflsses si/onal l on l oa ieytm. $/bnii S si/nt #Cagn t snl ue md hnig o ige sr oe S #/t/ntb Cnan ifrainaotdvcsta ecmta: otis nomto bu eie ht #aecretymutd I teeaemutdflsses r urnl one. f hr r one ieytm #wt qoa eald dslyte ih uts nbe, ipa hm i /s/i/u - 4/t/ntb \ f urbnct f ecmta /s/i/ge 'qoa,ut'>dvnl 2&;te urbnerp ^ut qoa /e/ul >1 hn eh 'hr aemutdflsseswt qoa eald co Tee r one ieytm ih uts nbe' f i H #Yuwl as ne t ucmettes etisi o il lo ed o nomn h a nre n #tesse cotb/a/po/rncotb/y. h ytm rna vrsolco/rnasss #Rfrt tesr1 adsd(m mnpgs ee o h a() n ac1) a ae #frmr ifrain o oe nomto. $/s/i/uss- "urlbs/ac/a/d/as`ae+d" urbns y c /s/i/asd vrams/adt %` H , S ?

#ssdoli asieo fv porm ta cniueanw yito s ut f ie rgas ht ofgr e #sse,o oeta hsbe ucniue wt ss ytm r n ht a en nofgrd ih y#ucni(M.Tessdolporm rnatmtclya nofg1) h yito rgas u uoaial t #sse isalto,o drn tefrtbo atra ytm ntlain r uig h is ot fe #mciehsbe scesul ucniue. ahn a en ucsfly nofgrd # #Teeporm hv n efc ecp a sc tms ad hs rgas ae o fet xet t uh ie, n #sol nvrb rnmnal. hud ee e u auly #Sse Flsae ytm ie r ct/t/oeae a ecndnm ct/t/otae* a echsnm. ct/t/eal/nt a ecdfutii ct/t/ealdmi a ecdfutoan ct/t/nthss a ecie/ot ct/t/ntntak a ecie/emss H A PPP ?

Configure /etc/asppp.cf for the aspppd daemon $/s/bnapp - 1 ursi/spd d H TCP/IP ?

#GtigPrmtr SpotdB TeTPDie etn aaees upre y h C rvr #T sewihprmtr aespotdb teTPdie, o e hc aaees r upre y h C rvr #uetefloigcmad s h olwn omn: $nd/e/c \ d dvtp ? #Tefloigcmadst tevleo teprmtr h olwn omn es h au f h aaee #i_owrigi teI die t zr.Ti dsbe I pfradn n h P rvr o eo hs ials P .akadia.com/ser ices/solaris_tips.html

8/24

4/3/12

SUN Solaris Tips #i_owrigi teI die t zr.Ti dsbe I pfradn n h P rvr o eo hs ials P #pce fradn. akt owrig

IP F

$/s/bnnd-e /e/pi_owrig0 ursi/d st dvi pfradn E IP F (M R )

$/s/bnnd-e /e/pi_owrig1 ursi/d st dvi pfradn H D R S ?

#Cniuedfutruesuigtelcl"ecdfutotr ofgr eal otr sn h oa /t/ealrue" #cniuainfl.Tefl cncnantehsnmso I ofgrto ie h ie a oti h otae r P #adesso oeo mr dfutrues drse f n r oe eal otr. # #Tedfutrue lse i te"ecdfutotr fl wl h eal ots itd n h /t/ealrue" ie il #rpaetoeaddb tekre drn dsls boig A elc hs de y h enl uig ikes otn. n #epy"ecdfutotr fl wl cuetedfutrue mt /t/ealrue" ie il as h eal ot #addb tekre t b dltd de y h enl o e eee. # #Nt ta tedfutrue fl i inrdi w rcie rue oe ht h eal otr ie s goe f e eevd ots #fo aDC sre.Orplc i t awy tutDC oe lcl rm HP evr u oiy s o las rs HP vr oa #amnsrto. diitain #StDfutRue e eal ot $rue- addfut<eal Ruefo /t/ealrue> ot n d eal Dfut ot rm ecdfutotr #So DfutRue hw eal ot $/s/bnrue-n ursi/ot f dfut1818181 dn eal 2.2.2.1 oe H NIS ?

i [- /t/ealdmi ] te f f ecdfutoan ; hn /s/i/oanae`a /t/ealdmi` urbndminm ct ecdfutoan eh "I dminm i `urbndminm` co NS oanae s /s/i/oanae" f i RPC (R P C )C

#rcid-uiesladesst RCpormnme mpe pbn nvra drse o P rga ubr apr #rcno-rpr RCifrain pif eot P nomto S K D

#kyevi adeo ta i ue frsoigtepiae esr s amn ht s sd o trn h rvt #ecyto ky o ec ue lge it tesse.Tee nrpin es f ah sr ogd no h ytm hs #ecyto ky aeue fracsigscr ntoksr nrpin es r sd o cesn eue ewr e#vcssc a scr NSadNS. ie uh s eue F n I+ $/s/bnkyev ursi/esr H S DNS " . "

#I ti mciei cniue t b a Itre f hs ahn s ofgrd o e n nent #Dmi Nm Sse (N)sre,rntenm deo. oan ae ytm DS evr u h ae amn #Satnmdpirt:rueadnths, tr ae ro o ot d e ot #t aoddsgtotyaetmu dlyfr o vi n ehsbnm iot ea o #nmsre drn bo. aeevr uig ot i [- /s/bni.ae - - /t/ae.of] te f f ursi/nnmd a f ecnmdcn ; hn eh 'trigitre dmi nm sre. co satn nent oan ae evr' /s/bni.ae & ursi/nnmd f i W ?

CniuainFl:/t/ylgcn ofgrto ie ecsso.of MsaeFl: esg ie /a/d/esgs vrammsae

.akadia.com/ser ices/solaris_tips.html

IP-A

SUN S

9/24

4/3/12

IP-A

SUN S

SUN Solaris Tips

#Hwt stpI-la o SNSlrs o o eu PAis n U oai 1 StpFl /t/otaehe: frtescn I-drs . eu ie echsnm.m01 o h eod PAdes ct/t/otaehe: a echsnm.m01 la dp 2 Isr I-drs i /t/ot . net PAdes n echss # #Itre hs tbe nent ot al # 1818181 2.2.2.1 u-otl xpra1 1818182 2.2.2.0 la dp

#I-drs o he: Pades n m00 #I-la o he: Pais n m01

3 SataisI-drs o Itraei /t/c. . tr la PAdes n nefc n ecr2d S9pla - ./ntdiais 9iais > .ii./pla #/i/h !bns #Aai A,Avne 4 C-64Tu kda G rewg , H30 hn #--------------------------------------------------------------------#Fl: ie iais pla # #Atr uo: Mri Zh /1.520 atn an 00.00 # #Proe ups: Stpscn I adeso he: eu eod P drs n m01 #--------------------------------------------------------------------i [- /t/otaehe: ] f f echsnm.m01 te hn cs "1 i ae $" n 'tr' #Satscn I adeso he: sat) tr eod P drs n m01 eh "tr mlihmdsre frU-LA1o he:" co Sat ut-oe evr o XAIS n m01 icni he: 1818182 u fofg m01 2.2.2.0 p ; ; 'tp) #So scn I adeso he: so' tp eod P drs n m01 eh "tpmlihmdsre frU-LA1o he:" co So ut-oe evr o XAIS n m01 icni he: 1818182 dw fofg m01 2.2.2.0 on ; ; ea sc f i 4 CekI-drs o scn Itrae . hc PAdes n eod nefc icni fofg a

/
The Solaris automount utility installs a t f mount points and associates an automount map with each mount uos point. The a t f file system monitors attempts to access directories within it and notifies the a t m u t uos uoond daemon. The daemon uses the map to locate a file system, which it then mounts at the point of reference within the a t f file system. You can assign a map to an a t f mount using an entry in the / t / u o m s e map uos uos ecat_atr or a direct map in / t / u o d r c . If the file system is not accessed within an appropriate interval (five ecat_iet minutes by default), the a t m u t daemon unmounts the file system. uoond D M /

The mount point / e is by default the location, where a t m u t mounts NFS filesystems, which are exported nt uoond on other machines. Lets suppose, that you have the filesystem / o eexported on the NFS server s p i , then hm ahr the (Solaris) NFS client with an active automounter will automatically mount this NFS filesystem under /e/ahr. ntspi/ M / / _

You probably doesn't want this default behavior. If you insert the following entry in / t / u o d r c .... ecat_iet /p/oa otlcl -w r rmt_ahn:lcl eoemcie/oa
10/24

.akadia.com/ser ices/solaris_tips.html

4/3/12

SUN Solaris Tips

.... then, the directory / o a on the remote machine "remote_machine" will be mounted on the local machine lcl under / p / o a . otlcl

S
The Solaris utility k dmanipulates the state of the keyboard or display the type of keyboard or change the b effect. Suppose, that you do not want that everybody can halt the the system you must change the default value. We also noticed, that the Solaris machines attached to a switch box, using a character terminal on a serial line, may halt when you switch from one machine to the other. SYNOPSIS kd[- ][- ][- o|f ] b r t c nof [- eal|ial ][- kyor dvc ] a nbedsbe d ebad eie kd- [- kyor dvc ] b i d ebad eie DESCRIPTION k dmanipulates the state of the keyboard, or displays the keyboard type or allows the default keyboard abort b sequence effect to be changed. The default keyboard device being set is / e / b . dvkd The -i option reads and processes default values for the keyclick and keyboard abort settings from the , / t / e a l / b . Only keyboards that support a clicker respond to the -c option. If you want to ecdfutkd turn clicking on by default, add or change the current value of the KEYCLICK variable to the value on in the keyboard default file, / t / e a l / b , as shown here. ecdfutkd KYLC=n ECIKo Then, run the command ' b - 'to change the current setting. Valid settings for this variable are the values on kd i and off. Other 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 on most 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 and enter the debugger or the monitor. If you want to permanently change the software default effect of the keyboard abort sequence, you can add or change the current value of the KEYBOARD_ABORT variable to the value disable in the keyboard default file, / t / e a l / b , as shown here. ecdfutkd KYOR_BR=ial EBADAOTdsbe Then, run the command ' b - 'to change the current setting. Valid settings for this value are the values kd i enable and disable. Other values are ignored. If the variable is not specified in the default file, the setting is unchanged. OPTIONS 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 and process keyclick and keyboard abort default values from the / t / e a l / b file. This option can only be used by the superuser. ecdfutkd Reset the keyboard as if power-up. Return the type of the keyboard being used. On/Off state Turn the clicking of the keyboard on or off. Enable/Disable state; Enable or disable the keyboard abort sequence effect.

This chapter describes procedures for monitoring system performance by using the v s a , i s a , d , and mtt ott f s rcommands. This is a list of the step-by-step instructions in this chapter. a H D V M S ( )

The following example shows the v s a display of statistics gathered at five-second intervals. mtt $vsa 5 mtt pos rc mmr eoy pg ae ds ik rbw sa fe r m p p f d s f s - wp re e f i o r e r 0 3 - 008232 68 0 9 2 0 1 0 0 0 1 0 0 81 6 003390 28 0 1 2 14 4 0 0 0 2 02 0 4 0 0 6 7 003300 28 3 1 4 28 8 9 9 6 2 01 0 9 0 0 6 5
.akadia.com/ser ices/solaris_tips.html

fut als cu p i s c u s n y s s y 1 6 8 1 2 0 1 2 5 1911 6 6 3 8 9 7 4527 61 5 1 7 5

i d 9 7 8 8 7 9
11/24

4/3/12

SUN Solaris Tips

003300 26 0 2 2 28 5 6 0 6 2 01 1 6 0 0131018 1 3 9 1 2 6 1 3 6 013300 26 3 4 5 2 6 02 51 0 0151123 71 8 26 5 5 2 8 1 7 2 9 9 2 1 2 003306 20 0 1 0 0 0 0 0 0 0 0 0 4 5 8 0 1 9 25 6 2 4 9 C procs r b w memory swap free page re mf pi po fr de sr disk faults in sy cs cpu us sy id H D S F N D Reports the following states: The number of kernel threads in the dispatch queue Blocked kernel threads waiting for resources Swapped out LWPs waiting for processing resources to finish Reports on usage of real and virtual memory: A Size of the free list Reports on page faults and paging activity, in units per second: Pages reclaimed Minor and major faults Kbytes paged in Kbytes paged out Kbytes freed Anticipated memory needed by recently swapped-in processes Pages scanned by page daemon (not currently in use). If sr does not equal zero, the page daemon has been running. Reports the number of disk operations per second, showing data on up to four disks Reports the trap/interrupt rates (per second): Interrupts per second System calls per second CPU context switch rate Reports on the use of CPU time: User time System time Idle time E I

Run v s a - to show the total of various system events that have taken place since the system was last mtt s booted. 0sa is wp n 0sa ot wp us 0pgssapdi ae wpe n 0pgssapdot ae wpe u 49740ttladestas fut tkn 0368 oa drs rn. als ae 3706pg is 053 ae n 2055pg ot 615 ae us 3142pgspgdi 825 ae ae n 6252pgspgdot 555 ae ae u 1070 ttlrcam 1069 oa elis 1975 rcam fo fe ls 0260 elis rm re it 0mco(a)fut ir ht als 49740mnr(s fut 0368 io a) als 2536mjrfut 978 ao als 12323cp-nwiefut 0787 oyo-rt als 6714 zr fl pg fut 1107 eo il ae als 10527 pgseaie b tecokdeo 02607 ae xmnd y h lc amn 78 rvltoso tecokhn 81 eouin f h lc ad 1767 pgsfedb tecokdeo 6130 ae re y h lc amn 4908frs 994 ok 1326vok 180 frs 5409ees 770 xc .akadia.com/ser ices/solaris_tips.html

12/24

4/3/12

SUN Solaris Tips 5409ees 770 xc 71625cucnetsice 4602 p otx wths 76453dvc itrut 3079 eie nerps 58558tas 2043 rp 29687 sse cls 46355 ytm al 40847ttlnm lous(ah ht 9% 3238 oa ae okp cce is 5) 877toog 12 oln 1447 ue 0867 sr cu p 9234sse cu 586 ytm p 43676il 4728 de cu p 1219 wi 6870 at cu p

Run v s a - to show swapping statistics. mtt S pos rc rbw 000 mmr eoy pg ae ds ik fut als cu p sa fe s s p p f d s m m m m wp re i o i o r e r 1 3 4 5 i n s y c u s i s s y d 81 52 88 0 01 2 5 0471 0 0 0 2614 38 2 29 8 2 1 5 1 0 00 0 6

s =Aeaenme o LP sapdi prscn i vrg ubr f Ws wpe n e eod s =Nme o woepoesssapdot o ubr f hl rcse wpe u H D D U I ( )

You can display disk activity information by using the i s a command with a time interval. The following ott example shows disk statistics gathered every five seconds. isa 5 ott ty t m1 d m3 d m4 d m5 d cu p tntu kstssr kstssr kstssr kstssr u s w i i ot p p ev p p ev p p ev p p ev s y t d 0 2 1 0 1 2 8 2 0 2 2 0 0 0 1 0 1 0 2 2 39 2 0 4 5 7 8 7 3 9 1 6 2 3 4 0 0 0 0 0 0 0 21 7 9 8 0 1 6 0 0 0 0 0 0 0 0 0 0 0 0 0 1 09 8 0 1 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 9 0 1 6 2 0 2 2 0 0 0 0 0 0 0 0 0 2 3 19 5 0 2 4 0 0 0 0 0 0 0 0 0 0 0 0 0 1 19 8 F E ... F tin tout Disk bps tps serv CPU us sy wt id H D E D S In user mode In system mode Waiting for I/O Idle Blocks per second Transactions per second Average service time, in milliseconds N D Number of characters in the terminal input queue Number of characters in the terminal output queue

Terminal

Run i s a - t to get extended disk statistics. This command displays a line of output for each disk. ott xc dvc eie rs ws / / m1 d 04 09 . . m3 d 01 02 . . m4 d 00 00 . . m5 d 00 00 . . m8 d 08 03 . . m1 d0 02 09 . . m1 d1 02 09 . . m3 d0 00 02 . . m3 d1 00 02 . . m4 d0 00 00 . . .akadia.com/ser ices/solaris_tips.html k/ rs 36 . 10 . 00 . 07 . 67 . 18 . 18 . 05 . 05 . 00 . etne dvc saitc xedd eie ttsis ty t cu p k/ wi at sct % % tntu u s w i ws at cv v_ w b i ot s y t d 69 00 00 2. . . . 77 1 1 0 2 2 2 39 2 13 00 00 2. . . . 17 0 0 00 00 00 . . . 00 0 0 . 00 00 00 . . . 99 0 0 . 1. 00 00 1. 42 . . 31 0 1 68 00 00 1. . . . 55 0 1 68 00 00 1. . . . 48 0 1 13 00 00 1. . . . 14 0 0 13 00 00 1. . . . 02 0 0 00 00 00 . . . 00 0 0 .

13/24

4/3/12

m4 d0 m4 d1 m5 d0 m5 d1 m8 d0 m8 d1 s0 d s1 d F r/s w/s Kr/s Kw/s wait actv svc_t %w %b H C N

00 . 00 . 00 . 00 . 04 . 04 . 06 . 06 .

00 . 00 . 00 . 00 . 03 . 03 . 21 . 21 . D

00 . 00 . 04 . 04 . 33 . 33 . 60 . 60 .

00 . 00 . 00 . 00 . 1. 42 1. 42 2. 28 2. 28

SUN Solaris Tips 00 00 . . 00 . 00 00 . . 00 . 00 00 . . 94 . 00 00 . . 73 . 00 00 1. . . 03 00 00 1. . . 17 00 00 1. . . 63 00 00 1. . . 52

0 0 0 0 0 0 0 0

0 0 0 0 0 1 3 2

Reads per second Writes per second Kbytes read per second Kbytes written per second Average number of transactions waiting for service (queue length) Average number of transactions actively being serviced Average service time, in milliseconds Percentage of time the queue is not empty Percentage of time the disk is busy CPU U ( )

Display CPU utilization with the sar -u command. (The sar command without any options is equivalent to sar -u.) At any given moment, the processor is either busy or idle. When busy, the processor is in either user or system mode. When idle, the processor is either waiting for I/O completion or "sitting still" with no work to do. Measure CPU utilization during 5 secs one time. sr- 51 a u Measure CPU utilization during 60 secs 1440 times and write result in file sar.log. sr- - srlg6 14 a u o a.o 0 40 To later review disk and tape activity from that period: sr- - srlg a d f a.o F %sys %user %wio %idle A % N D Lists the percentage of time that the processor is in system mode Lists the percentage of time that the processor is in user mode Lists the percentage of time the processor is idle and waiting for I/O completion Lists the percentage of time the processor is idle and is not waiting for I/O .

8
"

Solaris 7 and 8 include a native implementation of file system journaling. This feature, known as " or just "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 is the standard file system for all disk partitions on SUN servers, except for partitions holding swap space. By default, the journaling option is disabled. Logging is enabled on a per file system basis, and it can even be enabled on / (root file system) and other operating system partitions. B Solaris UFS logging works by allocating space from the file system's free blocks. Within that space, all metadata changes to the file system are written. Metadata includes directory and I-node information but not file data blocks, essentially everything but the actual data within the file. So, for example, a "file create" modifies the directory structure and allocates a new I-node, and those activities are written to the logging space. Once the metadata changes are made to the logging area, the system is free to perform other operations to the file system. In the background, the information in the log is flushed to the file system and updates the 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 complete metadata changes via logging and background flushing than by directly modifying the metadata (via random I/O) spread across the disk. The size of the logging space is based on the size of the file system, and .akadia.com/ser ices/solaris_tips.html

14/24

4/3/12

SUN Solaris Tips random I/O) spread across the 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 space, up to 64 MB. The space is used as a circular log: if the log space is about to fill up, new metadata change requests are paused while the log is emptied. As changes are moved from the log to the file system, that log space is made available, and new metadata changes can be written to the logging space.

Usually with UFS, if the system crashes during any file system operation, the entire system must have its consistency checked via the fsck command. That command can take several minutes per file system because it checks all metadata and file data to ensure the structures are correct, free, and used, and that the I-node block counts are correct. It also confirms that the free space available is current, repairs inconsistencies, and occasionally requires manual intervention to fix large problems. Files and even directories 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 logged file system after a crash is a simple and fast operation. The system evaluates the logging data and determines which changes had completed against the underlying file system, which had yet to start, and which were in progress. Those completed or not yet started are removed from the log, and those partly completed are either undone or completed. If there's sufficient data in the log to 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 the activities here. The end result is that the underlying file system is consistent, and no thorough consistency checking is needed. That operation completes in a few seconds per file system. U Starting with Solaris 7, there's a new logging option to the mount command and in the / / system configuration file. Logging only appears in a couple other places within Solaris. The mount command shows which partitions are mounted and lists logging in the options fields for each partition on which logging is enabled. Finally, at system boot time, the fsck phase reports per partition whether each is stable, logging, or being checked. There are no other status commands available to determine the state of logging. A=Dvc t mut eie o on B=Dvc t fc eie o sk C=Mutpit on on D=Flsse Tp ieytm ye E=Fc ps (nmotttwt lgig sk as uipran ih ogn) F=Muta bo on t ot G=Mutotos on pin #----------------------------------------------------------------#A B C D E F G #----------------------------------------------------------------f d /e/df dvf d - n o /rc po /rc po - n po rc o /e/s/0003 dvdkctds sa - n wp o /e/s/0000 /e/dkctds / dvdkctds dvrs/0000 us 1 n lgig f o ogn /e/s/0006 /e/dkctds /s dvdkctds dvrs/0006 ur us 2 n lgig f o ogn /e/s/0001 /e/dkctds /a dvdkctds dvrs/0001 vr us 3 n lgig f o ogn /e/s/0007 /e/dkctds /oe us 4 yslgig dvdkctds dvrs/0007 hm f e ogn /e/s/0005 /e/dkctds /p dvdkctds dvrs/0005 ot us 5 yslgig f e ogn /e/s/0800 /e/dkctds /0 dvdkctds dvrs/0800 u1 us 6 yslgig f e ogn /e/s/0900 /e/dkctds /0 dvdkctds dvrs/0900 u2 us 7 yslgig f e ogn /e/s/01ds /e/dkct000/0 dvdkct000 dvrs/01ds u3 us 8 yslgig f e ogn /e/s/01ds /e/dkct100/0 dvdkct100 dvrs/01ds u4 us 9 yslgig f e ogn /e/s/01ds /e/dkct200/0 dvdkct200 dvrs/01ds u5 us 1 yslgig f 0 e ogn /e/s/11ds /e/dkct300/p dvdkct300 dvrs/11ds ap us 1 yslgig f 1 e ogn /e/s/11ds /e/dkct400/sr us 1 yslgig dvdkct400 dvrs/11ds ues f 2 e ogn sa wp /m tp tps - ysmf e Logging increases performance, decreases fsck time, removes the risk of a file system corruption, can be used on all UFS partitions (including root), and is free.

The log system messages daemon reads and forwards system messages to the appropriate log files and/or users, depending upon the priority of a message and the system facility from which it originates. The configuration file / / . controls where messages are forwarded. The syslogd daemon ignores any faulty entry in /etc/syslog.conf, specially spaces instead of tabs are not recognized by syslogd. Therefore always check the entries in /etc/syslog.conf in the debugging mode of syslogd. H / / .
15/24

#/t/ntdsso so ecii./ylg tp .akadia.com/ser ices/solaris_tips.html

4/3/12

SUN Solaris Tips

#/t/ntdsso so ecii./ylg tp #/s/bnssodursi/ylg d gtes)fud1adess te ae 000022 ent( on drse, hy r: ..... aiohs( tsig1327111622 mlgot) etn 9.4.2.9.. cln(.r;enntc;uhntc fie*erkr.oieat.oie /e/ymg dvsss) cln(.r;endbgdeo.oie fie*erkr.eu;amnntc /a/d/esgs vrammsae) cln(alif;aldbg fiemi.nomi.eu /a/o/alo) vrlgmilg ssod ln 1:ukonpirt nm "eu ylg: ie 4 nnw roiy ae dbg cln(.lr;enerdeo.r fie*aetkr.r;amner cln(.lr fie*aet cln(.mr fie*eeg cln(srer fieue.r cln(srer fieue.r cln(sraet fieue.lr cln(sreeg fieue.mr ssod vrin17 ylg: eso .0 Satd StJn 61:14 20 tre: a a 01:7 01 Iptmsaecut sse 0 ntok0 nu esg on: ytm , ewr #Otus 1 upt: 0 533353333333333333333333XCNOE /e/ymg OSL: dvsss 733533333333333333333333XFL:/a/d/esgs IE vrammsae XX6XXXXXXXXXXXXXXXXXXXXXXUUE: NSD 311311111111111111111111XUES oeao SR: prtr 111111111111111111111111XUES ro SR: ot 000000000000000000000000XWL: AL X3XXXXXXXXXXXXXXXXXXXXXXXCNOE /e/ymg OSL: dvsss X3XXXXXXXXXXXXXXXXXXXXXXXFL:/a/d/esgs IE vrammsae X1XXXXXXXXXXXXXXXXXXXXXXXUES ro,oeao SR: ot prtr X0XXXXXXXXXXXXXXXXXXXXXXXWL: AL PrFl Saitc e ie ttsis Fl ie Tt o ---/e/ymg dvsss 0 /a/d/esgs vrammsae 0 0 0 0 0 oeao prtr 0 ro ot 0 WL AL 0 /e/ymg dvsss 0 /a/d/esgs vrammsae 0 ro,prtr otoeao 0 WL AL 0 ssod rsatd ylg: etre of&rnig.. f unn.. sspl bokn,ii_n= y_ol lcig ntct0 #^ D #/t/ntdsso sat ecii./ylg tr Line 14 in /etc/syslog.conf are filled up with spaces instead of tabs. Replace the spaces with tabs and syslogd will accept the new entry in Line 14. Dp us --0 0 0 0 0 0 0 0 0 Nfd ow ---0 0 0 0 0 0 0 0 0 Er rs --0 0 0 0 0 0 0 0 0 /a/o/alo" vrlgmilg

oeao) prtr ro) ot * ) /e/ymg dvsss) /a/d/esgs vrammsae) ro,oeao) ot prtr * )

100M

If you check the oracle process with the OS comand " " or " ", you can see that each oracle process use more than 100M memory. Is this a problem on the Oracle installation or something else? It seems that pmap counts the SGA size as the private 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 PDUENM TRPINC SZ I SRAE H R IE IE RSSAE E TT TM IE CUCMAD P OMN

---------------------------------------------------------------31oal 6 rce 28 5 5 9 0 14 2M 8Msep 00 00%oal 8 le :1 .0 rce 33oal 7 rce 1 5 1 9 0 12 2M 8Msep 4:0 00%oal 8 le 15 .0 rce 33oal 6 rce 1 5 1 9 0 19 1M 8Msep 00 00%oal 8 le :1 .0 rce .akadia.com/ser ices/solaris_tips.html

16/24

4/3/12

33oal 6 rce 35oal 6 rce 39oal 5 rce 37oal 7 rce 35oal 7 rce 37oal 6 rce 31oal 7 rce 39oal 6 rce M A

1 1 1 1 1 1 1 1 1 1

5 9 5 8 5 9 5 9 5 8 5 8 5 8 5 8 O

0 0 0 0 0 0 0 0

19 1M 19 1M 19 1M 19 1M 19 1M 18 1M 18 1M 18 1M P

SUN Solaris Tips 8Msep 00 8 le :1 8Msep 01 8 le :7 8Msep 00 9 le :0 8Msep 00 8 le :0 8Msep 00 8 le :0 8Msep 00 9 le :0 8Msep 00 9 le :0 8Msep 00 8 le :0

00%oal .0 rce 00%oal .2 rce 00%oal .0 rce 00%oal .0 rce 00%oal .0 rce 00%oal .0 rce 00%oal .0 rce 00%oal .0 rce

On many UNIX platforms and specially on Sun platforms, the text of the Oracle binary and shared libraries are actually shared between background processes if these instances share the same ORACLE_HOME. So you need to subtract the shared text of the 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 executable are often added incorrectly. D O S

This can be used by anyone who has privleges for the , which can be found in / /p oc/bin/. First, we need to find the process id (PID) of the Oracle background process you wish to determine the memory size for. This is done by issueing the following command: #p - oal s u rce f UD I oal rce oal rce oal rce oal rce oal rce oal rce oal rce oal rce oal rce oal rce PD PI C I PD SIETY TM T 39 5 1 01:61 ? 22:7 31 6 1 01:61 ? 22:7 33 6 1 01:61 ? 22:7 35 6 1 01:61 ? 22:7 37 6 1 01:61 ? 22:7 39 6 1 01:61 ? 22:7 31 7 1 01:61 ? 22:7 33 7 1 01:61 ? 22:7 35 7 1 01:61 ? 22:7 37 7 1 01:61 ? 22:8 TM CD IE M 00 oapo_I3 :0 r_mnDA 00 oadw_I3 :1 r_b0DA 00 oalw_I3 :1 r_grDA 01 oacp_I3 :8 r_ktDA 00 oaso_I3 :1 r_mnDA 00 oarc_I3 :0 r_eoDA 00 oasp_I3 :0 r_n0DA 4:0oas0_I3 15 r_00DA 00 oad0_I3 :0 r_00DA 00 oad0_I3 :0 r_01DA

Second, you then enter the following commands for the DB Writer process (ora_dbw0_DIA3) with process id = 361 as an example. #/s/rcbnpa 31 ge "hi" urpo/i/mp 6 rp smd 8000 892 ra/rt/xcsae [smd02] 0000 29K edwieee/hrd hi=x #/s/rcbnpa 31 urpo/i/mp 6 ttl143K oa 222 ge "oa" rp ttl

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

RMC

How much memory is needed on SUN Solaris? Explaining memory in Solaris by reviewing the different types of memory and introducing a set of tools, the RMC package. I RMC P

Download the RMCmem tools available from ftp://playground.sun.com/pub/memtool. The package includes a kernel module that provides extra instrumentation. #c /m d tp #za RCe382trg ct Mmm...a.z #pgd - . kad d trxfa v

The package is installed in /op /RMCmem (see README in this directory) V /P M U

Solaris is a virtual memory system. The total amount of memory that you can use is increased by adding swap space to the system. If you ever see "out of memory" messages, adding swap space is the usual fix. Performance of the system is very dependent on how much physical memory (RAM) you have. If you don't have enough RAM to run your workload, performance degrades rapidly. Physical memory usage can be classified into four groups:
.akadia.com/ser ices/solaris_tips.html 17/24

4/3/12

SUN Solaris Tips

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: #/p/Mmmbnpte otRCe/i/rmm Ttlmmr: oa eoy Kre Mmr: enl eoy Apiain plcto: Eeual &lb: xctbe is Fl Cce ie ah: Fe,fl cce re ie ah: Fe,fe: re re T The total physical memory can be seen using prtconf. Memory is allocated in units called pages, and you can use the 'pagesize' command to see the size in bytes per page: #/s/bnptof ge Mmr ursi/rcn rp eoy Mmr sz:12 Mgbts eoy ie 04 eaye #/s/i/aeie urbnpgsz 89 12 K Kernel memory is allocated to hold the initial kernel code at boot time, then grows dynamically as new device drivers and kernel modules are used. Kernel tables also grow dynamically, unlike some older versions of Unix. As you add hardware and processes to a system, the kernel will grow. In particular, to keep track of all the memory in a system, the kernel allocates a page table structure. If you have several gigabytes of RAM this table gets quite large. The dynamic kernel memory allocator grabs memory in large "slabs," then allocates smaller blocks more efficiently. This means that the kernel tends to grab a bit more memory than it's really using. If there is a severe memory shortage, the kernel unloads unused kernel modules and devices and frees unused slabs. The simplest summary of kernel memory usage comes from sar. To show the kernel memory allocation (KMA) activities use (see man a for more details). #sr- 1 a k SnSdaod57Gnrc164-2snu uO imn . eei_0511 u4 0/80 42/1 99Mgbts 8 eaye 6 Mgbts 0 eaye 10Mgbts 1 eaye 4 Mgbts 2 eaye 77Mgbts 5 eaye 1 Mgbts 1 eaye 6Mgbts eaye

slmm alc fi m_e lo al l_e gmm alc fi os_lo fi lo al vzalc al 67086426 838 043 04883 4712 4142 3670 0 1213 1322 0 A Application processes consist of an address space divided into segments, where each segment maps either to a file, anonymous memory (the swap space), System V shared memory, or a memory mapped device. The mapped files include the code and 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 in the RMCmem package. #/p/Mmmbnpe 31 otRCe/i/mm 6 31 6: oadw_I3 r_b0DA Kye Rsdn Sae PiaePrisos bts eiet hrd rvt emsin 892 892 892 29 29 29 -ra/rt/xc edwieee 1 6 1 6 8 8ra/xc edee 1 6 1 6 8 8ra/xc edee 8 8 8 -ra/rt/xc edwieee .... .... . . . . ......... ....... 12 1 8 0 7 2 8ra/xc edee 8 8 8 -ra/rt/xc edwieee 1 6 1 6 8 8ra/xc edee 8 8 8 -ra/rt/xc edwieee ---- --- --- --- ------ --- --- --- --143 222 900 978 34 22 32 1
.akadia.com/ser ices/solaris_tips.html

Mpe Fl apd ie [hi=x] smd02 lb_s.o1 icprs. lbps. im.o2 lbps. im.o2 ...... ..... lbl.o1 iefs. lbl.o1 iefs. lbv.o1 ikms. lbv.o1 ikms.

18/24

4/3/12

SUN Solaris Tips

Now we can see that the process address space size is 124232 kilobytes; 93040 kilobytes of that are currently resident in main memory, 92728 while 312 kilobytes are private. When this command started 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 the shared memory for each mapped file, we'll know how much application memory is in use. This summary is shown by p mem as we saw in the beginning, and the detail is listed by the memp command in RMCmem. #/p/Mmmbnmms otRCe/i/ep PD I .. . 39 5 37 6 39 6 31 7 35 6 37 7 33 6 35 7 31 6 33 7 F 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 same file twice and it is quicker the second time. The RMCmem package adds kernel instrumentation that counts up all the pages for each cached file. The memp -m command 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 directory 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 vnode open code) and making an inode-to-name lookup cache in the kernel. This cache size is limited (to 8192 entries by default), and the file may have been opened before the kernel module was loaded, so it can't always find the name. #mmsep m Sz ie IUeEFFlnm ns / ieae /s (nd ur ioe /s (nd ur ioe /s (nd ur ioe /s (nd ur ioe /s (nd ur ioe /s (nd ur ioe .. ... .. ... 508) 448 202) 692 502) 449 502) 448 502) 447 505) 440 ... ... Sz Rsdn ie eiet .... ... ... ... 180k 968 194 30k 188k 912 114 35k 172k 910 198 32k 184k 916 100 33k 194k 910 100 32k 184k 900 134 38k 198k 906 108 35k 184k 908 134 34k 143k 900 222 34k 110k 902 268 33k Sae Piae hrd rvt ... ... .. .. 980 20k 88 0k 974 20k 48 4k 974 20k 46 1k 970 22k 46 1k 972 21k 48 0k 970 22k 30 6k 970 22k 36 3k 970 22k 38 2k 978 22k 32 1k 978 22k 34 0k Poes rcs ....... ...... oapo_I3 r_mnDA oaso_I3 r_mnDA oarc_I3 r_eoDA oasp_I3 r_n0DA oacp_I3 r_ktDA oad0_I3 r_01DA oalw_I3 r_grDA oad0_I3 r_00DA oadw_I3 r_b0DA oas0_I3 r_00DA

204 204 F 16k 16k 88k 14 84 F 2k 75k 75kF 72 72 78k 78kF 40 40 78k 78kF 40 40 69k 69kF 86 86 .. .. .. . ..

... and so on down to lots of files ... #c /s d ur #fn .-nm508 id iu 448 .lcljb/r87odlbevr. /oa/dcoa1/l/isre8a More infos about the RMC package can be found PDF

U
S

S
8:

CD-ROM

c /do/o__o d crmsl8dc .a2d /bc ht:/urm88 tp/qou:88 .a2dso /bc tp S 7:

(tr) Sat (sn teDcoln) Uig h o nie (tp So)

c /do/o__19dc d crmsl719_o .a2d /bc ht:/imn:88 tp/daod88 .a2dso /bc tp


.akadia.com/ser ices/solaris_tips.html

(tr) Sat (sn teDcoln) Uig h o nie (tp So)


19/24

4/3/12

SUN Solaris Tips

DLT-TAPE UNIT INSTALLATION

7/8/9

Installation Instructions will cover the installation of the DLT tape peripheral hardware and configuration of the system to 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 DLT drive can be attached only to a SCSI single-ended interface. The same is true for SCSI differential attachment. Solaris includes a driver to efficiently communicate with SCSI tape drives, such as the DLT tape peripheral.

:
Shut down your Sun workstation/server and power off the machine and all scsi-devices. Connect the DLT to the scsi-bus using 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 drives will never let you achieve any good throughput. You bought the DLT because of performance didn't you ? 1. SO- (1A TPA L-) Power on the devices/machine again and halt the boot process with. (rpesteBEKkyi yuhv a ACI o rs h RA e f o ae n SI cnoe. osl) 2. poess-l rb-cial Verify that the drive is connected properly. Note: output from p o e s s will not always be correct if rb-ci you enter the PROM monitor by breaking the boot process! 3. 4. bo -v ot r c /enldv d kre/r Boot the system and log in as root. When booting you should see a message similar to these: " t : " s1 . Change directory to / e n l d v kre/r. Edit the s . o ffile by adding the following: tcn tp-ofgls=QATMDT00,QatmDT00,DT-aa; aecni-it"UNU L70""unu L70""L7dt" DT-aa=103,,x69408,x308,x53 L7dt ,x80083,,x208,x408,; tp-ofgls=<L tp ui>,<L rfrnenm>,<Ldt> aecni-it"DT ae nt""DT eeec ae""DTaa" t p - o f g l s is a variable defined by a series of tape configuration parameters listed below: aecni-it < L t p u i >is the vendor and product ID string for the DLT device. DT ae nt Depending on the DLT tape peripheral you are installing, you must insert the appropriate vendor and product ID for < L t p u i >as described in the following table: DT ae nt DTTp Pout L ae rdc DT00 L70 <L tp ui> DT ae nt QATMDT00( U N U L 7 0 Total string character count, including spaces, must equal 15).

< L r f r n e n m >is a name you select that the system will use to identify the DLT device. This DT eeec ae reference does not change the DLT product ID. When the system boots, the reference name will be displayed in the list of peripheral devices recognized by the system. < L -data> is a variable containing a series of additional DLT device configuration information. You select a DT name in place of the < L d t >string. You will continue editing the st.conf file by defining the name you DT aa selected for < L d t > The definition depends on the DLT tape peripheral you are installing. For a DT aa. DLT7000 series unit add the following line: 103,,x69408,x308,x53 ,x80083,,x208,x408,; < L d t >contains 10 parameters and are described following: DT aa 1 03 x8 The first parameter, is the version number and should not change. The second parameter, designates the DLT tape type as defined in /s/nld/y/toh uricuessmi..
20/24

#eieM_STE 03 / gnrcohrtp o tp die* dfn TIOHR x6 * eei te ye f ae rv / .akadia.com/ser ices/solaris_tips.html

4/3/12

SUN Solaris Tips

#eieM_STE 03 / gnrcohrtp o tp die* dfn TIOHR x6 * eei te ye f ae rv / #eieM_SL dfn TIDT 03 / sn SS DTtp die* x8 * u: CI L ae rv / 0 The third parameter is the block size. Since the DLT tape drive uses variable block size, this value should be zero.

083 x 6 9 The fourth parameter, 0x8639, is a summation of values that represent selected device options. The table below lists the options and the corresponding value: Oto pin S_AIBE TVRAL S_S TBF S_S TBR S_OGEAE TLN_RS S_OSED TNW_O S_LAAL TNODBE S_ORCIELMT TN_ESZ_II Vle au 000 x01 000 x08 001 x00 002 x00 000 x20 000 x40 080 x00

The m ns page has more information about these and other possible a t device options. For certain applications, it may be necessary to consider adding or removing one or more of the device options. 4 08 x2 08 x3 08 x4 08 x5 3 The fifth parameter, 4, defines the number of densities. The maximum definable number of densities is 4. The sixth, seventh, eighth and ninth parameter are used for system selection of tape densities. Use these values for a DLT 7000 Tape Drive.

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 s . o ffile, reboot the system: tcn 5. sudw-0g htoni-0 bo -v ot r Reboot the System The -r switch in the boot command enables a kernel compile and includes the creation of device special files used for communication with the DLT device. The -v switch enables verbose mode display of system bootup. With verbose mode, the system should indicate that the DLT tape peripheral is attached by displaying the <DLT reference name>string you selected. Enter the following command to verify the installation: Vno 'ADEG Pout'L70 'tp die edr TNBR' rdc DT00 ae rv: sneky00=N Adtoa Snersda=0 es e(x) o diinl es eiul rtis 0fl n=0bokn=0 ere= ie o lc o The target drive designations assigned by Solaris may take on values higher than already established in the / e / m /path. This is not a problem but during a b o - v Solaris does not remove tape device files for drives dvrt ot r, that are no longer attached to the system. This can increase the effort in locating the device file for the configured drive, however, this can be minimized by first deleting the tape device files: r /e/m/ m dvrt* then either boot the system with a: bo -v ot r or issue the following at the command line prompt: dvofg- s;tps rcni i t ae If the DLTtape is the only drive on the system, it's target assignment should be zero. The Solaris man pages have more information on drvconfig and tapes.

6.

m - /e/m/ sau t t dvrt0 tts

If you remove or add a device on Solaris then the devices files must be recreated, either with b o - vor ot r d v s d .For example to renumber the logical tape drive devices do the following: Tape drives were numbered efam beginning with /de / m .akadia.com/ser ices/solaris_tips.html /3 instead of /de / m /0. The physical devices pointed to by the logical /de / m /[012]

21/24

4/3/12

SUN Solaris Tips

beginning with /de / m /3 instead of /de / m /0. The physical devices pointed to by the logical /de / m /[012] devices no longer existed, and we wanted to renumber the valid devices beginning at /de / m /0. 1. Cleanup non-existent tape drive devices with de f adm. #dvsd - - tp efam C c ae v 2. Remove all /de / m logical links. #r - /e/m/ m f dvrt* 3. Recreate all /de / m logical links with de f adm # dvsd - tp efam c ae v

devfsadm(1M) maintains the /dev and /devices namespaces. It replaces the previous suite of devfs administration tools including 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. Restrict operations to devices of class device_class. Solaris defines the following values for device_class: , , , , and . This option may be specified more than once to specify multiple device classes.

- dvc_ls c eiecas

The Solaris operating system gets the jumpstart for its booting from a hardware-level interface called the OpenBoot PROM or OBP for short. OpenBoot at its heart has an interactive command interpreter with a varied set of functions. OBP is a firmware which is stored in the socketed startup PROM of the computer and consists of two parts, the PROM and the NVRAM. As stated earlier while the PROM acts as the interface for access to diagnostics and drivers, the NVRAM consists of some editable user defined parameters. Non Volatile information like the system identification information, device aliases etc are stored in the 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

U
D :

OK

.
G - boot k e rne l from de fault de vice . Factory de fault is to boot from DISK if pre se nt, othe rwise from NET. - boot k e rne l from ne twork - boot k e rne l from C DDisplay all variable s and curre nt value s. < > Se t variable to the give n < R e se t the value of de fault. value .

this com m and shows the following syste m s hardware inform atiion : Mode l, archite cture , proce ssor,k e yboard, ope nboot ve rsion, Se rial no. e the rne t addre ss & host id. - te st floppy disk drive - te st ne twork loopback s - te st scsi inte rface te st for all de vice s with se lfte st m e thod Show tick s of re al-tim e clock Monitor ne twork broadcast pack e ts Monitor broadcast pack e ts on all ne t inte rface s

ROM

> a iable to the factory

1: - boot from disk 1 partition h - boot de fault file from tape - boot m yunix from disk with flags "-as" DEVA LIA S > ok c / c @ f 4 0 / c i 3 d pi1,00ss@ ok . r p r i s poete ok

R e se t variable value s to the factory de faults.

.akadia.com/ser ices/solaris_tips.html

22/24

4/3/12
inte rface s Show attache d SC SI de vice s Show attache d SC SI de vice s for all host adapte rs- inte rnal & e x te rnal.

ok f00809d8 tape f007e cdc disk

SUN Solaris Tips

ok . C PU Spe e d : 200.00MHz UPA Spe e d : 100.00MHz PC I Bus A : 66Mhz PC I Bus B : 33Mhz

K S The se com m ands are disable d if the PR O M se curity is on. Also, if your syste m has f l se curity e nable d, you cannot apply ul any of the sugge ste d com m ands unle ss you have the password to ge t to the o prom pt. k S - Bypass PO ST. This com m and doe s not de pe nd on se curity-m ode . (Note : som e syste m s bypass PO ST as a de fault; in such case s, use S o - to start PO ST.) tpD S -A Abort. S -D - Ente r diagnostic m ode (se t d a - w t h to t u ). igsic? re S -F - Ente r Forth on TTYA inste ad of probing. Use e i to continue with the initialization se que nce . Use ful if hardware is xt brok e n. S -N R e se t NVR AM conte nts to de fault value s.

Start an OpenBoot Diagnostics <TPA SO > O stn da-wth tu K eev igsic? re O stn at-ot fle K eev uobo? as O rstal K ee-l O ts-l o oda K etal r big Configure Graphics Console (e.g. Sun XVR-100 Graphics Accelerator) instead of serial TTYA O so-ipas K hwdsly Slc tegahc aclrtr eg b eet h rpis ceeao, .. O naismdv<TLY K vla ye CR-> O stn otu-eiemdv K eev uptdvc ye O stn uenrmc tu K eev s-var? re O rstal K ee-l

W
O

'

If you are having problems where you have created a $ O E . o w r file in your home directory to forward eHM/frad mails from one account to another and it just won't forward them? S P First make sure the file isn't group or world writable. -wrx- 1zh da0Jn91:7.owr rxwrx an b a 21 frad -wrx- 1zh da0Jn91:7.owr rx-rx an b a 21 frad #wog rn #O K

Lastly, make sure your home directory isn't group or world writable. dwrx- 1 zh da49 Jn91:0zh rxwrx 4 an b 06 a 22 an dwrx- 1 zh da49 Jn91:0zh rx-rx 4 an b 06 a 22 an #wog rn #O K

S
O

A backup strategy is more complex than creating a redundant copy of disk storage and considering the strategy a success. A successful backup strategy must detail how the backup media are rotated, how the media are archived, how the system will be recovered, and what the backup software will do to create the backup. Although all parts of the backup strategy are equally important, this tip will focus on the backup script and will detail a flexible backup script that uses built-in Solaris software tools which create a reliable local backup of a Solaris machine. I 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 system. The backup script will run autonomously. The only human intervention will be to swap media and review output. .akadia.com/ser ices/solaris_tips.html

23/24

4/3/12

SUN Solaris Tips review output. The filesystems or directories to backup can be specified in the script. Using automounter you can even 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 media. The backup script will be able to run on any Solaris 2.6 or greater machine without modification.

T We use the well known utilities TAR, GZIP and DD, because they are available on any Unix system. They are very well tested and simple to use. In case of an emergency it is important to have a simple way to restore, independent of complex tools and incompatible software releases. Magne ic Tape Con rol The utility MT sends commands to a tape drive. Many of these commands are familiar, but some are not. The script will use these mt 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 S Click for the Shell Script

.akadia.com/ser ices/solaris_tips.html

24/24

Das könnte Ihnen auch gefallen