check_phpfpm_status icon indicating copy to clipboard operation
check_phpfpm_status copied to clipboard

Perl Notices on uninitialized values

Open doertedev opened this issue 10 years ago • 1 comments

I run: ./check_phpfpm_status.pl -H 127.0.0.1 -u /fpm_status -s SOMEFANCYURL -w 10,1,1 -c 5,2,2

And get: Use of uninitialized value $LastMaxListenQueue in numeric ge (>=) at ./check_phpfpm_status.pl line 416. Use of uninitialized value $LastMaxListenQueue in subtraction (-) at ./check_phpfpm_status.pl line 424. $Le actual Result$

doertedev avatar Apr 15 '14 13:04 doertedev

Ok, let's assume SOMEFANCYURL is a domain name (DNS) and not an url. LastMaxListenQueue is always initialized (https://github.com/regilero/check_phpfpm_status/blob/master/check_phpfpm_status.pl#L387), so something may have set a null inside, maybe the read of the temporary file (https://github.com/regilero/check_phpfpm_status/blob/master/check_phpfpm_status.pl#L388-394).

Try to remove the tempfile or to read the content, it should be something like: /tmp/127.0.0.1_check_phpfpm_status<xxxxmd5_of_urlxxx> and the 4th line should be the content set in this variable.

regilero avatar Apr 22 '14 08:04 regilero