Just killing the offensive process made my little old thinkpad come back to normal temperature.
Then, to make sure it doesn't happen again, I wrote a little elisp script to warn me in case my lappy is warming beyond acceptable limits. Or even kill chromium-browser in case the temperature is >95C.
So here's the code. Checking the temperature of the cpu, and acting if needed.
;;; raimonster@gmail.com ; The array returned by battery-statys-function => '((99 . "25330") (76 . "on-line") (100 . "54") (114 . "0 mW") (66 . "charged") (98 . "") (104 . "0") (109 . "0") (116 . "0:00") (112 . "97")) (defun rgc-check-for-hotness () (interactive) (let ((temp (string-to-number (cdr (assq (string-to-char "d") (and battery-status-function (funcall battery-status-function))))))) (cond ((> temp 95) (async-shell-command "killall -9 chromium-browser")) ((> temp 75) (message "FUCK! I'M HOT")) (t (message "ok, no problemo"))))) (defvar rgc-hot-timer nil "timer") (defun rgc-hot-hot-hot () (interactive) (setq rgc-hot-timer (run-at-time nil (* 60 5) 'rgc-check-for-hotness))) (defun rgc-stop-hot-checker () (interactive) (cancel-timer rgc-hot-timer))As always in this blog, no rocket science, but (hopefully) useful bits of elisp.
2 comentarios:
em donen ganes de tornar a instal·lar l'emax xD
Hahah! ja ho saps! aqui tens un colega de lisps!
Salut!
Publicar un comentario