Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of uninitialized value $proc_mem_usages[0] in division (/) at apachebuddy.pl line 323 (#1) #6

Open
paperscissors opened this issue Mar 8, 2013 · 6 comments

Comments

@paperscissors
Copy link

Still having this issue. I found that it actually works on my other Amazon Linux instance though. It's strange.

@charlesdunbar
Copy link
Contributor

What user does your Apache process run as? Is the name more than 8 characters long? If so, #5 has the resolution.

@paperscissors
Copy link
Author

aha, yes, that's exactly it. the username is much longer than that. thanks!

@paperscissors
Copy link
Author

p.s., very much appreciate the script and all the work it entails!

@ArvyRogerio
Copy link

Gathering information...
We are checking the service running on port 80
The process listening on port 80 is /usr/sbin/httpd
The process running on port 80 is Apache/2.2.15 (Unix)
Apache has been running 0d 0h 01m 13s
The full path to the Apache config file is: /etc/httpd/conf/httpd.conf
Apache is using prefork model

Examining your Apache configuration...
Apache runs as ftpuser
Your max clients setting is 99

Analyzing memory use...
Your server has 1877 MB of memory
Use of uninitialized value $proc_mem_usages[0] in division (/) at
apachebuddy.pl line 330 (#1)
(W uninitialized) An undefined value was used as if it were already
defined. It was interpreted as a "" or a 0, but maybe it was a mistake.
To suppress this warning assign a defined value to your variables.

To help you figure out what was undefined, perl will try to tell you the
name of the variable (if any) that was undefined. In some cases it cannot
do this, so it also tells you what operation you used the undefined value
in.  Note, however, that perl optimizes your program and the operation
displayed in the warning may not necessarily appear literally in your
program.  For example, "that $foo" is usually optimized into "that "
. $foo, and the warning will refer to the concatenation (.) operator,
even though there is no . in your program.

Use of uninitialized value $proc_mem_usages[0] in division (/) at
apachebuddy.pl line 336 (#1)
Use of uninitialized value $count in division (/) at apachebuddy.pl line 350 (#1)

Illegal division by zero at apachebuddy.pl line 350 (#2)
(F) You tried to divide a number by 0. Either something was wrong in
your logic, or you need to put a conditional in to guard against
meaningless input.

Uncaught exception from user code:
Illegal division by zero at apachebuddy.pl line 350.
at apachebuddy.pl line 350
main::get_memory_usage('/usr/sbin/httpd', 'ftpuser\x{d}', 'average') called at apachebuddy.pl line 1059

@manavarroasmws
Copy link

Good aftermoon,
I am impressed with his script for apache tuning.
I've seen that has the rpm files for installation in SuSE, but they are "depcretaed".
Muchisio We work with SuSE, and with new versions that have come out this script gives us many errors.
There is contemplated a future version for Suse?
Thanks and regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@paperscissors @charlesdunbar @ArvyRogerio @manavarroasmws and others