1. Kill the task cmd2="taskkill /F /IM typeperf.exe"stdout2=%x{#{cmd2}} 2. Start counters: cmd="typeperf -cfc:\test.txt>c:\test3.csv" 3. Get system info: require "sys/cpu" include Sys CPU.processors{ |cs| cs.members.each{ |m| puts "#{m}: " + cs[m].to_s } } puts "CPU Speed (Frequency): " +CPU.freq(0).to_s puts "Load avg: " +CPU.load_avg.to_s puts "Num CPU: " + CPU.num_cpu.to_s puts "Type: " + CPU.type puts "Model: " + CPU.model puts "Architecture: " +CPU.architecture