You can redirect the solver output to a file as follows:
solve > out;
where 'out' is the filename which you can change.
Also there is a solver message from the solution file which is reported using different means. For CPLEX it looks like
CPLEX
12.2.0.0: optimal solution; objective 42
0 dual simplex iterations (0 in phase I)
It is stored in the solve_message parameter and can be printed to a file as well:
print solve_message >> out;
Then you can parse the file containing the solver (CPLEX) output to extract all necessary information.
HTH,
Victor