  Although $\Lambda$CDM model is very successful in many aspects, it has been
seriously challenged. Recently, warm dark matter (WDM) remarkably rose as an
alternative of cold dark matter (CDM). In the literature, many attempts have
been made to determine the equation-of-state parameter (EoS) of WDM. However,
in most of the previous works, it is usually assumed that the EoS of dark
matter (DM) is constant (and usually the EoS of dark energy is also constant).
Obviously, this assumption is fairly restrictive. It is more natural to assume
a variable EoS for WDM (and dark energy). In the present work, we try to
constrain the EoS of variable WDM with the current cosmological observations.
We find that the best fits indicate WDM, while CDM is still consistent with the
current observational data. However, $\Lambda$CDM is still better than WDM
models from the viewpoint of goodness-of-fit. So, in order to distinguish WDM
and CDM, the further observations on the small/galactic scale are required. On
the other hand, in this work we also consider WDM whose EoS is constant, while
the role of dark energy is played by various models. We find that the
cosmological constraint on the constant EoS of WDM is fairly robust.
