Home > Articles > Operating Systems, Server > Solaris

This chapter is from the book

This chapter is from the book

4.2 Tools That Report System Configuration

4.2.1 Introduction

This section covers tools that report static information about the system, such as the type of processor installed and so forth.

4.2.2 Reporting General System Information (prtdiag, prtconf, prtpicl, prtfru)

prtdiag is a purely informational tool that prints the machine's diagnostic details. The exact output depends on the system. I included it in this chapter because it can be a source of useful information about the setup of the machine. It is located in /usr/sbin. The tool is often the first place to look for information on the processors and memory that are installed in the system, as well as general system configuration.

Output from prtdiag on a two-CPU UltraSPARC IIICu system is shown in Example 4.1. The output identifies the processors and the system clock speed, together with the amount of memory installed and in which memory slots it is installed. The output refers to the UltraSPARC IIICu processor as the UltraSPARC III+, and further abbreviates this to US-3+.

Example 4.1. Sample Output from prtdiag

$ /usr/sbin/prtdiag
System Configuration: Sun Microsystems sun4u SUNW,Sun-Blade-1000 (2xUltraSPARC III+)
System clock frequency: 150 MHZ
Memory size: 2GB
============================== CPUs ===================================
               E$          CPU     CPU       Temperature
CPU  Freq      Size        Impl.   Mask     Die    Ambient
---  --------  ----------  ------  ----  --------  --------
 0    900 MHz  8MB         US-III+   2.2     75 C     25 C
 1    900 MHz  8MB         US-III+   2.2     75 C     24 C
=============================== IO Devices ============================
     Bus   Freq
