Author |
Message
|
WillH |
Posted: Thu Dec 08, 2005 8:29 am Post subject: Surprises from mirrorq |
|
|
Novice
Joined: 15 Jun 2005 Posts: 23
|
I've installed mirrorq to copy some incoming messages. It works great in that respect, but my Unix admin tells me my /tmp space is filling up. I see that /tmp is the default, no problem. Mysteriously it is not defaulting to no logging. I say Mysterious because the notes at the top of mirror.c say...
Code: |
/* To debug the API Exit, log statements may be enabled. */
/* To enable tracing, export the environment variable */
/* MIRRORQ_LOG_PATH to any path desired, for example: */
/* MIRRORQ_LOG_PATH=/tmp */
/* Default tracing is errors only. To increase the level of */
/* tracing, export MIRRORQ_LOG_OPTIONS=x where x is a */
/* combination of: */
|
I am doing this in a production environment so I schedule a time in our window to do this:
export MIRRORQ_LOG_PATH=/usr/mqm/logs
export MIRRORQ_LOG_OPTIONS=0
That should fix it and prevent our OS-critical /tmp space from filling up. Next day, Unix tells me MIRRORQ is STILL putting files in /tmp. They are zero bytes, but the mystery continues as to why /tmp is still being used.
So reviewing the code further, I FIND THIS??
Code: |
/* C.L. - override env to force logging.
//pEnv = getenv("MIRRORQ_LOG_PATH"); */
pEnv = (char *)0x00000001;
|
Am I reading that right? Is the code I got from the IBM website hardcoding a value, one that clearly states in the notes can be user-defined? It's not a huge problem because the log level is thankfully not hardcoded. I just was taken back by this hard-coded path bit and the inconsistent notes. |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Dec 08, 2005 8:49 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Which operating system are you dealing with? |
|
Back to top |
|
 |
WillH |
Posted: Thu Dec 08, 2005 10:46 am Post subject: |
|
|
Novice
Joined: 15 Jun 2005 Posts: 23
|
AIX, why?
I said OS-critical because I know this space gets used by lots of other apps (some OS I think) by default. I'm not responsible for those, but if I fill up /tmp and they stop working, well I'm in trouble not them. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Dec 08, 2005 11:27 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Its interesting, only the AIX version of mirrorq has that statement commented out.... _________________ -wayne |
|
Back to top |
|
 |
bower5932 |
Posted: Thu Dec 08, 2005 11:43 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
Well, I'd say that you are looking at something that 'fell through the cracks'. I'll see what I can do about getting it fixed. |
|
Back to top |
|
 |
clindsey |
Posted: Thu Dec 08, 2005 11:46 am Post subject: |
|
|
Knight
Joined: 12 Jul 2002 Posts: 586 Location: Dallas, Tx
|
Well, I am the guilty party here
Obviously that should not have made it to the Web Site. Sample code doesn't have to pass the same rigorous tests as product code.
If you have the VisualAge compiler on your aix server, you can make the change and run the make file that is included in the package.
Thanks for pointing this out. It will be changed in the next update.
Please apologize to your admin for me,
Charlie |
|
Back to top |
|
 |
wschutz |
Posted: Thu Dec 08, 2005 11:54 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
ah, the downside of putting your initials in comments ....  _________________ -wayne |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Dec 08, 2005 11:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
wschutz wrote: |
ah, the downside of putting your initials in comments ....  |
Well. I for one admire an MQ developer of any sort who is active about admitting their faults and taking responsibility for their code... And I suspect Chris Smith feels the same way...  _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
WillH |
Posted: Thu Dec 08, 2005 12:49 pm Post subject: |
|
|
Novice
Joined: 15 Jun 2005 Posts: 23
|
clindsey wrote: |
Well, I am the guilty party here
Obviously that should not have made it to the Web Site. Sample code doesn't have to pass the same rigorous tests as product code.
If you have the VisualAge compiler on your aix server, you can make the change and run the make file that is included in the package.
Thanks for pointing this out. It will be changed in the next update.
Please apologize to your admin for me,
Charlie |
I do like the utility a lot. I thank you very much for it, and clearing up my concern. I have made the changes and I'm testing it out now but I expect it will work fine.
Thanks again. |
|
Back to top |
|
 |
|