System Administration Guide: Resource Management and Network Services
Total Page:16
File Type:pdf, Size:1020Kb
System Administration Guide: Resource Management and Network Services Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. Part No: 806–4076–10 May 2002 Copyright 2002 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, docs.sun.com, AnswerBook, AnswerBook2, SunOS, UltraSPARC, WebNFS, and Solaris are trademarks, registered trademarks, or service marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and Sun™ Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements. Federal Acquisitions: Commercial Software–Government Users Subject to Standard License Terms and Conditions. DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright 2002 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Tous droits réservés Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun. Des parties de ce produit pourront être dérivées du système Berkeley BSD licenciés par l’Université de Californie. UNIX est une marque déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd. Sun, Sun Microsystems, le logo Sun, docs.sun.com, AnswerBook, AnswerBook2, SunOS, UltraSPARC, WebNFS, et Solaris sont des marques de fabrique ou des marques déposées, ou marques de service, de Sun Microsystems, Inc. aux Etats-Unis et dans d’autres pays. Toutes les marques SPARC sont utilisées sous licence et sont des marques de fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d’autres pays. Les produits portant les marques SPARC sont basés sur une architecture développée par Sun Microsystems, Inc. L’interface d’utilisation graphique OPEN LOOK et Sun™ a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de pionniers de Xerox pour la recherche et le développement du concept des interfaces d’utilisation visuelle ou graphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre se conforment aux licences écrites de Sun. CETTE PUBLICATION EST FOURNIE “EN L’ETAT” ET AUCUNE GARANTIE, EXPRESSE OU IMPLICITE, N’EST ACCORDEE, Y COMPRIS DES GARANTIES CONCERNANT LA VALEUR MARCHANDE, L’APTITUDE DE LA PUBLICATION A REPONDRE A UNE UTILISATION PARTICULIERE, OU LE FAIT QU’ELLE NE SOIT PAS CONTREFAISANTE DE PRODUIT DE TIERS. CE DENI DE GARANTIE NE S’APPLIQUERAIT PAS, DANS LA MESURE OU IL SERAIT TENU JURIDIQUEMENT NUL ET NON AVENU. 020212@3332 Contents Preface 35 1 Resource Management and Network Service (Overview) 39 Topics for the Solaris 9 Release 39 Perl 5 40 Accessing Perl Documentation 40 Perl Compatibility Issues 40 Changes to the Solaris Version of Perl 41 2 Managing Web Cache Servers 43 Network Cache and Accelerator (Overview) 43 Managing Web Cache Servers (Task Map) 44 Administering the Caching of Web Pages (Tasks) 45 System Requirements for NCA 45 M How to Enable Caching of Web Pages 45 M How to Disable Caching of Web Pages 47 M How to Enable or Disable NCA Logging 48 M How to Load the NCA Socket Utility Library 48 Caching Web Pages (Reference) 49 NCA Files 49 NCA Architecture 50 3 Time-Related Services 53 Clock Synchronization (Overview) 53 Managing Network Time Protocol (Tasks) 54 3 M How to Set Up an NTP Server 54 M How to Set Up an NTP Client 54 Using Other Time-Related Commands (Tasks) 55 M How to Synchronize Date and Time From Another System 55 Network Time Protocol (Reference) 56 4 Solaris 9 Resource Manager Topics 57 5 Introduction to Solaris 9 Resource Manager 59 Overview 59 Resource Classifications 60 Resource Management Control Mechanisms 61 Resource Management Configuration 62 When to Use Resource Management 62 Server Consolidation 62 Supporting a Large or Varied User Population 63 Setting Up Resource Management (Task Map) 64 6 Projects and Tasks 67 Overview 67 Projects 68 Determining a User’s Default Project 68 project Database 68 PAM Subsystem 69 Name Service Configuration 69 Local project File Format 69 Name Service Configuration for NIS 71 Directory Service Configuration for LDAP 71 Tasks 72 Commands Used to Administer Projects and Tasks 72 Command Options Used With Projects and Tasks 73 Using cron and su With Projects and Tasks 75 Project Administration Examples 75 M How to Define a Project and View the Current Project 75 M How to Delete a Project From the /etc/project File 76 M How to Obtain User and Project Membership Information 77 M How to Create a New Task 77 4 System Administration Guide: Resource Management and Network Services • May 2002 M How to Move a Running Process Into a New Task 77 7 Extended Accounting 79 Overview 79 How Extended Accounting Works 80 Extensible Format 81 exacct Records and Format 81 Extended Accounting Configuration 82 Commands Used With Extended Accounting 82 Using Extended Accounting Functionality 83 M How to Activate Extended Accounting for Processes and Tasks 83 M How to Activate Extended Accounting With a Startup Script 83 M How to Display Extended Accounting Status 83 M How to View Available Accounting Resources 84 M How to Deactivate Process and Task Accounting 84 8 Resource Controls 87 Overview 87 Administering Resource Controls 88 Available Resource Controls 88 Resource Control Values and Privilege Levels 89 Actions on Resource Control Values 90 Resource Control Flags and Properties 91 Resource Control Enforcement 92 Global Monitoring of Resource Control Events 93 Configuration 93 Temporarily Updating Resource Control Values on a Running System 94 Updating Logging Status 94 Updating Resource Controls 94 Using Resource Controls 95 M How to Set the Maximum Number of LWPs for Each Task in a Project 95 M How to Set Multiple Controls on a Project 95 M How to Use prctl 96 M How to Use rctladm 97 Capacity Warnings 97 M How to Determine Whether a Web Server Is Allocated Enough CPU Capacity 97 Contents 5 9 Fair Share Scheduler 99 Overview 99 CPU Share Definition 100 CPU Shares and Process State 100 CPU Share Versus Utilization 101 CPU Share Examples 101 Example 1: Two CPU-Bound Processes in Each Project 102 Example 2: No Competition Between Projects 102 Example 3: One Project Unable to Run 103 FSS Configuration 104 Projects and Users 104 CPU Shares Configuration 104 FSS and Processor Sets 105 FSS and Processor Sets Examples 106 Combining FSS With Other Scheduling Classes 108 Monitoring the FSS 109 M How to Monitor System CPU Usage by Projects 109 M How to Monitor CPU Usage by Projects in Processor Sets 109 FSS Configuration Examples 109 M How to Set the Scheduler Class 109 M How to Manually Move Processes From the TS Into the FSS Class 110 M How to Manually Move Processes From all User Classes Into the FSS Class 110 M How to Move a Project’s Processes Into the FSS Class 110 M How to Tune Scheduler Parameters 111 References 112 10 Resource Pools 113 Overview 113 When to Use Pools 114 Batch Compute Server 114 Application or Database Server 114 Turning on Applications in Phases 114 Complex Timesharing Server 114 Workloads That Change Seasonally 115 Real-Time Applications 115 Administering Pools 115 Pools Framework 116 6 System Administration Guide: Resource Management and Network Services • May 2002 Implementing Pools on a System 116 Dynamic Reconfiguration Operations and Resource Pools 116 Creating Pools Configurations 117 M How to Create a Configuration by Discovery 117 M How to Create a New Configuration