使用命令提示:
[[email protected] ~]# dstat
File "/usr/bin/dstat", line 120
except getopt.error, exc:
^
SyntaxError: invalid syntax
原因:python版本问题,dstat只支持python2
解决:修改python版本
[[email protected]]# vi /usr/bin/dstat
#!/usr/bin/python2.7
[[email protected] ~]# dstat
You did not select any stats, using -cdngy by default.
----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai hiq siq| read writ| recv send| in out | int csw
2 1 97 0 0 0|1370B 65k| 0 0 | 0 0 | 993 6139
5 2 94 0 0 0| 0 28k| 180B 1054B| 0 0 |3533 8163 ^C
原文地址:https://www.cnblogs.com/sihye/p/12611448.html
时间: 2024-11-08 05:37:03