|
|
| Author |
Message |
manaf Cacti User
Joined: 16 Apr 2006 Posts: 50
|
Posted: Sun Aug 20, 2006 8:51 am Post subject: Advanced ping 100% loss |
|
|
I have a problem in graphing ping latency using advanced ping template. the graph always show a constant 100% loss as you see in the attached graph.
when I run the script using root account no problem happend:
| Quote: | [root@nms cacti]# php /var/www/html/cacti/scripts/ss_fping.php www.google.com 20
min:154.7600 avg:156.2960 max:159.0200 dev:1.0255 loss:0.0000
[root@nms cacti]#
[root@nms cacti]# |
but using other users like cactiuser i got the following result:
| Quote: | -bash-3.1$ php /var/www/html/cacti/scripts/ss_fping.php www.google.com
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
loss:100.00
PHP Warning: Unknown: open(/var/lib/php/session/sess_i3nvshq0fev0lokbguenmjc9u5, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0
-bash-3.1$ |
I'm using cacti 0.8.6h and php 5.1.4
could anybody help??
| Description: |
|
| Filesize: |
24.75 KB |
| Viewed: |
3695 Time(s) |

|
|
|
| Back to top |
|
 |
echelon360
Joined: 28 Mar 2006 Posts: 24
|
Posted: Sun Aug 20, 2006 11:50 pm Post subject: |
|
|
| i'm having the same problem as well...any luck?
|
|
| Back to top |
|
 |
sizulku Cacti User
Joined: 04 Nov 2002 Posts: 102 Location: ACEH
|
Posted: Mon Aug 21, 2006 12:57 am Post subject: |
|
|
| you need to run poller as root.
|
|
| Back to top |
|
 |
echelon360
Joined: 28 Mar 2006 Posts: 24
|
Posted: Mon Aug 21, 2006 2:57 am Post subject: |
|
|
| sizulku wrote: | | you need to run poller as root. |
but i'm running cacti on windows
|
|
| Back to top |
|
 |
manaf Cacti User
Joined: 16 Apr 2006 Posts: 50
|
Posted: Wed Aug 30, 2006 3:58 pm Post subject: |
|
|
| does anybody get solve this problem?
|
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9697 Location: MI, USA
|
Posted: Thu Aug 31, 2006 7:52 pm Post subject: |
|
|
This is an issue in Linux/Unix that prevents ICMP sockets to be created by anyone other than root. So, if your poller runs as root, you should be ok. Otherwise, you have to set the euid of php to root. A good way of doing that is to copy the PHP program to a custom location, make only the poller have access to it and then set the setuid bit on the application. Then in cron, make sure you start poller with this special php program. I have not tested it, but it might work. Don't know. Running the poller as root will though.
TheWitness
|
|
| Back to top |
|
 |
|