Operating System - Tru64 Unix
1827794 Members
2352 Online
109969 Solutions
New Discussion

Creating Symbolic Link

 
SOLVED
Go to solution
Adam Strobel
Frequent Advisor

Creating Symbolic Link

Hi

Does anyone know how to create a symbolic link for the binary.errlog? for happened is I have a server that keeps crashing but my binary.errlog file is not current.

Is this correct,

ln -s binary.errlog binary.errlog

thanks,

--Adam
7 REPLIES 7
Hein van den Heuvel
Honored Contributor
Solution

Re: Creating Symbolic Link


hmm... the command you post makes no sense.
It links a file to itself. That should error out with:
#ln -s x x
ln: x and x are identical.

Where do you want the link to come from/go to?

On my box binary.errlog =

/var/cluster/members/member0/adm/binary.errlog

And there is a softlink: /var/adm/binary.errlog
This points to the above file.

If you want a softling from your current directory to binary.errlog then you can use:

ln -s /var/cluster/members/member0/adm/binary.errlog .

But this does not seem too useful either.

Please try to explain more clearly what real problem you hope to solve, because I suspect that the sotling question is not the real problem.


fwiw,
Hein.
Ivan Ferreira
Honored Contributor

Re: Creating Symbolic Link

The problem may be that the server is crashing before the binlog service is started. Is the server crashing at boot time?

If the binlog service is not started, no records will be recorded to the file.

Now, troubleshooting using symbolink link has no sense.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Adam Strobel
Frequent Advisor

Re: Creating Symbolic Link

sorry everyone. I will try to give a better explaination.

My server crashes about every other day or so. I opened a ticket with HP and they had me ftp the binary.errlog file to them. I have two locations where this file sits,

/var/adm/binary.errlog
/var/cluster/members/member0/adm/binary.errlog

Both locations do not have any current data. Also HP said in my /var/adm under the binary.errlog file I should have a symbolic link whick I do not.

So I was wondering how to create this symbolic for my binary.errlog file to capture data when my server crashes.

I hope this is a better explanation and sorry I'm new to Unix.

--Adam

Hein van den Heuvel
Honored Contributor

Re: Creating Symbolic Link

ok. That's pretty close to what I answerred already.

The entry "/var/adm/binary.errlog" should be a symbolic link. If it is not, then I would issue:

#cd /var/adm
#ls -l binary.errlog ! Just to be sure
#ls -l /var/cluster/members/member0/adm/binary.errlog
#mv binary.errlog binary.errlog.old
#ln -s /var/cluster/members/member0/adm/binary.errlog .

Unfortunately I do not expect this to change the real problem, but at least it will be one less thing to worry about.

Hein.


Adam Strobel
Frequent Advisor

Re: Creating Symbolic Link

Thanks!!!


--Adam
Adam Strobel
Frequent Advisor

Re: Creating Symbolic Link

Thanks!
Ivan Ferreira
Honored Contributor

Re: Creating Symbolic Link

This is important information from the binlogd man page:

Managing the Binary Error Log File

If it becomes necessary to clean up the binary error logs, use the pro-cedures described below.

The binary.errlog file is a symbolic link to:

../cluster/members/{memb}/adm/binary.errlog

This symbolic link is a CDSL (Context Dependent Symbolic Link) and must not
be deleted.

After saving any existing archived logs, use the following command to
archive the current log:

# kill -USR1 `cat /var/run/binlogd.pid`

The preceding command copies the current log file to the following loca-tion:

/usr/var/cluster/members/{memb}/adm/binlog.saved/binary.errlog.saved

A new version of the binary.errlog log file is then created.

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?