Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-59197

support-core should report available processes for master

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • support-core-plugin
    • None

      Proposing putting this in about.md under the "Operating system" section

      https://github.com/jenkinsci/support-core-plugin/blob/a4b4c63641619602510966ce9821f3b434b3755d/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java#L399

       

      Name it "Available Processors"

      We should we able to query to runtime:
      Runtime.getRuntime().availableProcessors()

          [JENKINS-59197] support-core should report available processes for master

          Owen Wood added a comment - We already have  https://github.com/jenkinsci/support-core-plugin/blob/master/src/main/java/com/cloudbees/jenkins/support/impl/SystemConfiguration.java#L100

          Could be useful when Jenkins is running in docker (or a containerized platform such as k8s, mesos). Since the Runtime.getRuntime().availableProcessors() would reflect the CPU limit while nproc reflects the number of CPUs o the host.

          Allan BURDAJEWICZ added a comment - Could be useful when Jenkins is running in docker (or a containerized platform such as k8s, mesos). Since the Runtime.getRuntime().availableProcessors() would reflect the CPU limit while nproc reflects the number of CPUs o the host.

          Owen Wood added a comment -

          Reopening as the info pulled from /proc/cpuinfo seems to reflect the host. Which may not accurately reflect the allocated processes if running Jenkins in a container (Docker).

          Owen Wood added a comment - Reopening as the info pulled from /proc/cpuinfo seems to reflect the host. Which may not accurately reflect the allocated processes if running Jenkins in a container (Docker).

          Owen Wood added a comment -

          Owen Wood added a comment - I think it makes more sense to place this under the "Java" section https://github.com/jenkinsci/support-core-plugin/blob/a4b4c63641619602510966ce9821f3b434b3755d/src/main/java/com/cloudbees/jenkins/support/impl/AboutJenkins.java#L335  as we are looking at the Java Runtime.

          Owen Wood added a comment -

          Naming it "Available CPUs:" to fit in with the existing formatting.

          Owen Wood added a comment - Naming it "Available CPUs:" to fit in with the existing formatting.

          Owen Wood added a comment -

          Owen Wood added a comment - https://github.com/jenkinsci/support-core-plugin/pull/187

          Owen Wood added a comment - - edited

          Owen Wood added a comment - - edited Released as 2.61 -  https://github.com/jenkinsci/support-core-plugin/tree/support-core-2.61

            owood Owen Wood
            owood Owen Wood
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: