1753756 Members
4861 Online
108799 Solutions
New Discussion юеВ

Re: Syslogd info !!!

 
SOLVED
Go to solution
HP-UX_Ali
Regular Advisor

Syslogd info !!!

Dear All experts ,

Required your Input regarding Syslogd in debug mode.

our DBA team requested the system log files in debug mode, as the requirement from oracle after raising SR with oracle. they want to run the syslogd for 1 day and also a s/w called OS watcher.

Pls confirm the below procedure is correct.

1. kill the existing syslogd process
2. start the syslogd process in debug mode
"/usr/sbin/syslogd -d & to run in back ground.
3. after a day kill the process for syslogd -d
4.star the syslogd in normal mode.
/sbin/init.d/syslogd start

zip the syslog.log file and mail to our account.

If any other input will be apprecitaed...

Thanks
ALi

5 REPLIES 5
Bill Hassell
Honored Contributor
Solution

Re: Syslogd info !!!

> 1. kill the existing syslogd process
kill $(cat /var/run/syslog.pid)

> 2. start the syslogd process in debug mode
"/usr/sbin/syslogd -d & to run in back ground.

Use -Dd since you don't want the kernel messages sent to the console. Also, & is not necessary. syslogd is a proper daemon and will place itself in the background automatically.

> 3. after a day kill the process for syslogd -d

You can use the same technique:

kill $(cat /var/run/syslog.pid)

syslogd automatically puts its PID in the above file when it starts.

> 4.star the syslogd in normal mode.
/sbin/init.d/syslogd start

Correct.

If you need to see the syslogd priority and facility values, add -v to the command line (syslogd -Ddv) and to permanently enable these two numbers in syslog files, add the option to the startup config script in /edtc/rc.config.d/syslogd.


Bill Hassell, sysadmin
HP-UX_Ali
Regular Advisor

Re: Syslogd info !!!

Thanks a lot for your confirmation...

1 last thing, After capturing from debug mode. if i restart the syslogd in normal mode. does the syslog.log file gets overwritten.

Thanks to confirm

Regards
Ali.
rariasn
Honored Contributor

Re: Syslogd info !!!

Hi:

The proccess /sbin/init.d/syslogd with 'start' option, swithc the syslog file.

# cat /sbin/init.d/syslogd

... mv /var/adm/syslog/syslog.log /var/adm/syslog/OLDsyslog.log
...

rgs,
rgs,
Bill Hassell
Honored Contributor

Re: Syslogd info !!!

> 1 last thing, After capturing from debug mode. if i restart the syslogd in normal mode. does the syslog.log file gets overwritten.

No, the current syslog.log file will be moved (not appended) to OLDsyslog.log and a new syslog.log is started. To prevent this, just start syslogd from the command line.


Bill Hassell, sysadmin
HP-UX_Ali
Regular Advisor

Re: Syslogd info !!!

Thanks bills, found the solution & hence closing the thread.