1833756 Members
2541 Online
110063 Solutions
New Discussion

Re: socket file

 
Brian Lee_4
Regular Advisor

socket file

Does anyone know how to move/copy socket files to another file system?
Those socket files are under mqm directory.
I tried cp, mv, cpio and fbackup but none of them worked.
brian lee
8 REPLIES 8
Sandman!
Honored Contributor

Re: socket file

Try stopping the process that's opened them. You can see what process has that file opened with lsof:

# lsof

regards!
Brian Lee_4
Regular Advisor

Re: socket file

I already checked that none of process is holding those socket files.
brian lee
Sandman!
Honored Contributor

Re: socket file

Have you tried copying them with dd?
A. Clay Stephenson
Acclaimed Contributor

Re: socket file

This ain't gonna happen. You would have to write some C to create a socket and then bind() to the address (in this case, address would mean the path name).
If it ain't broke, I can fix that.
Brian Lee_4
Regular Advisor

Re: socket file

dd is also kind of copying so that it doesn't wokr ,either.
I am looking for a way to do image copy.
brian lee
Dave Hutton
Honored Contributor

Re: socket file

May not be real relative to what you are asking. But I remember running into a socket file we tried over and over to move/copy/relocate from one place to another.

I think it was Netbackup 5.0 related. We finally gave up and just fired up the application in the new location which then created the socket file.
So in our case, we didn't really need to move/copy it.

So, you may not really need to copy it. It may just recreate itself once you start up the application.


A. Clay Stephenson
Acclaimed Contributor

Re: socket file

You should also note that names associated with sockets are meaningless after connection is made and are often simply removed at that point. Yours may be a holdover from a dead process. Another peculiar aspect of these named sockets is that that can't be used to establish connections across machines --- which is the typical use of sockets.
If it ain't broke, I can fix that.
Ralph Grothe
Honored Contributor

Re: socket file

I think there is no need to copy Unix Domain sockets because I think it's good programming style for applications that use this sort of IPC to remove the stale sockets after the close().
After the applications have been cleanly halted (i.e. definitely not by a SIGKILL) they should create new socket files on next startup.
Madness, thy name is system administration