|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Cleaning IPC resources for a specific Queue Manager |
« View previous topic :: View next topic » |
Author |
Message
|
jpiette |
Posted: Fri Oct 25, 2002 11:15 am Post subject: Cleaning IPC resources for a specific Queue Manager |
|
|
Newbie
Joined: 25 Oct 2002 Posts: 1 Location: Canada
|
We are running MQSeries 5.1 in a Compaq Tru64 environment ( Compaq Tru64 UNIX V5.1A ). I'm looking for something that will allow me to clean up IPC resources for a specific queue manager. At time we have been forced to kill a runaway queue manager, but because we are running multiple queue managers it make it impossible to clean up the IPC resources properly. I was given a piece of code that performs this function in an AIX environment, but I have not been able to get it to work in the Tru64 environment. The code is as follows:
main(int argc, char *argv[])
{
key_t Key;
FILE *fp;
char buf[101];
if (argc < 2)
{
printf("%s: Please specify filename\n",argv[0]);
exit(1);
}
if ((fp = fopen(argv[1],"r")) == (FILE *)NULL)
{
printf("Cannot open %s!\n",argv[1]);
exit(2);
}
memset ( buf , NULL , sizeof ( buf ) ) ;
while (fgets(buf,100,fp) != NULL)
{
buf[strlen(buf)-1] = '\0';
Key = ftok(buf,'S');
if ( errno > 0 )
{
printf ("Error returned from FTOK was %s - file %s\n", strerror(errno) , buf ) ;
}
else
{
printf("file %s S key 0x%08x\n",buf,Key);
}
Key = ftok(buf,'M');
if ( errno > 0 )
{
printf ("Error returned from FTOK was %s - file %s\n", strerror(errno) , buf ) ;
}
else
{
printf("file %s M key 0x%08x\n",buf,Key);
}
memset ( buf , NULL , sizeof ( buf ) ) ;
}
fclose(fp);
exit(0);
}
What is being passed into the function is a file containing a complete list of all files under the /var/mqm directory. The KEY generated by the code does not match the KEY for the mq IPC resources.
Any one have anything that might help?? Thanks. _________________ Joe Piette
Senior Technical Specialist
Canadian Tire Corp |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|