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