增加设备,可以SNMP到,但是不出现图象,只是一个红×,然后运行
/usr/local/php4/bin/php /usr/local/apache2/htdocs/cacti/poller.php
图象出来了 ,但是没有数据显示!!是不是poller.php没有自动执行??
网上查找说是将cacti目录读写权限给cactiuser
查看cacti目录的权限
drwxr-xr-x11 1000 users4096 Jun 302005 cacti
于是更改 chown -R cacti
drwxr-xr-x11 cactiuser users4096 Jun 302005 cacti
查看这些目录,特别是rra 必须是cactiuser能读写的才可以
这个时候每隔5分钟手动执行
[root@test etc]# /usr/local/php4/bin/php/usr/local/apache2/htdocs/cacti/poller.php
查看生成的rra文件 是否取到数据
[root@test etc]# /usr/local/rrdtool/bin/rrdtool fetch/usr/local/apache2/htdocs/cacti/rra/off_traffic_in_11.rrd AVERAGE
timestamptraffic_outtraffic_in
1175645100:nannan
.
.
.
1175694000:nannan
1175694300:nannan
1175694600:nannan
1175720100:nannan
1175720400:4.5239193878e+049.5334806122e+04
1175720700:4.4871998223e+049.6902754466e+04
1175721000:nannan
.
.
1175729700:nannan
1175730000:nannan
1175730300:7.8620931034e+041.6441344335e+05
1175730600:7.7566945636e+041.4432470044e+05
1175730900:6.9826201565e+041.3622941426e+05
1175731200:6.9826201565e+041.3622941426e+05
1175731500:7.5456780826e+041.4221566716e+05
1175731800:nannan
以上可见,一旦手动执行poller.php 就可以取道数据,看来问题还是出在了自动执行的,crontab的问题。
更多精彩内容:http://www.bianceng.cnhttp://www.bianceng.cn/webkf/tools/
---------------------------------------------查看目录、文件的权限-----------------------------------------------------
[root@test ~]# cd /usr/local/apache2/htdocs/
[root@test htdocs]# ls -l
drwxr-xr-x11 cactiuser users4096 Jun 302005 cacti
[root@test htdocs]# cd cacti
[root@test cacti]# ls -l
total 776
-rw-r--r--1 cactiuser users5892 Jun 302005 about.php
-rw-r--r--1 cactiuser users4773 Jun 302005 auth_changepassword.php
-rw-r--r--1 cactiuser users6171 Jun 302005 auth_login.php
-rw-------1 cactiuser users 170639 Jun302005 cacti.sql
-rw-r--r--1 cactiuser users13108 Jun 302005 cdef.php
-rw-r--r--1 cactiuser users15843 Jun 302005 cmd.php
-rw-r--r--1 cactiuser users5917 Jun 302005 color.php
-rw-r--r--1 cactiuser users17516 Jun 302005 data_input.php
-rw-r--r--1 cactiuser users28158 Jun 302005 data_queries.php
-rw-r--r--1 cactiuser users43730 Jun 302005 data_sources.php
-rw-r--r--1 cactiuser users26823 Jun 302005 data_templates.php
drwxr-xr-x5 cactiuser users4096 Jun 302005 docs
-rw-r--r--1 cactiuser users6110 Jun 302005 gprint_presets.php
-rw-r--r--1 cactiuser users3423 Jun 302005 graph_image.php
-rw-r--r--1 cactiuser users10438 Jun 302005 graph.php
-rw-r--r--1 cactiuser users6318 Jun 302005 graph_settings.php
-rw-r--r--1 cactiuser users11757 Jun 302005 graphs_items.php
-rw-r--r--1 cactiuser users30676 Jun 302005 graphs_new.php
-rw-r--r--1 cactiuser users46433 Jun 302005 graphs.php
-rw-r--r--1 cactiuser users10091 Jun 302005 graph_templates_inputs.php
-rw-r--r--1 cactiuser users17359 Jun 302005 graph_templates_items.php
-rw-r--r--1 cactiuser users19176 Jun 302005 graph_templates.php
-rw-r--r--1 cactiuser users13531 Jun 302005 graph_view.php
-rw-r--r--1 cactiuser users30855 Jun 302005 host.php
-rw-r--r--1 cactiuser users14232 Jun 302005 host_templates.php
drwxr-xr-x2 cactiuser users4096 Jun 302005 images
drwxr-xr-x6 cactiuser users4096 Apr4 15:11 include
-rw-r--r--1 cactiuser users2271 Jun 302005 index.php
drwxr-xr-x2 cactiuser users4096 Jun 302005 install
drwxr-xr-x3 cactiuser users4096 Jun 302005 lib
-rw-r--r--1 cactiuser users15141 Jun 302005 LICENSE
drwxr-xr-x2 cactiuser users4096 Apr4 16:08 log
-rw-r--r--1 cactiuser users1796 Jun 302005 logout.php
-rw-r--r--1 cactiuser users9247 Jun 302005 poller.php
-rw-r--r--1 cactiuser users72 Jun 302005 README
drwxr-xr-x5 cactiuser users4096 Jun 302005 resource
drwxr-xr-x2 cactiuser users4096 Apr5 16:05 rra
-rw-r--r--1 cactiuser users6619 Jun 302005 rra.php
drwxr-xr-x2 cactiuser users4096 Jun 302005 scripts
-rw-r--r--1 cactiuser users6758 Jun 302005 script_server.php
-rw-r--r--1 cactiuser users353 Jun 302005 script_server.pl
-rw-r--r--1 cactiuser users4832 Jun 302005 settings.php
-rw-r--r--1 cactiuser users6813 Jun 302005 templates_export.php
-rw-r--r--1 cactiuser users 5843 Jun 302005 templates_import.php
-rw-r--r--1 cactiuser users17443 Jun 302005 tree.php
-rw-r--r--1 cactiuser users28117 Jun 302005 user_admin.php
-rw-r--r--1 cactiuser users10912 Jun 302005 utilities.php
[root@test cacti]# cd rra
[root@test rra]# ls -l
total 600
-rw-rw-r--1 cactiuser cactiuser 94660Apr6 13:25 by_traffic_in_14.rrd
-rw-rw-r--1 cactiuser cactiuser 94660Apr6 13:25 by_traffic_in_15.rrd