use the faster gethostname() instead of exec('hostname -f')