JDK-8204107 : Add -XshowSettings:system option to display system configuration
  • Type: CSR
  • Component: tools
  • Sub-Component: launcher
  • Priority: P3
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 11
  • Submitted: 2018-05-30
  • Updated: 2018-06-06
  • Resolved: 2018-06-06
Related Reports
CSR :  
Description
Summary
-------

A new -XshowSettings:system suboption has been added to display the system or container configuration.  This option is only available on Linux systems.

Problem
-------

A new jdk.internal.platform API has been introduced in JDK11 that allows the JDK to have access to Linux container or host configuration.  This API will most likely be used by tools such as JMX or JFR but It would also be a useful diagnostic tool to allow the -XshowSettings to present the config data to end users.  

Solution
--------

Add a "system" suboption to -XshowSettings that will dump the system configuration data to stdout.

Specification
-------------

         -XshowSettings:system
                           (Linux Only) show host system or container
                           configuration and continue
    
    On non Linux systems, this suboption will be ignored and all available
    settings will be printed.  This suboption may be supported on non-Linux
    systems when the jdk.internal.platform API implementation support is
    added.
        
      
            The output generated is an implementation detail.  Here is a sample of what 
            might be provided:
            
            Operating System Metrics:
                Provider: cgroupv1
                Effective CPU Count: 24
                CPU Period: 100000
                CPU Quota: -1
                CPU Shares: -1
                List of Processors, 24 total: 
                0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
                List of Effective Processors, 24 total: 
                0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
                List of Memory Nodes, 2 total: 
                0 1 
                List of Available Memory Nodes, 2 total: 
                0 1 
                CPUSet Memory Pressure Enabled: false
                Memory Limit: Unlimited
                Memory Soft Limit: Unlimited
                Memory & Swap Limit: Unlimited
                Kernel Memory Limit: Unlimited
                TCP Memory Limit: 2048.00T
                Out Of Memory Killer Enabled: true
     
Comments
Moving to Approved.
06-06-2018