Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Path problem again...

 
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific
Author Message
Steve
Guest





PostPosted: Thu Aug 14, 2003 1:23 am    Post subject: Path problem again... Reply with quote

Hi,

I'm running cacti 0.8.2a under OpenBSD 3.3.

My paths are set to /var/www/htdocs as Web Server Document Root and /cacti as cacti Web Root.

I have access to the cacti administartion interface and the permissions to the cacti paths are correct.

Code:

root@gattaca:/var/www/htdocs/cacti# ls -l
total 1194

...snip...

drwxr-xr-x  2 www   www        512 Jul 14 07:36 log

...snip...

drwxr-xr-x  2 www   www        512 Aug 13 11:19 rra

...snip...



But:
the scripts doesn't work because they are started from "var/www/...." and not "/var/www...."
The cronjob output shows this:

Code:

Subject: Cron <www@gattaca> cd /var/www/htdocs/cacti; /usr/local/bin/php cmd.php
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/var/www>
X-Cron-Env: <LOGNAME=www>
X-Cron-Env: <USER=www>
Date: Thu, 14 Aug 2003 08:10:07 +0200 (CEST)

Can't open perl script "var/www/htdocs/cacti/scripts/linux_memory.pl": No such >
Can't open perl script "var/www/htdocs/cacti/scripts/linux_memory.pl": No such >
Can't open perl script "var/www/htdocs/cacti/scripts/loadavg_multi.pl": No such>
Can't open perl script "var/www/htdocs/cacti/scripts/unix_users.pl": No such fi>
Can't open perl script "var/www/htdocs/cacti/scripts/unix_processes.pl": No suc>
command: perl var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:, output:
command: perl var/www/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output:
MUTLI command: perl var/www/htdocs/cacti/scripts/loadavg_multi.pl, output:
command: perl var/www/htdocs/cacti/scripts/unix_users.pl, output:
command: perl var/www/htdocs/cacti/scripts/unix_processes.pl, output:
update /var/www/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buf>
update /var/www/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap N>
update /var/www/htdocs/cacti/rra/localhost_users_6.rrd --template users N:U
update /var/www/htdocs/cacti/rra/localhost_proc_7.rrd --template proc N:U
time: 1
export: running graph export


The exported graphs are empty: http://gattaca.dyndns.info/stat/

how can I fix this problem ?

Thx !
Steve
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Fri Aug 15, 2003 1:04 am    Post subject: Reply with quote

Are you still having problems with this? I ask because it looks like there is some data on your graphs now.

-Ian
Back to top
Steve
Guest





PostPosted: Fri Aug 15, 2003 2:39 am    Post subject: Reply with quote

Hi,

I edited the data_input_data_cache manually.
In the column "command", I put a "/" in front of the path

Example:
perl var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:
-->
perl /var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:

Why did this error appear and how can I avoid it in the future ?

Bye
Steve
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Sat Aug 16, 2003 12:53 am    Post subject: Reply with quote

What happens if you comment out line 289 of 'include/functions.php' and clear your poller cache?

-Ian
Back to top
Steve
Guest





PostPosted: Sat Aug 16, 2003 4:03 am    Post subject: Reply with quote

Hi raX,

this is the output:

Code:


cat: /proc/meminfo: No such file or directory
cat: /proc/meminfo: No such file or directory
[i]^^^  these two lines appear because there is no /proc/meminfo in OPenBSD. Don't care about it in the moment...[/i]

[i]...but the following line starting with 'sh' wasn't there before I made the changes you asked for.[/i]
sh: syntax error: unexpected EOF

command: perl /var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:, output:
command: perl /var/www/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output:
MUTLI command: perl /var/www/htdocs/cacti/scripts/loadavg_multi.pl, output: 1min:0.59 5min:0.25 10min:0.13
MULTI expansion: found fieldid: 17, found rrdname: load_1min, value: 0.59
MULTI expansion: found fieldid: 18, found rrdname: load_5min, value: 0.25
MULTI expansion: found fieldid: 19, found rrdname: load_15min, value: 0.13
command: perl /var/www/htdocs/cacti/scripts/unix_users.pl <username>, output:
command: perl /var/www/htdocs/cacti/scripts/unix_processes.pl, output: 50
update /var/www/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers N:U
update /var/www/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap N:U
update /var/www/htdocs/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min N:0.59:0.25:0.13
update /var/www/htdocs/cacti/rra/localhost_users_6.rrd --template users N:U
update /var/www/htdocs/cacti/rra/localhost_proc_7.rrd --template proc N:50
time: 1
export: running graph export


If I undo my changes in the data_input_data_cache table (deleting the / in front of the path names), the old error still occurs:

Code:

...snip...

Can't open perl script "var/www/htdocs/cacti/scripts/loadavg_multi.pl": No such file or directory

...snip...
[/i]
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Sat Aug 16, 2003 11:23 am    Post subject: Reply with quote

I am trying to see if commenting out line 289 of 'include/functions.php' fixes your problem without you having to manually modify the 'data_input_data_cache' table. Is this the case?

-Ian
Back to top
Steve
Guest





PostPosted: Wed Aug 20, 2003 6:49 am    Post subject: Reply with quote

Hi raX,

this doesn't help

Without "/" in front of the paths (e. g. perl var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:) and Line 286 commented out:

Code:

