GithubHelp home page GithubHelp logo

tsar's Introduction

Introduction

Tsar (Taobao System Activity Reporter) is a monitoring tool, which can be used to gather and summarize system information, e.g. CPU, load, IO, and application information, e.g. nginx, HAProxy, Squid, etc. The results can be stored at local disk or sent to Nagios.

Tsar can be easily extended by writing modules, which makes it a powerful and versatile reporting tool.

Module introduction: info

Installation

Tsar is available on GitHub, you can clone and install it as follows:

$ git clone https://github.com/alibaba/tsar.git
$ cd tsar
$ make
# make install

Or you can download the zip file and install it:

$ wget -O tsar.zip https://github.com/alibaba/tsar/archive/master.zip --no-check-certificate
$ unzip tsar.zip
$ cd tsar
$ make
# make install

After installation, you may see these files:

  • /etc/tsar/tsar.conf, which is tsar's main configuration file;
  • /etc/cron.d/tsar, is used to run tsar to collect information every minute;
  • /etc/logrotate.d/tsar will rotate tsar's log files every month;
  • /usr/local/tsar/modules is the directory where all module libraries (*.so) are located;

Configuration

There is no output displayed after installation by default. Just run tsar -l to see if the real-time monitoring works, for instance:

[kongjian@tsar]$ tsar -l -i 1
Time              ---cpu-- ---mem-- ---tcp-- -----traffic---- --xvda-- -xvda1-- -xvda2-- -xvda3-- -xvda4-- -xvda5--  ---load-
Time                util     util   retran    pktin  pktout     util     util     util     util     util     util     load1
11/04/13-14:09:10   0.20    11.57     0.00     9.00    2.00     0.00     0.00     0.00     0.00     0.00     0.00      0.00
11/04/13-14:09:11   0.20    11.57     0.00     4.00    2.00     0.00     0.00     0.00     0.00     0.00     0.00      0.00

Usually, we configure Tsar by simply editing /etc/tsar/tsar.conf:

  • To add a module, add a line like mod_<yourmodname> on
  • To enable or disable a module, use mod_<yourmodname> on/off
  • To specify parameters for a module, use mod_<yourmodname> on parameter
  • output_stdio_mod is to set modules output to standard I/O
  • output_file_path is to set history data file, (you should modify the logrotate script /etc/logrotate.d/tsar too)
  • output_interface specifies tsar data output destination, which by default is a local file. See the Advanced section for more information.

Usage

  • null :see default mods history data, tsar
  • --modname :specify module to show, tsar --cpu
  • -L/--list :list available module, tsar -L
  • -l/--live :show real-time info, tsar -l --cpu
  • -i/--interval :set interval for report, tsar -i 1 --cpu
  • -s/--spec :specify module detail field, tsar --cpu -s sys,util
  • -D/--detail :do not conver data to K/M/G, tsar --mem -D
  • -m/--merge :merge multiply item to one, tsar --io -m
  • -I/--item :show spec item data, tsar --io -I sda
  • -d/--date :specify data, YYYYMMDD, or n means n days ago
  • -C/--check :show the last collect data
  • -h/--help :show help, tsar -h

Advanced

  • Output to Nagios

To turn it on, just set output type output_interface file,nagios in the main configuration file.

You should also specify Nagios' IP address, port, and sending interval, e.g.:

####The IP address or the hostname running the NSCA daemon
server_addr nagios.server.com
####The port on which the daemon is listening - by default it is 5667
server_port 8086
####The cycle (interval) of sending alerts to Nagios
cycle_time 300

As tsar uses Nagios' passive mode, so you should specify the nsca binary and its configuration file, e.g.:

####nsca client program
send_nsca_cmd /usr/bin/send_nsca
send_nsca_conf /home/a/conf/amon/send_nsca.conf

Then specify the module and fields to be checked. There are 4 threshold levels.

