Intel VCA1283LVV Hardware User's Manual page 27

Visual compute accelerator
Table of Contents

Advertisement

Intel® Visual Compute Accelerator Product Specification and Hardware User's Guide
#!/usr/bin/python
import time
import random
import subprocess
import sys
import re
import math
from subprocess import call
# will hang if program never exits
def runProcess(exe):
p = subprocess.Popen(exe,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
out,err = p.communicate();
if (p.returncode>0):
print "Error: Check to ensure vcatl and ipmitool is installed and ipmi service is running"
exit()
return out
def getTemperature():
maxTemp=0
maxTempNode=""
output = runProcess("vcactrl temp".split())
it = re.finditer(r"Card\s*\d{1,2}\s*Cpu\s*\d{1,2}",output)
for match in it:
it2 = re.search(r"Physical id \d{1,2}:\s*\+\d{1,3}",output[match.start():])
if it2:
int_list = [int(s) for s in re.findall('\\d+',it2.group())]
if len(int_list)==2 and int_list[1]>maxTemp:
maxTemp=int_list[1]
maxTempNode=match.group()
print "Highest temperature is",maxTemp,"on node",maxTempNode
21

Advertisement

Table of Contents
loading

Table of Contents