Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Sun Jul 21, 2019 3:10 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 123 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next
Author Message
 Post subject:
PostPosted: Thu Oct 06, 2005 12:51 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Donations are always welcome. They would be for my kids.

Larry


Attachments:
ss_fping.zip [1.1 KiB]
Downloaded 1098 times

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.
Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 2:09 am 
Offline

Joined: Thu Oct 07, 2004 2:53 pm
Posts: 18
Location: Paris, France
Give us a wishlist ! :wink:

Thanks a lot !

Fanu.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 4:55 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
http://www.cacti.net/donate.php

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 6:40 am 
Offline

Joined: Thu Oct 07, 2004 2:53 pm
Posts: 18
Location: Paris, France
Re-Hello,

I put the new ss_fping. It seems to be better, but there is still a problem :
when the first packet is lost, the script does not stop (same problem).

What can I do to help you to resolve this ?

Thanks for your help.

Fanu.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 8:19 am 
Offline

Joined: Thu Oct 07, 2004 2:53 pm
Posts: 18
Location: Paris, France
Hello,

In addition to my last message, I have done some tests. I set in hard in the script the timeout value to 10 ms. I try to ping www.google.com (about 20ms) and it works : I think my problem is that the ss_fping script (maybe the call to Net_Ping();) never time out. So if there is a lost packet, the script never ends.

Thanks for your help.

Fanu.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 7:08 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
fanu,

This may be the issue within the ping.php program caused by the set_scoket_option command. Look for it and then review the timeout issues. In some versions of PHP, it acutally works properly. But in windows (where I code) it does not work as expected.

Read the comments on seconds and microseconds. I think you just have to reverse the order and it will work properly. Try that and let me know.

I could write some detection logic to compare unix vs. windows and modify the commands, but I am not sure what platforms PHP is broken on.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 07, 2005 7:12 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
Here is the code:

Code:
/* set the socket timeout */
socket_set_option($this->socket,
  SOL_SOCKET,  // socket level
  SO_RCVTIMEO, // timeout option
  array(
  "sec"=>$this->timeout,  // I assume timeout in microseconds
  "usec"=>0 // Timeout in seconds
));


It would be changed to:

Code:
/* set the socket timeout */
socket_set_option($this->socket,
  SOL_SOCKET,  // socket level
  SO_RCVTIMEO, // timeout option
  array(
  "sec"=>0,  // I assume timeout in microseconds
  "usec"=>$this->timeout // Timeout in seconds
));


It occurs in a few places. Please let me know.

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 09, 2005 12:14 pm 
Offline

Joined: Thu Oct 07, 2004 2:53 pm
Posts: 18
Location: Paris, France
Hello,

Thank you for your response.
I try to do what you wrote but the problem is still here.
I try to force the timeout to 10ms in the ss_fping script but the directive seems to be ignored (I ping some hosts with 300ms of latency, but if there is a packet loss, the script still never end).
I don't know where to search ...

Thank you for your help.

Fanu.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 09, 2005 2:06 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
I have a new version of ping.php attached. Please test ss_fping.php especially using UDP pings if you can spare the testing time. Timeouts work like they should now. I abandoned the set option call for the socket select, which appears to be much better developed.

TheWitness


Attachments:
ping.zip [2.92 KiB]
Downloaded 1364 times

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.
Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 10, 2005 1:37 am 
Offline

Joined: Thu Oct 07, 2004 2:53 pm
Posts: 18
Location: Paris, France
It works!
Thank you very much for this update.
Everything seems to be fine now.

Merci beaucoup !!!

Fanu.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 8:08 am 
Offline
Cacti User

Joined: Thu Oct 06, 2005 5:03 am
Posts: 402
I am using the script but always i get 100% packet loss! (even to lan)
nothing weird to the logs...
any idea?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 9:42 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14804
Location: MI, USA
JJX,

What Ping method? Have you loaded the sockets.so PHP extension?

TheWitness

_________________
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 10:57 am 
Offline

Joined: Fri Sep 30, 2005 4:23 am
Posts: 26
lard wrote:
Isn't it amazing after searching forums e.t.c. and then posting a query....you answer it yourself within minutes???!! :evil:

Turns out that after chacking the data template for advanced ping the "per device hostname" field was checked.... :oops: ....after unchecking and adding the data template to an existing host it then asked me for the IP to poll..

I'll go and turn it back to snmp-reliable now :wink:

Lard


can you explain a bit more?
I'm playing around with this, but didn't find exactly what you are talking about....


Top
 Profile  
 
 Post subject: call to undefined function socket_create() ???
PostPosted: Wed Oct 12, 2005 11:19 pm 
Offline
User avatar

Joined: Thu Sep 29, 2005 12:03 am
Posts: 14
Location: Cagayan de Oro,Philippines
When I tried to run this:

PHP Script Server has Started - Parent is cmd
scripts/ss_fping.php ss_fping www.google.com 20 TCP 80

Fatal error: Call to undefined function: socket_create() in /usr/local/cacti-0.8.6g/lib/ping.php on line 298

Im using cacti 0.8.6g and applied the latest ss_fping.zip and ping.zip from this thread but still no luck. :-(. Im running on SuSE 9.3 OS

_________________
"Knowledge is Power"


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 13, 2005 12:41 am 
Offline
User avatar

Joined: Thu Sep 29, 2005 12:03 am
Posts: 14
Location: Cagayan de Oro,Philippines
Its ok now! :-) I just need the PHP-SOCKETS service. :lol:

_________________
"Knowledge is Power"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 123 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group