Brd  Type  MHz   Slot        Name                              Model
---  ----  ----  ----  --------------------------------  --------------
 0   pci    33      1  SUNW,m64B (display)               SUNW,370-4362
 0   pci    66      4  SUNW,qlc-pci1077,2200.5 (scsi-fc+
 0   pci    33      5  ebus/parallel-ns87317-ecpp (para+
 0   pci    33      5  ebus/serial-sab82532 (serial)
 0   pci    33      5  network-pci108e,1101.1 (network)  SUNW,pci-eri
 0   pci    33      5  firewire-pci108e,1102.1001 (fire+
 0   pci    33      6  scsi-pci1000,f.37 (scsi-2)
 0   pci    33      6  scsi-pci1000,f.37 (scsi-2)
======================= Memory Configuration ==========================
Segment Table:
-----------------------------------------------------------------------
Base Address       Size       Interleave Factor  Contains
-----------------------------------------------------------------------
0x0                2GB               4           BankIDs 0,1,2,3
Bank Table:
-----------------------------------------------------------
           Physical Location
ID       ControllerID  GroupID   Size     Interleave Way
-----------------------------------------------------------
0        0             0         512MB         0
1        0             1         512MB         1
2        0             0         512MB         2
3        0             1         512MB         3
Memory Module Groups:
--------------------------------------------------
ControllerID   GroupID  Labels
--------------------------------------------------
0              0        J0100,J0202,J0304,J0406
0              1        J0101,J0203,J0305,J0407

Other tools exist that provide system information at various levels of detail. The tools prtconf, prtpicl, and prtfru produce long lists of system configuration information, the contents of which depend on the details available on the particular platform.

4.2.3 Enabling Virtual Processors (psrinfo and psradm)

psrinfo is a tool that will report whether the virtual processors are enabled. Sample output from psrinfo, run on a system with two 900MHz processors, is shown in Example 4.2. You can obtain more detailed output using psrinfo -v.

Example 4.2. Sample Output from psrinfo and psrinfo -v

$ psrinfo
0       on-line since 11/20/2003 11:18:59
1       on-line since 11/20/2003 11:19:00
$ psrinfo -v
Status of virtual processor 0 as of: 10/23/2006 21:47:30
  on-line since 11/20/2003 11:19:00.
  The sparcv9 processor operates at 900 MHz,
        and has a sparcv9 floating-point processor.
Status of virtual processor 1 as of: 10/23/2006 21:47:30
  on-line since 11/20/2003 11:19:00.
  The sparcv9 processor operates at 900 MHz,
        and has a sparcv9 floating-point processor.

Solaris 10 introduced the -p option to psrinfo that reports on the physical processors in the system. Example 4.3 shows the output from a system that has a single UltraSPARC T1 physical processor with 32 virtual processors.

Example 4.3. Output from psrinfo -pv from an UltraSPARC T1 System

$ psrinfo -pv
The physical processor has 32 virtual processors (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31)
  UltraSPARC T1 (cpuid 0 clock 1200 MHz)

You can enable or disable the virtual processors using the psradm tool. The -f flag will disable a processor and the -n flag will enable it. This tool is available only with superuser permissions.

The -i flag for psradm excludes CPUs from handling interrupts; this may be of use when partitioning the workload over multiple CPUs. Example 4.4 shows the command for excluding CPU number 1 from the CPUs that are available to handle interrupts.

Example 4.4. Excluding a CPU from Interrupt Handling

$ psradm -i 1
$

4.2.4 Controlling the Use of Processors through Processor Sets or Binding (psrset and pbind)

It is possible to configure systems so that the processors are kept in discrete sets. This will partition compute resources so that particular applications run on particular sets of processors. The command to do this is psrset, and it is available only with superuser permissions. Example 4.5 illustrates the use of processor sets.

Example 4.5. Example of the psrset Command

# psrset -c 1
created processor set 1
processor 1: was not assigned, now 1
# psrset
user processor set 1: processor 1
# psrset -e 1 sleep 1
# psrset -d 1
removed processor set 1

The code in Example 4.5 first shows the creation of a processor set using the psrset -c option, which takes a list of processor IDs and binds those processors into a set. The command returns the id of the set that has just been created. The command psrset with no options reports the processor sets that are currently in existence, and the processors that belong to those sets. It is possible to run a particular process on a given set using the psrset -e option, which takes both the processor set to use and the command to execute on that set. Finally, the psrset -d option deletes the processor set that is specified.

You must be careful when using processor sets (or any partitioning of the processor resources). Using processor sets, it is possible to introduce load imbalance, in which a set of processors is oversubscribed while another set is idle. You need to consider the allocation of processors to sets at the level of the entire machine, which is why the command requires superuser privileges.

It is a good practice to check for both the number of enabled virtual processors (using psrinfo) and the existence of processor sets whenever the system's performance is being investigated. On systems where processor sets are used regularly, or processors are often switched off, they can be a common reason for the system not providing the expected performance.

It is also possible to bind a single process to a particular processor using the pbind command, which takes the -b flag together with the pid and the processor ID as inputs when binding a process to a processor, and the -u flag together with the pid to unbind the process. Unlike processor sets that exclude other processes from running on a given group of processors, processor binding ensures that a particular process will run on a particular processor, but it does not ensure that other processes will not also run there.

4.2.5 Reporting Instruction Sets Supported by Hardware (isalist)

isalist is a Solaris tool that outputs the instruction sets architectures (ISAs) the processor supports. This can be useful for picking the appropriate compiler options (this will be covered in Section 5.6.5 of Chapter 5). It is also useful in determining the particular variant of CPU that the system contains. Example 4.6 shows output from the isalist command on an UltraSPARC III-based system. It shows that there is a SPARC processor in the system, and that this can handle SPARC V7, V8, and V9 binaries. The processor can also handle the VIS 2.0 instruction set extensions.

Example 4.6. Sample Output from the isalist Command

$ isalist
sparcv9+vis2 sparcv9+vis sparcv9 sparcv8plus+vis sparcv8plus sparcv8
sparcv8-fsmuld sparcv7 sparc

4.2.6 Reporting TLB Page Sizes Supported by Hardware (pagesize)

In Section 1.9.2 of Chapter 1 we discussed the Translation Lookaside Buffer (TLB), which the processor uses to map virtual memory addresses to physical memory addesses. Different processors are able to support different page sizes. The advantage of larger page sizes is that they let the TLB map more physical memory using a fixed number of TLB entries. For example, a TLB with 64 entries can map 8KB*64=512KB when each entry is an 8KB page, but can map 4MB*64=256MB when each entry holds a 4MB page. The number of different page sizes that can be supported simultaneously is hardware-dependent. Even if the hardware supports large page sizes, there is no guarantee that an application will recieve large pages if it requests them. The number of available large pages depends on the amount of memory in the system and the degree to which contiguous memory is available.

The pagesize command prints out the different TLB page sizes that the processor can support. If no flags are specified, the utility will print the default page size. If the flag -a is used, it will report all the available page sizes (see Example 4.7).

Example 4.7. Sample Output from the pagesize Command

$ pagesize -a
8192
65536
524288
4194304

The pmap command (covered in Section 4.4.7) reports the page sizes that an application has been allocated.

It is possible to change the page sizes that an application requests. You can do this in several ways.

  • At compile time, you can use the -xpagesize compiler flag documented in Section 5.8.6 of Chapter 5.
  • You can preload the Multiple PageSize Selection (mpss.so.1) library, which uses environment variables to set the page sizes. We will cover preloading in more detail in Section 7.2.10 of Chapter 7. An example of using preloading to set the page size for an application appears in Example 4.8. In this example, the environment is being set up to request 4MB pages for both the application stack and the heap.

    Example 4.8. Using mpss.so.1 to Set the Page Size for an Application

    $ setenv MPSSHEAP 4M
    $ setenv MPSSSTACK 4M
    $ setenv LD_PRELOAD mpss.so.1
    $ a.out
    
          
  • You can set the preferred page size for a command or for an already running application through the ppgsz utility. This utility takes a set of page sizes plus either a command to be run with those page sizes, or a pid for those page sizes to be applied to. Example 4.9 shows examples of using the ppgsz command.

    Example 4.9. Using the ppgsz Command

    % ppgsz -o heap=4M a.out
    % ppgsz -o heap=64K -p <pid>
    
          

Table 4.1 shows the supported page sizes for various processors.

Table 4.1. Page Sizes Supported by Various Processor Types

Processor

4KB

8KB

64KB

512KB

2MB

4MB

32MB

256MB

UltraSPARC IIICu

u2713.gif

u2713.gif

u2713.gif

u2713.gif

UltraSPARC IV

u2713.gif

u2713.gif

u2713.gif

u2713.gif

UltraSPARC IV+

u2713.gif

u2713.gif

u2713.gif

u2713.gif

u2713.gif

u2713.gif

UltraSPARC T1

u2713.gif

u2713.gif

u2713.gif

u2713.gif

UltraSPARC T2

u2713.gif

u2713.gif

u2713.gif

u2713.gif

SPARC64 VI

u2713.gif

u2713.gif

u2713.gif

u2713.gif

u2713.gif

u2713.gif

x64

u2713.gif

u2713.gif

4.2.7 Reporting a Summary of SPARC Hardware Characteristics (fpversion)

fpversion is a tool that ships with the SPARC compiler and is not available on x86 architectures. The tool will output a summary of the processor's capabilities. The most important part of the output from fpversion is that it displays the options the compiler will use when it is told to optimize for the native platform (see -xtarget=native in Section 5.6.4 of Chapter 5).

Example 4.10 shows output from fpversion from an UltraSPARC IIICu-based system.

Example 4.10. Output from fpversion on an UltraSPARC IIICu Based System

$ fpversion
 A SPARC-based CPU is available.
 Kernel says CPU's clock rate is 1050.0 MHz.
 Kernel says main memory's clock rate is 150.0 MHz.

 Sun-4 floating-point controller version 0 found.
 An UltraSPARC chip is available.

 Use "-xtarget=ultra3cu -xcache=64/32/4:8192/512/2" code-generation option.

 Hostid = 0x83xxxxxx.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020