RRDTool只能存储数据和画图,它没有像MRTG中集成的数据采集功能,要手动收集数据或写脚本收集数据。
在命令行下的使用非常复杂,参数极多。
无用户、图像管理功能
步骤一,snmp协议收集远程服务器的数据
步骤二,将snmp收集的数据内容保存到rrd数据库中
步骤三,若用户查看某台设备上的流量或其它状态信息
步骤四,在mysql数据库中查找该设备对应的rra数据库文件的名称
步骤五,通过rrdtool命令进行绘图即可
1
2
3
4
|
[root@node1 ~]
# rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Retrieving http:
//pkgs
.repoforge.org
/rpmforge-release/rpmforge-release-0
.5.3-1.el6.rf.x86_64.rpm
Preparing...
########################################### [100%]
package rpmforge-release-0.5.3-1.el6.rf.x86_64 is already installed
#我这边已经安装好了
|
1
2
|
[root@node1 ~]
# ntpdate 202.120.2.101
12 Oct 11:03:56 ntpdate[13805]: adjust
time
server 202.120.2.101 offset 0.000661 sec
|
1
|
[root@node1 ~]# yum install -y httpd php php-mysql php-snmp php-xml php-gd mysql mysql-server gd gd-devel
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
[root@node1 ~]
# chkconfig httpd on
[root@node1 ~]
# service httpd start
正在启动 httpd: [确定]
[root@node1 ~]
# chkconfig mysqld on
[root@node1 ~]
# service mysqld start
正在启动 mysqld: [确定]
[root@node1 ~]
# netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID
/Program
name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1045
/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1122
/master
tcp 0 0 127.0.0.1:6010 0.0.0.0:* LISTEN 13786
/sshd
tcp 0 0 127.0.0.1:6012 0.0.0.0:* LISTEN 17820
/sshd
tcp 0 0 127.0.0.1:6013 0.0.0.0:* LISTEN 31664
/sshd
tcp 0 0 127.0.0.1:199 0.0.0.0:* LISTEN 13017
/snmpd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 13375
/mysqld
tcp 0 0 :::80 :::* LISTEN 13917
/httpd
tcp 0 0 :::22 :::* LISTEN 1045
/sshd
tcp 0 0 ::1:25 :::* LISTEN 1122
/master
tcp 0 0 ::1:6010 :::* LISTEN 13786
/sshd
tcp 0 0 ::1:6012 :::* LISTEN 17820
/sshd
tcp 0 0 ::1:6013 :::* LISTEN 31664
/sshd
udp 0 0 0.0.0.0:161 0.0.0.0:* 13017
/snmpd
|
1
2
3
4
5
|
[root@node1 ~]
# cd /var/www/html/
[root@node1 html]
# vim index.php
phpinfo();
?>
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
root@node1 ~]
# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection
id
is 96186
Server version: 5.1.69 Source distribution
Copyright (c) 2000, 2013, Oracle and
/or
its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and
/or
its
affiliates. Other names may be trademarks of their respective
owners.
Type
'help;'
or
'\h'
for
help. Type
'\c'
to
clear
the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
|
test
|
| testdb |
+--------------------+
4 rows
in
set
(0.08 sec)
mysql>
|
1
|
[root@node1 ~]
# yum install -y net-snmp net-snmp-utils
|
1
2
3
4
5
|
[root@node1 ~]
# vim /etc/snmp/snmpd.conf
修改前,
view systemview included .1.3.6.1.2.1.1
修改后,
view systemview included .1.3.6.1.2.1
|
1
2
3
4
5
6
7
8
9
10
11
|
[root@node1 ~]
# service snmpd start
正在启动 snmpd: [确定]
[root@node1 ~]
# snmpnetstat -v 2c -c public -Ca -Cp tcp localhost
Active Internet (tcp) Connections (including servers)
Proto Local Address Remote Address (state)
tcp *.
ssh
*.* LISTEN
tcp *.mysql *.* LISTEN
tcp localhost.smtp *.* LISTEN
tcp localhost.smux *.* LISTEN
tcp localhost.x11-
ssh
- *.* LISTEN
tcp 192.168.18.201.
ssh
192.168.18.138.61353 ESTABLISHED
|
1
|
[root@node1 ~]
# yum install -y rrdtool
|
1
2
3
4
5
6
7
8
9
10
|
[root@node1 ~]
# rrdtool -v
RRDtool 1.3.8 Copyright 1997-2009 by Tobias Oetiker
Compiled Aug 21 2010 10:57:18
Usage: rrdtool [options]
command
command_options
Valid commands: create, update, updatev, graph, graphv, dump, restore,
last, lastupdate, first, info, fetch, tune,
resize, xport
RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org
/copyleft/gpl
.html)
For
more
information
read
the RRD manpages
|
1
2
3
4
5
6
7
8
9
10
11
12
|
[root@node1 ~]
# wget http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz
[root@node1 ~]
# ll -h
总用量 2.8M
-rw-------. 1 root root 970 8月 17 18:50 anaconda-ks.cfg
-rw-r--r-- 1 root root 2.2M 8月 7 09:42 cacti-0.8.8b.
tar
.gz
-rw-r--r-- 1 root root 176 10月 11 16:06 getselect.sh
-rw-r--r-- 1 root root 152 10月 11 16:15 insert.sh
-rw-r--r--. 1 root root 16K 8月 17 18:50
install
.log
-rw-r--r--. 1 root root 4.1K 8月 17 18:48
install
.log.syslog
-rw-r--r-- 1 root root 11K 10月 11 16:23 mysql.png
-rw-r--r-- 1 root root 294K 10月 11 16:47 mysql.rrd
-rw-r--r-- 1 root root 294K 10月 10 21:53 rrdtool-1.3.8-6.el6.x86_64.rpm
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[root@node1 ~]
# vim /etc/httpd/conf/httpd.conf
DocumentRoot
/web/vhosts/cacti
ServerName cacti.
test
.com
ErrorLog logs
/cacti
.
test
.com-error_log
CustomLog logs
/cacti
.
test
.com-access_log common
Options Indexes FollowSymLinks
DirectoryIndex index.php index.html index.htm
AllowOverride None
Order allow,deny
Allow from all
<
/Directory
>
<
/VirtualHost
>
|
1
2
3
4
|
[root@node1 ~]
# mkdir -pv /web/vhosts/cacti
mkdir
: 已创建目录
"/web"
mkdir
: 已创建目录
"/web/vhosts"
mkdir
: 已创建目录
"/web/vhosts/cacti"
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
[root@node1 ~]
# tar xf cacti-0.8.8b.tar.gz
[root@node1 ~]
# cd cacti-0.8.8b
[root@node1 cacti-0.8.8b]
# mv * /web/vhosts/cacti/
[root@node1 cacti-0.8.8b]
# cd /web/vhosts/cacti/
[root@node1 cacti]
# ls
about.php data_templates.php graph_templates.php log scripts
auth_changepassword.php docs graph_view.php
logout
.php script_server.php
auth_login.php gprint_presets.php graph_xport.php plugins script_server.pl
cacti.sql graph_image.php host.php plugins.php settings.php
cdef.php graph.php host_templates.php poller_commands.php templates_export.php
cli graph_settings.php images poller_export.php templates_import.php
cmd.php graphs_items.php include poller.php tree.php
color.php graphs_new.php index.php README user_admin.php
data_input.php graphs.php
install
resource utilities.php
data_queries.php graph_templates_inputs.php lib rra
data_sources.php graph_templates_items.php LICENSE rra.php
|
1
2
|
[root@node1 cacti]
# mysqladmin create cactidb
[root@node1 cacti]
# mysql cactidb < cacti.sql
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
[root@node1 cacti]
# mysql -e "GRANT ALL ON cactidb.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'"
[root@node1 cacti]
# mysqladmin flush-privileges
[root@node1 cacti]
# mysql -ucactiuser -pcactiuser
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection
id
is 96192
Server version: 5.1.69 Source distribution
Copyright (c) 2000, 2013, Oracle and
/or
its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and
/or
its
affiliates. Other names may be trademarks of their respective
owners.
Type
'help;'
or
'\h'
for
help. Type
'\c'
to
clear
the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cactidb |
|
test
|
+--------------------+
3 rows
in
set
(0.02 sec)
mysql>
|
1
2
3
4
5
6
7
8
9
10
11
12
|
[root@node1 ~]
# cd /web/vhosts/cacti/
[root@node1 cacti]
# cd include/
[root@node1 include]
# vim config.php
/*
make
sure these values refect your actual database
/host/user/password
*/
$database_type =
"mysql"
;
$database_default =
"cactidb"
;
$database_hostname =
"localhost"
;
$database_username =
"cactiuser"
;
$database_password =
"cactiuser"
;
$database_port =
"3306"
;
$database_ssl =
false
;
$url_path =
"/"
;
#这一行非常重要设置cacti程序访问路径的
|
1
2
3
|
[root@node1 ~]
# cd /web/vhosts/cacti/
[root@node1 cacti]
# useradd cactiuser
[root@node1 cacti]
# chown -R cactiuser:cactiuser log/ rra/
|
1
|
192.168.18.201 cacti.
test
.com
|
New Graphs 添加新图形
Graph Management 图形管理。可以在此删除、复制图像,Cacti会自动创建图像。不过如果我们有特殊的需要,比如将几张图上的数据合并在一张图像上的话也可以在此手工新建图像;
Graph Trees 图形树。在graphs界面里,图像或devices是树状结构显示的,可以在此设置树的结构;
Data Sources 数据源。记要用来管理rrd文件的,一般无需修改,Cacti会自己创建rrd文件;
Devices 设备管理。这是我们最经常需要修改的地方,可以在此创建新的设备或修改其名称等信息。
Data Queries 数据查询,
Data Input Methods 数据输入方法
Graph Templates 图形模板
Host Templates 主机模板
Data Templates 数据模板
Import Templates 导入模板
Export Templates 导出模板
Settings 系统设置,Cacti的主要配置菜单;可以在此重新设置对应的程序的路径、版本等信息。也可以设置图像的输出方式(允许ftp)、显示效果、登陆方式(允许使用LDAP)等。
Plugin Management 插件管理
System Utilities 系统工具,显示Cacti系统的一些cache和log信息,如果log文件太大建议直接到后台查看;
User Management 用户管理,可以在此添加、删除用户,并对每个用户设置详细的权限;
Logout User 用户退出
数据查询:xml格式数据收集方法
数据输入方法:命令或脚本(比较常用)
1
2
|
TAG:data TAG:data
input:30 output:40
|
1
2
3
4
5
6
7
8
9
10
11
12
|
[root@node1 cacti]
# ls
about.php data_templates.php graph_templates.php log scripts
auth_changepassword.php docs graph_view.php
logout
.php script_server.php
auth_login.php gprint_presets.php graph_xport.php plugins script_server.pl
cacti.sql graph_image.php host.php plugins.php settings.php
cdef.php graph.php host_templates.php poller_commands.php templates_export.php
cli graph_settings.php images poller_export.php templates_import.php
cmd.php graphs_items.php include poller.php tree.php
color.php graphs_new.php index.php README user_admin.php
data_input.php graphs.php
install
resource utilities.php
data_queries.php graph_templates_inputs.php lib rra
data_sources.php graph_templates_items.php LICENSE rra.php
|
1
2
3
|
[root@node1 cacti]
# echo '*/5 * * * * /usr/bin/php /web/vhosts/cacti/poller.php &>/dev/null' > /var/spool/cron/cactiuser
[root@node1 cacti]
# crontab -u cactiuser -l
*
/5
* * * *
/usr/bin/php
/web/vhosts/cacti/poller
.php &>
/dev/null
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
[root@node1 cacti]
# su - cactiuser
[cactiuser@node1 ~]$
/usr/bin/php
/web/vhosts/cacti/poller
.php
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 165
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 165
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 166
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 166
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 167
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 167
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 168
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 168
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 169
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 169
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 170
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 170
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 171
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_constants
.php on line 171
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 671
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 671
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 672
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 672
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 673
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 673
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 674
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 674
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 675
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 675
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 676
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 676
PHP Warning: strtotime(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 677
PHP Warning:
date
(): It is not safe to rely on the system
's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected '
Asia
/Chongqing
' for '
CST
/8
.0
/no
DST' instead
in
/web/vhosts/cacti/include/global_arrays
.php on line 677
[cactiuser@node1 ~]$
|
1
2
3
4
5
|
[root@node1 cacti]
# vim /etc/php.ini
date
.timezone = Asia
/Shanghai
[root@node1 cacti]
# service httpd restart
停止 httpd: [确定]
正在启动 httpd: [确定]
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
[root@node1 cacti]
# su - cactiuser
[cactiuser@node1 ~]$
/usr/bin/php
/web/vhosts/cacti/poller
.php
[root@node1 cacti]
# chown -R cactiuser:cactiuser log/ rra/ #修改一下cacti程序中的log和rra目录的所属者与所属组
[cactiuser@node1 cacti]$
/usr/bin/php
/web/vhosts/cacti/poller
.php
10
/12/2013
04:18:26 PM - SYSTEM STATS: Time:0.2288 Method:cmd.php Processes:1 Threads:N
/A
Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.00 r:0.14
OK u:0.00 s:0.01 r:0.15
OK u:0.00 s:0.01 r:0.15
OK u:0.00 s:0.01 r:0.15
OK u:0.00 s:0.01 r:0.15
OK u:0.00 s:0.01 r:0.16
OK u:0.00 s:0.01 r:0.16
|
1
2
3
|
[cactiuser@node1 cacti]$
cd
log
[cactiuser@node1 log]$
tail
cacti.log
10
/12/2013
04:18:26 PM - SYSTEM STATS: Time:0.2288 Method:cmd.php Processes:1 Threads:N
/A
Hosts:2 HostsPerProcess:2 DataSources:5 RRDsProcessed:5
|