HP Process Resource Manager User’s Guide Version C.03.05 Manufacturing Part Number: B8733-90027 January 2009 © Copyright 1998-2009 Hewlett-Packard Development Company, L.P.
Publication history Eighteenth edition, January 2009, B8733-90027: HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 Seventeenth edition, April 2008, B8733-90025: HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 Sixteenth edition, June 2007, B8733-90021: HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 Fifteenth edition, December 2006, B8733-90019: HP-UX 11i v3 Fourteenth edition, September 2006, B8733-90017: HP-UX 11i v1, HP-UX 11i v2, and HP-UX 11i v3 Thirteenth edition, March 2006, B8733-90015: HP-UX 11i v1 and HP-UX
Legal Notice Confidential computer software. Valid license from HP required for possession, use, or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Contents 1. Overview What is HP Process Resource Manager? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction to PRM commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Why use HP Process Resource Manager? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Standard HP-UX resource allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How PRM can improve on standard allocation . . . .
Contents How PRM manages applications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How application processes are assigned to PRM groups at start-up . . . . . . . . . . . . . How PRM handles child processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pattern matching for filenames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Pattern matching for renamed application processes. . . . . . . . . . . .
Contents 7. Configuring and enabling PRM on the command line Quick start to using PRM’s command-line interface . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Configuring PRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 The PRM configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Configuration tips and requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents Setting the memory manager’s polling interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting the interval with prmconfig. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting the application manager’s polling interval . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting the interval with prmconfig. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Disabling PRM . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents A. Command reference prmagt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . prmanalyze . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . prmavail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . prmconfig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Contents G. PRM error messages prmmonitor error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . prmconfig error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . prmmove error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . prmrun error messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Tables Table 1-1. Resources managed by PRM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Table 2-1. Processor sets example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Table 2-2. Converting shares to percentages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Table 2-3. Altered configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Table 2-4. Hierarchical PRM groups—top level . . . .
Tables Table C-1. Structure of PRM’s SNMP data (prmReadOnly) . . . . . . . . . . . . . . . . . . 233 Table C-2. PRM groups in xnmbrowser graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figures Figure 1-1. HP-UX standard resource allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Figure 1-2. Balancing resource use between users . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Figure 1-3. Prioritizing resource use between users . . . . . . . . . . . . . . . . . . . . . . . . . 29 Figure 1-4. Prioritizing resource use for an application . . . . . . . . . . . . . . . . . . . . . . 30 Figure 2-1. Parent, child, sibling, and leaf PRM groups . . . . . . . . . . . . . . .
Figures 14
Preface This document describes Release C.03.05 of HP Process Resource Manager (PRM). The intended audience for this document is system administrators. New in this edition This edition includes information on the following changes and additions: • Placement of processes in PRM groups based on real user IDs. The prmconfig -M option now offers two modes for enabling and disabling process placement based on real user ID: REALUIDON and REALUIDOFF. For more information, see prmconfig(1). • Support for IPv6.
italic In command syntax diagrams, italic identifies variables that you must provide. Brackets ( [ ] ) In command examples, square brackets designate optional entries. The following command example uses brackets to indicate that the variable output_file is optional: command input_file [output_file] Curly brackets ({}), Pipe (|) In command syntax diagrams, text surrounded by curly brackets indicates a choice. The choices available are shown inside the curly brackets, separated by the pipe sign (|).
Associated documents Associated documents include: • HP PRM Version C.03.
The HP-UX System Administrator’s Guide, Managing Systems and Workgroups, and the Managing ServiceGuard documents, along with many other Hewlett-Packard documents, are available on the web at http://docs.hp.com. Providing feedback • Email your feedback to the PRM development team at the following address: prmfeedback@rsn.hp.com • For a forum with other PRM users, visit the IT Resource Center’s forum for HP-UX Workload/Resource Management: http://forums.itrc.hp.
1 Overview This chapter introduces the basic concepts and functions of HP Process Resource Manager. It covers: • What is HP Process Resource Manager? • Why use HP Process Resource Manager? What is HP Process Resource Manager? Process Resource Manager (PRM) is a resource management tool used to control the amount of resources that processes use during peak system load (at 100% CPU resource, 100% memory resource, or 100% disk bandwidth utilization).
Overview What is HP Process Resource Manager? PRM has four managers: CPU (processor time) Ensures that each PRM group is granted at least its allocation of CPU resources. Optionally for FSS PRM groups, this resource manager ensures no more than its capped amount of CPU resources. For PSET PRM groups, processes are capped on CPU resource usage by the number of cores assigned to the group. MEM (memory) Can manage both private memory and shared memory.
Overview What is HP Process Resource Manager? Group/CPU Specifies a PRM group’s name and its CPU allocation. The two types of PRM group records are FSS PRM group records and PSET PRM group records. An FSS PRM group is the traditional PRM group, whose CPU entitlement is specified in shares. This group uses the Fair Share Scheduler (FSS) in the HP-UX kernel within the system’s default processor set (PSET).
Overview Introduction to PRM commands Application Specifies an application (either explicitly or by regular expression) and the PRM group in which the application should run. Optionally, it specifies alternate names the application can take at execution. (Alternate names are most common for complex programs such as database programs that launch many processes and rename them.) User Specifies a user or a collection of users (through a netgroup) and assigns the user or netgroup to an initial PRM group.
Overview Introduction to PRM commands prmavail Displays estimated resource availability to help plan PRM configurations. prmconfig Configures, enables, disables, and resets PRM. Also, validates PRM configuration files and controls PRM’s message logging. You can also perform these tasks using the PRM graphical interface in HP System Management Homepage (SMH) or HP Systems Insight Manager (SIM). prminitconfig Configure or unconfigure the PRM GUI to be available in HP Systems Insight Manager (SIM).
Overview Why use HP Process Resource Manager? prmsmhconfig Configure or unconfigure the PRM GUI to be available in HP System Management Homepage (SMH). prm2scomp Generates a minimal Security Containment configuration based on a PRM configuration. (The Security Containment configuration defines secure compartments. You can also create compartment configurations using the PRM utility srpgen.) Available starting with HP-UX 11i v2 (B.11.23).
Overview Why use HP Process Resource Manager? Reasons to use PRM: • Improve the response time for critical users and applications. • Set and manage user expectations for performance. • Allocate shared servers based on budgeting. • Ensure that an application package in a Serviceguard cluster has sufficient resources on an active standby system in the event of a failover. • Ensure that critical users or applications have sufficient CPU, memory, and disk bandwidth resources.
Overview Why use HP Process Resource Manager? Table 1-1 Resources managed by PRM Resource managed CPU Shares Yes (for FSS PRM groups) Cap Management algorithm Yes (on all groups in CPUCAPON mode; on a per-group basis is also available for HP-UX 11i v3 and later) PRM allocates time slices to FSS PRM groups proportional to their shares. When CPUCAPON mode is enabled, the FSS PRM group is given CPU time regardless of whether the time is needed.
Overview Why use HP Process Resource Manager? Standard HP-UX resource allocation Under standard HP-UX resource allocation, all processes are treated equally. Figure 1-1 illustrates how a user, by starting multiple processes, can consume a majority of an available resource because the processes each get equal amounts. As illustrated, User1 starts two processes and User2 starts one process.
Overview Why use HP Process Resource Manager? Balancing resource use between users Figure 1-2 shows how PRM can alter standard resource allocation and balance system resource use. In the following scenario, a service provider wants each customer to have an equal share of the machine. Each customer is assigned to a separate PRM group, which is given resource shares equivalent to 50%. The resource being allocated could be either CPU, disk bandwidth, or memory.
Overview Why use HP Process Resource Manager? Prioritizing resource use between users Figure 1-3 illustrates how users’ access to resources can be prioritized using PRM. In this example, two university departments both contributed to the purchase of a new computer. The math department paid 25% of the cost, and the engineering department paid 75%. PRM groups are assigned accordingly: 25% for the math PRM group MGroup and 75% for the engineering PRM group EGroup.
Overview Why use HP Process Resource Manager? Prioritizing resource use for applications Figure 1-4 illustrates a situation where two users and an application are assigned to separate PRM groups. User1 and User2 are respectively assigned to GroupA and GroupB. Both groups are given 25%. The critical application is assigned to GroupC, which is given 50%. Because of its greater resource allocation, GroupC takes priority over GroupA and GroupB.
Overview Why use HP Process Resource Manager? Isolating resource use for applications and users The following example describes a situation where a system administrator needs to isolate an application in order to ensure dedicated memory and CPU cycles. A system administrator has determined that his company’s credit card purchase system needs dedicated memory and CPU resources for users who are buying products.
Overview Why use HP Process Resource Manager? 32 Chapter 1
2 Understanding how PRM manages resources This chapter explains how PRM performs resource management. The following topics are covered: NOTE • How PRM controls resources • How PRM manages CPU resources • How PRM manages real memory resources • How resource allocations interact • How PRM manages disk bandwidth resources • How PRM manages applications If PRM is unable to start or run properly due to CPU or memory resources not being available, it cannot manage your system’s resources.
Understanding how PRM manages resources How PRM controls resources PRM groups PRM groups are integral to how PRM works. These groups are assigned per process and are independent of any other groups, such as user groups that are defined in /etc/group. You assign applications and users to PRM groups. PRM then manages each group’s CPU, disk bandwidth, and real memory resources (private and shared) according to the current configuration.
Understanding how PRM manages resources How PRM controls resources resources using processor sets. Real memory resources are allocated in shares (private memory) or megabytes (shared memory). You cannot allocate disk bandwidth resources to PSET PRM groups. What are processor sets? Processor sets allow cores on your system to be grouped together in a set by the system administrator and assigned to a PSET PRM group.
Understanding how PRM manages resources How PRM controls resources Applications and users that are assigned to a PSET PRM group have dedicated CPU cycles from the cores assigned to the group. Competition for CPU cycles within the processor set are handled using the HP-UX time-share scheduler. Table 2-1 shows a 16-core system that has four FSS PRM groups defined within the default PSET, and two additional system-administrator-defined PSET PRM groups.
Understanding how PRM manages resources How PRM controls resources the maximum amount of CPU resources available to the PRM group is based on the number of cores assigned to the group. You can assign a maximum amount of memory to a PSET PRM group. These maximum amounts, known as caps, are not available for disk bandwidth for either type of PRM group. Shared memory allocations are static in size, so no caps are needed. How shares work A share is a guaranteed minimum when the system is at peak load.
Understanding how PRM manages resources How PRM controls resources To give the new group 50% of the available CPU resource, we assign it four shares, the total number of shares in the old configuration, thereby doubling the total number of shares in the new configuration. Table 2-3 Altered configuration PRM group CPU shares CPU resource percentage determined by PRM GroupA 1 12.50% GroupB 2 25.00% GroupC 4 50.00% OTHERS 1 12.
Understanding how PRM manages resources How PRM controls resources Figure 2-1 Parent, child, sibling, and leaf PRM groups Parent groups Development Compilers Implied parent Finance Development OTHERS Compilers Debuggers Profilers Child groups Finance Development OTHERS Compilers Debuggers Profilers C Fortran Compilers Debuggers C Fortran C Sibling groups Finance Development OTHERS Fortran Profilers Leaf groups Finance Debuggers Profilers C Fortran OTHERS In Figure 2-1, parent groups are the D
Understanding how PRM manages resources How PRM controls resources You specify resource shares for each group in a hierarchy. If a group has child groups, the parent group’s resource shares are distributed to the children based on the shares they are assigned. If a group has no children, it uses the shares. More explicitly, the percentage that a group’s shares equate to is determined as follows: 1. Start at the top level in the hierarchy. Consider these groups as sibling groups with an implied parent.
Understanding how PRM manages resources How PRM controls resources Table 2-5 shows how the CPU resource percentages for the child groups of the Development group are determined from their shares. It also shows how the child groups for the Development/Compilers group further divide the CPU resources. Table 2-5 Hierarchical PRM groups—Development’s child groups Group CPU shares Percent of system’s available CPU resources Development 5 5/10 = 50.
Understanding how PRM manages resources How PRM controls resources NOTE Application records must assign applications only to leaf groups—not parent groups. Similarly, user records must assign users only to leaf groups. For more information on these record types, see “Controlling applications” on page 126 and “Specifying PRM users” on page 139. In group/CPU records, each PRM group—regardless of where it is in the hierarchy—must be assigned resource shares.
Understanding how PRM manages resources How PRM manages CPU resources • Enables making higher-level policy decisions—By placing groups in a hierarchy, you can implement changes in policy or funding at a higher level in a configuration without affecting all elements of the configuration.
Understanding how PRM manages resources How PRM manages CPU resources Because the rate at which the priority increases is slowest when CPU load is high, the result is that a process with a heavy demand for CPU time is penalized by the standard HP-UX scheduler as its CPU resource use increases. With PRM, you can reverse the effects of the standard scheduler.
Understanding how PRM manages resources How PRM manages CPU resources Example: PRM CPU resource management Figure 2-2 illustrates PRM’s CPU resource management for two FSS PRM groups. In this example, Group1 has 33 CPU shares, and Group2 has 66 CPU shares. Note that the percentage of CPU resources referred to may not be total system CPU resources if PSET PRM groups are configured. The percentage is of CPU resources available on the cores assigned to the default PSET.
Understanding how PRM manages resources How PRM manages CPU resources At Time B: • Group1’s processes are now using 80% of available CPU time, which consists of all of Group1’s shares and an unused portion of Group2’s share. • Group2 processes continue at a steady 15%. • PRM scheduling is not in effect. Between Time B and Time C: • Group2’s demands start to increase. • With available CPU resource use approaching 100%, PRM starts to have an effect on CPU allocation.
Understanding how PRM manages resources How PRM manages CPU resources CPU allocation and number of shares assigned When managing FSS PRM groups, PRM favors processes in groups with a larger number of CPU shares over processes in groups with fewer CPU shares. Processes in FSS PRM groups with a larger number of CPU shares are scheduled to run more often and are given more opportunities to consume CPU time than processes in other FSS PRM groups.
Understanding how PRM manages resources How PRM manages CPU resources NOTE Capping based on the CPUCAPON mode overrides per-group capping; however, using both forms of capping at the same time is not recommended. For PSET PRM groups, capping is a result of the number of cores assigned to the group. Capping CPU usage can be a good idea when migrating users and applications to a new system.
Understanding how PRM manages resources How PRM manages CPU resources Hyper-Threading Hyper-Threading, available starting with HP-UX 11i v3 (B.11.31), enables you to use multiple execution threads per core. Each execution thread is a logical CPU. PRM supports the Hyper-Threading feature for PSET PRM groups. When PRM creates new PSETs, they inherit the Hyper-Threading state the system had before PRM was enabled.
Understanding how PRM manages resources How PRM manages CPU resources For example, on a two-way MP system with Hyper-Threading disabled, FSS PRM Group1 has two active processes A and B, and FSS PRM Group2 has two active processes C and D. In this example, PSET PRM groups are not configured. PRM assigns process A to the first core, process B to the second core, process C to the first core, and finally process D to the second core—as shown in Figure 2-3.
Understanding how PRM manages resources How PRM manages real memory resources As implied above, PRM provides a PRM group its entitlement on a symmetric-multiprocessing (SMP) system with Hyper-Threading disabled by granting the group its entitlement on each core. If the group does not have at least one process for each core, PRM compensates by proportionally increasing the PRM group’s entitlements on cores where it does have processes.
Understanding how PRM manages resources How PRM manages real memory resources To execute a process, the kernel executes through a per-process virtual address space that has been mapped into real memory. Memory management allows the total size of user processes to exceed real memory by using an approach termed demand-paged virtual memory.
Understanding how PRM manages resources How PRM manages real memory resources from when needed. So, in this example, the prmavail command would show 850 Mbytes of available memory before PRM is configured, and 756 Mbytes of available memory after PRM is configured.
Understanding how PRM manages resources How PRM manages real memory resources When system memory use is at 100%, borrowed memory pages are returned to the owning PRM groups if needed. The time involved for the borrowed memory pages to be returned is dependent on the swap rate and the order in which old pages are paged out. If a group is exceeding its memory shares on a system that is paging, prm2d uses proportional overachievement logic.
Understanding how PRM manages resources How PRM manages real memory resources Reducing memory shares If a PRM group’s memory share is reduced while the group is using most of its memory pages, the reduction is not immediately visible. The memory must be paged out to the swap device. The time involved for the reduction to take effect is determined by the memory transfer rate (for example, 2 Mbytes/second), and the order in which the old pages are paged out.
Understanding how PRM manages resources How PRM manages real memory resources PRM allows groups that do not have memory isolation enabled to freely borrow memory from other groups as needed. The lending groups are restricted in their giving by their physical entitlement size. A group cannot lend its memory resources if memory isolation is enabled.
Understanding how PRM manages resources How PRM manages real memory resources Figure 2-4 Locked memory distribution 200 Mbytes of available memory (includes lockable memory) GroupA 170 Mbytes of lockable memory GroupB GroupC Example: memory management This example shows how the PRM memory manager prm2d manages the competing memory demands of three PRM groups as system memory utilization approaches 100%.
Understanding how PRM manages resources How PRM manages real memory resources At Time A • There is plenty of memory available on the system for the processes that are running. • Group1 is using its share, and Group2 is using slightly more than its share, borrowing excess from Group3. • Group3 is using much less than its share. At Time B: • System memory use approaches 100%. • Group1 is borrowing excess memory from Group3. • Group2 processes reach the group’s 30% memory cap.
Understanding how PRM manages resources How resource allocations interact How resource allocations interact You can assign different numbers of shares for CPU (for FSS PRM groups), memory, and disk bandwidth resources to a PRM group depending on the group’s requirements for each type of resource. To optimize resource use, it is important to understand the typical demands for resources within a PRM group.
Understanding how PRM manages resources How PRM manages disk bandwidth resources How PRM manages disk bandwidth resources PRM manages disk bandwidth at the logical volume group/disk group level. As such, your disks must be mounted and under the control of either HP’s Logical Volume Manager (LVM) or VERITAS Volume Manager (VxVM) to take advantage of PRM disk bandwidth management. PRM controls disk bandwidth by re-ordering the I/O requests of volume groups and disk groups.
Understanding how PRM manages resources How PRM manages applications For more information about LVM or about using PRM disk bandwidth management, see “Setting up your disks” on page 85. How PRM manages applications This section describes how PRM assigns processes to run in PRM groups.
Understanding how PRM manages resources How PRM manages applications How application processes are assigned to PRM groups at start-up Table 2-7 describes what PRM groups an application process is started in based on how the application is started. Table 2-7 PRM’s group assignments at process start-up Process initiated Process runs in PRM group as follows By user By at By cron Upon login Process runs in the user’s initial group.
Understanding how PRM manages resources How PRM manages applications How PRM handles child processes When they first start, child processes inherit the PRM groups of their parent processes. At configurable polling intervals, the application manager checks the PRM configuration file against all processes currently running. If any processes should be assigned to different PRM groups, the application manager moves those applications to the correct PRM groups.
Understanding how PRM manages resources How PRM manages applications NOTE Use pattern matching only when it is not practical to list all possible alternate names. Many complex applications, such as database applications, may assign unique names to new processes or rename themselves while running.
Understanding how PRM manages resources How PRM manages applications should be within single quotes. Other records can still have non-ERE alternate names for the same application. Note that while non-ERE alternate names are matched against non-dash command-line arguments, Extended Regular Expression alternate names are matched against the entire available command line. Note that commas within an ERE are not separators for alternate names; they must match commas in the command line.
Understanding how PRM manages resources How PRM manages applications The precedence of PRM record types—from highest to lowest—is: 1. Compartment record 2. Application record 3. User record 4. Unix group record The PRM application manager goes through the following steps to determine in which PRM group to place a process. 1. Manually moved processes Leave manually moved processes (processes moved using prmrun or prmmove) in their current PRM groups. 2.
Understanding how PRM manages resources How PRM manages applications 4. Root processes Move any process running as root to the PRM_SYS group (or to root’s initial group if explicitly given in a user record). 5. User records Move any process run by a nonroot user to the initial group assigned to the user in a user record, assuming the initial group is other than (NONE). 6.
Understanding how PRM manages resources How PRM manages applications Next, assume the user launches the bar application, which also has an application record. % bar The application starts in the invoking user’s initial group. However, the application manager will soon place the application in the group specified in the application record, GroupF. The user then starts another program: % phone_home This application name is an exact match of an alternate name.
Understanding how PRM manages resources How PRM manages applications Lastly, a user starts the following program: % calendar The second and fourth records both seem to match the calendar command. The expressions are expanded in the order they appear in the configuration file. So, the second record is expanded first and is used for the calendar process, placing it in GroupB.
Understanding how PRM manages resources How PRM manages applications 70 Chapter 2
3 PRM configuration planning This chapter focuses on determining your PRM configuration needs. It explains: • Using multiple configurations • Selecting a configuration model • Identifying resource use • Using prmanalyze to quickly identify resource use Using multiple configurations Because PRM is configured using files, you can maintain numerous configurations using multiple configuration files. These files are normally stored in the directory /etc/opt/prm/conf/, with the owner set to hpsmh.
PRM configuration planning Selecting a configuration model Selecting a configuration model Your PRM configuration should reflect some aspect of your business priorities. You may choose to configure your system based on how much each user group funds the system (budget model). Alternatively, you may configure the system to reflect the priorities of the applications that run on it (application priority model). Perhaps, you will devise another configuration model.
PRM configuration planning Selecting a configuration model If each department provides equal funding per user, a budget model configuration for PRM might result in: NOTE • User default group for guests and system administrator: 5 CPU shares, 5 memory shares, 5 disk bandwidth shares • Group A: 50 CPU shares, 50 memory shares, 50 disk bandwidth shares • Group B: 30 CPU shares, 30 memory shares, 30 disk bandwidth shares • Group C: 20 CPU shares, 20 memory shares, 20 disk bandwidth shares Although the
PRM configuration planning Selecting a configuration model Another way of allocating the computing resources equally is to assign each department to an isolated area using PSET PRM groups. In the following example, each department is allocated its own core for CPU cycles. Memory is allocated equally using shares, and disk bandwidth is obtained for the PSET PRM groups from PRM_SYS.
PRM configuration planning Selecting a configuration model • The planning department with three users running: — Inventory application — Word processing and miscellaneous tasks — Mail application • The development department with two users running: — CAD design tool — Debugging tools — Compilers — Word processing and miscellaneous tasks — Mail application Table 3-1 shows how much CPU and memory resources each application is using.
PRM configuration planning Selecting a configuration model A resulting application priority configuration might be: • Mail group (mail): 10 CPU shares, 5 memory shares • User default group, word processing, and miscellaneous: 20 CPU shares, 10 memory shares • Business applications group (order processing, inventory): 30 CPU shares, 30 memory shares • Development tools group (design tool, debugger, compilers): 40 CPU shares, 55 memory shares In this configuration, business applications are assigned t
PRM configuration planning Identifying resource use • Development tools group (design tool, debugger, compilers): 40 CPU shares, 55 memory shares Suppose the business application group (order processing, inventory) runs a critical database that requires on-demand, dedicated CPU cycles and memory. Create a PSET PRM group and assign the appropriate number of cores to it. Also, isolate the group’s memory resources.
PRM configuration planning Identifying resource use Quick analysis If you need to implement PRM immediately to provide adequate resources to critical applications you could: 1. Identify CPU, memory, and disk bandwidth resource needs for each application. For information on how to collect this data, see “Using prmanalyze to quickly identify resource use” on page 81. 2. Create a PRM configuration file with a group for each high-priority application. 3.
PRM configuration planning Identifying resource use In this configuration, the order processing group still has 40% of the total CPU resources, but four specific cores are dedicated to it. The memory shares remain the same. Assuming this is not a memory-intensive application, you do not need to isolate the memory shares. Detailed analysis The following steps outline a more detailed inspection of CPU, memory, and disk bandwidth resource use.
PRM configuration planning Identifying resource use • If response times are appropriate for representatives of each conflicting group. Step 2. Set up a preliminary configuration With the preliminary data you have gathered, set up some PRM groups and assign them CPU, memory, and disk bandwidth resources, users, and applications, then observe system usage to determine: • The PRM groups you need to match your configuration model. • The initial and alternate PRM groups users need access to.
PRM configuration planning Using prmanalyze to quickly identify resource use Using prmanalyze to quickly identify resource use The prmanalyze utility scans accounting files for information on the desired resource type (disk, memory, or CPU) and orders the accounting records by the requested sort key (user, UNIX group, command name, or PRMID). This section focuses on the prmanalyze functionality that is relevant to quickly identifying resource use.
PRM configuration planning Using prmanalyze to quickly identify resource use completion each day. It also gets its own PRM group. The next program, web_broswer, also consumes a large amount of the CPU resources; however, it is not a critical application and should not be allowed to consume 16% of the CPU resource during peak periods. It needs to be placed in its own PRM group to restrict its resource use.
PRM configuration planning Using prmanalyze to quickly identify resource use Instead of adding a user record for each of these users, you could create only one user record. This record would be for a new netgroup you define, say finance_dept. The netgroup would include these users. Using a netgroup also simplifies updates when the staff changes. For more information on using netgroups in user records, see “Specifying PRM users” on page 139. Step 5.
PRM configuration planning Using prmanalyze to quickly identify resource use Step 6. Generate memory records to implement the configuration decided upon in Step 5. Step 7. Use prmanalyze to create a summary disk bandwidth report, sorted by command and piped to a reverse sort on the “% total” column: # prmanalyze -s command -r disk -p -t summary -1 filename | sort -r +5 The disk bandwidth summary report is omitted for brevity.
4 Setting up PRM This chapter explains how to set up PRM. It covers the following topics: • Installing PRM • Setting up your disks • Setting PRM to start automatically at reboot Installing PRM PRM is installed using the Software Distribution (SD) utilities. Installation of PRM typically requires a kernel build and a reboot of the system. For more specific information, see the release notes, which are available in the /opt/prm/newconfig/RelNotes/ directory. See the release notes on http://docs.hp.
Setting up PRM Setting PRM to start automatically at reboot LVM divides the disk in much the same way as the hard partitions implemented under earlier versions of HP-UX. However, logical volumes are much easier to reconfigure than partitions, and they can span two or more disks. These two attributes make LVM a much more powerful and flexible tool than hard partitions. LVM is the most common disk-management method for current versions of HP-UX on all platforms.
5 Using PRM with HP System Management Homepage (SMH) HP System Management Homepage (SMH) enables you to perform various system administration tasks on a system through a single web interface. You can also configure and monitor PRM through SMH. Quick start to using PRM’s SMH interface The following steps outline how to use PRM’s SMH interface. For more information on configuring PRM using the SMH interface, see the PRM online help. Step 1. Determine which configuration model you are going to use.
Using PRM with HP System Management Homepage (SMH) Quick start to using PRM’s SMH interface Step 3. Navigate to the PRM interface by following the links: Tools -> Resource Management -> Manage PRM Groups NOTE If the above links are not present, run the following command: # /opt/prm/bin/prmsmhconfig -c and log in to SMH again as indicated in Step 2. Step 4. Create your configuration file.
Using PRM with HP System Management Homepage (SMH) Quick start to using PRM’s SMH interface Step 6. Enable PRM. On the Configure tab, in the Resource Manager Configuration area, change options as desired for the loaded configuration file and then select the Apply button. Step 7.
Using PRM with HP System Management Homepage (SMH) Quick start to using PRM’s SMH interface 90 Chapter 5
6 Using PRM with HP Systems Insight Manager (SIM) This chapter discusses how you can use PRM with HP Systems Insight Manager (SIM), which provides a single point of administration for multiple HP-UX systems.
Using PRM with HP Systems Insight Manager (SIM) What PRM tasks are available through SIM? What PRM tasks are available through SIM? The following sections describe the PRM tasks available through SIM. Monitor PRM Groups Enables you to monitor PRM groups on the specified target nodes. Configure PRM Groups Enables you to create PRM groups on the specified target nodes. Display Resource Usage Executes the prmlist command on the specified target nodes.
Using PRM with HP Systems Insight Manager (SIM) Configuring user authorizations Configuring user authorizations You must be authorized in HP SIM to run the PRM tools. To configure user authorizations, you must be logged into HP SIM as a user with Full Configuration Rights. Refer to mxuser(1M) for information about viewing and setting configuration rights. Choose Options->Security->Users and Authorizations from the HP SIM menu bar. Use the tabs to view and change the toolbox authorizations for each user.
Using PRM with HP Systems Insight Manager (SIM) Configuring user authorizations Role: PRM operator With the authorizations from the table below, you can examine the configuration of all managed systems through Virtualization Manager. You can monitor the amount of CPU, memory, and disk bandwidth resources used by PRM groups on the CMS and managed systems. You cannot make any configuration changes to the PRM groups.
Using PRM with HP Systems Insight Manager (SIM) Quick start to using PRM’s SIM interface Quick start to using PRM’s SIM interface The following steps outline how to use PRM’s SIM interface. For more information on configuring PRM using the SIM interface, see the PRM online help. Step 1. Determine which configuration model you are going to use. For information on planning your configuration, see “PRM configuration planning” on page 71. Step 2.
Using PRM with HP Systems Insight Manager (SIM) Quick start to using PRM’s SIM interface Step 4. Create your configuration file. For help in determining the resource allocations in your initial configuration, see “Using prmanalyze to quickly identify resource use” on page 81. For configuration tips, see “Configuration tips and requirements” on page 102. To create configuration files, once you navigate to the PRM interface, select the Configure tab.
7 Configuring and enabling PRM on the command line This chapter explains the tasks necessary to configure and enable PRM.
Configuring and enabling PRM on the command line Quick start to using PRM’s command-line interface Quick start to using PRM’s command-line interface The following steps outline how to use PRM’s command-line interface. Detailed information on these topics is available in the remainder of the chapter. Step 1. Determine which configuration model you are going to use. For information on planning your configuration, see “PRM configuration planning” on page 71. Step 2. Create your configuration file.
Configuring and enabling PRM on the command line Configuring PRM Step 7. Confirm that the processes are running in the appropriate PRM groups: # ps -efP Configuring PRM Configuring PRM is independent of enabling PRM. You can configure PRM without enabling it. In such a state, PRM stamps processes with PRM group identifiers so that their resource usage can be controlled when you enable the PRM CPU, memory, disk, or application manager.
Configuring and enabling PRM on the command line Configuring PRM Specify PRM groups and CPU allocations in group/CPU records. The configuration file must contain a group/CPU record for each PRM group you want to create on your system. The file must also contain a group/CPU record for any PRM group listed in a user or application record. Optionally, define memory records to assign memory allocations for the groups.
Configuring and enabling PRM on the command line Configuring PRM In addition to syntax requirements, it is important to keep the following configuration file requirements in mind: • PRM automatically assigns system processes to the group PRM_SYS (PRMID 0) and calculates this group’s resource needs. You do not need to specify the PRM_SYS group in the PRM configuration file. If you are configuring PRM to manage memory resources, the PRM configuration file must not contain a PRM_SYS group.
Configuring and enabling PRM on the command line Configuring PRM The generic configuration file contains: • A PRM group/CPU record for the user default group, OTHERS (PRMID 1) and 100 CPU shares. • A PRM user record for each user specified in the /etc/passwd file. Root users are assigned to the group PRM_SYS. For each nonroot user, instead of placing the user in a PRM group, a record is created using the placeholder (NONE).
Configuring and enabling PRM on the command line Configuring PRM you assign shares to a volume group/disk group for one FSS PRM group, you must assign shares for that volume group/disk group to all FSS PRM groups. Chapter 7 • The minimum CPU and memory shares are one. (Assigning one share is rarely a good idea for any resource.) The minimum number of disk bandwidth shares you can assign is zero.
Configuring and enabling PRM on the command line Configuring PRM • The internet services daemon, inetd, should be placed in a group other than the system group if the services or their children are using too much CPU, memory, or disk bandwidth resources. • The user processes of some alternate login methods are not placed in their appropriate initial PRM groups unless PRM’s application manager is running. See “Special case of interest: Client/server connections” on page 198 for more information.
Configuring and enabling PRM on the command line Configuring PRM You can explicitly add the PRM_SYS (PRMID 0) group to a configuration file. However, if you explicitly add the PRM_SYS group to a configuration file, it gets the CPU shares you assign it, which must equate to at least 20%. You can also assign disk bandwidth shares to an explicitly defined PRM_SYS group. You cannot, however, assign memory shares to an explicitly defined PRM_SYS group.
Configuring and enabling PRM on the command line Configuring PRM Group/CPU records have the following syntax for FSS PRM groups, hierarchical groups, and PSET PRM groups, respectively: GROUP:PRMID:SHARES:[MAX]: GROUP:HIER:SHARES:: GROUP:PSET:::[CORES]:[CORE_LIST][:PSET_ATTR] where GROUP Specifies the PRM group name. The PRM group can be the traditional PRM group (FSS PRM group) or a PSET PRM group. The group name must contain at least one alphabetic character and contain no more than 49 characters.
Configuring and enabling PRM on the command line Configuring PRM HIER Indicates the PRM group is a parent group in a hierarchy and that it has no PRMID. The reserved group names OTHERS and PRM_SYS cannot be parent groups. Also, you cannot use PRMID 0 for a child group. You can, however, use PRMID 1 for a child group. For information on hierarchical groups, see “Hierarchical PRM groups” on page 38. PSET Indicates the PRM group is a PSET PRM group. In this case, SHARES is not used.
Configuring and enabling PRM on the command line Configuring PRM When CPUCAPON mode is enabled, the percentages computed from the SHARES values of the FSS PRM groups are also used as caps. For information on this mode, see the section “Capping CPU resource use” on page 111. You can enable per-group CPU capping using the MAX field discussed next. MAX (Available for HP-UX 11i v3 and later.) MAX is an upper bound for CPU consumption for the FSS PRM group.
Configuring and enabling PRM on the command line Configuring PRM PSET_ATTR Passes attributes for the specified PSET to HP-UX. (For a complete attribute list, see the -t option in the psrset(1M) manpage.) The only attribute currently available is the logical CPU (Hyper-Threading) feature, available starting with HP-UX 11i v3 (B.11.31).
Configuring and enabling PRM on the command line Configuring PRM • An FSS PRM group mailserver (PRMID 5) with 10 CPU shares. • A management PSET PRM group with two cores assigned. The specific cores assigned are Core 3 and Core 4. Adding/modifying PRM groups and CPU allocations To add or modify a group/CPU record, follow these steps: Step 1. Open the desired configuration file in a text editor. Step 2. Add or modify a line specifying the group name, PRMID, HIER or PSET keyword, and CPU allocations.
Configuring and enabling PRM on the command line Configuring PRM Step 6. Enable PRM’s CPU manager if it is not already enabled: # prmconfig -e CPU Alternatively, enable all PRM resource managers using prmconfig -e without any additional arguments: # prmconfig -e Capping CPU resource use CPU capping allows you to limit the amount of CPU resources that FSS PRM groups use. PRM provides two types of CPU capping: • On a per-group basis (Available for HP-UX 11i v3 and later.
Configuring and enabling PRM on the command line Configuring PRM Removing groups/CPU allocations To remove group/CPU allocations with a text editor: Step 1. Open the configuration file in a text editor. Step 2. Remove the line corresponding to the group/CPU record you wish to remove. If the group is a parent group, you will need to remove all the child groups first.
Configuring and enabling PRM on the command line Configuring PRM Controlling memory use You can define private memory shares and caps for existing PRM groups as well as allocate shared memory as discussed in the following sections: • “Adding/modifying private memory shares/caps” on page 118 • “Adding/modifying shared memory allocations” on page 119 • “Removing private memory shares” on page 120 • “Removing shared memory allocations” on page 121 • “Isolating private memory for a group” on page 122
Configuring and enabling PRM on the command line Configuring PRM A white paper, titled HP Process Resource Manager memory resource groups: Memory calculation, on the web at http://h20338.www2.hp.com/hpux11i/downloads/5983-1676EN.pdf presents a case study of setting memory allocations for PRM groups. Use the following syntax to specify a memory record: #!PRM_MEM:{PRMID|GROUP}:SHARES:[MAX]:::[[IMPORT]:[EXPORT]:] where #!PRM_MEM Indicates the start of a memory record.
Configuring and enabling PRM on the command line Configuring PRM Consider the following example memory records: # PRM memory records #!PRM_MEM:1:10:25::: #!PRM_MEM:databases:30:::: #!PRM_MEM:databases/inventory:15:::: #!PRM_MEM:3:15:::: #!PRM_MEM:4:55:::: #!PRM_MEM:5:5:15::: #!PRM_MEM:6:20::::0:0: The example shows: Chapter 7 • A memory record for PRMID 1 (group OTHERS), which specifies 10 memory shares. The memory cap is 25%.
Configuring and enabling PRM on the command line Configuring PRM Shared memory A shared memory record is a request that PRM try to keep a minimum number of megabytes of physical memory available for use as shared memory for the specified PRM group. (As pages in the shared memory segment are paged out, PRM will attempt to maintain the requested amount of physical memory for the PRM group. To maintain the current PRM group’s physical memory, memory in other PRM groups may be paged out more aggressively.
Configuring and enabling PRM on the command line Configuring PRM If the PRM group uses a larger shared memory segment, it must borrow the difference. It attempts to borrow the difference from its private memory allocation first, then from other user-defined PRM groups, and then from the PRM_SYS group. You should avoid this borrowing, if possible, by determining how much shared memory a workload allocates and then setting MEGABYTES to 1.1 times that size.
Configuring and enabling PRM on the command line Configuring PRM Adding/modifying private memory shares/caps To add or modify a memory record, follow these steps: Step 1. Open the desired configuration file in a text editor. Step 2. Using the syntax shown below: #!PRM_MEM:{PRMID|GROUP}:SHARES:[MAX]:::[[IMPORT]:[EXPORT]:] and explained in the section “Memory record syntax” on page 113: a. Add or modify a line specifying a PRMID or group name for an existing group. b. Specify an integer number of shares. c.
Configuring and enabling PRM on the command line Configuring PRM Step 6. Enable PRM’s memory manager if it is not already enabled: # prmconfig -e MEM Alternatively, enable all PRM resource managers using prmconfig -e without any additional arguments: # prmconfig -e Adding/modifying shared memory allocations To add or modify a shared memory record, follow these steps: Step 1. Open the desired configuration file in a text editor. Step 2.
Configuring and enabling PRM on the command line Configuring PRM Step 5. Enable PRM’s memory manager if it is not already enabled: # prmconfig -e MEM Alternatively, enable all PRM resource managers using prmconfig -e without any additional arguments: # prmconfig -e Removing private memory shares To remove a memory record manually: Step 1. Open the configuration file in a text editor. Step 2. Remove the line corresponding to the memory record you wish to remove.
Configuring and enabling PRM on the command line Configuring PRM Alternatively, enable all PRM resource managers using prmconfig -e without any additional arguments: # prmconfig -e Removing shared memory allocations To remove a memory record manually: Step 1. Open the configuration file in a text editor. Step 2. Remove the line corresponding to the shared memory record you wish to remove. Shared memory records have the following form: #!SHARED_MEM:{PRMID|GROUP}:MEGABYTES Step 3.
Configuring and enabling PRM on the command line Configuring PRM Isolating private memory for a group To isolate memory for a group, follow these steps: Step 1. Open the desired configuration file in a text editor. Step 2. Using the syntax shown below: #!PRM_MEM:{PRMID|GROUP}:SHARES:[MAX]:::[[IMPORT]:[EXPORT]:] and explained in the section “Memory record syntax” on page 113: a. Find the memory record in the configuration file you wish to modify. b. Set the EXPORT and IMPORT fields to zero.
Configuring and enabling PRM on the command line Configuring PRM Controlling disk bandwidth You can add, modify, or delete disk bandwidth shares for each PRM group as discussed in the following sections: NOTE • “Adding/modifying disk bandwidth shares” on page 124 • “Removing disk bandwidth shares” on page 125 To take advantage of PRM’s disk bandwidth management, your disks must be under the control of HP’s Logical Volume Manager (LVM) or of VERITAS Volume Manager (VxVM).
Configuring and enabling PRM on the command line Configuring PRM SHARES Is the FSS PRM group disk bandwidth shares. Shares are expressed as integer values between zero and MAXINT inclusive. Use zero shares as a place-holder for groups not using the volume group/disk group. The value is not literally zero: It does not block access to the volume group/disk group. However, if a group has zero shares, a five-second disk transaction could take over 30 minutes if the disk is busy.
Configuring and enabling PRM on the command line Configuring PRM Step 4.
Configuring and enabling PRM on the command line Configuring PRM Step 6.
Configuring and enabling PRM on the command line Configuring PRM For example, in the records below, the two applications /usr/bin/mv and /bin/mv have the same underlying file ID, but are assigned to two different PRM groups. Because of the ambiguity, it is impossible to accurately predict which PRM group would get the application. /usr/bin/mv::::GroupA /bin/mv::::GroupB # duplicate record In the next example, the application is now /usr/bin/mv in both records.
Configuring and enabling PRM on the command line Configuring PRM Application record syntax This section explains the application record syntax. Application records assign applications to PRM groups. Each record specifies an application and the PRM group it and its child processes can run in. Application records are optional; if an application does not have a record, it runs in the PRM group of the user who invoked it. Specify application records using the following syntax: APPLICATION::::GROUP[,ALT_NAME[,..
Configuring and enabling PRM on the command line Configuring PRM GROUP Is the name of the PRM group in which the application will run. If GROUP is in a hierarchy, it must be a leaf group (a group with no child groups). You cannot assign applications to parent groups. For example, in the configuration below, TWO is a parent group and TWO/b is a leaf group.
Configuring and enabling PRM on the command line Configuring PRM Pattern matching notation can be used to designate a group of similarly named processes. For more information on how to use wildcards and Extended Regular Expressions in alternate names, see “Pattern matching for renamed application processes” on page 63. For details on pattern matching expressions, see the regexp(5) manpage.
Configuring and enabling PRM on the command line Configuring PRM Adding/modifying an application’s group assignment To add or modify an application’s PRM group assignment, follow these steps: Step 1. Open the desired configuration file in a text editor. Step 2. Using the syntax shown below: APPLICATION::::GROUP[,ALT_NAME[,...,ALT_NAME]] and explained in the section “Application record syntax” on page 128, add or modify an application record as follows: a. Specify the full pathname of the application. b.
Configuring and enabling PRM on the command line Configuring PRM With prmconfig -k, typically all of the application’s currently running processes continue to execute in their current groups until: • A prmmove is executed • The application is restarted • The application manager moves any processes that are not in their assigned groups However, prmconfig -k does move a currently running application if: • It is running in the system group (PRM_SYS) and that is not its assigned group • The group it is
Configuring and enabling PRM on the command line Configuring PRM However, due to the importance of this application as a sales tool, the PRM administrator decides to assign it to the crit_apps group where it is assured sufficient resources. The procedure to re-assign the application is outlined below. Step 1. Open the desired configuration file in a text editor. Step 2. Add an application record for CustomerTrack with crit_apps as the assigned group. Step 3.
Configuring and enabling PRM on the command line Configuring PRM Removing an application’s group assignment To remove an application record with a text editor: Step 1. Open the configuration file in a text editor. Step 2. Remove the line corresponding to the application record you wish to remove. Application records have the following form: APPLICATION::::GROUP[,ALT_NAME[,...,ALT_NAME]] NOTE You may have multiple records for a single application.
Configuring and enabling PRM on the command line Configuring PRM Launching an application under PRM There are two ways to start an application under PRM: • Start the application as you normally would. The application manager automatically moves it to the PRM group assigned in the PRM configuration file. A user must have the correct permissions to run the application. • Use the prmrun command.
Configuring and enabling PRM on the command line Configuring PRM Launching an application in its assigned group To launch an application in its assigned PRM group, you have two options: • Start the application, then wait 30 seconds (the application manager’s default interval) to allow it to place the application in its assigned group • Follow the steps below: Step 1. Ensure the application has an assigned PRM group.
Configuring and enabling PRM on the command line Configuring PRM Launching a script under PRM To always run a script in a specific PRM group, use an application record. In this record, specify the full path of the shell or interpreter used in the script as the application. Also, give the name—without the path—of the script as an alternate name. For example, consider a script named foo that uses ksh to execute its contents.
Configuring and enabling PRM on the command line Configuring PRM Launching a Java program under PRM To always run a Java program in a specific PRM group, use an application record. In this record, specify the full path of the Java binary as the application. Also, give the classname as an alternate name. (Specifically, the alternate name you specify should match the first argument to the Java binary that is not preceded by a dash ( - ) in the COMMAND column of the ps -ef output.
Configuring and enabling PRM on the command line Configuring PRM Specifying PRM users You can add, modify, and remove users’ PRM group assignments as discussed in the following sections: • “Adding/modifying a user’s group assignment” on page 142 • “Removing a user’s group assignment” on page 144 PRM integrates with NIS by allowing you to specify netgroups in user records. For more information on NIS, see the ypfiles(4) manpage.
Configuring and enabling PRM on the command line Configuring PRM memory.) Take particular care when creating user records for root as such records will move essential system processes, such as inetd. • +netgroup_name netgroup_name must correspond to a list of login names in /etc/netgroup. When a configuration is loaded, any user in netgroup_name who does not have an explicit user record assumes the INITIALGROUP and any ALTERNATEGROUPs of this record.
Configuring and enabling PRM on the command line Configuring PRM ALTERNATEGROUP Is the name of one of the alternate PRM groups for the user or netgroup. Alternate groups are groups other than the initial group that the user or netgroup members are allowed to run processes in. The user or netgroup members can start a process in an alternate group using prmrun or can move an existing process to an alternate group using prmmove.
Configuring and enabling PRM on the command line Configuring PRM Consider the following example user records: #PRM user records sysadm::::OTHERS engineer1::::development,OTHERS user1::::OTHERS user2::::sales +marketing::::mktg These user records define: • An initial group of OTHERS for root user sysadm. (Recall that all root users have implicit access rights to all groups.) • An initial group of development and alternate group OTHERS for engineer1. • An initial group of OTHERS for user1.
Configuring and enabling PRM on the command line Configuring PRM Step 4.
Configuring and enabling PRM on the command line Configuring PRM One way to accomplish this change is to: Step 1. Update the configuration file in a text editor as follows: a. Modify the number of shares for the purchasing and sales groups. b. Modify the user record for advisor6 to specify an initial group of purchasing. Step 2. Load the updated configuration using -k to keep the existing assignments of users, processes, and groups: # prmconfig -k Step 3.
Configuring and enabling PRM on the command line Configuring PRM Step 5. Enable PRM’s application manager if it is not already enabled: # prmconfig -e APPL Alternatively, enable all PRM resource managers using prmconfig -e without any additional arguments: # prmconfig -e Assigning secure compartments to PRM groups Use the HP-UX feature Security Containment (available starting with HP-UX 11i v2) to create secure compartments, which isolate files and processes.
Configuring and enabling PRM on the command line Configuring PRM COMPARTMENT_NAME Is the alphanumeric name (of no more than 255 characters) of an existing secure compartment that you created using the HP-UX feature Security Containment. (You can also create these compartments using a PRM utility such as srpgen or prm2scomp.) The compartment must be active. A compartment can have no more than one record. This record type takes precedence over application records and user records.
Configuring and enabling PRM on the command line Configuring PRM Adding/modifying a compartment’s group assignment To add or modify a compartment record, follow these steps: Step 1. Open the desired configuration file in a text editor. Step 2. Using the syntax shown below: #!SCOMP:COMPARTMENT_NAME:{GROUP | (NONE)} and explained in the section “Compartment record syntax” on page 145: a. Add or modify a line specifying a compartment name. b. Add or modify the group—or replace it with (NONE). Step 3.
Configuring and enabling PRM on the command line Configuring PRM Removing a compartment’s group assignment To remove a compartment record manually: Step 1. Open the configuration file in a text editor. Step 2. Remove the line corresponding to the compartment record you wish to remove. Compartment records have the following form: #!SCOMP:COMPARTMENT_NAME:{GROUP | (NONE)} Step 3. Save the file and exit the text editor. Step 4.
Configuring and enabling PRM on the command line Configuring PRM Assigning Unix groups to PRM groups Unix groups are collections of users given Unix permissions as a whole. PRM allows you to map Unix groups to PRM groups without having to specify each user in the Unix group. With a Unix group record, any process running as a specific Unix group can be assigned to a PRM group.
Configuring and enabling PRM on the command line Configuring PRM GROUP The PRM group to which the Unix group is to be mapped. If you are using group hierarchies, the group you specify must not have any child groups. (NONE) You can specify (NONE) in place of a group name if you would like to explicitly show in your configuration file that a Unix group is not to be mapped to a PRM group.
Configuring and enabling PRM on the command line Configuring PRM Adding/modifying a Unix group’s PRM group assignment To add or modify a Unix group record, follow these steps: Step 1. Open the desired configuration file in a text editor. Step 2. Using the syntax shown below: #!UXGRP:UNIX_GROUP_NAME:{GROUP | (NONE)} and explained in the section “Unix group record syntax” on page 149: a. Add or modify a line specifying a Unix group name. b. Add or modify the group—or replace it with (NONE). Step 3.
Configuring and enabling PRM on the command line Configuring PRM Removing a Unix group’s PRM group assignment To remove a Unix group record: Step 1. Open the configuration file in a text editor. Step 2. Remove the line corresponding to the Unix group record you wish to remove. Unix group records have the following form: #!UXGRP:UNIX_GROUP_NAME:{GROUP | (NONE)} Step 3. Save the file and exit the text editor. Step 4.
Configuring and enabling PRM on the command line Configuring PRM Checking the configuration file Use prmconfig -s to perform validation without changing the current PRM configuration. This can be helpful to validate a configuration file that will be activated by a script at a later time. To specify a configuration file other than /etc/prmconf, use prmconfig -s -f configfile.
Configuring and enabling PRM on the command line Configuring PRM When the prmconfig -i, prmconfig -k, or GUI equivalents complete without finding errors, an internal copy of the configuration file is made. This copy is used by the PRM commands as well as the PRM-aware HP-UX commands while PRM is configured. (For information on these PRM-aware commands, see “HP-UX command/system call support” on page 231.) Thus, the original configuration file can be edited without disrupting PRM.
Configuring and enabling PRM on the command line Configuring PRM Table 7-1 Differences in loads when a configuration is already loaded Command prmconfig -k (Keep) Description Loads a PRM configuration, keeping all processes in their current PRM groups, with the following exceptions: • User processes running in PRM_SYS (the PRM system group) and processes running in groups that do not exist in the new configuration Each process is moved to the initial group of the process owner, as defined in the configu
Configuring and enabling PRM on the command line Enabling resource managers Loading the PRM configuration with prmconfig When loading a configuration, you have two options.
Configuring and enabling PRM on the command line Enabling resource managers Enabling resource managers with prmconfig To start all PRM resource managers (CPU, memory, disk bandwidth, and application), enter the following command: # prmconfig -e If there are no memory records, the memory manager is not started. However, even if there are no application records, the application manager does start.
Configuring and enabling PRM on the command line Updating the configuration Updating the configuration To update your configuration, simply change your configuration file and load it. You do not need to disable or reset PRM to make changes to your PRM configuration. For small changes you can bring the configuration file into a text editor or a GUI, make the changes, save the file, and then load the configuration with prmconfig or a GUI.
Configuring and enabling PRM on the command line Updating the configuration Change your configuration file then load the new configuration, as indicated in the following steps: Step 1. Change the configuration using prmloadconf or as explained in “Configuring PRM” on page 99. Step 2. Load the configuration using one of the following commands.
Configuring and enabling PRM on the command line Updating the configuration 160 Chapter 7
8 Fine-tuning your PRM configuration This chapter describes the optional step of fine-tuning your PRM configuration. To adjust your configuration, you may need to perform several iterations of identifying resource use and assigning groups. Fundamentally, you need to understand what processes are run by what users and the percentages of resources they consume. How you collect this data depends on how your processes or system load varies from day to day.
Fine-tuning your PRM configuration Using prmanalyze to analyze your configuration Using prmanalyze to analyze your configuration The prmanalyze utility scans accounting files for information on the desired resource type (disk, memory, or CPU) and orders the accounting records by the requested sort key (user, UNIX group, command name, or PRMID). Use prmanalyze to find patterns in resource usage, then change your PRM configurations accordingly.
Fine-tuning your PRM configuration Using prmanalyze to analyze your configuration • Conflict This report provides the most detail, highlighting only the instances where resources are scarce and users are in conflict. Use this report when fine-tuning a configuration. This report catches items that are missed by the time-based reports. After identifying conflicts, determine how much resource each PRM group needed during each conflict.
Fine-tuning your PRM configuration Using prmanalyze to analyze your configuration Example: Locating system bottlenecks The first example shows how one might locate system bottlenecks and fine-tune a configuration with the aid of prmanalyze special reports. Many of the interactive users assigned to the group OTHERS have complained that the system response time is terrible in the afternoons. The administrator examines the summary reports generated by prmanalyze, but sees nothing out of the ordinary.
Fine-tuning your PRM configuration Using prmanalyze to analyze your configuration group. If he is unrelated to any of the other activities on the machine, a separate group with low CPU/memory shares (taken from the OTHERS allocation) and a memory cap might be in order. Example: High-level views of usage The next example assumes a new multiprocessor machine in a university environment.
Fine-tuning your PRM configuration Using prmanalyze to analyze your configuration Example: Checking for patterns and configuration accuracy In the following example, we assume a single-core system. Every so often, it is a good idea to examine daily reports for patterns and configuration accuracy.
Fine-tuning your PRM configuration Using prmanalyze to analyze your configuration almost all the machine! Upon closer examination though, the administrator finds that the total seconds used is about the same as every other day, but all the other groups went virtually idle on the weekend. This application might be able to do its job even faster if we took off the memory cap for group 2 only on the weekends.
Fine-tuning your PRM configuration Using prmanalyze to analyze your configuration # prmanalyze -r disk -x dump -1 -t conflict -E -x financials \ -d 4194304 pacct.3 conflict disk report by command name begins at Wed Jul 7 15:27:00 1999 ave Bps disk threshold 4194304.00 unique id Jul Jul 7 16:20 7 17:00 cp mrkt_rsch rm sales_fcst sort web_browser ave Bps peak Bps total KB 5.242E+06 7.993E+06 1.229E+07 2.092E+05 1.397E+06 3.056E+05 4.503E+05 2.841E+05 2.142E+06 5.324E+05 3.734E+06 3.815E+05 5.
Fine-tuning your PRM configuration Using GlancePlus to analyze your configuration Using GlancePlus to analyze your configuration The following steps guide you in using GlancePlus to determine adjustments you may wish to make to your configuration. GlancePlus has both a text interface (glance) and an X-Windows interface (gpm). Having PRM configured but not enabled allows you to track resource use by PRM group through GlancePlus without having PRM actually control the use of these resources.
Fine-tuning your PRM configuration Using GlancePlus to analyze your configuration For information on using GlancePlus, see the GlancePlus online help. Here is a sample of the GlancePlus information on PRM.
Fine-tuning your PRM configuration Analyzing memory use Analyzing memory use The following steps guide you in using PRM’s logging facility to examine system memory use. Step 1. Load a PRM configuration with prmconfig -ie APPL if you have not already done so. Do not enable the PRM resource manager at this time. (You can disable PRM with the prmconfig -d command if it is already enabled.) Step 2.
Fine-tuning your PRM configuration Analyzing memory use 172 Chapter 8
9 Administering PRM This chapter explains the tasks involved in the daily administration of PRM. Various PRM commands are mentioned in this chapter. See “Command reference” on page 201 for information on these commands. Moving processes between PRM groups This section explains how to move a process from one PRM group to another. You might want to move a process to a different PRM group if it is either not getting enough of or using too much of the resources allocated to its current group.
Administering PRM Moving processes between PRM groups To move the same process to your initial group, use the -i option: # prmmove -i -p 100 To move multiple processes to your initial group: # prmmove -i -p 100 -p 101 -p 102 To move the user’s shell (PID indicated by $$ below) to PRM group 15: # prmmove 15 -g $$ To move all processes owned by user1 to PRM group projectX: # prmmove projectX -u user1 NOTE Be careful when using the -u option: Configured applications that were invoked by the user (those assig
Administering PRM Displaying application filename matches Displaying application filename matches Because application records allow wildcards in filenames, keeping track of all the applications that a filename with wildcards matches can be difficult. The prmlist command with the -a option displays exactly this information, however. It also shows each application’s PRM group assignment. For example, consider a configuration that includes only one application record.
Administering PRM Displaying netgroup expansions Displaying netgroup expansions The combination of user records and multiple netgroup records can make determining a user’s initial and alternate PRM groups difficult. The prmlist command displays exactly this information. Using the prmlist -u +netgroup option displays the data for only the specified netgroup.
Administering PRM Displaying netgroup expansions Using the prmlist command, we get all the group and alternate group assignments (a portion of the output has been omitted for brevity): # prmlist PRM User Initial Group Alternate Group(s) -----------------------------------------------------------------guest OTHERS user0 even_PRM_group user1 odd_PRM_group user2 even_PRM_group prime_PRM_group user3 odd_PRM_group prime_PRM_group user4 even_PRM_group user5 Five root PRM_SYS For the users who are members of mult
Administering PRM Displaying accessible PRM groups Displaying accessible PRM groups Use the prmmove command or the prmrun command with no options to display the PRM groups you can access. As root, you have access to all PRM groups. Thus, as root, these commands list all configured PRM groups.
Administering PRM Displaying application and configuration information Displaying application and configuration information To display information from the current PRM configuration file, including application record information, use the prmlist command. This command does not display state information. # prmlist PRM configured from file: File last modified: /etc/prmconf Sun Aug 15 12:11:34 1999 PRM Group PRMID CPU Entitlement ---------------------------------------------GroupA 2 55.00% GroupB 3 15.
Administering PRM Setting the memory manager’s polling interval Setting the memory manager’s polling interval The memory manager examines the use of memory on a regular basis to ensure PRM groups are using memory as specified in the configuration. You can change the frequency of these examinations by changing the polling interval of the manager. The default polling interval for the memory manager is 10 seconds. Change the interval on the command line as explained in the following section.
Administering PRM Setting the application manager’s polling interval Setting the application manager’s polling interval The application manager regularly examines all processes on the system to ensure applications are running in the correct PRM groups. You can change the frequency of these examinations by changing the polling interval of the manager. The default polling interval for the application manager is 30 seconds. Change the interval on the command line as explained in the following section.
Administering PRM Disabling PRM Disabling PRM Disabling PRM does not change the PRM configuration—it only returns control to standard HP-UX resource management. In other words, processes are still assigned a PRMID, but only the standard HP-UX resource management determines what resources processes receive. Having PRM configured but disabled allows you to track resource use by PRM group through prmanalyze, GlancePlus, or acctcom without having PRM actually control the use of these resources.
Administering PRM Resetting PRM Resetting PRM When you reset PRM, it returns to its initial state. This is the state PRM is in after it is installed and after the system is booted. Only the standard HP-UX resource management is in effect. Reset PRM: • Before shutting your system down (this saves a backup copy of your current configuration).
Administering PRM Monitoring PRM groups Monitoring PRM groups To monitor and verify your PRM configuration, use the prmanalyze, prmconfig, prmlist, prmmonitor, id, acctcom, or ps commands or the GlancePlus product. Sample prmmonitor output is shown below: Tue Mar 21 14:36:42 2000 Sample: CPU scheduler state: Enabled PRM Group 5 seconds PRMID CPU Entitlement CPU Used ____________________________________________________________ OTHERS 1 20.00% 20.08% databases/inventory 2 10.00% 10.
Administering PRM Logging PRM application messages Controlling memory logging with prmconfig To begin logging PRM memory messages, enter: # prmconfig -L MEM To stop logging PRM memory messages, enter: # prmconfig -L MEM STOP Logging PRM application messages The application manager always logs the following to syslog: • Initial execution interval • Interval change, if any • Enabling or disabling of the application manager • Enabling or disabling of logging You can enable further logging of applicat
Administering PRM Displaying groups’ allocated and used resources Displaying groups’ allocated and used resources Using the prmmonitor command is the primary method to collect data on PRM group activity.
Administering PRM Displaying user information To display the PRM memory and CPU resource statistics for one 30-second interval, enter the command: # prmmonitor 30 1 Tue Mar 21 15:08:19 2000 Sample: CPU scheduler state: Enabled 30 seconds CPU CPU PRM Group PRMID Entitlement Used ____________________________________________________________ OTHERS 1 20.00% 20.00% databases/inventory 2 10.00% 9.98% databases/order 3 20.00% 20.00% development 4 40.00% 40.00% mailserver 5 10.00% 10.
Administering PRM Displaying available memory to determine number of shares Displaying available memory to determine number of shares The prmavail command displays the amount of memory available for user processes when the MEM argument is specified: # prmavail MEM 54300 real memory pages or 212 MB available (PRM estimate) If prm2d is not running, this value is calculated by subtracting the memory used by the kernel, system processes, and the system paging reserve from total real memory.
Administering PRM Displaying data on logical volume groups and disk groups Displaying data on logical volume groups and disk groups The prmavail command displays the names of the logical volume groups (LVM) and disk groups (VxVM) eligible for PRM management when the DISK argument is specified: # prmavail DISK 6 volume groups /dev/vg00 /dev/vgcrash /dev/vg01 /dev/vg03 /dev/vgstripe05 /dev/vg02 This command is useful in determining candidates for disk bandwidth management.
Administering PRM Displaying past process information Displaying past process information The acctcom command with the -P option prints the PRM group name in addition to the customary acctcom information for all groups on the system. Adding the -R option and a PRM group name displays information for that group. The following command displays history information about all PRM groups: # acctcom -P COMMAND NAME ls rm registra vi cpp.
Administering PRM Displaying current process information Displaying current process information Using the ps command with the -P option adds a column listing each process’s PRM group by name. # ps -P PRMID PRM_SYS PRM_SYS PRM_SYS OTHERS PID 1047 1046 1081 548 TTY ttyp2 ttyp2 ttyp2 ? TIME 0:01 0:02 0:00 0:20 COMMAND sh rlogind ps sendmail By using ps with the -l and -P options, the PRMID is printed instead of the PRM group name.
Administering PRM Monitoring PRM with GlancePlus Monitoring PRM with GlancePlus You can use HP’s optional performance and monitoring tool GlancePlus to: • Display PRM reports • Display resource use in real-time • Set alarms to report when resource use is excessive GlancePlus has both a text interface (glance) and an X-Windows interface (gpm). See the GlancePlus help facility for details.
Administering PRM Monitoring PRM with OpenView Performance Agent (OVPA) / OpenView Performance Manager (OVPM) Monitoring PRM with OpenView Performance Agent (OVPA) / OpenView Performance Manager (OVPM) You can treat your PRM groups as applications and then track their application metrics in OpenView Performance Agent for UNIX as well as in OpenView Performance Manager for UNIX.
Administering PRM Automating PRM administration with scripts Automating PRM administration with scripts To automate PRM administration, you can create scripts that use prmconfig, prmmove, and prmmonitor. If you want to use prmmonitor to report information that is later manipulated or analyzed by other programs, use prmmonitor -t, directing the output to a logfile; then, create a script that summarizes the output for system accounting.
Administering PRM Protecting the PRM configuration from reboots To configure PRM on reboot, set PRM_CONFIG equal to one: PRM_CONFIG=1 To use a configuration file other than /etc/prmconf, set PRM_CONFIG_FILE equal to the name of the new file: PRM_CONFIG_FILE=/etc/opt/prm/conf/dayconf.prm To enable the appropriate resource managers after PRM has been configured, set PRM_ENABLE to one: PRM_ENABLE=1 The PRM_ENABLE variable can be set to one only when PRM_CONFIG is set to one.
Administering PRM Reconstructing a configuration file To start PRM’s SNMP agent on reboot, set PRM_SNMPAGT to one: PRM_SNMPAGT=1 For more information on this agent, see Appendix C. Reconstructing a configuration file When PRM is configured, an internal copy of the configuration file is created as /var/opt/prm/PRM.prmconf. If PRM is then reconfigured, this file is renamed /var/opt/prm/PRM.prmconf.old, and a copy of the new configuration is created as /var/opt/prm/PRM.prmconf.
Administering PRM Reconstructing a configuration file Table 9-1 shows when the various files are available. Table 9-1 Internal copies of configuration files State Files available Boot-time None Load a configuration /var/opt/prm/PRM.prmconf (current configuration) /var/tmp/PRM.prmconf (configuration kept for legacy purposes) Load a configuration when a configuration is already present /var/opt/prm/PRM.prmconf (current configuration) /var/opt/prm/PRM.prmconf.old (previous configuration) /var/tmp/PRM.
Administering PRM Special case of interest: Client/server connections Special case of interest: Client/server connections NOTE The scenario described in this section applies only when the application manager is not enabled. Prevent this scenario by enabling the manager using the prmconfig -e command. In a client/server configuration, users attaching to a system via a socket connect (bypassing the normal login procedure) all run as the same user (typically, root or other username).
Administering PRM Backing up PRM files Backing up PRM files If you would like to make a backup of your PRM environment, be sure to back up the following files: • /etc/prmconf The default PRM configuration file • /etc/opt/prm/conf/* The suggested location for additional PRM configurations. Files in this directory should have the owner set to hpsmh. • /opt/prm/conf/* A location previously suggested for additional PRM configurations • /etc/rc.config.d/prm Configuration file used by /sbin/init.
Administering PRM Backing up PRM files 200 Chapter 9
A Command reference This chapter provides an overview of the PRM commands. The PRM commands are: • prmagt • prmanalyze • prmavail • prmconfig • prminitconfig • prmlist • prmloadconf • prmmonitor • prmmove • prmrecover • prmrun • prmsmhconfig • prm2scomp • scomp2prm • srpgen prmagt Syntax: prmagt -V prmagt [-plock | -stop | -interval seconds] Availability: Only a root user can run the prmagt command.
Command reference prmagt The prmagt utility is the PRM SNMP read-only agent. It enables SNMP-aware products to collect PRM configuration and usage statistics. Information is updated once per minute or whenever a major configuration change occurs. Secure sites may want to disable prmagt to avoid unwanted information exchange.
Command reference prmanalyze prmanalyze Syntax: prmanalyze -V prmanalyze [-s {auto | uid | gid | command | prmid}] [-f config_file] [-r {disk | mem | cpu}] [-t {summary | conflict | hourly | daily | weekly | monthly}] [-p] [-1] [-E] [-d resource_density][-m minimum_duration] [-x exclude_key_value] [filename_list] Availability: Any user can run the prmanalyze command assuming the user has read permissions on the files in filename_list.
Command reference prmanalyze If you would like to obtain information for billing based on PRM groups, use /usr/sbin/acct/acctcom -P. Table A-2 shows the prmanalyze options and parameters. Running prmanalyze without options or parameters is equivalent to entering the following command line: prmanalyze -s command -r cpu -t summary /var/adm/pacct NOTE For memory, the average, peak, and percent KB values should be comparable to those presented by acctcom.
Command reference prmanalyze Table A-2 prmanalyze options/parameters (Continued) Option/parameter -s {auto | uid | gid | command | prmid} Description Specifies how to sort the accounting data. Only one type of sort is allowed at a time. The data can be sorted based on: • Auto (auto) • User ID (uid) • Group ID (gid) • Command name (command) (default) • PRMID (prmid) Each sort type can be abbreviated using its first letter.
Command reference prmanalyze Table A-2 prmanalyze options/parameters (Continued) Option/parameter -t {summary | conflict | hourly | daily | weekly | monthly} Abbreviated form: -t {s | c | h | d | w | m} Description Specifies the report type. Valid report types are: summary (default) Provides a high-level view of resource use and is a good starting point when creating a new PRM configuration. See also the -1 option.
Command reference prmanalyze Table A-2 prmanalyze options/parameters (Continued) Option/parameter -p Description Requests that available accounting information for all currently running processes be added to the report. This option allows you to get data on server applications that run indefinitely and consequently are not tracked in the accounting files. -1 Removes all values that are less than 1% of the total.
Command reference prmanalyze Table A-2 prmanalyze options/parameters (Continued) Option/parameter -d resource_density Description Specifies the floating-point resource_density threshold for a report. Use this option with the conflict report or one of the time-based reports (hourly, daily, ...). When used with the time-based reports, this option filters out time intervals with resource usage less than resource_density.
Command reference prmavail Table A-2 prmanalyze options/parameters (Continued) Option/parameter Description Specifies a space-separated list of accounting files. You can use regular expressions to specify the filenames. These files can be listed in any order. filename_list This parameter defaults to /var/adm/pacct. prmavail Syntax: prmavail -V prmavail [-p] [-f] [CPU | DISK | MEM] Availability: Any user can run the prmavail command.
Command reference prmconfig DISK Displays the number of logical volume groups and disk groups on the system, as well as the names of those logical volume groups and disk groups. MEM Displays an estimate of the amount of real memory available for user processes. If prm2d is not running, this value is calculated by subtracting the memory used by the kernel, system processes, and the system paging reserve from total real memory.
Command reference prmconfig Table A-3 describes the prmconfig options available to both users and root users. Table A-3 prmconfig user options Option Description No options Prints current configuration, state, and mode information. -V Displays version information and exits. -s Performs cross checks between the users listed in /etc/prmconf or in a specified file with the list of users in password files accessible by the C function getpwnam.
Command reference prmconfig Table A-4 prmconfig root user options (Continued) Option -k Description Loads the default configuration file /etc/prmconf (or a specified file), keeping all currently running processes in their current PRM groups. For information on exceptions to this behavior, see Table 7-1 on page 154. This option does not move root processes. It also does not enable PRM. -f configfile {-i | -k | -s | -c} Specifies a configuration file other than /etc/prmconf.
Command reference prmconfig Table A-4 prmconfig root user options (Continued) Option -e [manager] Description Enables PRM. This option followed by one of the manager keywords below enables only the corresponding manager: • CPU • DISK • MEM • APPL When specifying multiple manager arguments, precede each argument with -e. Specifying -e without a keyword enables all managers. This does not change the current configuration. If there are no memory records, the memory manager is not started.
Command reference prmconfig Table A-4 prmconfig root user options (Continued) Option Description -h Includes parent hierarchical groups in output. (For more information on hierarchical groups, see “Hierarchical PRM groups” on page 38.) -w Prints the PRM group names in wide-column format, exceeding the 30-column default if necessary to avoid clipping any names. -p Includes the number of cores and their core IDs for PSET PRM groups in the output. -m Displays whether memory isolation is being used.
Command reference prminitconfig Table A-4 prmconfig root user options (Continued) Option Description Specify a PRM operation mode. To specify multiple modes with the same command, repeat -M mode. -M mode mode is required and can be: CPUCAPON Enables PRM CPU resource capping for all FSS PRM groups in the configuration. CPU usage for each FSS PRM group is capped at the group’s shares value. CPUCAPOFF (Default) Disables PRM CPU resource capping based on each group’s shares value.
Command reference prminitconfig Table A-5 prminitconfig options/parameters Options/parameters -a Description Configure the PRM GUI for SIM. You must run prminitconfig -a so that you can access PRM’s interface in SIM. Run prminitconfig -a after SIM is installed. NOTE: If you installed HP Virtual Server Environment Management Software A.03.00.00 or later and ran vseinitconfig -a, it ran prminitconfig -a for you, assuming PRM was already installed.
Command reference prmlist prmlist Syntax: prmlist -V prmlist [-h] [-w] [-p] [-m] [-g [group]] [-u [user | +netgroup]] [-s [compartment]] [-a [application]] [-d [LogicalVolumeGroup]] [-G [unix_group]] Availability: Any user can run the prmlist command. The prmlist command displays information from the current PRM configuration file, including PRM group, memory, user, disk, compartment, application, and Unix group record information. Table A-6 explains the available options.
Command reference prmlist Table A-6 prmlist user options (Continued) Option -g [ group] Description Displays all PRM group and memory record information. If group is specified, displays only information for the requested PRM group. Specify a group by its name or PRMID. -u [ user | +netgroup] Displays all user record information. If user is specified, displays only information for the requested user records. If +netgroup is specified, displays all members of the netgroup and their PRM group assignments.
Command reference prmloadconf Table A-6 prmlist user options (Continued) Option -d [ LogicalVolumeGroup] Description Displays all disk record information. If LogicalVolumeGroup is specified, displays only information for the requested disk record. The device name must be a directory name beginning with /dev/v that contains a group of logical volumes (LVM) or disk groups (VxVM). -G [unix_group] Displays all Unix group record information.
Command reference prmmonitor Table A-7 shows the prmloadconf options. Table A-7 prmloadconf root user options Option Description No options Creates or updates the PRM configuration file /etc/prmconf. -V Displays version information and exits. -f configfile Creates or updates the PRM configuration given by configfile. For each nonroot user in /etc/passwd not already in the PRM configuration file, the command appends a PRM user record that uses the placeholder (NONE) as the PRM group.
Command reference prmmonitor Table A-8 shows the available options. Table A-8 prmmonitor user options/parameters Option/ parameter Description No options Displays allocation and actual use of CPU and memory resources by PRM group. -V Displays version information and exits. resource Specifies the resource for which statistics are displayed.
Command reference prmmove Table A-8 prmmonitor user options/parameters (Continued) Option/ parameter Description interval Specifies the length in seconds of the sample interval. The HP-UX memory manager typically samples memory data every 10 seconds, so if you specify an interval value less than 10 seconds, the same memory statistics may be repeated in sequential displays.
Command reference prmmove Root users can use prmmove to dynamically change the PRM group of one or more processes to any PRM group. Users can move processes they own to PRM groups listed in their PRM user records in the configuration file. You can specify the -p option, -g option, and -u option with multiple arguments in a single use of the prmmove command. Any user can run the prmmove command. However, a user must have permission to use the target PRM group and own the process to be moved.
Command reference prmrecover Table A-9 prmmove user options/parameters (Continued) Option/ parameter Description -p PID Specifies the processes to move by PID. Can take multiple PID arguments. -g pgid Specifies the processes to move by process group ID. Can take multiple pgid arguments. For information on determining process group IDs, see the prmmove(1M) manpage. -u login Specifies the processes to move by user login name. Can take multiple login arguments.
Command reference prmrun prmrun Syntax: prmrun -V prmrun [-w] prmrun [-g targetgrp | -i ] [application [arguments]] Availability: Any user can run the prmrun command. The user must also have permission to execute the application. The prmrun command launches a designated application in a PRM group. Table A-11 describes the available options. Table A-11 prmrun user options/parameters Option/parameter Description No options Lists the PRM groups the invoker can access.
Command reference prmsmhconfig Table A-11 prmrun user options/parameters (Continued) Option/parameter Description Launches an application in the user’s initial group. -i Any user can launch an application in the user’s initial group using the -i option, as long as the user has permission to execute the application. application [arguments] Launches application, with any specified arguments, in its assigned group, unless -g targetgrp or -i is specified.
Command reference prm2scomp Table A-12 prmsmhconfig options/parameters (Continued) Options/parameters Description Unconfigure the PRM GUI for SMH, removing the Manage PRM Groups link from SMH. -u This command is run when PRM is removed from the system. Display the usage string. -h prm2scomp Syntax: prm2scomp -p prmpath -s scomppath [-i] The prm2scomp command generates a minimal configuration for the HP-UX feature Security Containment—based on a PRM configuration.
Command reference scomp2prm Table A-13 prm2scomp options/parameters (Continued) Option/parameter Description Saves the generated Security Containment configuration to the file given by scmpath. -s scmpath This file must not already exist and cannot be in a directory that is owned by a user other than root or is writable by a user other than owner. Run prm2scomp interactively and assign network interfaces to the secure compartments. (Network interfaces are defined in the file /etc/rc.config.d/netconf.
Command reference srpgen srpgen Syntax: srpgen [-m] -f basepath The HP-UX feature Security Containment, available for HP-UX 11i v2 (B.11.23) and later, provides secure compartments. Placing secure compartments inside PRM groups produces Secure Resource Partitions, or SRPs. srpgen generates minimal configuration files for both Security Containment and PRM based on user input. For each SRP name entered, a secure compartment and a PRM group is added to the configuration files.
Command reference srpgen 230 Appendix A
B HP-UX command/system call support Several HP-UX commands and system calls support PRM in assigning users and applications to the proper PRM groups. Other commands have options that allow you to use PRM more efficiently. In either case, this functionality is available only when PRM is configured. See the following tables for information on these commands and system calls. Table B-1 lists HP-UX commands and system calls that support PRM groups.
HP-UX command/system call support Table B-2 describes HP-UX commands that have options for PRM. Table B-2 PRM options in HP-UX commands Command Option Description acctcom -P Displays the PRMID of each process. acctcom -R group Displays only processes belonging to the PRM group given by group, which is specified by PRM group name or PRMID. id -P Displays the PRMID and name of the invoking user’s initial group.
C Monitoring PRM through SNMP PRM makes various information available through SNMP. This information can be viewed through products such as HP OpenView Network Node Manager. Reported data includes: NOTE • Resource usage assigned to and achieved by each PRM group • Manager states • Time of last PRM configuration PRM’s SNMP data does not include any information on user records in the PRM configuration. PRM’s data is in the SNMP subtree hp.hpSysMgt.hpUXSysMgt.hpPRM.prmReadOnly.
Monitoring PRM through SNMP Table C-1 Structure of PRM’s SNMP data (prmReadOnly) (Continued) Corresponding SNMP string PRM data MEM resource 234 Major sequence number* cpuSequenceNum CPUs available cpuAvail Manager state cpuManagerState Sample interval cpuInterval Capping state cpuCapState Group count cpuGroupCount Group/CPU records: cpuTable Name cpuGroupName PRMID cpuPRMid Percent entitled cpuPercentEnt Percent of machine received cpuPercentGot Shares entitled cpuSharesEnt Ti
Monitoring PRM through SNMP Table C-1 Structure of PRM’s SNMP data (prmReadOnly) (Continued) Corresponding SNMP string PRM data DISK resource Appendix C Major sequence number* memSequenceNum MB available memAvail Manager version memManagerVersion Manager state memManagerState Manager interval memInterval Logging state memLoggingState Record count memGroupCount Global paging (Boolean) memPagingSeen Memory records: memTable Name memGroupName PRMID memPRMid Percent entitled memPerce
Monitoring PRM through SNMP Table C-1 Structure of PRM’s SNMP data (prmReadOnly) (Continued) Corresponding SNMP string PRM data Major sequence number * diskSequenceNum Manager state diskManagerState Sample interval diskInterval Device count diskDeviceCount Group count diskGroupCount Devices: diskTable Device name diskDeviceName Group name diskGroupName PRMID diskPRMid Percent entitled diskPercentEnt Percent of machine received diskPercentGot Shares entitled diskSharesEnt Bytes rece
Monitoring PRM through SNMP Accessing PRM’s SNMP data *. The major sequence number indicates the number of times a configuration has changed since the last reset. Accessing PRM’s SNMP data You can access SNMP information through a command-line interface, known as snmpwalk, and through a graphical user interface called xnmbrowser. Using these utilities is described below. Using OpenView’s snmpwalk Secure sites may want to disable prmagt to avoid unwanted information exchange.
Monitoring PRM through SNMP Accessing PRM’s SNMP data You can limit the data displayed by choosing a lower level item. For example, to display only information on application records, enter the following command: # /opt/OV/bin/snmpwalk \ hostname hp.hpSysMgt.hpUXSysMgt.hpPRM.prmReadOnly.applResource Using OpenView’s xnmbrowser NOTE Secure sites may want to disable prmagt to avoid unwanted information exchange.
Monitoring PRM through SNMP Accessing PRM’s SNMP data Step 3. Enter the name of the system to monitor in the field Name or IP Address. In the following graphic, the system name is ungava.
Monitoring PRM through SNMP Accessing PRM’s SNMP data Step 4. Enter “public” in the field Community Name. Step 5.
Monitoring PRM through SNMP Accessing PRM’s SNMP data The graphic below shows the beginning of the hierarchy.
Monitoring PRM through SNMP Accessing PRM’s SNMP data Step 6. Press the Start Query button to get all PRM data or continue navigating deeper to the desired level, then press the Start Query button.
Monitoring PRM through SNMP Accessing PRM’s SNMP data Graphing resource usage You can use xnmbrowser to graph various data. xnmbrowser can only graph integer values. String values cannot be graphed. The xnmbrowser utility indicates an item that can be graphed by making the Graph button active, as seen in the following procedure. NOTE To see how many CPU ticks each PRM group is getting: Step 1.
Monitoring PRM through SNMP Accessing PRM’s SNMP data Step 2. Select the Graph button on the right side of the browser. A graph similar to the following appears.
Monitoring PRM through SNMP Accessing PRM’s SNMP data Appendix C 245
Monitoring PRM through SNMP Accessing PRM’s SNMP data Table C-2 maps the PRM groups to their respective identifiers in the graph. Note how each group’s PRMID is used in its cpuTicksGot identifier. The development group comes in with approximately 4500 ticks. The databases/order group converges on 3500 ticks, while databases/inventory and mailserver come in at about 2000 and 1000 ticks, respectively. OTHERS and PRM_SYS get the fewest ticks. The amount of idle CPU, represented by cpuTicksGot.
D Creating Secure Resource Partitions The optional HP-UX feature Security Containment, available starting with HP-UX 11i v2 (B.11.23), provides “secure compartments,” which allow you to isolate processes and files. You can place one or more secure compartments in a single PRM group to manage the resource allocation for your secure compartments. Using these features together, you form Secure Resource Partitions.
Creating Secure Resource Partitions 248 Appendix D
E Using PRM with Serviceguard The optional HP product Serviceguard provides users and applications with a high availability environment. Serviceguard makes this environment possible by moving applications from one server to another when the original server or application session is unable to complete the desired jobs. You can set up PRM to control applications on the primary server and on a secondary server in the event of a failover.
Using PRM with Serviceguard An example of a customer-defined function is given on the following pages. It performs the following tasks: 1. Checks to see if PRM is installed. 2. If PRM is installed, it checks for the desired configuration file. 3. If the desired configuration file is not found, it is created. 4. Checks to see if PRM is configured. 5. If PRM is not already configured, the desired configuration is loaded. 6. If PRM is already configured, the configuration is checked for the group math_dept.
Using PRM with Serviceguard Here is the example control function: # START OF CUSTOMER DEFINED FUNCTIONS function customer_defined_run_cmds { # customer defined run commands.
Using PRM with Serviceguard echo “WARNING : prmconfig -f /etc/opt/prm/conf/Serviceguard failed” return 0 fi else # make sure it has my group /opt/prm/bin/prmconfig | grep math_dept > /dev/null 2> /dev/null if [ “$?” -ne “0” ] then echo “WARNING : conflicting PRM already running on $UNAME” return 0 else # log the initial configuration /opt/prm/bin/prmconfig fi fi else # no luck.
F Using PRM with HP Integrity Virtual Machines HP Integrity Virtual Machines (Integrity VM) is a robust soft partitioning and virtualization technology that provides operating systems isolation, shared CPU (with sub-CPU granularity), shared I/O, and automatic, dynamic resource allocation. It is available for HP-UX 11i v2 and later running on HP Integrity servers.
Using PRM with HP Integrity Virtual Machines 254 Appendix F
G PRM error messages This appendix lists all PRM error messages with cause and action text.
PRM error messages prmmonitor error messages prmmonitor error messages 001 Message Interval and number of samples must be more than 0 and less than %d. Cause Command arguments are invalid. Action Specify positive integers as command arguments. Message PRM is not configured. Cause PRM is not configured; there is nothing to monitor. Action Configure and enable PRM (prmconfig -k -e or prmconfig -i -e) prior to running prmmonitor. Message PRM resource manager(s) disabled.
PRM error messages prmmonitor error messages 147 Message PRM Memory Resource Group (MRG) feature not included in this system. Cause In-kernel memory controls are not available on the system. Action Do not specify the MRG option for this command on systems where in-kernel memory controls are not available. Message Current Memory manager does not stop jobs. Cause In-kernel memory controls are not available on the system.
PRM error messages prmconfig error messages prmconfig error messages 201 Message PRM is not included in the system. Cause The kernel has not been built with libprm.a. Action Check that PRM is in the system file (/stand/system). Then rebuild the kernel with /usr/sbin/mk_kernel. Message Configuration lock already held by %s. Cause Someone is currently configuring PRM. Action Consult the other party to determine the proper configurations needed for the system.
PRM error messages prmconfig error messages 205 Message Could not find configuration file. Cause Could not open /etc/prmconf or the specified file for reading. Action Make sure configuration file exists and is readable by superusers. Message %s: illegal option “%s” Cause An unknown option was specified on the command line. Action Check the usage message or the prmconfig(1) manpage for valid options. Message %s: -p not valid. Processor sets not available.
PRM error messages prmconfig error messages 225 Message Cannot enable. PRM is not configured. Cause prmconfig -e option used before -k or -i option. Action Configure and enable PRM with prmconfig -ke or -ie options. PRM options are executed in command-line order. Message Cannot display configuration. PRM is not configured. Cause prmconfig command used without options before PRM is configured. Action Configure PRM with prmconfig -k or -i before requesting PRM configuration and state information.
PRM error messages prmconfig error messages 231 Message Could not disable PRM %s: (HP-UX error message) Cause You are not running as superuser, or an internal system failure. Action Log in as superuser and try again or take action based on the HP-UX error message. If that does not work, contact system support staff. Message Could not enable PRM %s: (HP-UX error message) Cause You are not running as superuser or an internal system failure.
PRM error messages prmconfig error messages 244 Message The -i and -k options cannot be used together. Cause prmconfig command specified with both -i and -k options. Action Re-enter command, specifying either -i or -k, not both. Message The -f option requires an argument. Cause The filename argument is missing. Action Enter the command, include the filename argument with the -f option. Message Pathname too long. Cause The pathname entered as an argument to -f exceeds 1024 characters.
PRM error messages prmconfig error messages 286 Message Manager arg for prmconfig -d or -e may only be DISK, APPL, CPU or MEM. Cause The Manager argument specified for the prmconfig -d or -e command is not a recognized keyword. Action Re-enter the command and either disable or enable all of the configured PRM managers or use a valid Manager argument to select the desired PRM manager to disable or enable. Message Both the Interval and Manager arguments are required for prmconfig -I.
PRM error messages prmconfig error messages 291 Message The -M option requires a keyword argument. Cause The -M option was used without an argument. Action Use either CPUCAPON or CPUCAPOFF as an argument to -M. Message Unrecognized keyword argument for -M option. Cause The entered argument to -M is not valid. Action Use either CPUCAPON or CPUCAPOFF as an argument to -M. Message Enabling of CPU cap only allowed when PRM CPU scheduler enabled.
PRM error messages prmconfig error messages 296 Message Unable to change the polling interval of the %s manager: (HP-UX error message) Cause You are not running as root, the manager is no longer enabled, or an internal system failure. Action Log in as superuser and try again or check that the manager is running. If it is running, see if using prmconfig -r resolves the problem. Be sure to load a configuration and enable the resource manager after resetting PRM.
PRM error messages prmmove error messages prmmove error messages 401 Message Warning! All root processes with pid > 0 have been moved to group %s. Cause Command prmmove %s -u user1 executed where user1 is a superuser. This moves all root processes (except PID 0) to a group other than the PRM system group. This includes almost all of the system processes. Action If this was your intention, then no further action is required.
PRM error messages prmmove error messages 404 Message Group name is too long. Cause The group name length is longer than allowed. Action Check group name. Message Could not move process %d to group %s Cause Internal system failure. Action Ensure the PRM group and PID still exist. Message Could not move process group %d to group %s: (HP-UX error message) (perror) Cause Internal system failure. Action Ensure the PRM group and PID still exist.
PRM error messages prmmove error messages 412 Message User %s does not have permission to use group %s. Cause User %s is not superuser and does not have access to group %s. A nonroot user must own all processes to be moved and have access to the target group. Action Verify that user has access to the desired group by executing the prmmove command without any options. If user does not have access, choose an alternate group or request access to the group. Otherwise, log in as superuser and try again.
PRM error messages prmmove error messages 418 Message Please specify %s. Cause The command line is missing arguments for -p, -g, or -u options. Action Re-execute the command with the appropriate argument type: process ID, process group ID, or user login. Message %s requires users to be specified by login names. Cause Cannot use user ID number (UID) as argument to -u option. User login name is required argument for -u option.
PRM error messages prmmove error messages 426 Message Could not find internal configuration file %s. Cause Could not open internal configuration file %s for reading. Action Make sure file exists and is readable. Reconfiguring PRM with prmconfig -k or -i recreates the internal file and resyncs it with /etc/prmconf or the specified configuration file. Message %d is not a process group id. Cause %d is not a valid process group ID; it is simply a process ID.
PRM error messages prmrun error messages prmrun error messages 601 Message Could not find configured application. Cause Could not find the application record in the configuration file. Possible causes are: • Could not find the full path of the application specified on the command line. • User’s PATH environment variable is empty. • The application either does not exist, is empty, or is not executable. • The assigned group does not exist.
PRM error messages prmrun error messages 604 Message User's PATH environment variable is empty. Cause User’s PATH environment variable is not set. Action Add application’s directory to PATH environment variable and retry prmrun command. Message Could not launch application %s in group %s (perror) Cause Exec of command %s failed for the reason indicated in message. Action Take action necessary to resolve indicated failure and retry prmrun command. Message Application file %s does not exist.
PRM error messages prmrun error messages 611 Message Could not find application %s in the configuration file. Cause Could not find the application record in the configuration file. Action Make sure the syntax of the application parameter is correct and that the application’s directory is in the user’s PATH environment variable. If the application does not have a record in the configuration file, use prmrun -g targetgrp to start the application in the group targetgrp.
PRM error messages prmrun error messages 617 Message Could not find group %s in configuration file. Cause Cannot find PRM group/CPU record for this group in internal configuration file. Cause may be a corrupt PRM internal configuration file (/var/tmp/PRM.prmconf). Action Verify that /etc/prmconf or the specified file has the correct information in it (PRM group/CPU record for desired target group). Then reconfigure PRM using prmconfig -k or -i to resync internal configuration file.
PRM error messages prmlist error messages 626 Message Could not find internal configuration file %s. Cause Could not open internal configuration file %s for reading. Action Make sure file exists and is readable. Reconfiguring PRM with prmconfig -k or -i will recreate internal file and resync it with /etc/prmconf or the specified file. Message %s has alternate names, do not launch with prmrun.
PRM error messages prmlist error messages 806 Message No Compartment records in the configuration file. Cause Could not find any compartment records in the internal configuration file. Action Add compartment records as needed. Message Please specify only one -g option. Cause More than one -g option was specified on the command line. Action Specify only one -g option and retry the prmlist command. Message Please specify only one -u option.
PRM error messages prmlist error messages 811 Message Device name %s not legal. Cause Name given is not a logical volume group. Action Check the spelling, then use bdf to check whether the device is mounted. Message Could not find full path of application %s. Cause The full path of the application parameter could not be found. Action Make sure the syntax of the application parameter is correct. Message Please specify only one -s option.
PRM error messages prmlist error messages 816 Message Unix group name is too long. Cause The Unix group name is more than 255 characters. Action Change the Unix group name to be no more than 255 characters and update the PRM configuration to use the new name. Message Could not find group %s in the configuration file. Cause Could not find record for group %s in the internal configuration file. Action Add group/CPU record to configuration file, if needed, and reconfigure.
PRM error messages prmlist error messages 822 Message No members found for netgroup %s for this machine and domain. Cause An empty or nonexistent netgroup was specified in a user record. Action Check the spelling in the PRM configuration file against the spelling in the /etc/netgroup file and correct if necessary. Alternatively, if the configuration is used on multiple systems and the netgroup name is valid on one of the other systems, do nothing. Message Could not find compartment %s.
PRM error messages prmloadconf error messages 847 Message Could not find configuration file modification date. Cause Could not find the time of last modification in the first two lines in the PRM internal working file. Action Reset PRM with prmconfig -r then load a configuration and enable PRM. prmloadconf error messages 901 Message Must have root capability to use prmloadconf. Cause The command was executed by a nonroot user. Action Log in as root and execute the command.
PRM error messages prmrecover error messages 929 Message Unable to further append to file %s. Please check file system space. Cause There is no disk space available. Action Free up disk space and retry. Message prmloadconf may not change PRM internal configuration file %s Cause Specifying the internal configuration file as the argument to the -f option is not allowed. Action Specify another file as the -f argument.
PRM error messages prmrecover error messages 1005 Message Must shutdown memory manager before doing recovery. Cause Recovery of suppressed processes is not allowed while memory manager is running. Action Shutdown the PRM memory manager by entering prmconfig -r before proceeding with recovery. 1006 Message Recovery cannot proceed during OL activity. Please try again later. Cause Recovery of suppressed processes is not allowed while online cell operations are in progress.
PRM error messages prmavail error messages 1161 Message Cleaning up processes Cause Informational message. Action None. 1162 Message Cleaning up groups Cause Informational message. Action None. 1171 Message Could not disable kernel memory feature Cause Could not disable in-kernel memory controls. Action Contact system support staff. 1172 Message Successfully disabled kernel memory feature Cause Informational message. Action None.
PRM error messages prmanalyze error messages 1205 Message prmavail takes only three arguments. Cause More than three command-line arguments were used. Action Check command syntax and re-enter command using up to three command-line arguments. 1208 Message Disk Bandwidth Manager not available in this kernel. Cause Disk bandwidth controls not available on the system. Action Do not specify the DISK option for this command on systems where disk bandwidth controls are not available.
PRM error messages prmanalyze error messages 1503 Message illegal report type %s Cause The requested report type is not valid. Action Re-enter the command using a valid report type: summary, conflict, hourly, daily, weekly, or monthly. 1504 Message key type ‘auto’ only allowed with report type ‘summary’ Cause You tried to use the key type auto with a different report. Action Use the key type auto with the report type summary.
PRM error messages prmanalyze error messages 1509 Message only one report type argument (-t) allowed Cause The -t option was entered more than once. Action Re-enter the command using -t only once. 1510 Message unable to access file %s Cause The file does not exist or the directory permissions for the directory where the file resides do not allow access. Action Check the directory permissions and filename. 1511 Message unable to read file %s Cause File permissions do not allow reading.
PRM error messages prmanalyze error messages 1515 Message unable to open temp file %s Cause There is not enough disk space or the file has been removed. Action Check disk space in /tmp and rerun the command. 1516 Message Internal data structures corrupt %d. Verify accounting file format with acctcom. Cause File is not an accounting file. Action Use acctcom to confirm file does not contain accounting data. 1518 Message unable to read event temp file %s Cause File has been removed externally.
PRM error messages prmanalyze error messages 1521 Message illegal prm group number %s Cause When sorting by prmid, -x was specified with an argument that is nonnumeric, less than 0, greater than 63, or greater than 255 (starting with HP-UX 11i v2 Update 2). Action Re-enter the command using a number from 0 to 63, or 0 to 255 depending on your HP-UX version, as the argument to -x.
PRM error messages prmagt error messages 1527 Message exclusion option not permitted with autogenerate option Cause You used the exclusion option. Action Do not use the exclusion option. 1528 Message the option \”-%c\” requires an argument Cause No option argument was used. Action Check command syntax for correct option usage. 1529 Message the -d option requires a floating point argument Cause An invalid floating-point argument was used. Action Check command syntax for correct option usage.
PRM error messages prmagt error messages 1603 Message error: unable to read file %s Cause The file /var/opt/prm/prmagt.pid is corrupt or 0-length. Action Kill the currently running prmagt process, remove the prmagt.pid file, and start prmagt again. 1604 Message error: prmagt already running, pid %d Cause The prmagt command was executed while the agent is already active. Action None. The agent is running. 1609 290 Message error: illegal interval ’%s’.
Glossary alternate name Other names assigned to processes spawned by an application. This is most common for complex programs such as database and mail programs that launch many processes and rename them. alternate group A PRM group other than the user’s initial group that a user can access using prmrun or prmmove. For users, these groups are listed in their user records (or their netgroups’ user records) in the PRM configuration file following the initial group.
Glossary disk group disk group A single logical disk device under control of VERITAS Volume Manager (VxVM) formed from one or more physical disk drives. PRM manages disk bandwidth on a disk group basis as well as a logical volume group basis. disk manager A kernel routine that monitors bandwidth at the level of logical volume groups (LVM) and disk groups (VxVM), rearranging I/O requests as needed to ensure disk bandwidth shares. disk bandwidth record (Also known as “disk record.
Glossary PRMID logical volume group A single logical disk device under control of Logical Volume Manager (LVM) formed from one or more physical disk drives. PRM manages disk bandwidth on a logical volume group basis, as well as a disk group basis. Logical Volume Manager (LVM) A disk-management tool used to partition physical disk drives. memory cap An upper limit on a PRM group’s memory use.
Glossary PRM_SYS group PRM_SYS group The PRM group PRM_SYS with PRMID 0. PRM places all system processes in this group by default. System processes are processes started by someone with UID 0. real memory Real memory is shared by all processes. The data and instructions of any process (a program in execution) must be available to the core by residing in real memory at the time of execution. process group Every process (except system processes, such as init and swapper) belongs to a process group.
Glossary user record shares Resource allocations for CPU (for FSS PRM groups), private memory, and disk bandwidth are specified in shares. A share is a guaranteed minimum when the system is at peak load. PRM allocates a percentage of the system resource to each PRM group based on its number of shares relative to the sum of it and its siblings’ number of shares.
Glossary user record 296 Glossary
Index A accessible PRM groups, listing, 178 acctcom command, 190 displaying past process information, 190 fine-tuning your configuration, 161 support for PRM, 232 adding application records with a text editor, 131 compartment records with a text editor, 147 disk bandwidth records with a text editor, 124 group/CPU records with a text editor, 110 memory records with a text editor (private), 118 memory records with a text editor (shared), 119 Unix group records with a text editor, 151 user record for root (
Index automating administration, 194 available memory, 52 defined, 291 displaying, 188 B backup PRM files, 199 backups of configurations, 196 boot-time state, 85, 183 budget model for determining your configuration, 72 business priorities in determining your configuration, 74 C capping CPU capping CPU use with prmconfig, 111 introduction, 48 per-group capping, 108 prmconfig -M {CPUCAPON|CPUCAPOFF}, 215 showing availability of per-group capping with prmavail -f, 209 specifying through the max value (per-grou
Index prmconfig automating PRM administration, 194 checking configuration file syntax, 98 differences between -i and -k, 154 disabling PRM, 182 error messages, 258 errors in the configuration file, 153 including full hierarchies in output with -h, 214 introduction, 23 loading a configuration file, 153 logging application messages, 185 logging memory messages, 185 resetting PRM, 183 setting the application manager interval, 181 setting the memory manager interval, 180 syntax, 210 unlocking a configuration f
Index scomp2prm introduction, 24 syntax, 228 srpgen introduction, 24 syntax, 229 commands for PRM, 22, 201–224 compartment records adding with a text editor, 147 modifying with a text editor, 147 precedence over application records, 62 precedence over other record types, 65 removing with a text editor, 148, 152 specifying compartment records, 145 syntax, 145 compartments (overview), 247 configuration and multiprocessor systems, 49 backups, 196 creating with data from prmanalyze, 81 displaying current config
Index creating the configuration file with prmloadconf, 98, 101 creating your configuration with data from prmanalyze, 81 cron command support for PRM, 231 D disabling PRM, 182 prmconfig syntax, 210 with prmconfig, 182 disk bandwidth manager and swap partitions, 86 defined, 292 how PRM manages disk bandwidth, 60 introduction, 20 specifying disk bandwidth management, 123 records, 123 adding with a text editor, 124 assignment of 0 shares, 124 defined, 292 introduction, 21 modifying with a text editor, 124 re
Index F filename pattern matching and, 63 files /etc/prmconf (default configuration file) at installation time, 85 overview, 99 /etc/rc.config.d/prm (PRM startup script) enabling remote management on reboot, 194 modifying to automatically configure PRM on reboot, 86, 194 starting PRM’s SNMP agent on reboot, 194, 237, 238 /var/adm/syslog/syslog.log determining memory use, 171, 184 logging application messages, 185 /var/tmp/PRM.
Index I id command, 187 support for PRM, 232 identifying PRM group with prmmonitor, 186 identifying PRM state with prmmonitor, 186 identifying resource use (analyzing use to better configure PRM), 79 inetd possible need to remove from system group, 104 initial configuration at installation, 85 initial group defined, 292 initial state at installation, 85 at reset, 183 install state caused by a reset, 183 installation directory (/opt/prm/), 85 installing PRM, 85 internal copy of configuration file, 196 inter
Index manager, 113 defined, 293 how PRM manages memory, 51 introduction, 20 setting the polling interval, 180 specifying memory management, 113 paging, 52 peak management by prm2d, 57 real, 51 records adding with a text editor (private), 118 adding with a text editor (shared), 119 defined, 293 introduction, 21 modifying with a text editor (private), 118 modifying with a text editor (shared), 119 removing with a text editor (private), 120 removing with a text editor (shared), 121 records (private) syntax, 11
Index PID, 173 defined, 293 planning examples, 72 polling interval defined, 293 setting for the application manager, 181 setting for the memory manager, 180 POSIX real-time process, defined, 293 precedence of record types, 65 PRM administrator, defined, 293 PRM advantages over the standard HP-UX CPU scheduler and memory manager, 24 PRM commands, 22, 201–224 PRM group, 34 defined, 293 ID, defined, 293 PRM group name displaying with ps -P, 191 PRM overview, 19 PRM_SYS group, 104 as "(PRM_SYS)" in prmmonitor -
Index prmloadconf command creating a new configuration file, 98, 101 error messages, 280 introduction, 23 syntax, 219 updating the configuration file, 102, 158 prmmonitor command automating PRM administration, 194 displaying groups’ allocated and used resources, 186 error messages, 256 example, 187 fine-tuning your configuration, 161 including full hierarchies in output with -h, 221 introduction, 23 syntax, 220 prmmove command automating PRM administration, 194 displaying accessible groups, 178 error messa
Index records, 20 application adding with a text editor, 131 alternate names, 129 compartment records overriding of, 62 defined, 291 duplicate application records, 126 introduction, 22 modifying with a text editor, 131 pattern matching (regular expressions) in alternate names, 64 filenames, 63, 175 precedence over user records, 62 removing with a text editor, 134 specifying PRM control of applications, 126 specifying with a text editor, 131 syntax, 128 compartment adding with a text editor, 147 modifying
Index resource managers, 20 defined, 294 disabling, 182 enabling, 156 resource priorities, 72 resource shares CPU, 104 disk bandwidth, 123 memory, 113 resource use detailed analysis, 79 quick analysis, 78 returning to HP-UX standard scheduler, 182 root user record (and prmconfig -i), 154 user record (automatically created), 139 rtprio interaction with PRM, 48 rtsched interaction with PRM, 48 S scheduling gang (cannot use with PRM), 33 scomp2prm command introduction, 24 syntax, 228 scripts automating PRM adm
Index system calls exec support for PRM, 231 fork support for PRM, 231 pstat support for PRM, 231 system group as an explicit group, 105 defined, 295 System Manage Homepage, 87 system processes, 103 system requirements to use PRM, 19 system resource use, 79 system startup real memory, 51 Systems Insight Manager, 91 T turning off PRM scheduler, 182 U UID, defined, 295 Unix group records adding with a text editor, 151 modifying with a text editor, 151 specifying Unix records, 149 syntax, 149 unlocking a confi
Index 310