add getHostnamfunction.
add of get state process function and class.