Module: DockDriver::Template::Linux
- Included in:
- DockDriver::Template
- Defined in:
- lib/dock_driver/template/linux.rb
Overview
Adds network-related methods to the DockDriver::Template DSL.
Since I’m using a bit of metaprogramming, here’s a list of DSL methods that this module brings to the template:
- loadavg_one
-
1 minute load average
- loadavg_five
-
minute load average
- loadavg_fifteen
-
15 minute load average
- loadavg_running
-
otal number of running processes
- loadavg_total
-
total number of processes
- loadavg_last_pid
-
last running process id
Example:
<%= loadavg_one %> => 1.61
Constant Summary collapse
- LOADAVG_PATH =
Path to load stats. (procfs)
'/proc/loadavg'- LOADAVG_KEYS =
Map of column names for the load stats.
[ :one, :five, :fifteen, :running, :total, :last_pid ]