Advanced ping (ss_fping.php) buggy

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

frosty
Posts: 14
Joined: Mon Feb 28, 2005 3:56 pm

Advanced ping (ss_fping.php) buggy

Post by frosty »

It seems the stats gets corrupted when running concurrent ss_fping.php "sessions". Either with other ss-fping.php sessions or with other "normal" pings. When running the script alone I don't get weird values but very often so during the cronjob. This is a typical run where the minimum value is incorrect:

02/07/2006 09:55:24 AM - CACTID: Poller[0] Host[249] DS[3246] SS[0] SERVER: /var/www/html/cacti/scripts/ss_fping.php ss_fping x.x.x.x ICMP, output: min:59.2800 avg:231.7795 max:284.0400 dev:43.3995 loss:0.0000

The minimum value is 59ms when it can't physically be less than 200ms. I think ss_fping is counting a response from some other ICMP-session.

Anyone else seen this and know how to fix it?

This is on RedHat Linux Enterprise 4 (2.6.9-22.0.1.ELsmp).
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I will have to look at the ICMP logic next week. I am out of town for a week on business. Since I originally wrote it, I have learned much. There may be an issue where PHP is getting confused.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I have made a quick review and I have made the sequence numbers all x00. I will have to add a static and change those numbers to increase. This would potentially cause issues with repeated pings. Can you please open a Mantis bug report so I don't forget to fix this. Please reference this post. (http://bugs.cacti.net).

Thanks,

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
frosty
Posts: 14
Joined: Mon Feb 28, 2005 3:56 pm

Post by frosty »

frosty
Posts: 14
Joined: Mon Feb 28, 2005 3:56 pm

Post by frosty »

Have you had time to look at this?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please try this version.

Thanks,

TheWitness
Attachments
ping.zip
(3.24 KiB) Downloaded 1004 times
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
frosty
Posts: 14
Joined: Mon Feb 28, 2005 3:56 pm

Post by frosty »

Hi!

I'm afraid I still get weird values:

02/17/2006 09:25:21 AM - CACTID: Poller[0] Host[249] DS[3246] SS[0] SERVER: /var/www/html/cacti/scripts/ss_fping.php ss_fping x.x.x.x 20 ICMP, output: min:2.4500 avg:132.7270 max:292.3800 dev:95.2837 loss:0.0000

02/17/2006 09:25:28 AM - CACTID: Poller[0] Host[252] DS[3265] SS[1] SERVER: /var/www/html/cacti/scripts/ss_fping.php ss_fping y.y.y.y 20 ICMP, output: min:35.4200 avg:247.3465 max:484.2500 dev:134.5223 loss:0.0000

The min values are 2.4ms and 35ms which are impossible when checking(in this example) a node in South Africa from Europe.
sictc
Posts: 6
Joined: Mon Nov 07, 2005 4:56 am

Post by sictc »

I lost my whole cacti folder on my cactiserver. Everything but subfolders were gone and nothing in any logfiles to indicate something bad happend except for when you started the website where you log in and got 'directory listing not allowed' :roll: I hope this has had nothing to do with updating ss_fping.
frosty
Posts: 14
Joined: Mon Feb 28, 2005 3:56 pm

Post by frosty »

Well, fortunately I didn't get that problem. Must be something else.

Anyway, I don't seem to get the minimum problem with all hosts. Could it be that Advanced ping reacts to some other ICMP packets/response and treats it like an echo-reply even though it isn't?

Will try to do some sniffing to find out.
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

frosty,

I will make one other change to remove one more degree of freedom from this equation. Sometime likely this weekend.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

frosty,

What is your OS. This issue appears to be limited to a very select few. I have confirmed that the sequence numbering is working and am going to close the ticket.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
frosty
Posts: 14
Joined: Mon Feb 28, 2005 3:56 pm

Post by frosty »

It's RedHat Linux Enterprise 4 (2.6.9-22.0.1.ELsmp). Where can the bugfixed ping.php be downloaded?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Frosty,

I am going to make another change to it. Would you be able to test it? On Linux, you will have to run as something other than root. It will be using the seteuid => 0 to establish root privileges. Does your php include the posix 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 dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
frosty
Posts: 14
Joined: Mon Feb 28, 2005 3:56 pm

Post by frosty »

I can test it. How do I check if PHP includes Posix extensions?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

check how PHP was configured using phpinfo()

Mine says :

Code: Select all

Configure Command : ./configure [...] --disable-posix
Larry, could you send me the modified version too ?

Thanks in advance.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest