Measuring nonequilibrium temperature of forced oscillators