Run the simulation from cmdenv and redirect the simulation output. Related config options:
cmdenv-autoflush=<bool>, default:false; per-run setting
Call fflush(stdout) after each event banner or status update; affects both
express and normal mode. Turning on autoflush may have a performance
penalty, but it can be useful with printf-style debugging for tracking down
program crashes.
cmdenv-output-file=<filename>; global setting
When a filename is specified, Cmdenv redirects standard output into the
given file. This is especially useful with parallel simulation. See the
`fname-append-host' option as well.
cmdenv-performance-display=<bool>, default:true; per-run setting
When cmdenv-express-mode=true: print detailed performance information.
Turning it on results in a 3-line entry printed on each update, containing
ev/sec, simsec/sec, ev/simsec, number of messages created/still
present/currently scheduled in FES.
cmdenv-status-frequency=<double>, unit="s", default:2s; per-run setting
When cmdenv-express-mode=true: print status update every n seconds.
Rudolf
ps: the IDE does this similarily. I.e. it reads the standard output of the simulation and parses out the status updates to get the percentage.
Thaks