Can't open perl script "var/www/htdocs/cacti/scripts/linux_memory.pl": No such file or directory
Can't open perl script "var/www/htdocs/cacti/scripts/linux_memory.pl": No such file or directory
Can't open perl script "var/www/htdocs/cacti/scripts/loadavg_multi.pl": No such file or directory
sh: syntax error: unexpected EOF
Can't open perl script "var/www/htdocs/cacti/scripts/unix_processes.pl": No such file or directory
command: perl var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:, output:
command: perl var/www/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output:
MUTLI command: perl var/www/htdocs/cacti/scripts/loadavg_multi.pl, output:
command: perl var/www/htdocs/cacti/scripts/unix_users.pl <username>, output:
command: perl var/www/htdocs/cacti/scripts/unix_processes.pl, output:
update /var/www/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers N:U
update /var/www/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap N:U
update /var/www/htdocs/cacti/rra/localhost_users_6.rrd --template users N:U
update /var/www/htdocs/cacti/rra/localhost_proc_7.rrd --template proc N:U
time: 1
export: running graph export



With "/" in front of the paths (e. g. perl /var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:) and Line 286 commented out:

Code:

cat: /proc/meminfo: No such file or directory
cat: /proc/meminfo: No such file or directory
sh: syntax error: unexpected EOF
command: perl /var/www/htdocs/cacti/scripts/linux_memory.pl MemFree:, output:
command: perl /var/www/htdocs/cacti/scripts/linux_memory.pl SwapFree:, output:
MUTLI command: perl /var/www/htdocs/cacti/scripts/loadavg_multi.pl, output: 1min:1.84 5min:1.63 10min:1.41
MULTI expansion: found fieldid: 17, found rrdname: load_1min, value: 1.84
MULTI expansion: found fieldid: 18, found rrdname: load_5min, value: 1.63
MULTI expansion: found fieldid: 19, found rrdname: load_15min, value: 1.41
command: perl /var/www/htdocs/cacti/scripts/unix_users.pl <username>, output:
command: perl /var/www/htdocs/cacti/scripts/unix_processes.pl, output: 45
update /var/www/htdocs/cacti/rra/localhost_mem_buffers_3.rrd --template mem_buffers N:U
update /var/www/htdocs/cacti/rra/localhost_mem_swap_4.rrd --template mem_swap N:U
update /var/www/htdocs/cacti/rra/localhost_load_1min_5.rrd --template load_1min:load_5min:load_15min N:1.84:1.63:1.41
update /var/www/htdocs/cacti/rra/localhost_users_6.rrd --template users N:U
update /var/www/htdocs/cacti/rra/localhost_proc_7.rrd --template proc N:45
time: 1
export: running graph export


What else can I try ?

Thank you very much for your help !

Steve
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Thu Aug 21, 2003 6:44 pm    Post subject: Reply with quote

What version of PHP are you running?

-Ian
Back to top
Steve
Guest





PostPosted: Fri Aug 22, 2003 1:01 am    Post subject: Reply with quote

PHP
Code:

Steve@gattaca:~# php -v
PHP 4.3.2 (cli) (built: Aug 11 2003 13:38:57)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies


mySQL
Code:

mysql> status
--------------
mysql  Ver 11.18 Distrib 3.23.55, for unknown-openbsd3.3 (i386)

Connection id:          1824
Current database:
Current user:           root@localhost
Current pager:          stdout
Using outfile:          ''
Server version:         3.23.55-log
Protocol version:       10
Connection:             Localhost via UNIX socket
Client characterset:    latin1
Server characterset:    latin1
UNIX socket:            /var/run/mysql/mysql.sock
Uptime:                 5 days 19 hours 45 min 22 sec

Threads: 1  Questions: 235335  Slow queries: 0  Opens: 231707  Flush tables: 1  Open tables: 4 Queries per second avg: 0.468
--------------



Apache
Code:

Server version: Apache/1.3.27 (Unix)
Server built:   Jul  7 2003 11:01:10
Server's Module Magic Number: 19990320:13
Server compiled with....
 -D EAPI
 -D HAVE_MMAP
 -D HAVE_SHMGET
 -D USE_MMAP_SCOREBOARD
 -D USE_MMAP_FILES
 -D HAVE_FLOCK_SERIALIZED_ACCEPT
 -D HAVE_SYSVSEM_SERIALIZED_ACCEPT
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D HARD_SERVER_LIMIT=256
 -D HTTPD_ROOT="/var/www"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/httpd.scoreboard"
 -D DEFAULT_LOCKFILE="logs/httpd.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
 -D ACCESS_CONFIG_FILE="conf/access.conf"
 -D RESOURCE_CONFIG_FILE="conf/srm.conf"


Apache ist chroot'ed into /var/www

thx
Steve
Back to top
Steve
Guest





PostPosted: Wed Sep 10, 2003 12:11 am    Post subject: Reply with quote

After updating to cacti 0.8.3a, the problmes are "fixed".

Thx
Steve
Back to top
raX
Lead Developer


Joined: 13 Oct 2001
Posts: 2234
Location: Carlisle, PA

PostPosted: Wed Sep 10, 2003 7:18 pm    Post subject: Reply with quote

That's good to hear, even though we aren't left with much of an answer as what went wrong. Let me know if you experience any more problems.

-Ian
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Help: Linux/Unix Specific All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group