Operating System - HP-UX
1823714 Members
4087 Online
109664 Solutions
New Discussion юеВ

re-directing printer syslog messages

 
SOLVED
Go to solution
Rainer von Bongartz
Honored Contributor

re-directing printer syslog messages

I have hundreds of printers all sending syslog messages to one HP-UX server.
I want to direct this messages to a different log file than syslog.log

Can anybody tell me if this is possible and how I should configure syslog.conf


Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
5 REPLIES 5
Cheryl Griffin
Honored Contributor

Re: re-directing printer syslog messages

You can redirect errors to different logs by configuring /etc/syslog.conf, then stopping and restarting syslog.
"Downtime is a Crime."
Rainer von Bongartz
Honored Contributor

Re: re-directing printer syslog messages

I know but what could be the entry/priority ins syslog.conf for HP JetDirect Printers ???

Regards
Rainer


He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
Dietmar Konermann
Honored Contributor
Solution

Re: re-directing printer syslog messages

Rainer,

first of all you need to check the priority of thoses messages is.

Start the syslogd with the -d (debug) option.

e.g.
# echo test | logger -p user.info

An entry should look like this then:

got a message (1, 0x8)
logmsg: pri 16, flags 0, from hprtdu95, msg May 9 14:13:22 dkonerma: test
readfds = 0x8 0x3 0xffffffff 0xffffffff

Here the prio is 16.

This decodes to facility 1:

#define LOG_USER (1<<3) /* random user-level messages */

And prority:

#define LOG_INFO 6 /* informational */


Best regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
LucianoCarvalho
Respected Contributor

Re: re-directing printer syslog messages

hi,

try to use something like this:
lp.info /var/tmp/lp.log
I configured the syslog.conf with this entry, and restarted the syslogd daemon without error, but I can't test to confirm if the messages will sopt logging into syslog because I have no printer configured right now.

regards.
Rainer von Bongartz
Honored Contributor

Re: re-directing printer syslog messages

Thanks Dietmar.....
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...