On Thu, 3 Jul 2014 15:46:05 -0500, Fred Kaptein wrote:
>We have the following USS files on our z/OS system
> /tmp/daemon.log.a
> -this file is empty
>
> /tmp/daemon.log.b
> - this file is currently in use and is quite lengthy
>
>It seems these were switched quite some time ago, and I am not sure how to
>switch them.
>I am looking to do the following:
> - switch to put daemon.log.a in use
> - empty out daemon.log.b
>
>Does anyone know the commands to do this.
>I am looking for specific commands to do this, not suggestions such as check
>with your Unix administrator or refer to the manuals.
>
Many daemons (but not all -- refer to the manuals -- sorry) respond to SIGHUP
by closing and reopening their log files. So:
mv /tmp/daemon.log.b /tmp/daemon.log.old
mv /tmp/daemon.log.a /tmp/daemon.log.b
kill -HUP daemon-pid
Also, many daemons (but not all; etc.) record their PIDs in /etc, so the
last command becomes:
kill -HUP $( cat /etc/daemon.pid )
However, the existence of daemon.log.a and daemon.log.b suggests that your
vendor has chosen not this conventional protocol, but one reminiscent, perhaps,
of SYS1.MANX and SYS1.MANY.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN