Operating System - HP-UX
1829558 Members
1769 Online
109992 Solutions
New Discussion

Where does syslog get the hostname

 
Stanley Kurasaki
Occasional Advisor

Where does syslog get the hostname

Hi,

This is bugging me, when I get log messages from syslog they only show the first section of my FQDN, eg. abc.def.xyz.com and I will only get abc in the log. My problem is that I have the same name abc for a number of def.xyz.com domains so this is making troubleshooting more difficult. I thought syslog used hostname, but my hostname is the FQDN. Possibly it was using NodeName, but when changing the NodeName and restarting syslog it still not correct. I am testing using the logger command. Also does anyone know if NodeName will expand past 9 characters. This is on HPUX 11, if anyone can helpme thanks in advanced.

Stan
5 REPLIES 5
Chris Calabrese
Valued Contributor

Re: Where does syslog get the hostname

Don't know for sure, but the
only other places I can think
of are uname -n and a reverse
DNS/hosts lookup on the
originating IP address
(remember that syslog is a
network service).

Then again, perhaps it
truncates the domain name off even if it knows it...
Brainbench MVP for Unix Administration and Internet Security, SANS Review Editor, and Center for Internet Security HP-UX Benchmark project leader
Jim Moffitt_1
Valued Contributor

Re: Where does syslog get the hostname

It may even get it from the `hostname` command. Try executing that to see if you get the same results.
Stanley Kurasaki
Occasional Advisor

Re: Where does syslog get the hostname

I thought it was the uname -n = nodename, but when I tried to do a uname -S abcdef, I still only get abc in the syslog. I have restarted syslog. My hostname is correct the command hostname gives me abc.def.xyz.com.
MANOJ SRIVASTAVA
Honored Contributor

Re: Where does syslog get the hostname

the place it gets the hostname is /etc/rc.config.d/netconf.


Manoj Srivastava
Stanley Kurasaki
Occasional Advisor

Re: Where does syslog get the hostname

My netconf file has the FQDN, so that isn't where it is set completely. It seems that the S320hostname file parses the netconf file and only grabs the part of the name before the period. I guess I'm going to have to reset the hostname and reboot my server. Does anyone know how I can do this without rebooting.