Пример #1
0
def setupCPUs():
    cpus    = detectCPUs() 
    cpulist = []
    
    #print "[+] This machine has %d CPUs" %cpus
    for i in range(0,cpus):
        cpufreq = pycpufreq.pycpufreq(cpu = i)
        cpufreq.status()
        cpulist.append(cpufreq)
    
    return cpulist
Пример #2
0
def setupCPUs():
    cpus = detectCPUs()
    cpulist = []

    #print "[+] This machine has %d CPUs" %cpus
    for i in range(0, cpus):
        cpufreq = pycpufreq.pycpufreq(cpu=i)
        cpufreq.status()
        cpulist.append(cpufreq)

    return cpulist
Пример #3
0
def setCPUspeed(options):
    for i in range(0, 8):
        cpufreq = pycpufreq.pycpufreq(cpu=i)
        cpufreq.status()
        #print cpufreq.dump()
       
        if not amIRoot():
            print "[-] You need to be root to change frequency!"
            sys.exit(1)

        if options.cpuspeed == "max":
            print "[+] Setting CPU:%d maximum CPU speed:%s" %(i,cpufreq.speed_max)
            cpufreq.setspeed(cpuspeedy.SPEED_MAX(cpufreq.speed_max))
        elif options.cpuspeed == "min":
            print "[+] Setting CPU:%d minimum CPU speed:%s" %(i,cpufreq.speed_min)
            cpufreq.setspeed(cpuspeedy.SPEED_MIN(cpufreq.speed_min))
Пример #4
0
def setCPUspeed(options):
    for i in range(0, 8):
        cpufreq = pycpufreq.pycpufreq(cpu=i)
        cpufreq.status()
        #print cpufreq.dump()

        if not amIRoot():
            print "[-] You need to be root to change frequency!"
            sys.exit(1)

        if options.cpuspeed == "max":
            print "[+] Setting CPU:%d maximum CPU speed:%s" % (
                i, cpufreq.speed_max)
            cpufreq.setspeed(cpuspeedy.SPEED_MAX(cpufreq.speed_max))
        elif options.cpuspeed == "min":
            print "[+] Setting CPU:%d minimum CPU speed:%s" % (
                i, cpufreq.speed_min)
            cpufreq.setspeed(cpuspeedy.SPEED_MIN(cpufreq.speed_min))