安装mytop 出现 Error in option spec: "long|!"

简介:

安装mytop 出现 Error in option spec: "long|!"

编辑 mytop vim /usr/bin/mytop

找到 "long|!" => \$config{long_nums},

修改成 "long|long_nums|l!" => \$config{long_nums},

问题解决

使用的时候出现

Use of uninitialized value in substitution (s///) at /usr/bin/mytop line 958.

可以这么解决


#vim  /usr/bin/mytop

{

           $thread->{Host} =~ s/:\d+$//;

           my $host = gethostbyaddr(inet_aton($thread->{Host}), AF_INET);

          $host =~ s/^([^.]+).*/$1/;  (删除或者注释)

           $thread->{Host} = $host;(删除或者注释)

           if ($host)  (添加)

           {        (添加)

             $host =~ s/^([^.]+).*/$1/;(添加)

             $thread->{Host} = $host;(添加)

           }

}

本文转自    拖鞋崽      51CTO博客,原文链接:http://blog.51cto.com/1992mrwang/1196309



相关文章
Error running Application. Command line is too long.
【2月更文挑战第2天】Error running Application. Command line is too long. 问题处理
|
10月前
|
Java 开发工具 git
解决Error running XXXApplicationCommand line is too long.报错
解决Error running XXXApplicationCommand line is too long.报错
|
Java 编译器 Android开发
Java compiler error: constant string too long
Java compiler error: constant string too long
/usr/include/openssl/des.h:91:9: error: unknown type name ‘DES_LONG’ DES_LONG deslong[2];
/usr/include/openssl/des.h:91:9: error: unknown type name ‘DES_LONG’ DES_LONG deslong[2];
106 0
Idea运行报错Error running ‘Application‘: Command line is too long的解决方法
Idea运行报错Error running ‘Application‘: Command line is too long的解决方法
141 0
Error running 'XXXApplication': Command line is too long. Shorten command line forXXX
Error running 'XXXApplication': Command line is too long. Shorten command line forXXX
119 0
Error running 'XXXApplication': Command line is too long. Shorten command line forXXX
|
关系型数据库 MySQL Linux
MySQL插入中文时出现ERROR 1406 (22001): Data too long for column 'name' at row 1
      使用命令行方式登陆到MySQL服务器, 建立一个数据库,数据库编码设为UTF-8。此时,如果直接在命令行窗口使用insert语句插入中文,就遇到类似 ERROR 1406 (22001): Data too long for column 'name' at row 1 错误。
1940 0
|
1月前
|
JSON JavaScript 前端开发
解决js中Long类型数据在请求与响应过程精度丢失问题(springboot项目中)
解决js中Long类型数据在请求与响应过程精度丢失问题(springboot项目中)
86 0
|
1月前
|
编译器 C语言
c语言中long的作用类型
c语言中long的作用类型
61 0