####tsar mod alert config file
####threshold servicename.key;w-min;w-max;c-min;cmax;
threshold cpu.util;50;60;70;80;
  • Output to MySQL

To use this feature, just add output type output_interface file,db in tsar's configuration file.

Then specify which module(s) will be enabled:

output_db_mod mod_cpu,mod_mem,mod_traffic,mod_load,mod_tcp,mod_udpmod_io

Note that you should set the IP address (or hostname) and port where tsar2db listens, e.g.:

output_db_addr console2:56677

Tsar2db receives sql data and flush it to MySQL. You can find more information about tsar2db at https://github.com/alibaba/tsar2db.

Module development

Tsar is easily extended. Whenever you want information that is not collected by tsar yet, you can write a module with C or Lua.

C Module

First, install the tsardevel tool (make tsardevel will do this for you):

Then run tsardevel <yourmodname>, and you will get a directory named yourmodname, e.g.:

[kongjian@tsar]$ tsardevel test
build:make
install:make install
uninstall:make uninstall

[kongjian@tsar]$ ls test
Makefile  mod_test.c  mod_test.conf

You can modify the read_test_stats() and set_test_record() functions in mod_test.c as you need. Then run make;make install to install your module and run tsar --yourmodname to see the output.

Lua Module

First, install the tsarluadevel tool (make tsarluadevel will do this for you):

Then run tsarluadevel <yourmodname>, and you will get a directory named yourmodname, e.g.:

[kongjian@tsar]$ tsarluadevel test
install:make install
uninstall:make uninstall
test:tsar --list or tsar --lua_test --live -i 1

[kongjian@tsar]$ ls test
Makefile  mod_lua_test.conf  mod_lua_test.lua

You can modify the register()、read() and set() functions in mod_lua_test.lua as you need. Then run make install to install your module and run tsar --lua_yourmodname to see the output.

More

Homepage http://tsar.taobao.org

Any question, please feel free to contact me by [email protected]

tsar's People

Contributors

0xflotus avatar astroprofundis avatar chobits avatar detailyang avatar digping avatar hackersean avatar hugozhu avatar icedfish avatar kongjian avatar levie-vans avatar lilymona avatar liximomo avatar pjhades avatar shitaibin avatar soarpenguin avatar songbingyu avatar theosotr avatar wa5i avatar walkerxk avatar xkking avatar yeasy avatar zhihuifan avatar zhuzhaoyuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsar's Issues

采集模块 时间调度系统实现

hi,
不知道你们是否有计划实现采集模块的执行时间和频率功能,

有些模块并不需要每分钟执行一次打,也许有需求是一天执行一次。

目前能想到的是:
执行频率在模块功能里自动判断实现,但个人感觉执行频率应该属于通用功能,如果能把模块频率调度功能放在tsar的框架里则更好。

不知道现在你们是怎么处理这种特殊情况? 有计划开发模块频率调度功能吗?

取进程内存使用量的模块

对一个进程,监控其内存的使用量,数据从/proc//status里取:

[root@localhost 704082]# cat status
Name:   java
State:  S (sleeping)
Tgid:   704082
Pid:    704082
PPid:   619125
TracerPid:  0
Uid:    0   0   0   0
Gid:    0   0   0   0
Utrace: 0
FDSize: 256
Groups: 0
envID:  1
VPid:   14118
StopState:  0
VmPeak:  1735256 kB
VmSize:  1735256 kB
VmLck:         0 kB
VmHWM:    147928 kB
VmRSS:    142048 kB
VmData:  1577640 kB
VmStk:        96 kB
VmExe:         4 kB
VmLib:     15440 kB
VmPTE:       592 kB
VmPTD:        32 kB
VmSwap:        0 kB
Threads:    33
SigQ:   1/191583
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 2000000181005ccf
SigSvd: 0000000000000000
CapInh: 00000000fdccefff
CapPrm: 00000000fdccefff
CapEff: 00000000fdccefff
CapBnd: 00000000fdccefff
Cpus_allowed:   ffff
Cpus_allowed_list:  0-15
Mems_allowed:   00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003
Mems_allowed_list:  0-1
voluntary_ctxt_switches:    16
nonvoluntary_ctxt_switches: 4
TaskUB: 1
MMUB:   1

