For several month I had this problem on one of my osx servers: the computer name was keep changing by adding a number at the end. Today was mmd (1), tomorrow mmd (2) and so on.
I have tried several things but nothing was successful until I finally gave up and looked up over the internet.
The solution was found here (link at the end of this article), among other methods. The one below was the most useful to me.
plex:~ osx$ sudo /usr/libexec/PlistBuddy -c "Add :ProgramArguments: string --no-namechange" /System/Library/LaunchDaemons/com.apple.discoveryd.plist Password: plex:~ osx$ sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist plex:~ osx$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.discoveryd.plist plex:~ osx$ sudo scutil --set ComputerName mmd plex:~ osx$ sudo scutil --set HostName mmd plex:~ osx$ sudo scutil --set LocalHostName mmd plex:~ osx$ hostname -f mmd
Source: http://apple.stackexchange.com/questions/153080/computer-name-keeps-changing-osx-10-10-14a389