The ergodic behavior of magnetic field lines is investigated numerically in a Tokamak divertor system under the influence of magnetic perturbations. The entropylike quantity introduced into the magnetic system characterizes the property of the magnetic field lines and is related closely to the width of the ergodic layer. The metric entropy of the ergodic field lines is given in terms of the entropylike quantity.