建议-d的参数能指定一个时间段

有时候,需要tsar输出连续几天的数据,但是-d只能指定输出一天的数据,需要连续几天的数据就需要自己分别输出当天的数据然后自己合并,如果可以指定输出一个时间段的数据就很方便了。

mac上不能跑

$ sudo tsar -li 1
[Wed Apr 8 21:51:36 2015] framework.c:66 load_modules: dlopen module mod_io err dlopen(/usr/local/tsar/modules/mod_io.so, 10): image not found
[Wed Apr 8 21:51:36 2015] framework.c:66 load_modules: dlopen module mod_partition err dlopen(/usr/local/tsar/modules/mod_partition.so, 10): image not found
Time ---cpu-- ---mem-- ---tcp-- -----traffic---- ---load-
Time util util retran bytin bytout load1
08/04/15-21:51:37 ------ ------ ------ ------ ------ ------
08/04/15-21:51:38 ------ ------ ------ ------ ------ ------
08/04/15-21:51:39 ------ ------ ------ ------ ------ ------

Did any one install success on mac osx 10.8.3 ?

I try to install on mba osx 10.8.3, buf failed:

[steven@MacbookAir tsar]$ make
for i in modules src; do make -C $i; done
gcc -I../include -Wall -fPIC --shared -g -O2 -Wno-strict-aliasing mod_swap.c -o mod_swap.so
Undefined symbols for architecture x86_64:
"_register_mod_fileds", referenced from:
_mod_register in ccO2HTmm.o
"_set_mod_record", referenced from:
_read_vmstat_swap in ccO2HTmm.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [mod_swap.so] Error 1
make[1]: Nothing to be done for `all'.

[steven@MacbookAir tsar]$ uname -a
Darwin MacbookAir.local 12.3.0 Darwin Kernel Version 12.3.0: Sun Jan 6 22:37:10 PST 2013; root:xnu-2050.22.13~1/RELEASE_X86_64 x86_64 i386 MacBookAir4,2 Darwin

minor update

diff --git a/src/Makefile b/src/Makefile
index f19f7ac..35b0b1f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -9,7 +9,7 @@ INCLUDE_DIR = ../include
 all: tsar

 tsar: config.o debug.o framework.o tsar.o output_file.o output_print.o output_db.o output_tcp.o output_nagios.o common.o
-   $(CC) config.o debug.o framework.o tsar.o output_file.o output_print.o output_db.o output_tcp.o output_nagios.o common.o -o tsar -I$(INCLUDE_DIR) -g -Wall -ldl -rdynamic
+   $(CC) config.o debug.o framework.o tsar.o output_file.o output_print.o output_db.o output_tcp.o output_nagios.o common.o -o tsar -g -Wall -ldl -rdynamic

 clean:
    rm -rf *.o tsar;

parse_add_string

if (var == NULL) {
if (token) {
strncpy(var, token, strlen(token));
}
} else {
if (token) {
strcat(token, ",");
strncat(token, var, strlen(var));
}
if (token) {
strncpy(var, token, strlen(token));
}
}
上述代码中,var==NULL时,怎么还可以执行strncpy

在CentOS 6.3 下安装失败

CentOS 6.3 下执行make install 失败,提示
“无法创建普通文件"/etc/cron.d/tsar"”, CentOS下定时任务目录/etc/cron.daily/
详细信息:

mkdir for tsar

mkdir -p /usr/local/tsar/modules
mkdir -p /etc/tsar
mkdir -p /usr/local/man/man8/

copy tsar shared so

cp modules/*.so /usr/local/tsar/modules

copy bin file

cp src/tsar /usr/bin/tsar

copy config file

cp conf/tsar.conf /etc/tsar/tsar.conf
cp conf/tsar.logrotate /etc/logrotate.d/tsar
cp conf/tsar.cron /etc/cron.d/tsar
cp: 无法创建普通文件"/etc/cron.d/tsar": 没有那个文件或目录
make: *** [install] 错误 1

传数据使用的ip

当服务器有多个ip时,传送数据默认使用主ip,但是主ip有可能被ddos打死。这时就需要使用辅ip传送。不知有没有考虑到这种情况?

support common arguments in modules 关于模块的参数问题

tsar的模块,目前比较土,多只有一个 --cpu这样的命令行参数,配以 mod_cpu on这样的配置方法。在后面我们碰到的问题里,我们遇到了很多关于模块需要参数的情况如:

  • squid的监听端口是一个参数
  • ts模块的socket是一个需要用的参数
  • proc一定需要一个进程名字,甚至可能是多个进程名字
  • 你希望在命令行的时候显示某一列而不是全部(屏幕总是有限的啊)
  • 某些模块的很难变的数据,是不是就不要采集了呢??如--cpu里的CPU个数

从上面的各种情况看,我们需要统一规范命令行、配置文件中的模块基本参数、模块列数据选择参数、模块的多item参数格式。

命令行参数格式

[--modulename [item1:][argument=value],... [item2[:argument=valule],...]... ]

多item格式:

--proc traffic_server httpd

参数格式:

--squid 80:port=80 81:port=81

--ts_client socket=/var/run/trafficserver/mgmtsocket

配置文件:

mod_proc [on] traffic_server httpd
mod_squid 80:port=80 81:port=81
mod_ts_client socket=/var/run/trafficserver/mgmtsocket

命令行列选择:

--cpu ::user,util

以上信息应可以在--live模式下用,也可以在log模式下用:

tsar --live --cpu ::user,util -i 2

多个item定制:

tsar --squid 80:port=80::qps,rt 81:port=81::qps,rt --live
mod_squid 80:port=80 81:port=81
tsar --squid 80::qps,rt 81::rt

列所有磁盘的io情况,只列出await,svct列:

tsar --io ::await,svct

以上proposal是比较大的节目改变,需要提入v3.0的日程里。

--traffic 在openSUSE13.2上采集不到数据

openSUSE13.2网卡的名称采用类似enpxxxx的命名方式,我本机自行fix了一下,现在很多机器有了docker在里面,是不是也加入一下?

    while (fgets(line, LEN_4096, fp) != NULL) {
        if (strstr(line, "enp") || strstr(line, "eth") || strstr(line, "em") || strstr(line, "venet")) {
            memset(&cur_st, 0, sizeof(cur_st));
#more /proc/net/dev

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
wlp4s0: 2641229   17717    0    0    0     0          0         0     9706      35    0    0    0     0       0          0
docker0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
enp5s0f1: 42829771  217239    0    2    0     0          0         0  5594920   46609    0    0    0     0       0          0
    lo: 177075425   61494    0    0    0     0          0         0 177075425   61494    0    0    0     0       0          0

和nginx集成不成功,全是横线

根据官方教程进行安装并配置nginx,运行curl 127.0.0.1:80/nginx_status出现
Active connections: 14
server accepts handled requests
628 628 837
Reading: 0 Writing: 3 Waiting: 11
但是运行curl 127.0.0.1:80/nginx_status -H 'Host: status.taobao.com'出错,404
运行tsar --nginx --live -i 1的时候全是横线
Time ----------------------------------nginx---------------------------------
Time accept handle reqs active read write wait qps rt
08/07/16-17:00 ------ ------ ------ ------ ------ ------ ------ ------ ------
08/07/16-17:05 ------ ------ ------ ------ ------ ------ ------ ------ ------
08/07/16-17:10 ------ ------ ------ ------ ------ ------ ------ ------ ------
08/07/16-17:15 ------ ------ ------ ------ ------ ------ ------ ------ ------
08/07/16-17:20 ------ ------ ------ ------ ------ ------ ------ ------ ------
08/07/16-17:25 ------ ------ ------ ------ ------ ------ ------ ------ ------
08/07/16-17:30 ------ ------ ------ ------ ------ ------ ------ ------ ------

求大神指教

--check will take wrong when limit with -s

[root@BJDXT_ATS_75 tsar]# tsar --check --tcpx -s cnest
BJDXT_ATS_75    tsar    tcpx:est=0.0 tcpx:cnest=114.0

[root@BJDXT_ATS_75 tsar]# tsar --check --ts_cache -s ramhit
BJDXT_ATS_75    tsar    ts_cache:hit=14.5 ts_cache:ramhit=13.3

due to

void
set_special_field(const char *s)
{
    int    i = 0, j = 0;
    struct module *mod = NULL;

    for (i = 0; i < statis.total_mod_num; i++)
    {
        mod = &mods[i];
        struct mod_info *info = mod->info;
        for (j=0; j < mod->n_col; j++) {
            char *p = info[j].hdr;
            while (*p  == ' ') {
                p++;
            }
            if (strstr(s, p)) {
                info[j].summary_bit = SPEC_BIT;
                mod->spec = 1;
            }
        }
    }
}

strstr est to cnest is always a hit. that is not what we want.

用mac安装不成功

用mac安装时,编译源代码的过程正常。
进行 make install的时候就出现了下面的提示:
make: install is up to date.

代码合并漏了

这个print_llu在mod_info里面没有定义吧 刚我下了 就编译不过了 合并代码漏了devel/这个下面的文件吧

Error msg at the first time running

After make; make install
The first time running tsar, there will be error msg, like
[Fri Oct 31 16:43:34 2014] output_print.c:626 unable to open the log file /var/log/tsar.data

关于NSCA传递数据的配置

我看了下代码,tsar用send_nsca向nags发送数据时使用的host name是直接用gethostname获取到的,请问下能不能自定义一个hostname用于发送数据。因为在nagios里面对某台机器定义的name,并不一定是该机器自身的hostname

tsar是否支持mac

想在mac平台试用一下,结果make的时候就报错了,报错信息如下:

for i in modules src; do make -C $i; done
gcc -I../include -Wall -fPIC --shared -g -O2 -Wno-strict-aliasing mod_swap.c -o mod_swap.so
Undefined symbols for architecture x86_64:
"_register_mod_fileds", referenced from:
_mod_register in ccX0HC6O.o
"_set_mod_record", referenced from:
_read_vmstat_swap in ccX0HC6O.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[1]: *** [mod_swap.so] Error 1
make[1]: Nothing to be done for `all'.

