Megatest

Check-in [85b652d5a1]
Login
Overview
Comment:Added get-intercept and get-delay functions for load monitoring ==/FAIL/orion,zeus/==
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.65
Files: files | file ages | folders
SHA1: 85b652d5a1bb45d876a4c7639b00af3ff909dde7
User & Date: jmoon18 on 2020-08-25 15:08:25
Original Comment: Added get-intercept and get-delay functions for load monitoring
Other Links: branch diff | manifest | tags
Context
2020-09-28
11:25
Moved up to 85b652 ==/3.39/1.0/PASS/1203/orion/== ==/10.9/1.0/WARN/1202/== check-in: 6e90915f98 user: mrwellan tags: v1.6564-refactor
2020-09-05
11:17
Merged cleanup branch back to v1.65 ==9.4/2.2/1201/WARN/mars== check-in: 0cbf1a0b26 user: matt tags: v1.65
2020-08-25
15:54
Merged v1.65 with get-intercept and get-delay ==/8.7/1.0/WARN/1201/mars/== check-in: b0705815be user: mrwellan tags: v1.65-cleanup
15:08
Added get-intercept and get-delay functions for load monitoring ==/FAIL/orion,zeus/== check-in: 85b652d5a1 user: jmoon18 tags: v1.65
2020-08-24
17:12
Fixes for genexample ==6.6/1.1/1201/WARN/mars== check-in: 0c2987faad user: jmoon18 tags: v1.65
Changes

Modified common.scm from [af38f0fd65] to [c880298bb2].

1702
1703
1704
1705
1706
1707
1708











1709
1710
1711
1712
1713
1714
1715
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726







+
+
+
+
+
+
+
+
+
+
+







      (begin
	(debug:print-error 0 *default-log-port* "command \"/bin/readlink -f " path "\" failed.")
	path) ;; just give up
    (with-input-from-pipe
	(conc "/bin/readlink -f " path)
      (lambda ()
	(read-line)))))

(define (common:get-intercept onemin fivemin)
  (let* ((load-change (- onemin fivemin))
         (tchange     (- 300 60)))
  (max (+ onemin (* 60 (/ load-change tchange)))0))
)

(define (common:get-delay load-in numcpus)
  (max (/ (expt 5 (* 4 (/ load-in numcpus))) 10) 0)
)


(define (get-cpu-load #!key (remote-host #f))
  (car (common:get-cpu-load remote-host)))
;;   (let* ((load-res (process:cmd-run->list "uptime"))
;; 	 (load-rx  (regexp "load average:\\s+(\\d+)"))
;; 	 (cpu-load #f))
;;     (for-each (lambda (l)