Query nthreads automatically