lefred / mysql-shell-innotop

Innotop like module in MySQL Shell
GNU General Public License v2.0
17 stars 4 forks source link

import innotop from mysqlsh doesn't seem to work #2

Open btemesre opened 5 years ago

btemesre commented 5 years ago

Hello,

I might be doing something wrong but following the readme and installation instructions I am having the issue while calling the procedure innotop.session_processlist.run() that the module innotop is not loaded or available. I was testing the both open-source and the commercial version of mysqlsh.

$ /u00/app/mysql/product/mysql-shell-commercial-8.0.15/bin/mysqlsh --py admin@localhost:2222
Please provide the password for 'admin@localhost:2222': ****************
MySQL Shell 8.0.15-commercial
Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.
Type '\help' or '\?' for help; '\quit' to exit.
Creating a session to 'vwadmin@localhost:2222'
Fetching schema names for autocompletion... Press ^C to stop.
Your MySQL connection id is 12
Server version: 8.0.14-commercial MySQL Enterprise Server - Commercial
No default schema selected; type \use <schema> to set one.

MySQL  localhost:2222 ssl  Py > import sys
MySQL  localhost:2222 ssl  Py > sys.path.append('/u00/app/mysql/product/mysql-shell-commercial-8.0.15/innotop/mysql-shell-innotop-master')
MySQL  localhost:2222 ssl  Py > import innotop
MySQL  localhost:2222 ssl  Py > innotop.session_processlist.run()

Traceback (most recent call last):
                                    File "<string>", line 1, in <module>
                                    File "/u00/app/mysql/product/mysql-shell-commercial-8.0.15/innotop/mysql-shell-innotop-master/modules/session_processlist.py", line 27, in run
                                    stdscr, info = innotop.common.setup(curses, session)
                                    File "/u00/app/mysql/product/mysql-shell-commercial-8.0.15/innotop/mysql-shell-innotop-master/modules/common.py", line 40, in setup
                                    curses.init_pair(10, 166, curses.COLOR_WHITE)
                                    _curses.error: init_pair() returned ERR

Line 27: stdscr, info = innotop.common.setup(curses, session)

Cheers, Balazs

lefred commented 5 years ago

Hi, do you have ncurses installed ?

could you try: python -c 'import curses'

btemesre commented 5 years ago

Hi, I would say so, this is a pretty closed enterprise environment at one of our big customers so I can only work with what is provided to us from the OS team: [username@servername ~]$ python -c 'import curses' [username@servername ~]$ cdm [username@servername mysql]$ cd product/mysql-shell-commercial-8.0.15/bin/ [username@servername bin]$ cd mysql-shell-innotop-master/^C [username@servername bin]$ ./mysqlsh --py admin@localhost:33060 Please provide the password for 'admin@localhost:33060': **** MySQL Shell 8.0.15-commercial

Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

MySQL localhost:33060+ ssl Py > import sys MySQL localhost:33060+ ssl Py > sys.path.append('/u00/app/mysql/product/mysql-shell-commercial-8.0.15/innotop/mysql-shell-innotop-master') MySQL localhost:33060+ ssl Py > import innotop MySQL localhost:33060+ ssl Py > innotop.session_processlist.run() Traceback (most recent call last): File "", line 1, in

File "/u00/app/mysql/product/mysql-shell-commercial-8.0.15/innotop/mysql-shell-innotop-master/modules/session_processlist.py", line 27, in run

                         stdscr, info = innotop.common.setup(curses,

session) File "/u00/app/mysql/product/mysql-shell-commercial-8.0.15/innotop/mysql-shell-innotop-master/modules/common.py", line 40, in setup

curses.init_pair(10, 166, curses.COLOR_WHITE)

                             _curses.error: init_pair() returned ERR

                              MySQL  localhost:33060+ ssl  Py >

On Fri, Feb 22, 2019 at 1:38 PM Frédéric Descamps notifications@github.com wrote:

Hi, do you have ncurses installed ?

could you try: python -c 'import curses'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lefred/mysql-shell-innotop/issues/2#issuecomment-466382854, or mute the thread https://github.com/notifications/unsubscribe-auth/AtmnXGZ0PBfaiDGFdCyuRn4WywtSLBOIks5vP-S8gaJpZM4bFIeB .

lefred commented 5 years ago

What is your terminal ? What is the OS ?

btemesre commented 5 years ago

By terminal I am not entirely sure what you mean: putty running on a windows client is the way we connect to the servers

[ ~]$ uname -a Linux lxf201p016 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 15 17:36:42 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux [ ~]$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.6 (Maipo)

On Fri, Feb 22, 2019 at 2:39 PM Frédéric Descamps notifications@github.com wrote:

What is your terminal ? What is the OS ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lefred/mysql-shell-innotop/issues/2#issuecomment-466399196, or mute the thread https://github.com/notifications/unsubscribe-auth/AtmnXE6_j_5tOKS0sNMwQrRB1nOkmhdsks5vP_MZgaJpZM4bFIeB .

lefred commented 5 years ago

it might be something with putty... let's see if somebody can try and confirm