Wednesday, May 11, 2016

cpu stress test 'cli'


stressing cpu:


** python

#!/usr/bin/python
import multiprocessing
def burn(x):  
    while 1: 1
pool = multiprocessing.Pool(multiprocessing.cpu_count())  

pool.map(burn, range(multiprocessing.cpu_count()))  


** bash

#!/bin/sh

while [ 1 ] ; do  

echo $((13**99)) 1>/dev/null 2>&1
done

No comments:

Post a Comment