Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Mytop works but gives error because of /proc/loadavg on 10.11.1 #46110

Closed
davideradice opened this issue Nov 18, 2015 · 4 comments
Closed

Mytop works but gives error because of /proc/loadavg on 10.11.1 #46110

davideradice opened this issue Nov 18, 2015 · 4 comments

Comments

@davideradice
Copy link

Mytop gives this error:

readline() on closed filehandle L at /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop line 883.
Use of uninitialized value $l in scalar chomp at /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop line 885.
Use of uninitialized value $l in concatenation (.) or string at /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop line 916.

Here is /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop at lines 883-884:

    open L, "</proc/loadavg";
    my $l = <L>;

On my system

cat /proc/loadavg 

gives me this:

cat: /proc/loadavg: No such file or directory

My system:

Mac OS X
10.11.1

Mytop:

mytop: stable 1.9.1 (bottled)
Top-like query monitor for MySQL
http://www.mysqlfanboy.com/mytop-3/
Conflicts with: mariadb
/usr/local/Cellar/mytop/1.9.1_1 (21 files, 432K) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/mytop.rb
==> Dependencies
Required: openssl ✔
@DomT4
Copy link
Member

DomT4 commented Nov 19, 2015

/proc/loadavg

This is a Linux thing, so doesn't exist on OS X. Is the error you're experiencing fatal?

@davideradice
Copy link
Author

No, it's not fatal. Anyway, is there a way for NOT showing errors in output?

Other errors, not platform specific, are shown:

Useless use of private variable in void context at /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop line 998.
"my" variable $data masks earlier declaration in same scope at /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop line 1032.
Argument "5.6.23" isn't numeric in sprintf at /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop line 286.

@DomT4
Copy link
Member

DomT4 commented Nov 20, 2015

No idea. Don't use the tool myself. Upstream hasn't been known to be active for a while now, but normally we'd suggest contacting upstream and asking them to fix up the syntax errors. If you know an alternative website/email where they can be reached that'd probably be the best course of action.

They seem to be harmless enough Perl syntax errors though. Debian looks to have patched them out of their mytop, so we could adopt that patch and see how many warnings it resolves.

@davideradice
Copy link
Author

Thank you.

I've fixed adding

no warnings "all";

to /usr/local/Cellar/mytop/1.9.1_1/libexec/bin/mytop at line 24.

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants