| headless not logging!? [message #667489] |
Fri, 29 April 2011 02:06  |
No real name Messages: 3 Registered: April 2011 |
Junior Member |
|
|
Hi,
I'm having big issues logging data while running scenario's in headless. I'm currently using v1.2 RC5 64bit for OS X, but have also tried RC5 plus the slightly older weekly builds on a linux machine.
I can launch STEM -headless fine and scenarios execute like expected. However, even though I provide the -log parameter, the .csv files are generated but they never get populated with any data. I've tried several projects, including one that was created following exact instructions on the STEM wiki.
(also to note: I've validated all project-files inside the GUI so they should be error-free)
There are several weird parts to this issue. First of all, all scenarios I attempt to run headless-ly runs fine in the GUI, and if I turn .csv logger on while simulation in the GUI it also logs correctly to the .csv-files. There seems to be an issue with logging in -headless !?!
The other weird part of this problem is that I've downloaded the UsaMexico project and run it in -headless mode. It actually *does* log output BUT it only starts doing so at exactly 40% (why is that?). Basically it writes out a huge 10.5MB chunk of data at 40% and then another 10MB or so in the final %.
I need to get headless up and running ASAP with the logging. Any pointers?
Thanks
|
|
|
|
|
| Re: headless not logging!? [message #667614 is a reply to message #667489] |
Fri, 29 April 2011 18:35   |
Matthew Davis Messages: 268 Registered: July 2009 |
Senior Member |
|
|
Hi,
The commits earlier today fix the two bugs listed in the bug report. First, when running a simulation in headless mode, a STOP event will be fired at completion, which will properly flush and close the log files. Second fix is to match a bug fix from the UI logger earlier this month, that'll flush the log at PAUSE too. Together these should ensure no log data is lost on simulations that run to completion in headless (including log files < 10 MB). This will be in the 1.2.0 release build, which should happen this weekend or early next week.
This does not fix the issue where a headless process is killed by signal and data does not get flushed. The same problem also exists in the UI loggers, but at least you can stop/pause in UI. For the next release, we'll investigate options here. One option could be to make the write buffer size configurable and/or allow interactive input from the console (like "stop" or "exit").
-Matt
|
|
|
|
| Re: headless not logging!? [message #667899 is a reply to message #667626] |
Mon, 02 May 2011 12:27   |
Matthew Davis Messages: 268 Registered: July 2009 |
Senior Member |
|
|
Hi again,
Yep, it should be pretty easy.
Assuming you're using Eclipse with the plug-in development environment installed (Eclipse Classic or Plug-in Developer versions) and have checked out the STEM source code, do the following...
- Right click on the org.eclipse.stem.util.loggers project
- Select Export
- In the Export wizard, expand "Plug-in Development", select "Deployable plug-ins and fragments" and click next
- Make sure "org.eclipse.stem.util.loggers" is selected. Enter a directory to export to.
- Click Finish
This will compile and create properly-formed plug-in JAR in the "plugins" directory under your target directory.
- Next, copy the JAR file to the "plugins" directory under the root directory of your STEM installation. Make sure the name matches and the new JAR replaces the existing org.eclipse.stem.util.loggers_* JAR file in this directory.
- Launch STEM through the command line with the -clean flag. (If you're using a Mac, it'll be: "STEM.app/Contents/MacOS/STEM -clean")
- The new plugin should be installed!
-Matt
|
|
|
|
Powered by
FUDForum. Page generated in 0.01798 seconds