![Intel VCA1283LVV Hardware User'S Manual Download Page 27](http://html1.mh-extra.com/html/intel/vca1283lvv/vca1283lvv_hardware-users-manual_2073493027.webp)
Intel® Visual Compute Accelerator Product Specification and Hardware User’s Guide
21
#!/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
Summary of Contents for VCA1283LVV
Page 2: ......