ADDED utils/Makefile.whodunit Index: utils/Makefile.whodunit ================================================================== --- /dev/null +++ utils/Makefile.whodunit @@ -0,0 +1,9 @@ +.DEFAULT : all + +all : whodunit + +clean : + rm whodunit + +whodunit : + csc -static -L -static -L -lm -L -ldl -L -lpthread -L -lssl -L -lcrypto -L -lz whodunit.scm -o whodunit Index: utils/whodunit.scm ================================================================== --- utils/whodunit.scm +++ utils/whodunit.scm @@ -13,17 +13,24 @@ ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with Megatest. If not, see . ;; - (module whodunit * -(import scheme chicken data-structures extras) -(use posix srfi-69) + +(import + (chicken process-context) + (chicken process) + (chicken string) + (chicken sort) + (chicken io) + srfi-69 + scheme +) (define *numsamples* (or (and (> (length (argv)) 1) (string->number (cadr (argv)))) 3)) @@ -55,11 +62,11 @@ (cpu (list-ref indat 8))) (hash-table-set! ht usr (+ cpu (hash-table-ref/default ht usr 0))))) data)) ) -(import whodunit) +(import whodunit srfi-69 (chicken sort)) (print "Getting " *numsamples* " samples of cpu usage data.") (define data (cleanup-data (topdata))) (define pidhash (make-hash-table)) (define userhash (make-hash-table))