Author |
Message
|
JohnRodey |
Posted: Tue Sep 27, 2005 6:33 am Post subject: Redirecting Log messages on Solaris |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
Is there a way to redirect all log messages from my default qmgr log directory to another directory.
I tried simply editing my qm.ini file from :
Log:
LogPath=/var/mqm/log/saturn!queue!manager/
To something like :
Log:
LogPath=/app/mydir/mqLogs/
I then tried shutting down my qmgr and restarting and I got a "AMQ6109: An internal WebSphere MQ error has occurred" message. So I assume that is not the IBM desired way of changing your log directory.
Thanks for any help in advance. |
|
Back to top |
|
 |
hopsala |
Posted: Tue Sep 27, 2005 6:41 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
See command "hamvmqm" on this site and on the System Administration Guide. This is usually used for working with hardware clusters, why do you need this? |
|
Back to top |
|
 |
JohnRodey |
Posted: Tue Sep 27, 2005 6:44 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
I would like all qmgrs to be capable of logging all messages to a shared directory on a network. So that a admin could see all logs, whether they be qmgrs on different machines, app servers, database logs....
I don't know if it makes things easier or even if it makes a lot of sense to do, but the higher ups would like to see it. |
|
Back to top |
|
 |
JohnRodey |
Posted: Tue Sep 27, 2005 6:48 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
Is the hamvmqm utility specific to Windows? |
|
Back to top |
|
 |
hopsala |
Posted: Tue Sep 27, 2005 7:23 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
JohnRodey wrote: |
I would like all qmgrs to be capable of logging all messages to a shared directory on a network. So that a admin could see all logs, whether they be qmgrs on different machines, app servers, database logs....
I don't know if it makes things easier or even if it makes a lot of sense to do, but the higher ups would like to see it. |
No, it doesn't make a lot of sense to me; in fact, it doesn't make ANY sense whatsoever.
It would seem you are confusing the error message logs (aka AMQERR01.LOG on /errors) which contain textual readable messages concerning the status of the qmanager, and the logs (/log), being what contains the messages themselves and all the qms activity.
The error logs should indeed be monitored by the admin, and it would make some sense to put them on one lib (though not a lot of sense if you ask me, there are better ways to do this), the logs however are only used for recovery purposes and should not be handled manually, especially by anyone who is not a well-experienced mq administrator. They have no bearing whatsoever on monitoring - Search this site and the manuals for more info on these matters.
JohnRodey wrote: |
Is the hamvmqm utility specific to Windows? |
Nope; it is relevant to any distributed system (i.e Win, unix flavors, linux etc). Naturally if you are indeed confusing the error logs and logs, you should know this command applies to the logs, not the error logs.
pardon the italics, thought this was important enough to justify a font change  |
|
Back to top |
|
 |
JohnRodey |
Posted: Tue Sep 27, 2005 7:37 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
Thanks hopsala,
You are correct, the error logs are the only logs I want to move. How would you suggest redirecting these logs to a shared directory?
And best case scenario would be to log to both places, shared and default directories. I'm not sure if this would hurt performance at all though. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 27, 2005 7:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
JohnRodey wrote: |
How would you suggest redirecting these logs to a shared directory? |
You can't, not really. You can mount a shared directory as, for example /var/mqm/errors on several machines, and likewise mount a sub directory as /var/mqm/qmgrs/<qmgr_name>/errors. But then you'll have all of your MQServers trying to write to the same copy of AMQERR01.LOG. And they could overwrite each other's FDCs and etc.
You could maybe do it the other way around, create a file system on some central machine that then individually mounts the /var/mqm/errors and /var/mqm/qmgrs/<qm_name>/errors into different sub directories.
But this is still not a good monitoring solution. Try looking at the Monitoring WebSphere MQ manual. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JohnRodey |
Posted: Tue Sep 27, 2005 8:02 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
What if on one machine I had a directory structure something like :
.../MqLogs/hostManchine/qMgrName/errors/
Then if I only wrote the error logs into that directory, It would never be overwritten since we could never have two of the same QM's on the same machine.
Is there a way to configure a QM to log all of its error messages to a specified directory?
And believe me I don't necessarily agree with this approach either, but I would like to prototype to see whether or not it is possible. |
|
Back to top |
|
 |
hopsala |
Posted: Tue Sep 27, 2005 8:03 am Post subject: |
|
|
 Guardian
Joined: 24 Sep 2004 Posts: 960
|
(All that jeff said is true, I have nothing to add concerning the technical stuff)
What is it that you're trying to achieve exactly? On a more general level I mean. Why not simply log on to the proper comp to look at the error logs if there's a prob?
It should be made clear that the error logs do not provide a very good indication as to the exact state of the qm, to monitor mq properly you need to purchase a monitoring product; for example, see Monitoring MQ processes and Need a Tool to Monitor MQ Environment.. for a short discussion of this topic, and search this site for more.
If you're short on cash, I think a better approach would be to write a silly little batch file, that upon execution FTPs all files from the /errors directories to the local comp, this way you can get all files on-demand. Or possibly something that schedules this once every 15min or so.
It's icky, but not as icky as the alternative you presented... |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Sep 27, 2005 8:11 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
JohnRodey wrote: |
What if on one machine I had a directory structure something like :
.../MqLogs/hostManchine/qMgrName/errors/
Then if I only wrote the error logs into that directory, It would never be overwritten since we could never have two of the same QM's on the same machine.
Is there a way to configure a QM to log all of its error messages to a specified directory?
And believe me I don't necessarily agree with this approach either, but I would like to prototype to see whether or not it is possible. |
But there's a difference, albeit slight, between /var/mqm/errors and /var/mqm/<qmgr-name>/errors.
And I don't think - although I could be wrong - that there's any specific setting for "write the errors here". So you have to trick this with hard links or mount points. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
JohnRodey |
Posted: Tue Sep 27, 2005 8:17 am Post subject: |
|
|
 Centurion
Joined: 13 Apr 2005 Posts: 103
|
Ok, thanks to both of you for your help!!! |
|
Back to top |
|
 |
xxx |
Posted: Tue Sep 27, 2005 8:29 am Post subject: |
|
|
Centurion
Joined: 13 Oct 2003 Posts: 137
|
All the MQ points are supposed to be local ,
For each system there are only AMQ*1.LOG etc only 3 , and if you try to mount them as NFS mount etc ,
Then one Qmanger will be writting to the mounted log and all others will get a FILE open error ,
and I assume this will give some errors like FDC or it may even crash a queue manager I don't know,
It is just not supported |
|
Back to top |
|
 |
|