Jprofiler无法在远程计算机上查看Jboss JVM(Jprofiler unable to see Jboss JVM on remote machine)
我试图将本地计算机上的JProfiler GUI(Windows x64)连接到运行在远程(Windows x64)上的JProfiler代理。 远程机器有2个JVM--一个是JBOSS JVM,另一个是作为Windows服务的Java应用程序,通过YAJSW的包装服务。 这些JVM启动Windows用户配置文件1.我将JProfiler代理zip文件粘贴到远程机器上,并通过mstsc登录到它。 当我在cmd(以管理员身份)运行jpenable命令时,它会要求我搜索“已运行的JVM” - 我按'y',但cmd窗口会自动关闭。 当我强制Jpenable运行这些JVM中的任何一个的PID时 - 它会抱怨JVM不能被这个用户看到。 即使使用用户配置文件1,JProfiler也无法看到JBOSS JVM或其他具有显示服务选项的JVM,并显示错误消息“未找到未定义的JVM”。
我的问题是 - 如果我们在1个用户启动的远程机器上获得了JVM,并且我试图用用户2运行JProfiler代理(通过jpenable),我怎么让代理看到两个JVM启动分析,这样我可以将我的本地JProfiler GUI连接到这些JVM中的任何一个。
非常感激 !
I am attempting to hook up JProfiler GUI on my local machine(Windows x64) to a JProfiler agent running on a remote (Windows x64). The remote machine has 2 JVMs - one a JBOSS JVM and another as a Java Application as a Windows Service via wrapper services of YAJSW. These JVMs are started Windows User Profile 1. I pasted the JProfiler agent zip file on the remote machine and logged into it via mstsc. When I run the jpenable command in cmd (As admin) and it asks me to search for "already running JVMs" - I press 'y' but the cmd window automatically closes out. When I force jpenable to run with the PID of either of those JVMs - it complains that the JVMs cannot be seen by this user. Even using User Profile 1, JProfiler could not see the JBOSS JVM or the other JVM (with Show Services option) with the error message - 'No unprofiled JVMs found'.
My question is - if we have got JVMs on a remote machine started by 1 user, and I attempt to run the JProfiler agent (through jpenable) with user 2 , how can I have the agent see both JVMs to start up profiling so that I can hook up my local JProfiler GUI to either of these JVMs.
Much Appreciated !
原文:https://stackoverflow.com/questions/37995332
最满意答案
你可以这样做:
m = __import__(a)
在这种情况下,
m
是目标模块,例如:>>> m = __import__('sys') >>> m.path ['', '/usr/lib/python2.7', '/usr/local/lib/python2.7/dist-packages' ... ]
you can do this:
m = __import__(a)
in this case
m
is object module, as example:>>> m = __import__('sys') >>> m.path ['', '/usr/lib/python2.7', '/usr/local/lib/python2.7/dist-packages' ... ]
相关问答
更多-
在Python中使用同一模块内的字符串调用函数?(Calling a function from string inside the same module in Python?)[2023-05-02]
globals可能更易于理解。 它返回当前模块的__dict__ ,所以你可以这样做: func_I_want = globals()['bar'] #Get the function func_I_want() #call it 如果你真的想要模块对象,你可以从sys.modules获得它(但你通常不需要它): import sys.modules this_mod = sys.modules[__name__] func = getattr(this_mod,'bar') func() 请注 ... -
下列中不属于面向对象的编程语言的是?[2022-05-30]
a -
你可以这样做: m = __import__(a) 在这种情况下, m是目标模块,例如: >>> m = __import__('sys') >>> m.path ['', '/usr/lib/python2.7', '/usr/local/lib/python2.7/dist-packages' ... ] you can do this: m = __import__(a) in this case m is object module, as example: >>> m = __import ...
-
你可以使用getattr getattr(module, class_name) 访问课程。 更完整的代码: module = __import__(module_name) class_ = getattr(module, class_name) instance = class_() You can use getattr getattr(module, class_name) to access the class. More complete code: module = __import__ ...
-
从字符串变量导入模块(import module from string variable)[2022-05-04]
__import__函数有点难以理解。 如果你改变 i = __import__('matplotlib.text') 至 i = __import__('matplotlib.text', fromlist=['']) 那么i将参考matplotlib.text 。 在Python 2.7和Python 3.1或更高版本中,您可以使用importlib : import importlib i = importlib.import_module("matplotlib.text") 一些笔记 如果 ... -
你可以使用python默认函数__import__来导入模块。 mod = __import__(module) 但是这个模块的路径需要附加在sys.path中 sys.path.insert(0,
) you can use python default function __import__ to import modules. mod = __import__(module) but path of this module need to be appended ... -
该错误表示在路径上找不到该模块,因此它位于错误的位置或路径不是您认为的那样。 您可以查看sys.path(在'import sys'之后)以查看路径。 我不确定为什么Wing会在那里提供自动完成功能。 一种可能性是您已经在Project Properties(或Wing 101中的Configure Python对话框)中修改了Python Path,并且尚未从其Options菜单重新启动Python Shell。 That error indicates that the module is not fo ...
-
如何在python中处理字符串调用模块和函数?(How is calling module and function by string handled in python?)[2023-11-14]
使用__import__(....)函数: http://docs.python.org/library/functions.html# import (David几乎拥有它,但我认为如果你想重新定义正常的导入过程,例如从zip文件加载,他的例子更适合做什么) Use the __import__(....) function: http://docs.python.org/library/functions.html#import (David almost had it, but I think his ... -
你要求的是不可能的。 您正在尝试使用目标代码创建源代码。 虽然有反编译器项目可以或多或少地做到这一点,但是完全通用的解决方案是难以处理的。 如果您只想获得模块的原始来源,那很容易。 例如,您可以使用inspect.getsource ,然后将结果字符串写入文件。 或者只使用inspect.getfile并从生成的路径名中复制。 当然,您可以在复制时修改原始来源。 例如: source = inspect.getsource(foo) with open('newfoo.py', 'wb') as f: ...
-
该字符串实际上最终成为模块的文档字符串。 因此它可以通过模块的__doc__属性访问。 Python选择它在模块,类或函数中找到的第一个松散字符串来确定其docstring。 https://www.python.org/dev/peps/pep-0257/#what-is-a-docstring That string actually ends up being the docstring for the module. So it is accessed by the __doc__ attribut ...