1834915 Members
2654 Online
110071 Solutions
New Discussion

syslog directory empty

 
SOLVED
Go to solution
Miguel Carabano_1
Regular Advisor

syslog directory empty

Hi,

/var/adm/syslog not found!!!

How i can recreate or reactivate /var/adm/syslog/syslog.log and anything event automatic is registered.

Thanks
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: syslog directory empty

Shalom Miguel,

bdf /var

If you get an answer with only /

/var is not mounted.

Immediately halt your system and boot to single user mode.

Empty the /var folder and then

mount /var

All should be present. If so boot and make sure everything mounts.

If there is an error in dmesg/syslog, you still have problems. Check hardware for missing disk. ioscan -fnC disk

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor
Solution

Re: syslog directory empty

First, use mkdir to create the directory with permissions like this:

# ll -d /var/adm/syslog
dr-xr-xr-x 2 bin bin 96 Feb 1 13:48 /var/adm/syslog

Then check that you have an /etc/syslog.conf file with contents similar to this:


# @(#)B.11.11_LR
#
# syslogd configuration file.
#
# See syslogd(1M) for information about the format of this file.
#
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *

Then make sure that syslogd is running:

# ps -ef |grep syslog
root 451 1 0 Feb 1 ? 0:00 /usr/sbin/syslogd -D


You can force syslogd to reread it's configuration file by sending it a HANGUP (HUP) signal.


Pete

Pete
Miguel Carabano_1
Regular Advisor

Re: syslog directory empty

Pete,

All it's correct!

#ps -ef |grep syslog
root 839 1 0 11:49:10 ? 0:00 /usr/sbin/syslogd -D
root 29546 25264 0 09:07:28 pts/tb 0:00 grep syslog

# @(#) $Revision: 74.1 $
#
# syslogd configuration file.
#
# See syslogd(1M) for information about the format of this file.
#
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log
*.alert /dev/console
*.alert root
*.emerg *

how i can forced ??
Miguel Carabano_1
Regular Advisor

Re: syslog directory empty

Pete,

Ready!!!

#/etc> grep -e syslog rc.log
Output from "/sbin/rc2.d/S220syslogd start":
#/etc> cd /sbin/rc2.d/
#/sbin/rc2.d> ./S220syslogd stop
syslogd stopped
#/sbin/rc2.d> ./S220syslogd start
System message logger started

Thanks!!!

MC
Steve Steel
Honored Contributor

Re: syslog directory empty

Hi

bdf -i /var

touch /var/adm/syslog/test

ll -d / /var /var/adm /var/adm/syslog



Give results

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Steven E. Protter
Exalted Contributor

Re: syslog directory empty

Was the directory erased?

Are you SURE /var is mounted?

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Miguel Carabano_1
Regular Advisor

Re: syslog directory empty

Thanks for help.

Regards,

Miguel
Miguel Carabano_1
Regular Advisor

Re: syslog directory empty

thanks for all!
Yogeeraj_1
Honored Contributor

Re: syslog directory empty

hi miguel,

also check your syslogd file in /etc/rc.config.d/

should contain line:

SYSLOGD_OPTS="-D"

hope this helps too!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Miguel Carabano_1
Regular Advisor

Re: syslog directory empty

Thanks Yogeeraj!

In /etc/rc.config.d/syslogd

Value is correct!
SYSLOGD_OPTS="-D"

MC