Пример #1
0
Файл: utils.py Проект: hdd/drQt
def get_all_slaves():
    computer_list = drqueue.request_computer_list(drqueue.CLIENT)
    return computer_list
Пример #2
0
#!/usr/bin/python2.6

import drqueue.base.libdrqueue as drqueue
from baseprocess import daemonization
import time

daemonization()

while 1:
    try:
        for client in drqueue.request_computer_list(drqueue.CLIENT):
            client.add_pool('mentalray', 0)
    except Exception:
        pass

    time.sleep(60)
Пример #3
0
    'C04-12',
    'C04-13',
    'C04-14',
    'C04-15',
    'C04-16',
    'C05-01',
    'C05-02',
    'C05-03',
    'C05-04',
    'C05-05',
    'C05-06',
    'C05-07',
    'C05-08',
    'C05-09',
    'C05-10',
    'C05-11',
    'C05-12',
    'C05-13',
    'C05-14',
    'C05-15',
    'C05-16',
]

import drqueue.base.libdrqueue as drqueue
import socket

print[
    socket.gethostbyname(c) for c in set(COMPARISON_LIST) -
    set([i.hwinfo.name for i in drqueue.request_computer_list(drqueue.CLIENT)])
]
Пример #4
0
#!/usr/bin/env python

import sys
import drqueue.base.libdrqueue as drqueue

index = int(sys.argv[1])
computer = drqueue.request_computer_list(drqueue.CLIENT)[index]
print computer.hwinfo.ncpus
Пример #5
0
#!/usr/bin/env python

import sys
import drqueue.base.libdrqueue as drqueue

osMap = {2: 'Linux', 3: 'Windows'}
index = int(sys.argv[1])
computer = drqueue.request_computer_list(drqueue.CLIENT)[index]
print osMap[computer.hwinfo.os]
Пример #6
0
# find out username
username = os.getlogin()


## TEST 1: request_computer_list()

# determine number of shared memory segments before running the test
p1 = subprocess.Popen(["ipcs", "-m"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["grep", username], stdin=p1.stdout, stdout=subprocess.PIPE)
p3 = subprocess.Popen(["wc", "-l"], stdin=p2.stdout, stdout=subprocess.PIPE)
numshm = int(p3.communicate()[0])

for x in range(10):
	# get list of slaves
	slaves = drqueue.request_computer_list(drqueue.CLIENT)
	#print slaves
	
# destroy object
slaves = 0

# determine number of shared memory segments again
p1 = subprocess.Popen(["ipcs", "-m"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["grep", username], stdin=p1.stdout, stdout=subprocess.PIPE)
p3 = subprocess.Popen(["wc", "-l"], stdin=p2.stdout, stdout=subprocess.PIPE)
shmnew = int(p3.communicate()[0])

print("TEST 1: request_computer_list()\nOld number of SHM segments: "+str(numshm)+"\nNew number of SHM segments: "+str(shmnew)+"\n")

# test if memory was leaked
if shmnew > numshm:
Пример #7
0
COMPARISON_LIST = [
    'C01-01', 'C01-02', 'C01-03', 'C01-04',
    'C01-05', 'C01-06', 'C01-07', 'C01-08',
    'C01-09', 'c01-10', 'c01-11', 'c01-12',
    'C01-13', 'c01-14', 'c01-15', 'c01-16',
    'C02-01', 'C02-02', 'C02-03', 'C02-04',
    'C02-05', 'C02-06', 'C02-07', 'C02-08',
    'C02-09', 'C02-10', 'C02-11', 'C02-12',
    'C02-13', 'C02-14', 'C02-15', 'C02-16',
    'C03-01', 'C03-02', 'C03-03', 'C03-04',
    'C03-05', 'C03-06', 'C03-07', 'C03-08',
    'C03-09', 'C03-10', 'C03-11', 'C03-12',
    'C03-13', 'C03-14', 'C03-15', 'C03-16',
    'C04-01', 'C04-02', 'C04-03', 'C04-04',
    'C04-05', 'C04-06', 'C04-07', 'C04-08',
    'C04-09', 'C04-10', 'C04-11', 'C04-12',
    'C04-13', 'C04-14', 'C04-15', 'C04-16',
    'C05-01', 'C05-02', 'C05-03', 'C05-04',
    'C05-05', 'C05-06', 'C05-07', 'C05-08',
    'C05-09', 'C05-10', 'C05-11', 'C05-12',
    'C05-13', 'C05-14', 'C05-15', 'C05-16',]

import drqueue.base.libdrqueue as drqueue
import socket

print [socket.gethostbyname(c) for c in
    set(COMPARISON_LIST) - set([i.hwinfo.name for i in
    drqueue.request_computer_list(drqueue.CLIENT)])]
Пример #8
0
#!/usr/bin/env python

import sys
import drqueue.base.libdrqueue as drqueue

computer_icomp = int(sys.argv[1])
computer = drqueue.request_computer_list(drqueue.CLIENT)[computer_icomp]
print computer.hwinfo.name
Пример #9
0
#!/usr/bin/python2.6

import drqueue.base.libdrqueue as drqueue

drqueue.request_computer_list(drqueue.CLIENT)[0].remove_pool('mentalray', 0)
Пример #10
0
# find out username
username = os.getlogin()

## TEST 1: request_computer_list()

# determine number of shared memory segments before running the test
p1 = subprocess.Popen(["ipcs", "-m"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["grep", username],
                      stdin=p1.stdout,
                      stdout=subprocess.PIPE)
p3 = subprocess.Popen(["wc", "-l"], stdin=p2.stdout, stdout=subprocess.PIPE)
numshm = int(p3.communicate()[0])

for x in range(10):
    # get list of slaves
    slaves = drqueue.request_computer_list(drqueue.CLIENT)
    #print slaves

# destroy object
slaves = 0

# determine number of shared memory segments again
p1 = subprocess.Popen(["ipcs", "-m"], stdout=subprocess.PIPE)
p2 = subprocess.Popen(["grep", username],
                      stdin=p1.stdout,
                      stdout=subprocess.PIPE)
p3 = subprocess.Popen(["wc", "-l"], stdin=p2.stdout, stdout=subprocess.PIPE)
shmnew = int(p3.communicate()[0])

print("TEST 1: request_computer_list()\nOld number of SHM segments: " +
      str(numshm) + "\nNew number of SHM segments: " + str(shmnew) + "\n")