how to set hostname

all of a sudden i am not able to get hostname of sparc server. all the settings are proper in hostname file.can anyone help me on this

Hostname file as in ? do you mean hostname.xxx in /etc/ ? if so then thats the file used for IP not for hostname

Can you check what�s there in /etc/nodename

If the /etc/nodename contains the same hostname as you want all u need to do is