- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- "logger" command and KERN facility
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2005 10:46 AM
тАО01-03-2005 10:46 AM
I'm having a hardtime trying to figure out this. This is one of my lines in /etc/syslog.conf:
kern.debug /var/adm/syslog/kern/07-debug
I restart the syslog daemon and when I do this:
logger -p kern.debug "this is a test"
I don't see the message in 07-debug. I even stop/start syslogd so it will flush its buffers but still don't see anything.
The logger man page says:
"Messages written in locales other than the POSIX/C locale are not supported."
Does that mean that I can only use the logger command to test the ONLY the local facility?
Thanks,
Jorge
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-03-2005 12:49 PM
тАО01-03-2005 12:49 PM
Re: "logger" command and KERN facility
kill -HUP $(cat /var/run/syslog.pid)
The warning about locales has to do with languages, not the local facility. It simply means that logger does not have NLS (Native Langage Support). Run the command:
locale -a
to see all the language sets available. When a facility and priority have been defined (kern.debug), all higher priorities will be logged too. You can see the actual priorities and facilities by using the attached script and turning on the -v option for syslogd. To set syslogd options, edit the file /etc/rc.config.d/syslogd:
SYSLOGD_OPTS="-D -v"
then stop and restart syslogd with the start/stop script:
/sbin/init.d/syslogd stop
/sbin/init.d/syslogd start
Then use logger:
logger -p kern.debug "Test debug"
logger -p kern.info "Test info"
And check /var/adm/syslog/kern/07-debug for the messages, and use the attached script to read the file:
syslogdecoder /var/adm/syslog/kern/07-debug
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2005 02:08 AM
тАО01-04-2005 02:08 AM
Re: "logger" command and KERN facility
Thanks for the answer. I used that script about a year ago. I really like it. Thanks :)
I'm still having problems with syslog. I sent the SIGHUP signal so it would reread the conf file...However when I do:
logger -p kern.info "this is info"
it is not written to the specified location in /etc/syslog.conf. The funny part is that it is actually written to
/var/adm/syslog/user/06-info (the location specified for user.info events).
Any idea?
Thanks,
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2005 02:13 AM
тАО01-04-2005 02:13 AM
Re: "logger" command and KERN facility
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2005 06:32 AM
тАО01-04-2005 06:32 AM
Solution#KERN FACILITY
kern.debug /var/adm/syslog/kern/07-debug
kern.info /var/adm/syslog/kern/06-info
kern.notice /var/adm/syslog/kern/05-notice
kern.warning /var/adm/syslog/kern/04-warning
The syslogd priority is a lower limit. Thus, the 06-kern.info file will have info plus notice, warn, err, crit, alert and emerg all sent to the 06-info file. The debug level will have all the messages sent to it.
However, at 11.11, I do see a strange behavior with the KERN facility and logger. It seems that using logger to generate a KERN, the messages are tagged with USER, not KERN facility, yet facilities MAIL and DAEMON seem to work OK. This may be a bug in logger. Try your other facility logging files with logger and my guess is that they may work OK.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2005 07:02 AM
тАО01-04-2005 07:02 AM
Re: "logger" command and KERN facility
I'm glad that to know that you took the time to test it on your system. And in fact, yes, I did it on my 4 servers and I can see it works with other facilitiees ( I tried MAIL and it worked just like you said). The problem is with the kernel facility.
One last question before closing the thread: Do you think I should open a ticket regarding this (perhaps it is a bug)?
Many thanks!
Jorge
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-04-2005 07:17 AM
тАО01-04-2005 07:17 AM
Re: "logger" command and KERN facility
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-05-2005 09:25 AM
тАО01-05-2005 09:25 AM