1829142 Members
6518 Online
109986 Solutions
New Discussion

Stop logping

 
SOLVED
Go to solution
Wantit Tangrugsasut
Occasional Contributor

Stop logping

Hi,

I got this file, /var/adm/lp/log in hp/ux.
Anybody know how to stop logging this file

Thank You



5 REPLIES 5
Pedro Sousa
Honored Contributor
Solution

Re: Stop logping

Hi Wantit!
from the lpsched man page:
"lpsched Schedules requests taken by lp(1) for printing on line printers.
lpsched is typically invoked in /sbin/rc. This creates a process which runs in the background until lpshut is executed. The activity of the process is recorded in /var/adm/lp/log."

So, if you have lpsched running, you have to let this log growing. Of course you can always shrink it for example with a script that checks the size of it.
Before this, check if you need lpsched running. Then check if the log contains important information.
good luck.
A. Clay Stephenson
Acclaimed Contributor

Re: Stop logping

I would take Pedro's advice and periodically move the file to a log.old and compress it. You could set up a cron job to do it. However,
if you really want to stop logging (which I don't suggest) you can create a symbolic link to /dev/null.
ln -s /dev/null /var/adm/lp/log
If it ain't broke, I can fix that.
Vincenzo Restuccia
Honored Contributor

Re: Stop logping

Check /etc/syslog.conf
Rita C Workman
Honored Contributor

Re: Stop logping

Well here's a little info I found. Logging is turned on when lpsched -v is run. Now via lpsched command, I do not have a clue how to stop this.
But I remember a couple things...there's a command pddisable and you can use this to modify the log_severity and maximum log-size you want to let it grow. You may (note I said may..) be able to stop it using the command
pddisable -c log SERVERNAME:default_error

But .... I have never tried it...so I am not sure what it may or may not do..
There is also a file at /var/opt/pd called spl_error.cfg and I believe you can edit this file so that if you wanted logging to stop when the file hit a certain size you could set it here...as well as set the log-severity option.

Well that's all I could come up with...hope this gives you some ideas,
/rcw
Bill Thorsteinson
Honored Contributor

Re: Stop logping

Try scheduling a job to run lpshut
and then lpsched on a periodic basis.
lpsched will move the log file to
/var/adm/lp/oldlog.
Pick a frequency that keeps the log size
reasonable for you.