Differences

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

Link to this comparison view

Both sides previous revision Previous revision
sdk:monitor-system-load [2016/08/01 15:39]
juraschek
sdk:monitor-system-load [2016/09/13 14:21] (current)
juraschek
Line 16: Line 16:
   s = sysinfo();   s = sysinfo();
   if (s.loads[0] > 1.0 * CPUCORES)   if (s.loads[0] > 1.0 * CPUCORES)
-    nb_syslog("​Warning:​ system load last minute above %3.1f percent",​ 100 * s.loads[0] / CPUCORES);+    nb_syslog("​Warning:​ system load last minute above %3.2f percent",​ 100 * s.loads[0] / CPUCORES);
   if (s.loads[1] > 0.7 * CPUCORES)   if (s.loads[1] > 0.7 * CPUCORES)
-    nb_syslog("​Warning:​ system load last 5 minutes above %3.1f percent",​ 100 * s.loads[1] / CPUCORES);+    nb_syslog("​Warning:​ system load last 5 minutes above %3.2f percent",​ 100 * s.loads[1] / CPUCORES);
   if (s.loads[2] > 0.7 * CPUCORES)   if (s.loads[2] > 0.7 * CPUCORES)
-    nb_syslog("​Warning:​ system load last 15 minutes above %3.1f percent",​ 100 * s.loads[2] / CPUCORES);+    nb_syslog("​Warning:​ system load last 15 minutes above %3.2f percent",​ 100 * s.loads[2] / CPUCORES);
   sleep(60);   sleep(60);
 } }
 </​code>​ </​code>​