Operating System - Tru64 Unix
1827811 Members
2020 Online
109969 Solutions
New Discussion

Re: how to delete old binary.errlog

 
how to remove old new b
Occasional Contributor

how to delete old binary.errlog

Hi,

I have already copy the current binary.errlog and now i want to delete the old one how to do it..
thank's for your helping me..

Rgds
gimo

6 REPLIES 6
Vladimir Fabecic
Honored Contributor

Re: how to delete old binary.errlog

Do:
# kill -USR1 `cat /var/run/binlogd.pid`
Your current file will be renamed to
/usr/var/cluster/members/{memb}/adm/binlog.saved/binary.errlog.saved
You may also look at binlogd man pages
# man binlogd
In vino veritas, in VMS cluster
Balasubramanian S
Frequent Advisor

Re: how to delete old binary.errlog

To automate cleanup approach, become the root user and run the crontab
command to uncomment the crontab entry:

#0 2 1 * * kill -USR1 `cat /var/run/binlogd.pid`

The new crontab entry will do the following:

1) Run at 2:00 AM on the first day of every month
2) Automatically rename the current log file to be:

/usr/var/adm/binlog.saved/binary.errlog.saved

3) Start a new copy of the log file, /usr/adm/binary.errlog.

That the saved log file overwrites the previous version, so you should add a line to crontab to copy the existing saved file if you want to preserve it.

For more details refer man page of binlogd.
how to remove old new b
Occasional Contributor

Re: how to delete old binary.errlog

Ok Thanks all...
I will try


Rgds
Gimo
Balasubramanian S
Frequent Advisor

Re: how to delete old binary.errlog

Hello,
Make sure you say thanks by assigning points as appropriate...

http://forums1.itrc.hp.com/service/forums/helptips.do?#28

Regards, Bala S
Shardha
Valued Contributor

Re: how to delete old binary.errlog

Dear ,

Please find the procedure to restart the process and create a new binary error log file.



Restarting Binary Errlog
If binary.errlog got corrupted or size becomes too large.
Tru64 version 4.x

Login to system as Superuser or root

# cd /var/adm

Save existing binary errlog in compress form or copy
# cat binary .errlog | compress > binary.errlog_
or
# cp binary.errlog binary.errlog_01oct03

Copy empty file to binary.errlog or create new file
# cp /dev/null binary.errlog
or
# > binary.errlog

To test new binary errlog, create a test entry
# logger â b â this is a test messageâ

Use dia or uerf to display test message and prove the errlog is working
# /usr/sbin/dia

Tru64 Unix version 5.x

# cd /var/cluster/members/member0/adm
or
# cd /var/adm
Save existing binary errlog
# cp binary.errlog binary.errlog_

Stop the daemon binlogd
# /sbin/init.d/binlog stop

Create new binary.errlog using
# >binary.errlog
or
# kill â USR1 â cat /var/run/binlogd.pidâ

Start the daemon
# /sbin/init.d/binlog start
Use /usr/sbin/dia to see the entries in errlog.

Please assign points.

Shardha
how to remove old new b
Occasional Contributor

Re: how to delete old binary.errlog

Thank you shardha...