[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grinder-use
Subject:    Re: [Grinder-use] Agents file store
From:       Hendrik Schenk <hschenk () gmx ! com>
Date:       2012-06-25 9:58:07
Message-ID: 4FE8362F.3070904 () gmx ! com
[Download RAW message or body]

Hi Phil,

yes, i want to access a file.
My directorys looks like this:

C:\grinder\
--> grinder.properties

C:\grinder\scripts\
--> here are the scripts to execute, extra python modules and the files 
to access from the workers threads

So that the agents or the worker threads can find the extra modules, i 
had to set the following in grinder.properties
"grinder.jvm.arguments = -Dpython.path=C:/grinder/scripts/"

In the Console i set the distribution directory to C:\grinder\scripts. I 
start the Grinder in C:\grinder, so that it can find the properties. But 
if i want to open the file in code, it will fail, because it does not 
find the file.
If i write
file = open("/scripts/" + filename) or
file = open("./scripts/" + filename) or
file = open(filename)

it will not work.


If i set the abosulte path (open("C:/grinder/scripts/" + filename) ) or 
if i  move the properties to scripts, start the agent there and call 
open(filename), it will work.

Best regards
hschenk


>
> Philip Aston schrieb:
>> Can you elaborate on what you mean by "set an absolute path"?
>>
>> Are trying to write some script code to access a file? Relative paths
>> should work here. When an agent starts a worker process to run a
>> distributed script, the working directory of the agent is set to the
>> distribution directory.
>>
>> - Phil
>>
>> On 22/06/12 09:58, Hendrik Schenk wrote:
>>  
>>> Hi,
>>>
>>> i want to distribute some files with the console to every agent, so 
>>> that every worker has access to the files. If i set a absolute path, 
>>> i can open the file and read it. But if i set a relative path, i 
>>> will not work. So there is a file store with two directorys: current 
>>> and incoming. even if set the relative path to one of this 
>>> directorys, i cannot open the file.
>>>
>>> I start the grinder in C:\grinder . the filestore will be created in 
>>> C:\grinder\<hostname>-file-store and there are the two directorys 
>>> current and incoming. How can i set the relative path to this file? 
>>> Which path do i have to take?
>>>
>>> Best regards
>>> hschenk
>>>
>>>     
>>
>>   
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
grinder-use mailing list
grinder-use@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/grinder-use
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic