AIX Syslog where the hostname sit

Dear all experts,
I would like to know where can I find the hostname located as when I receive the syslog, I can only see as below : (showing in localhost instead of the hostname)

Feb  6 15:31:31 localhost syslog:info syslogd: restart
Feb  6 15:31:50 localhost syslog:info syslogd: restart
Feb  6 15:36:06 localhost daemon:info xntpd[3604704]: synchronized to LOCAL(0), stratum=3
Feb  6 15:42:01 localhost syslog:info syslogd: restart

I have checked /etc/hosts, hostname has stated correctly with correct IP.

The hostname of your system can be retrieved by using the hostname utility.

Hi, thanks for your reply.
Are you saying the smitty hostname? Or command hostname?
For your info, I have done that and the returned value is my server's hostname. And that's why I can't understand why the syslog doesn't show the my server's hostname and instead it only show "localhost"

Is it possible you do a network syslog to 127.0.0.1 ?

Thanks RudiC,
Sorry that I do not understand what you mean of network syslog to 127.0.0.1? Can you provide me a command to do it?
Thanks.

The 'host name' shown in the syslog is usually set by the source system. I suspect that your server is receiving log data from another server and the problem lies there. Back-tracking may prove difficult.

Can you cause anything to generate these messages on demand? e.g. restart the syslog service

Robin

FYI, my server was restored from another server's mksysb. I have changed the host tables as well as the network to become a new server. There may be some system files that still having information of the previous server.
But I have performed refresh -s syslogd and the hostname shown in syslog still "localhost".
I have also performed refresh -g inetd and several tcp related subsystem group. Do I need to reboot the server?
For the question of whether I can generate messages on demand for the syslog? Yes, I can always try to sign in with dummy user ID and the syslog will capture it.

Output of the following commands would be helpful:

uname -a
hostname
lsattr -El inet0
cat /etc/syslog.conf
cat /etc/hosts
host $(hostname)
host -n $(hostname)
host <IP-address from the previous output>
host -n <IP-address from the previous output>

Thanks for the reply.

Attached is the output for the above commands.

Thanks for all the responses, I have managed to get the hostname display in syslog. After I reboot the server, the syslog start to record as the hostname.

I have done the refresh of syslogd, inetd, tcp, etc.. but no change. But reboot of server, then it changed.

Thanks to all your kind responses.

That's good but would you tell where you changed what before the reboot?

I think the syslog hostname is taking from hostname but it just need a server reboot to refresh it.

So the command hostname showed localhost ? In the large txt file hostname showed another name. I assume you changed somewhere localhost into that other name, before you rebooted? Or did you not change anything and just rebooted? Am I missing something?

syslogd's hostname is taken from gethostbyaddr(ip address of hostname), but only once afaik - when syslogd is started. If you changed the hostname and everything configured correctly, the next step is to restart syslogd - stopsrc -s syslogd ; sleep 2 ; startsrc -s syslog . The refresh operation re-reads configuration file, but doesn't check the hostname.