cpu gpu温度显示,监测显卡和cpu温度的软件

  cpu gpu温度显示,监测显卡和cpu温度的软件

  实验室电脑原来的1080训练椰子树数据集时烧坏了,搞了2周终于放弃治疗,返厂维修。同时换了一台全音阶的第七音继续跑,为了随时监控1080蒂的温度,我用计算机编程语言写了一个实时监控国家政治保卫局。参见国家政治保卫局温度的脚本,分享如下。

  # !/usr/彩色的爆米花/python #-*-编码:utf-8-*-导入时间导入OS,shutilimport smtplibfrom email。哑剧。文本导入mime文本导入datetime pause=100 mailto _ list=[ zcy 0016 @ 163。com ]mail _ host= SMTP。163 .com mail _ user= GPU _ Monitor #发送警报的邮箱mail_pass=自己注册一个吧老哥们,简单的一比吊糟,记得开启三偏磷酸钠服务,设置三偏磷酸钠密码 #不是登录密码,是三偏磷酸钠密码mail _ postfix= 163。com def send _ email(To _ list,sub,content):me= GPU Auto Monitor mail _ user @ mail _ postfix msg=mime text(content,_ subtype= plain )msg[ Subject ]=sub msg[ From ]=me msg[ To ]=;加入(至列表)#将收件人列表以;分隔try: server=smtplib .SMTP() server.connect(邮件主机)#连接服务器server.login(邮件用户,邮件通行证)#登录操作server.sendmail(me,to_list,msg.as_string()) server.close()返回真异常:打印(发送错误!)return false def get _ GPU _ tem():shell _ str= tem _ line= NVIDIA-SMI grep % tem 1= echo $ tem _ line cut-d C-f 1 ` te m2= echo $ te m1 cut-d %-f 2 echo $ tem 2 result=OS。popen(shell _ str)result _ str=result。read()tem _ str=result。拆分( n )[0]结果。close()返回float(tem _ str)while(True):trystrftime( % Y-% M-% d % H:% M:% S )warning _ str=now time 当前温度为str(tem_num)!print(Warning _ str)send _ email(mailto _ list, GPU Warning!warning _ str)print( send over )finally:time。睡眠(暂停)

cpu gpu温度显示,监测显卡和cpu温度的软件