Megatest

Diff
Login

Differences From Artifact [e3a13b4dea]:

To Artifact [b89a44911d]:


1747
1748
1749
1750
1751
1752
1753











1754
1755
1756
1757
1758
1759
1760
      (begin
	(debug:print-error 0 *default-log-port* "command \"/bin/readlink -f " path "\" failed. exn=" exn)
	path) ;; just give up
    (with-input-from-pipe
	(conc "/bin/readlink -f " path)
      (lambda ()
	(read-line)))))












(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)







>
>
>
>
>
>
>
>
>
>
>







1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
      (begin
	(debug:print-error 0 *default-log-port* "command \"/bin/readlink -f " path "\" failed. exn=" exn)
	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)