session: added support for ntasks-per-{socket,core}