I'm sponsoring this fast-track for Menno Lageman.

Thanks,
Jerry

Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
         prctl usage output
    1.2. Name of Document Author/Supplier:
         Author:  Menno Lageman
    1.3  Date of This Document:
        13 July, 2009
4. Technical Description
   Summary

   This case proposes to enhance the output format of prctl(1M) defined by
   PSARC 2004/183[1] to include the current resource usage.  Patch binding
   is requested.

   Description

   The prctl(1M) utility currently displays the configured resource limits
   for resource controls but does not offer the administrator a simple way
   to observe the current usage of a resource control.  The resource control
   subsystem provides an optional callback mechanism for resource controls
   to export their current usage.  This callback is invoked by getrctl(2) when
   passed the RCTL_USAGE flag.

   This case will modify prctl(1M)[2] to retrieve the current resource usage
   using getrctl(2) and display the usage on a separate line if resource
   usage is available for that resource control:

   # prctl -i zone global
   zone: 0: global
   NAME    PRIVILEGE       VALUE    FLAG   ACTION               RECIPIENT
   zone.max-swap
           usage            469MB   
           system          16.0EB    max   deny                         -
   zone.max-locked-memory
           usage               0B   
           system          16.0EB    max   deny                         -
   zone.max-shm-memory
           system          16.0EB    max   deny                         -
   zone.max-shm-ids
           system          16.8M     max   deny                         -
   zone.max-sem-ids
           system          16.8M     max   deny                         -
   zone.max-msg-ids
           system          16.8M     max   deny                         -
   zone.max-lwps
           usage             282    
           system          2.15G     max   deny                         -
   zone.cpu-cap
           usage               0   
           system          4.29G     inf   deny                         -
   zone.cpu-shares
           usage               1    
           privileged          1       -   none                         -
           system          65.5K     max   none                         -

   The parseable ouput emitted by the -P option will be changed to include
   an additional line for the usage (if available for the resource control):

   # prctl -P -i zone global
   zone: 0: global
   zone.max-swap usage 491675648 - - -
   zone.max-swap system 18446744073709551615 max deny -
   zone.max-locked-memory usage 0 - - -
   zone.max-locked-memory system 18446744073709551615 max deny -
   zone.max-shm-memory system 18446744073709551615 max deny -
   zone.max-shm-ids system 16777216 max deny -
   zone.max-sem-ids system 16777216 max deny -
   zone.max-msg-ids system 16777216 max deny -
   zone.max-lwps usage 284 - - -
   zone.max-lwps system 2147483647 max deny -
   zone.cpu-cap usage 0 - - -
   zone.cpu-cap system 4294967295 inf deny -
   zone.cpu-shares usage 1 - - -
   zone.cpu-shares privileged 1 - none -
   zone.cpu-shares system 65535 max none -

   Interface Stability

   Human-readable output        Uncommitted
   Parseable output             Committed

   References

   [1] PSARC 2004/183 Resource control and projects enhancements
   [2] 6855557 prctl(1M) should show resource control usage
       http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6855557



6. Resources and Schedule
    6.4. Steering Committee requested information
        6.4.1. Consolidation C-team Name:
                on
    6.5. ARC review type: FastTrack
    6.6. ARC Exposure: open


Reply via email to