代理机JVM worker进程运行时加载library文件?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

代理机JVM worker进程运行时加载library文件?

ypspace
目前在控制台中grinder.properties文件中配置grinder.jvm.arguments=-Djava.library.path=[代理机器上指定文件目录],这种可以方法可以实现worker进程加载library文件。
但问题是library文件不能随脚本分发到代理上,需要手工为每台代理部署library文件,而且文件路径要求一致。如何实现从控制台分发,自动加载library文件?
Reply | Threaded
Open this post in threaded view
|

Re: 代理机JVM worker进程运行时加载library文件?

junoyoon
Administrator
Is it grinder question? or ngrinder question?
Reply | Threaded
Open this post in threaded view
|

RE: 代理机JVM worker进程运行时加载library文件?

Mavlarn
In reply to this post by ypspace

你是要在脚本中使用其他的java lib吗?

可以建一个lib目录,把你需要的其他的java包上传到里面,使用相应的脚本运行测试的时候,默认就会把这个lib下的jars分发到agent上运行。

http://www.cubrid.org/wiki_ngrinder/entry/how-to-use-library 

 

 

-----Original Message-----
From: "ypspace [via ngrinder]"<[hidden email]>
To: "Mavlarn"<[hidden email]>;
Cc:
Sent: 2014-01-22 (星期三) 15:09:59
Subject: 代理机JVM worker进程运行时加载library文件?

目前在控制台中grinder.properties文件中配置grinder.jvm.arguments=-Djava.library.path=[代理机器上指定文件目录],这种可以方法可以实现worker进程加载library文件。
但问题是library文件不能随脚本分发到代理上,需要手工为每台代理部署library文件,而且文件路径要求一致。如何实现从控制台分发,自动加载library文件?


If you reply to this email, your message will be added to the discussion below:
http://ngrinder.642.n7.nabble.com/JVM-worker-library-tp1229.html
To start a new topic under ngrinder-user-cn, email [hidden email]
To unsubscribe from ngrinder-user-cn, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: 代理机JVM worker进程运行时加载library文件?

ypspace
脚本要调用动态链接库,所以要在library.path中指定链接库路径,才可以被调用。
测试过如果将链接库文件放在lib目录中,将无法被调用
Reply | Threaded
Open this post in threaded view
|

RE: 代理机JVM worker进程运行时加载library文件?

junoyoon
Administrator
Reply | Threaded
Open this post in threaded view
|

RE: 代理机JVM worker进程运行时加载library文件?

ypspace
学习了,能否提供一个jython脚本样例哪?
还有传递参数中有结构体参数,应该如何实现?
Reply | Threaded
Open this post in threaded view
|

RE: 代理机JVM worker进程运行时加载library文件?

junoyoon
Administrator
http://www.flester.com/blog/2009/02/21/java-jna-jythonjruby-the-sweet-spot

We didn't make any experiment for jython yet.
However I believe it will work with jython as well. Upload the dll or so in the lib folder and try to load it and map it into the interface using JNA.

If you have some troubles, please let us know.