centos5.8 64位编译报错

for i in modules src; do make -C $i; done
make[1]: Entering directory /home/software/star/tsar-master/modules' gcc -I../include -Wall -fPIC --shared -g -O2 -Wno-strict-aliasing mod_swap.c -o mod_swap.so /usr/bin/ld: cannot open output file mod_swap.so: No such file or directory collect2: ld 返回 1 make[1]: *** [mod_swap.so] 错误 1 make[1]: Leaving directory/home/software/star/tsar-master/modules'
make[1]: Entering directory /home/software/star/tsar-master/src' gcc config.o debug.o framework.o tsar.o output_file.o output_print.o output_db.o output_tcp.o output_nagios.o common.o -o tsar -I../include -g -Wall -ldl -rdynamic /usr/bin/ld: cannot open output file tsar: No such file or directory collect2: ld 返回 1 make[1]: *** [tsar] 错误 1 make[1]: Leaving directory/home/software/star/tsar-master/src'
make: *** [all] 错误 2

build error on centos7

build error on centos7, here is the message

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11)

framework.c:454:1: error: conflicting types for ‘read_line_to_module_record’
read_line_to_module_record(char *line)
^
In file included from ../include/tsar.h:37:0,
from framework.c:20:
../include/framework.h:83:6: note: previous declaration of ‘read_line_to_module_record’ was here
void read_line_to_module_record(char *line);
^
make[1]: *** [framework.o] Error 1

-d参数有bug?

在8点钟之前使用-d 20141205得到的是1204的数据,而同样的使用在当天的8点钟后使用得到的才是1205的数据,-d 1 也是一样的。我们尝试修复了下。

tsar LVS采集数据问题

采集LVS的数据有误,tsar采集少了一个数量级
bytin byout
28.7M 830.9K

实际用nload看是
bytin byout
280M 8M

请教关于tsar --ts_cache 相关参数的问题

hit ramhit band ssdhit

我读了生成这几个值的模块的代码,对于ramhit这个指标的计算有点疑问,

/* not ssd and sas */
if (cur_array[5] == 0 && cur_array[1]) {
st_array[1] = cur_array[1] / 10.0;

} else {
    if (cur_array[3] > pre_array[3]) {
        st_array[1] = (cur_array[4] - pre_array[4]) * 100.0 / (cur_array[3] - pre_array[3]);
        st_array[6] = (cur_array[5] - pre_array[5]) * 100.0 / (cur_array[3] - pre_array[3]);
    }
}

cur_array[5] == 0 只表示并没有使用ssd,这样的话读取的值不就是内存缓存占所有成功读的比例,而不是内存缓存占缓存的比例了,也就是有没有使用ssd,ramhit表达的含义是不一样的。另外,为什么if (cur_array[5] == 0 && cur_array[1]) { 这段表示no ssd and sas呢?

bugs found by our scanner

Hi, we developed a taint analysis based static analysis tool named Hi, we developed a taint analysis based static analysis tool named Vanguard, which could prognosis potential vulnerabilities by identifying security-sensitive operations (e.g. divide-zero, mod-zero, array-index-access, and sensitive function calls) without proper checks for their operands.

Some code locations are listed in the following, we think these locations maybe bugs after our manual analysis. Please check them, and add precondition checks if necessary.

divide/mod-zero

1.in function set_squid_record, mod_squid.c#L622
st_array[0] = (cur_array[0] - pre_array[0]) / inter;
Divisor: inter
Result: Could be 0, Please Check.

2.in function set_swap_record, mod_swap.c#L71#L78#L86
st_array[0] = (cur_array[0] - pre_array[0]) / inter;
st_array[1] = (cur_array[1] - pre_array[1]) / inter;
st_array[3] = 100.0 - cur_array[3] * 100.0 / cur_array[2];
Divisor: inter, cur_array[2]
Result: Could be 0, Please Check.

3.in function set_tcp_record, mod_proc.c#L188#L191#L196
st_array[3] = cur_array[4] * 100.0 / cur_array[3];
st_array[5] = (cur_array[5] - pre_array[5]) * 1.0 / inter;
st_array[6] = (cur_array[6] - pre_array[6]) * 1.0 / inter;
Divisor: cur_array[3], inter
Result: Could be 0, Please Check.

4.in function set_haproxy_record, mod_haproxy.c#L101
st_array[3] = (cur_array[3] - pre_array[3]) / inter;
Divisor: inter
Result: Could be 0, Please Check.

mac os 10.9.1安装失败

make的时候报了如下错误

for i in modules src; do make -C $i; done
gcc -I../include -Wall -fPIC --shared -g -O2 -Wno-strict-aliasing mod_swap.c -o mod_swap.so
Undefined symbols for architecture x86_64:
  "_register_mod_fileds", referenced from:
      _mod_register in mod_swap-Pp8E05.o
  "_set_mod_record", referenced from:
      _read_vmstat_swap in mod_swap-Pp8E05.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [mod_swap.so] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.