For both the linear and nonlinear solvers default routines allow one to graphically monitor convergence of the iterative method. These are accessed via the command line with -ksp_xmonitor and -snes_xmonitor. See also Sections Convergence Monitoring and Convergence Monitoring .
The two functions used are KSPLGMonitor() and KSPLGMonitorCreate() . These can easily be modified to serve specialized needs.