Open your jenkins instance script console http://yourJenkins:port/script following is an example for how to get information about this instance. copy the code to the console and click "Run".
/* This scripts shows how to get basic information about Jenkins instance */
def jenkins = Jenkins.getInstance()
println "Jenkins version: ${jenkins.getVersion()}"
println "Available JDKs: ${jenkins.getInstance().getJDKs()}"
println "Connected Nodes:"
jenkins.getNodes().each{
println it.displayName
}
println "Configured labels: ${jenkins.getLabels()}"
In this example you will see information about the Jenkins version, JDKs, agents(slaves) and labels.