Oracle®SolarisAdministration:Common Tasks PartNo:821–1451–11 December2011 Copyright©1998,2011,Oracleand/oritsaffiliates.Allrightsreserved. Thissoftwareandrelateddocumentationareprovidedunderalicenseagreementcontainingrestrictionsonuseanddisclosureandareprotectedbyintellectual propertylaws.Exceptasexpresslypermittedinyourlicenseagreementorallowedbylaw,youmaynotuse,copy,reproduce,translate,broadcast,modify,license, transmit,distribute,exhibit,perform,publishordisplayanypart,inanyform,orbyanymeans.Reverseengineering,disassembly,ordecompilationofthissoftware, unlessrequiredbylawforinteroperability,isprohibited. Theinformationcontainedhereinissubjecttochangewithoutnoticeandisnotwarrantedtobeerror-free.Ifyoufindanyerrors,pleasereportthemtousinwriting. IfthisissoftwareorrelateddocumentationthatisdeliveredtotheU.S.GovernmentoranyonelicensingitonbehalfoftheU.S.Government,thefollowingnoticeis applicable: U.S.GOVERNMENTRIGHTS Programs,software,databases,andrelateddocumentationandtechnicaldatadeliveredtoU.S.Governmentcustomersare"commercialcomputersoftware"or "commercialtechnicaldata"pursuanttotheapplicableFederalAcquisitionRegulationandagency-specificsupplementalregulations.Assuch,theuse,duplication, disclosure,modification,andadaptationshallbesubjecttotherestrictionsandlicensetermssetforthintheapplicableGovernmentcontract,and,totheextent applicablebythetermsoftheGovernmentcontract,theadditionalrightssetforthinFAR52.227-19,CommercialComputerSoftwareLicense(December2007). OracleAmerica,Inc.,500OracleParkway,RedwoodCity,CA94065. Thissoftwareorhardwareisdevelopedforgeneraluseinavarietyofinformationmanagementapplications.Itisnotdevelopedorintendedforuseinanyinherently dangerousapplications,includingapplicationsthatmaycreateariskofpersonalinjury.Ifyouusethissoftwareorhardwareindangerousapplications,thenyoushall beresponsibletotakeallappropriatefail-safe,backup,redundancy,andothermeasurestoensureitssafeuse.OracleCorporationanditsaffiliatesdisclaimany liabilityforanydamagescausedbyuseofthissoftwareorhardwareindangerousapplications. OracleandJavaareregisteredtrademarksofOracleand/oritsaffiliates.Othernamesmaybetrademarksoftheirrespectiveowners. IntelandIntelXeonaretrademarksorregisteredtrademarksofIntelCorporation.AllSPARCtrademarksareusedunderlicenseandaretrademarksorregistered trademarksofSPARCInternational,Inc.AMD,Opteron,theAMDlogo,andtheAMDOpteronlogoaretrademarksorregisteredtrademarksofAdvancedMicro Devices.UNIXisaregisteredtrademarkofTheOpenGroup. Thissoftwareorhardwareanddocumentationmayprovideaccesstoorinformationoncontent,products,andservicesfromthirdparties.OracleCorporationand itsaffiliatesarenotresponsibleforandexpresslydisclaimallwarrantiesofanykindwithrespecttothird-partycontent,products,andservices.OracleCorporation anditsaffiliateswillnotberesponsibleforanyloss,costs,ordamagesincurredduetoyouraccesstooruseofthird-partycontent,products,orservices. Celogicieletladocumentationquil’accompagnesontprotégésparlesloissurlapropriétéintellectuelle.Ilssontconcédéssouslicenceetsoumisàdesrestrictions d’utilisationetdedivulgation.Saufdispositiondevotrecontratdelicenceoudelaloi,vousnepouvezpascopier,reproduire,traduire,diffuser,modifier,breveter, transmettre,distribuer,exposer,exécuter,publierouafficherlelogiciel,mêmepartiellement,sousquelqueformeetparquelqueprocédéquecesoit.Parailleurs,ilest interditdeprocéderàtouteingénierieinversedulogiciel,deledésassembleroudeledécompiler,exceptéàdesfinsd’interopérabilitéavecdeslogicielstiersoutelque prescritparlaloi. Lesinformationsfourniesdanscedocumentsontsusceptiblesdemodificationsanspréavis.Parailleurs,OracleCorporationnegarantitpasqu’ellessoientexemptes d’erreursetvousinvite,lecaséchéant,àluienfairepartparécrit. Sicelogiciel,ouladocumentationquil’accompagne,estconcédésouslicenceauGouvernementdesEtats-Unis,ouàtouteentitéquidélivrelalicencedecelogiciel oul’utilisepourlecompteduGouvernementdesEtats-Unis,lanoticesuivantes’applique: U.S.GOVERNMENTRIGHTS.Programs,software,databases,andrelateddocumentationandtechnicaldatadeliveredtoU.S.Governmentcustomersare "commercialcomputersoftware"or"commercialtechnicaldata"pursuanttotheapplicableFederalAcquisitionRegulationandagency-specificsupplemental regulations.Assuch,theuse,duplication,disclosure,modification,andadaptationshallbesubjecttotherestrictionsandlicensetermssetforthintheapplicable Governmentcontract,and,totheextentapplicablebythetermsoftheGovernmentcontract,theadditionalrightssetforthinFAR52.227-19,Commercial ComputerSoftwareLicense(December2007).OracleAmerica,Inc.,500OracleParkway,RedwoodCity,CA94065. Celogicieloumatérielaétédéveloppépourunusagegénéraldanslecadred’applicationsdegestiondesinformations.Celogicieloumatérieln’estpasconçunin’est destinéàêtreutilisédansdesapplicationsàrisque,notammentdansdesapplicationspouvantcauserdesdommagescorporels.Sivousutilisezcelogicieloumatériel danslecadred’applicationsdangereuses,ilestdevotreresponsabilitédeprendretouteslesmesuresdesecours,desauvegarde,deredondanceetautresmesures nécessairesàsonutilisationdansdesconditionsoptimalesdesécurité.OracleCorporationetsesaffiliésdéclinenttouteresponsabilitéquantauxdommagescausés parl’utilisationdecelogicieloumatérielpourcetyped’applications. OracleetJavasontdesmarquesdéposéesd’OracleCorporationet/oudesesaffiliés.Toutautrenommentionnépeutcorrespondreàdesmarquesappartenantà d’autrespropriétairesqu’Oracle. AMD,Opteron,lelogoAMDetlelogoAMDOpteronsontdesmarquesoudesmarquesdéposéesd’AdvancedMicroDevices.InteletIntelXeonsontdesmarquesou desmarquesdéposéesd’IntelCorporation.TouteslesmarquesSPARCsontutiliséessouslicenceetsontdesmarquesoudesmarquesdéposéesdeSPARC International,Inc.UNIXestunemarquedéposéeconcédésouslicenseparX/OpenCompany,Ltd. 111206@25097 Contents Preface...................................................................................................................................................17 1 LocatingInformationAboutOracleSolarisCommands...............................................................23 SupportforFull-TextSearchingofManPages ................................................................................23 AboutOracleSolarisManPages........................................................................................................24 LocatingInformationinManPages..................................................................................................24 CreatingIndexFilestoEnabletheSearchingofManPagesforSpecificKeywords.............24 SearchingforInformationinManPagesbySpecifyingKeywords........................................25 FormatoftheManPageSections ......................................................................................................29 DescriptionoftheManPageSections .......................................................................................29 ManPageFormat .........................................................................................................................29 2 ManagingUserAccountsandGroups(Overview) .........................................................................33 What'sNewinUserAccountsandGroups? ....................................................................................33 RemovalofSupportforSolarisManagementConsole ...........................................................33 DefaultPasswordHashingAlgorithm ......................................................................................33 WhatAreUserAccountsandGroups?.............................................................................................34 UserAccountComponents ........................................................................................................34 GuidelinesforAssigningUserNames,UserIDs,andGroupIDs..........................................40 WhereUserAccountandGroupInformationIsStored ................................................................41 FieldsinthepasswdFile ..............................................................................................................41 DefaultpasswdFile ......................................................................................................................42 FieldsintheshadowFile ..............................................................................................................44 FieldsinthegroupFile ................................................................................................................44 DefaultgroupFile ........................................................................................................................44 Command-LineToolsforUserandGroupAccountManagement..............................................46 CustomizingaUser'sWorkEnvironment .......................................................................................47 3 Contents UsingSiteInitializationFiles ......................................................................................................48 AvoidingLocalSystemReferences ............................................................................................48 ShellFeatures................................................................................................................................49 Bashandksh93ShellHistory .....................................................................................................49 Bashandksh93ShellEnvironmentVariables..........................................................................50 CustomizingtheBashShell ........................................................................................................53 AbouttheMANPATHEnvironmentVariable...............................................................................53 ThePATHVariable ........................................................................................................................53 LocaleVariables ...........................................................................................................................54 DefaultFilePermissions(umask) ...............................................................................................55 CustomizingaUserInitializationFile.......................................................................................56 3 ManagingUserAccountsandGroups(Tasks).................................................................................57 SettingUpandAdministeringUserAccounts(TaskMap) ...........................................................57 SettingUpUserAccounts ..................................................................................................................58 GatheringUserInformation.......................................................................................................59 ▼HowtoCustomizeUserInitializationFiles ..............................................................................60 ▼HowtoChangeAccountDefaultsForAllRoles ......................................................................60 ▼HowtoAddaUser.......................................................................................................................61 ▼HowtoDeleteaUser ...................................................................................................................62 ▼HowtoAddaGroup....................................................................................................................63 ▼HowtoShareHomeDirectoriesThatAreCreatedasZFSFileSystems...............................63 ManuallyMountingaUser'sHomeDirectory. ........................................................................64 4 BootingandShuttingDownanOracleSolarisSystem.................................................................67 What'sNewinBootingandShuttingDownaSystem? ..................................................................67 SupportforAdministrativelyProvideddriver.confFiles....................................................68 BitmappedConsole .....................................................................................................................69 BootandShutdownProgressAnimation .................................................................................69 FastReboot ...................................................................................................................................69 x86:RemovalofSupportfor32–BitKernel ..............................................................................70 BootingandShuttingDownanOracleSolarisSystem(Overview) ..............................................70 GRUBBasedBooting ..................................................................................................................71 ManagementofBootServicesbytheServiceManagementFacility......................................71 BootingaSystemtoaSpecifiedState(TaskMap) ...........................................................................72 4 OracleSolarisAdministration:CommonTasks • December2011 Contents BootingaSystemtoaSpecifiedState(RunLevel)...........................................................................72 DeterminingaSystem'sCurrentRunLevel..............................................................................73 ▼SPARC:HowtoBootaSystemtoaMultiuserState(RunLevel3).........................................73 ▼x86:HowtoBootaSystemtoaSingle-UserState(RunLevelS)............................................74 ShuttingDownaSystem(TaskMap)................................................................................................76 ShuttingDownaSystem.....................................................................................................................76 ▼HowtoShutDownaSystembyUsingtheshutdownCommand ..........................................76 BringingaSystemtoaShutdownState(RunLevel0)byUsingtheinitCommand .........78 ▼HowtoShutDownaSystembyUsingtheinitCommand...................................................78 BootingaSystemFromtheNetwork ................................................................................................79 AcceleratingtheRebootProcess(TaskMap)...................................................................................80 AcceleratingtheRebootProcess........................................................................................................81 ▼HowtoInitiateaFastRebootofaSPARCBasedSystem ........................................................81 ▼HowtoInitiateaFastRebootofanx86BasedSystem.............................................................82 ChangingtheDefaultBehavioroftheFastRebootFeature....................................................82 InitiatingaStandardRebootofaSystemThatHasFastRebootEnabled .............................83 BootingFromaZFSBootEnvironment(TaskMap)......................................................................83 SPARC:BootingFromaZFSBootEnvironment............................................................................84 ▼SPARC:HowtoDisplayaListofAvailableBootEnvironmentsDuringtheBoot Sequence........................................................................................................................................85 ▼SPARC:HowtoBootFromaZFSBootEnvironmentorRootFileSystem..........................85 ModifyingBootParameters(TaskMap) ..........................................................................................87 ModifyingBootParameters ...............................................................................................................88 ▼SPARC:HowtoDeterminetheDefaultBootDevice ..............................................................89 ▼SPARC:HowtoChangetheDefaultBootDevicebyUsingtheBootPROM.......................90 ▼x86:HowtoModifyBootParametersbyUsingtheeepromCommand................................91 ▼x86:HowtoModifyBootParametersatBootTime ................................................................92 AddingaLinuxEntrytotheGRUBMenuAfteranInstallation ............................................93 KeepingaSystemBootable(TaskMap) ...........................................................................................93 KeepingaSystemBootable.................................................................................................................94 DeterminingWhethertheboot-archiveSMFServiceIsRunning......................................94 ▼HowtoClearaFailedAutomaticBootArchiveUpdatebyManuallyUpdatingtheBoot Archive ..........................................................................................................................................95 ▼x86:HowtoClearaFailedAutomaticBootArchiveUpdatebyUsingthe auto-reboot-safeProperty......................................................................................................95 WheretoFindMoreInformationAboutBootingandShuttingDownaSystem........................96 5 Contents 5 WorkingWithOracleConfigurationManager................................................................................99 IntroductiontoOracleConfigurationManager..............................................................................99 ManagingOracleConfigurationManager(Tasks) .......................................................................100 ▼HowtoEnabletheOracleConfigurationManagerService..................................................101 ▼HowtoDisabletheOracleConfigurationManagerService.................................................101 ▼HowtoManuallyRegisterWiththeOracleRepository........................................................101 ▼HowtoChangetheTimeorFrequencyofDataCollection..................................................102 6 ManagingServices(Overview)........................................................................................................103 IntroductiontoSMF .........................................................................................................................103 SMFConcepts....................................................................................................................................104 SMFService ................................................................................................................................104 SMFDependencies ....................................................................................................................105 ServiceIdentifiers.......................................................................................................................105 ServiceStates...............................................................................................................................106 SMFManifests............................................................................................................................106 SMFProfiles................................................................................................................................107 ServiceConfigurationRepository............................................................................................107 SMFRepositoryBackups ..........................................................................................................108 SMFSnapshots ...........................................................................................................................109 SMFAdministrativeLayers ......................................................................................................109 SMFServiceErrorLogging.......................................................................................................110 SMFAdministrativeandProgrammingInterfaces.......................................................................110 SMFCommand-LineAdministrativeUtilities ......................................................................110 ServiceManagementConfigurationLibraryInterfaces........................................................111 SMFComponents .............................................................................................................................111 SMFMasterRestarterDaemon................................................................................................111 SMFDelegatedRestarters.........................................................................................................112 SMFPropertiesandPropertyGroups .....................................................................................112 ManagingInformationintheServiceConfigurationRepository ...............................................113 ViewingSMFInformation........................................................................................................113 ModifyingSMFInformation....................................................................................................113 DeletingSMFInformation .......................................................................................................114 SMFandBooting...............................................................................................................................114 SMFCompatibility............................................................................................................................115 6 OracleSolarisAdministration:CommonTasks • December2011 Contents RunLevels ..........................................................................................................................................115 WhentoUseRunLevelsorMilestones...................................................................................116 DeterminingaSystem'sRunLevel...........................................................................................116 /etc/inittabFile.............................................................................................................................117 WhatHappensWhentheSystemIsBroughttoRunLevel3................................................118 7 ManagingServices(Tasks)...............................................................................................................119 MonitoringServices(TaskMap).....................................................................................................119 MonitoringSMFServices.................................................................................................................120 ▼HowtoListtheStatusofaService............................................................................................120 ▼HowtoListCustomizationsofaService.................................................................................121 ▼HowtoShowWhichServicesAreDependentonaServiceInstance ..................................121 ▼HowtoShowWhichServicesaServiceIsDependentOn ....................................................122 ▼HowtoSetUpEmailNotificationofSMFTransitionEvents ..............................................122 ManagingSMFServices(TaskMap)...............................................................................................124 ManagingSMFServices....................................................................................................................125 UsingRBACRightsProfilesWithSMF...................................................................................125 ▼HowtoDisableaServiceInstance............................................................................................125 ▼HowtoEnableaServiceInstance.............................................................................................125 ▼HowtoRestartaService............................................................................................................126 ▼HowtoRestoreaServiceThatIsintheMaintenanceState ..................................................127 ▼HowtoCreateanSMFProfile ..................................................................................................127 ▼HowtoApplyanSMFProfile ...................................................................................................129 ConfiguringSMFServices(TaskMap)...........................................................................................129 ConfiguringSMFServices................................................................................................................129 ▼HowtoModifyanSMFServiceProperty................................................................................130 ▼HowtoModifyaServiceThatIsConfiguredbyaFile...........................................................130 ▼HowtoChangeanEnvironmentVariableforaService........................................................131 ▼HowtoChangeaPropertyforaninetdControlledService ................................................131 ▼HowtoDeleteCustomizationsforaService...........................................................................133 ▼HowtoModifyaCommand-LineArgumentforaninetdControlledService.................133 ▼HowtoConvertinetd.confEntries.......................................................................................134 UsingRunControlScripts(TaskMap) ..........................................................................................135 UsingRunControlScripts ...............................................................................................................135 ▼HowtoUseaRunControlScripttoStoporStartaLegacyService.....................................135 7 Contents ▼HowtoAddaRunControlScript............................................................................................136 ▼HowtoDisableaRunControlScript ......................................................................................137 TroubleshootingtheServiceManagementFacility.......................................................................138 ▼DebuggingaServiceThatIsNotStarting ...............................................................................138 ▼HowtoRepairaCorruptRepository.......................................................................................138 ▼HowtoBootWithoutStartingAnyServices ..........................................................................141 ▼HowtoForceansuloginPromptIfthesystem/filesystem/local:defaultServiceFails DuringBoot................................................................................................................................141 8 UsingtheFaultManager..................................................................................................................143 FaultManagementOverview...........................................................................................................143 NotificationofFaultsandDefects ...................................................................................................145 DisplayingInformationAboutFaultsorDefects ..........................................................................145 ▼HowtoDisplayInformationAboutFaultyComponents .....................................................146 ▼HowtoIdentifyWhichCPUsAreOffline ..............................................................................148 ▼HowtoDisplayInformationAboutDefectiveServices ........................................................148 RepairingFaultsorDefects ..............................................................................................................149 fmadmreplacedCommand......................................................................................................150 fmadmrepairedCommand......................................................................................................150 fmadmacquitCommand ..........................................................................................................150 FaultManagementLogFiles ............................................................................................................151 FaultStatistics ....................................................................................................................................151 9 ManagingSystemInformation(Tasks)..........................................................................................153 What'sNewinDisplayingandChangingSystemInformation...................................................153 SupportforAdministrativelyProvideddriver.confFiles..................................................153 DisplayingSystemInformation(TaskMap)..................................................................................154 DisplayingSystemInformation.......................................................................................................155 ▼HowtoDisplayaSystem'sReleaseInformation ....................................................................155 ▼HowtoDisplayaSystem'sHostIDNumber ..........................................................................156 ▼HowtoDisplayaSystem'sProductName ..............................................................................156 ▼HowtoDisplayaSystem'sInstalledMemory.........................................................................156 ▼HowtoDisplayDefaultandCustomizedPropertyValuesforaDevice .............................157 ▼HowtoDisplaytheDateandTime..........................................................................................158 IdentifyingInformationAboutChipMultithreadingFeatures............................................158 8 OracleSolarisAdministration:CommonTasks • December2011 Contents ▼HowtoDisplayaSystem'sPhysicalProcessorType..............................................................158 ▼HowtoDisplayaSystem'sLogicalProcessorType ...............................................................159 ChangingSystemInformation(TaskMap) ...................................................................................160 ChangingSystemInformation ........................................................................................................160 ▼HowtoManuallySetaSystem'sDateandTime ....................................................................160 ▼HowtoSetUpaMessage-Of-The-Day ...................................................................................161 ▼HowtoChangeaSystem'sIdentity(nodename) .....................................................................162 10 ManagingSystemProcesses(Tasks) ..............................................................................................163 ManagingSystemProcesses(TaskMap)........................................................................................163 CommandsforManagingSystemProcesses .................................................................................164 UsingthepsCommand ............................................................................................................164 Usingthe/procFileSystemandCommands ........................................................................165 ManagingProcessesWithProcessCommands(/proc).......................................................166 ▼HowtoListProcesses ................................................................................................................167 ▼HowtoDisplayInformationAboutProcesses .......................................................................168 ▼HowtoControlProcesses.........................................................................................................169 TerminatingaProcess(pkill,kill) ....................................................................................170 ▼HowtoTerminateaProcess(pkill).......................................................................................170 ▼HowtoTerminateaProcess(kill).........................................................................................171 DebuggingaProcess(pargs,preap) .......................................................................................172 ManagingProcessClassInformation(TaskMap) ........................................................................173 ManagingProcessClassInformation .............................................................................................173 ChangingtheSchedulingPriorityofProcesses(priocntl) .................................................174 ▼HowtoDisplayBasicInformationAboutProcessClasses(priocntl) ..............................174 ▼HowtoDisplaytheGlobalPriorityofaProcess.....................................................................175 ▼HowtoDesignateaProcessPriority(priocntl)...................................................................176 ▼HowtoChangeSchedulingParametersofaTimesharingProcess(priocntl).................177 ▼HowtoChangetheClassofaProcess(priocntl).................................................................178 ChangingthePriorityofaTimesharingProcess(nice) .......................................................178 ▼HowtoChangethePriorityofaProcess(nice).....................................................................179 TroubleshootingProblemsWithSystemProcesses......................................................................180 11 MonitoringSystemPerformance(Tasks) ......................................................................................181 WheretoFindSystemPerformanceTasks.....................................................................................181 9 Contents SystemPerformanceandSystemResources ..................................................................................182 ProcessesandSystemPerformance.................................................................................................182 AboutMonitoringSystemPerformance ........................................................................................184 MonitoringTools.......................................................................................................................184 DisplayingSystemPerformanceInformation(TaskMap) ..........................................................185 DisplayingVirtualMemoryStatistics(vmstat) ............................................................................186 ▼HowtoDisplayVirtualMemoryStatistics(vmstat).............................................................187 ▼HowtoDisplaySystemEventInformation(vmstat-s)......................................................188 ▼HowtoDisplaySwappingStatistics(vmstat-S) ..................................................................188 ▼HowtoDisplayInterruptsPerDevice(vmstat-i) ..............................................................189 DisplayingDiskUtilizationInformation(iostat).......................................................................189 ▼HowtoDisplayDiskUtilizationInformation(iostat) .......................................................190 ▼HowtoDisplayExtendedDiskStatistics(iostat-xtc)......................................................191 DisplayingDiskSpaceStatistics(df) ..............................................................................................192 ▼HowtoDisplayDiskSpaceInformation(df-k)...................................................................192 MonitoringSystemActivities(TaskMap) .....................................................................................193 MonitoringSystemActivities(sar) ................................................................................................195 ▼HowtoCheckFileAccess(sar-a) .........................................................................................195 ▼HowtoCheckBufferActivity(sar-b)...................................................................................196 ▼HowtoCheckSystemCallStatistics(sar-c)........................................................................197 ▼HowtoCheckDiskActivity(sar-d) .....................................................................................199 ▼HowtoCheckPage-OutandMemory(sar-g) ....................................................................200 CheckingKernelMemoryAllocation......................................................................................201 ▼HowtoCheckKernelMemoryAllocation(sar-k) .............................................................202 ▼HowtoCheckInterprocessCommunication(sar-m) ........................................................203 ▼HowtoCheckPage-InActivity(sar-p) ................................................................................204 ▼HowtoCheckQueueActivity(sar-q)..................................................................................205 ▼HowtoCheckUnusedMemory(sar-r)...............................................................................206 ▼HowtoCheckCPUUtilization(sar-u)................................................................................207 ▼HowtoCheckSystemTableStatus(sar-v)..........................................................................208 ▼HowtoCheckSwappingActivity(sar-w) ............................................................................209 ▼HowtoCheckTerminalActivity(sar-y) .............................................................................210 ▼HowtoCheckOverallSystemPerformance(sar-A) ..........................................................211 CollectingSystemActivityDataAutomatically(sar) ..................................................................211 RunningthesadcCommandWhenBooting.........................................................................212 RunningthesadcCommandPeriodicallyWiththesa1Script...........................................212 10 OracleSolarisAdministration:CommonTasks • December2011
Description: