57 Star 255 Fork 123

GVPopenEuler / A-Tune

 / 详情

VMware中anlysis采集数据失败

Done
Bug
Opened this issue  
2021-08-27 21:57

【环境信息】
硬件信息:
虚拟机版本:VMware® Workstation 14 Pro
内存:1GB
硬盘:20GB
处理器:1
软件信息:
系统版本:openEuler-20.03-LTS-x86_64
【问题复现步骤】
通过下载代码并编译
使用systemctl启动atuned和atune-engine服务,输入atune-adm analysis
【实际结果】
在收集CPU和内存数据时报错退出
【附件信息】
输入图片说明
输入图片说明

Comments (11)

Hey grjadusheye-nasha-ctranei, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at
https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md.
If you have any questions, please contact the SIG: A-Tune, and any of the maintainers: @hanxinke , @Monday , @smileknife , @谢志鹏 , @MarsChan .

Expand operation logs

@Grjadusheye nasha ctranei 您好,请问是否能提供完整日志呢,可以尝试cat /var/log/messages | grep atune命令获取,或补全systemctl status atuned的后半截报错,谢谢!

同时,请确认cpu型号,analysis功能需读取cpu相关信息,目前仅支持在鲲鹏920处理器上使用。除collection和analysis外的功能不受影响。

截图
输入图片说明
文本:
Aug 28 15:58:18 localhost [/bin/bash]: [systemctl status atune-engine] return code=[0], execute success by [root(uid=0)] from [pts/0 (192.168.75.1)]
Aug 28 15:58:25 localhost atuned[8352]: time="2021-08-28T15:58:25+08:00" level=info msg="tuning collector body is &{[{CPU STAT --interval=5; --fields=usr --fields=nice --fields=sys --fields=iowait --fields=irq --fields=soft --fields=steal --fields=guest --threshold=30 --fields=util --fields=cutil} {STORAGE STAT --interval=5;--device=sda --fields=rs --fields=ws --fields=rMBs --fields=wMBs --fields=rrqm --fields=wrqm --fields=rareq-sz --fields=wareq-sz --fields=r_await --fields=w_await --fields=util --fields=aqu-sz} {NET STAT --interval=5;--nic=ens33 --fields=rxkBs --fields=txkBs --fields=rxpcks --fields=txpcks --fields=ifutil} {NET ESTAT --interval=5;--nic=ens33 --fields=errs --fields=util} {MEM BANDWIDTH --interval=5;--fields=Total_Util} {PERF STAT --interval=5;--fields=IPC --fields=CACHE-MISS-RATIO --fields=MPKI --fields=ITLB-LOAD-MISS-RATIO --fields=DTLB-LOAD-MISS-RATIO --fields=SBPI --fields=SBPC} {MEM VMSTAT --interval=5;--fields=procs.b --fields=memory.swpd --fields=io.bo --fields=system.in --fields=system.cs --fields=util.swap --fields=util.cpu --fields=procs.r} {SYS TASKS --interval=5;--fields=procs --fields=cswchs} {SYS LDAVG --interval=5;--fields=runq-sz --fields=plist-sz --fields=ldavg-1 --fields=ldavg-5} {SYS FDUTIL --interval=5;--fields=fd-util}] 20 /run/1630137505 /run/atuned/test.csv }" file="profile.go:1418"
Aug 28 15:58:25 localhost atuned[8360]: 2021-08-28 15:58:25,317 [INFO] collector [/usr/libexec/atuned/analysis/../analysis/atuned/collector.py:40] : {'sample_num': 20, 'monitors': [{'module': 'CPU', 'purpose': 'STAT', 'field': '--interval=5; --fields=usr --fields=nice --fields=sys --fields=iowait --fields=irq --fields=soft --fields=steal --fields=guest --threshold=30 --fields=util --fields=cutil'}, {'module': 'STORAGE', 'purpose': 'STAT', 'field': '--interval=5;--device=sda --fields=rs --fields=ws --fields=rMBs --fields=wMBs --fields=rrqm --fields=wrqm --fields=rareq-sz --fields=wareq-sz --fields=r_await --fields=w_await --fields=util --fields=aqu-sz'}, {'module': 'NET', 'purpose': 'STAT', 'field': '--interval=5;--nic=ens33 --fields=rxkBs --fields=txkBs --fields=rxpcks --fields=txpcks --fields=ifutil'}, {'module': 'NET', 'purpose': 'ESTAT', 'field': '--interval=5;--nic=ens33 --fields=errs --fields=util'}, {'module': 'MEM', 'purpose': 'BANDWIDTH', 'field': '--interval=5;--fields=Total_Util'}, {'module': 'PERF', 'purpose': 'STAT', 'field': '--interval=5;--fields=IPC --fields=CACHE-MISS-RATIO --fields=MPKI --fields=ITLB-LOAD-MISS-RATIO --fields=DTLB-LOAD-MISS-RATIO --fields=SBPI --fields=SBPC'}, {'module': 'MEM', 'purpose': 'VMSTAT', 'field': '--interval=5;--fields=procs.b --fields=memory.swpd --fields=io.bo --fields=system.in --fields=system.cs --fields=util.swap --fields=util.cpu --fields=procs.r'}, {'module': 'SYS', 'purpose': 'TASKS', 'field': '--interval=5;--fields=procs --fields=cswchs'}, {'module': 'SYS', 'purpose': 'LDAVG', 'field': '--interval=5;--fields=runq-sz --fields=plist-sz --fields=ldavg-1 --fields=ldavg-5'}, {'module': 'SYS', 'purpose': 'FDUTIL', 'field': '--interval=5;--fields=fd-util'}], 'pipe': '/run/1630137505', 'file': '/run/atuned/test.csv', 'data_type': ''}
Aug 28 15:58:25 localhost atuned[8360]: 2021-08-28 15:58:25,319 [INFO] collector [/usr/libexec/atuned/analysis/../analysis/atuned/collector.py:63] : [['CPU', 'STAT', '--interval=5; --fields=usr --fields=nice --fields=sys --fields=iowait --fields=irq --fields=soft --fields=steal --fields=guest --threshold=30 --fields=util --fields=cutil'], ['STORAGE', 'STAT', '--interval=5;--device=sda --fields=rs --fields=ws --fields=rMBs --fields=wMBs --fields=rrqm --fields=wrqm --fields=rareq-sz --fields=wareq-sz --fields=r_await --fields=w_await --fields=util --fields=aqu-sz'], ['NET', 'STAT', '--interval=5;--nic=ens33 --fields=rxkBs --fields=txkBs --fields=rxpcks --fields=txpcks --fields=ifutil'], ['NET', 'ESTAT', '--interval=5;--nic=ens33 --fields=errs --fields=util'], ['MEM', 'BANDWIDTH', '--interval=5;--fields=Total_Util'], ['PERF', 'STAT', '--interval=5;--fields=IPC --fields=CACHE-MISS-RATIO --fields=MPKI --fields=ITLB-LOAD-MISS-RATIO --fields=DTLB-LOAD-MISS-RATIO --fields=SBPI --fields=SBPC'], ['MEM', 'VMSTAT', '--interval=5;--fields=procs.b --fields=memory.swpd --fields=io.bo --fields=system.in --fields=system.cs --fields=util.swap --fields=util.cpu --fields=procs.r'], ['SYS', 'TASKS', '--interval=5;--fields=procs --fields=cswchs'], ['SYS', 'LDAVG', '--interval=5;--fields=runq-sz --fields=plist-sz --fields=ldavg-1 --fields=ldavg-5'], ['SYS', 'FDUTIL', '--interval=5;--fields=fd-util']]
Aug 28 15:58:33 localhost atuned[8360]: 2021-08-28 15:58:33,877 [ERROR] common [/usr/local/lib/python3.7/site-packages/atune_collector/plugin/monitor/common.py:124] : PerfStat.report: division by zero
Aug 28 15:58:33 localhost atuned[8360]: 2021-08-28 15:58:33,884 [INFO] collector [/usr/libexec/atuned/analysis/../analysis/atuned/collector.py:69] : division by zero
Aug 28 15:58:33 localhost atuned[8360]: 2021-08-28 15:58:33,886 [ERROR] app [/usr/lib/python3.7/site-packages/flask/app.py:1786] : Exception on /v1/collector [POST]#012Traceback (most recent call last):#012 File "/usr/lib/python3.7/site-packages/flask/app.py", line 1838, in full_dispatch_request#012 rv = self.dispatch_request()#012 File "/usr/lib/python3.7/site-packages/flask/app.py", line 1824, in dispatch_request#012 return self.view_functionsrule.endpoint#012 File "/usr/lib/python3.7/site-packages/flask_restful/init.py", line 480, in wrapper#012 resp = resource(*args, **kwargs)#012 File "/usr/lib/python3.7/site-packages/flask/views.py", line 88, in view#012 return self.dispatch_request(*args, **kwargs)#012 File "/usr/lib/python3.7/site-packages/flask_restful/init.py", line 595, in dispatch_request#012 resp = meth(*args, **kwargs)#012 File "/usr/lib/python3.7/site-packages/flask_restful/init.py", line 722, in wrapper#012 resp = f(*args, **kwargs)#012 File "/usr/libexec/atuned/analysis/../analysisatuned/collector.py", line 72, in post#012 for num in raw_data:#012TypeError: 'ZeroDivisionError' object is not iterable

@Grjadusheye nasha ctranei 您好,请在您的异常环境中执行下以下命令并反馈下结果
perf stat -a -e cycles,instructions,branches,branch-misses,cache-misses,cache-references,dTLB-load-misses,dTLB-loads,iTLB-load-misses,iTLB-loads,stalled-cycles-backend,r7004,r7005,migrations --interval-print 5000 --interval-count 1

time counts unit events

 5.007698206    <not supported>      cycles                                                      
 5.007698206    <not supported>      instructions                                                
 5.007698206    <not supported>      branches                                                    
 5.007698206    <not supported>      branch-misses                                               
 5.007698206    <not supported>      cache-misses                                                
 5.007698206    <not supported>      cache-references                                            
 5.007698206                  0      dTLB-load-misses          #    0.00% of all dTLB cache hits 
 5.007698206                  0      dTLB-loads                                                  
 5.007698206                  0      iTLB-load-misses          #    0.00% of all iTLB cache hits 
 5.007698206                  0      iTLB-loads                                                  
 5.007698206    <not supported>      stalled-cycles-backend                                      
 5.007698206                  0      r7004                                                       
 5.007698206                  0      r7005                                                       
 5.007698206                  1      migrations    

@hanxinke 您好,不好意思,在别人的问答区回复,我和楼主的问题一致,我看楼主长时间未回复故主动粘贴的结果。麻烦看下是什么问题,感谢!

@flyriver_wyh 感谢,找到原因了,从您的执行结果来看,该环境无法采集到对应的指标信息,并且存在某些指标为0的场景,该场景在代码中未考虑到,需要增加对指标为0值的判断
输入图片说明

我的结果与@flyriver_wyh 的结果一致。请问如gaoruoshu所说,A-Tune只能在鲲鹏920处理器上使用吗?我记得之前有一次issue中提到过新版本的master分支A-Tune是可以在虚拟机中运行的,不支持的只有openeuler镜像中自带的旧版本A-Tune

楼主提到的哪个issue应该是这个问题:#I1PJG0:ECS上能运行A-Tune吗?

hanxinke changed issue state from 待办的 to 已完成

Sign in to comment

Status
Assignees
Projects
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
Duration (hours)
Confirm
参与者(5)
5329419 openeuler ci bot 1632792936
Go
1
https://git.oschina.net/openeuler/A-Tune.git
git@git.oschina.net:openeuler/A-Tune.git
openeuler
A-Tune
A-Tune

Search