monitors:cpu-load-calc

Error loading plugin struct
ParseError: syntax error, unexpected 'fn' (T_STRING), expecting :: (T_PAAMAYIM_NEKUDOTAYIM)
More info is available in the error log.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
monitors:cpu-load-calc [2016/12/28 15:45] – [Installation] dozormonitors:cpu-load-calc [2018/05/22 15:05] (current) – [Changelog] dozor
Line 56: Line 56:
 # Description: Calculate a xymon client's cpu load (Run on Xymon Server periodically with cron) # Description: Calculate a xymon client's cpu load (Run on Xymon Server periodically with cron)
 # Dependency: Requires 'bc' package # Dependency: Requires 'bc' package
 +# Last Change: 2018-05-22
 +# Recent Changes:-Updated awk search to look for [nproc] at the beginning of the line
  
 #======================= #=======================
Line 190: Line 192:
  
   # Get the number of procs reported from node's most recent host data file   # Get the number of procs reported from node's most recent host data file
-  node_num_procs="$(cat ${xymon_hostdata_dir}/${node}/$(ls -tr ${xymon_hostdata_dir}/${node}/ | tail -1) | awk '/nproc/ { getline; print }')"+  node_num_procs="$(cat ${xymon_hostdata_dir}/${node}/$(ls -tr ${xymon_hostdata_dir}/${node}/ | tail -1) | awk '/^\[nproc]/ { getline; print }')"
      
   # If node_num_procs is empty or not a number, move to the next node   # If node_num_procs is empty or not a number, move to the next node
Line 228: Line 230:
 ===== Known Bugs and Issues ===== ===== Known Bugs and Issues =====
  
 +  * Enterprise Linux 5 does not report number of procs in hostdata. Those systems will need to be set manually in analysis.cfg files.
 ===== To Do ===== ===== To Do =====
  
Line 234: Line 237:
 ===== Changelog ===== ===== Changelog =====
  
 +  * **2018-05-22**
 +    * Updated awk search to look for [nproc] at the beginning of the line.
   * **2016-12-28**   * **2016-12-28**
     * Added green status in force_hostdata function to improve refresh logic.     * Added green status in force_hostdata function to improve refresh logic.
  • monitors/cpu-load-calc.txt
  • Last modified: 2018/05/22 15:05
  • by dozor