14

In Jenkins when clicking on Build Executor Status I can only see free disk space related statistics (URI: /computer). How I can monitor free system memory (RAM) in Jenkins?

I'm asking, because sometimes when I had too many executors (despite having swap space configured, but not the one below), Jenkins was freezing or crashing a lot.

Jenkins at /computer - Name, Architecture, Clock Difference, Free Disk Space, Free Swap Space, Free Temp Space, Response Time

030
  • 13,383
  • 17
  • 76
  • 178
kenorb
  • 8,011
  • 14
  • 43
  • 80

2 Answers2

10

Have a look at the Monitoring plugin. Here are some more details about it (from the linked page):

  • Charts of memory, cpu, system load average, http response times by day, week, month, year or custom period
  • Statistics of http requests with mean response times, mean cpu times, mean response size by request and by day, week, month, year or custom period
  • Errors and logs
  • Current http requests
  • Threads
  • Heap histogram (instances and sizes by class)
  • Http sessions
  • Process list of OS
  • MBeans
  • Actions for GC, heap dump and invalidate session(s)
  • Report in html or pdf
  • In English, German, French, Portuguese or Chinese
  • Jenkins security
  • For Jenkins nodes (slaves in general):
    • The report for the nodes is available at http://yourhost/monitoring/nodes
    • Charts aggregated for all nodes of memory, cpu, system load average, number of running builds, build queue length, build times by period
    • Detailed statistics of the build times and of the build steps by period
    • Threads, process list and MBeans for each nodes
    • Heap histogram aggregated for all nodes
  • For each individual node (each node in http://yourhost/computer), reports and actions are available from the "Monitoring" page in the contextual menu or in the detail of the node:
    • Threads, process list, MBeans of that node only
    • Heap histogram of that node
    • Actions for GC, heap dump
  • And more...

Credits: Assaf Lavie (who first mentioned it in a comment, but for some reason didn't post that as an actual answer ...).

Pierre.Vriens
  • 7,225
  • 14
  • 39
  • 84
5

As for workaround, the actual memory can be checked by invoking Groovy commands directly in Script Console (at /computer/(master)/script). Example command:

println "free -m".execute().text
kenorb
  • 8,011
  • 14
  • 43
  • 80