|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Using MS03, how do I capture its errors to a file? |
« View previous topic :: View next topic » |
Author |
Message
|
PeterPotkay |
Posted: Fri Jul 18, 2003 12:25 pm Post subject: Using MS03, how do I capture its errors to a file? |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R
This is the command that I run from a bat file to back up my QM. If MS03 works, then MyOutputfile.txt has the stuff I need to use runmqsc.
But if MS03 has a problem (maybe the QM is down, or the Command Server is down, etc), it simply hangs for a few seconds, throws an error to the screen, and does not produce any text file at all.
This is a problem since I want to be able to look at a server and see after the fact what the problem was.
Is there any way to capture in a text file the data that MS03 throws out to the screen? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
GMcCarthy |
Posted: Fri Jul 18, 2003 3:42 pm Post subject: |
|
|
 Centurion
Joined: 06 Nov 2001 Posts: 113 Location: Melville NY
|
This works... (AIX)
nohup ./saveqmgr -v 53 -m queuemanager -f queuemanager.defs -R
it will write (append) to a file called nohup.out
Hope this helps. _________________ Regards,
Gina
IBM Certified MQSeries Specialist |
|
Back to top |
|
 |
PeterPotkay |
Posted: Fri Jul 18, 2003 3:52 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
hmmm, I dont see how to apply your idea to Windows. Have you ever done that Gina? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
RogerLacroix |
Posted: Fri Jul 18, 2003 9:58 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Try the following:
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 1>ok.log 2>error.log
This will create ok.log and error.log each time the command is issued. If you want to have a continuous log then you can append to it by using the following command:
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 1>>ok.log 2>>error.log
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Jul 19, 2003 5:28 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Roger,
Thanks. Everything, good and bad, goes to whatever file is psecified by the 2 parameter.
Looks like the only valid parameter is 2?
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 1>ok.log 2>error.log
All output goes to error.log
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 2>error.log
All output goes to error.log
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 1>error.log
There is no output written to error.log
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 3>error.log
There is no output written to error.log
saveqmgr -m QueueManagerName -f MyOutputfile.txt -R 2>error2.log 3>error3.log
All output goes to error2.log _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
RogerLacroix |
Posted: Sat Jul 19, 2003 2:03 pm Post subject: |
|
|
 Jedi Knight
Joined: 15 May 2001 Posts: 3264 Location: London, ON Canada
|
Hi,
Just a few notes. The 1> and 2> come from the Unix world and are implemented by Windows, OS/2 Linux, etc...
They mean the following:
Code: |
0 - stdin - Standard In
1 - stdout - Standard Out
2 - stderr - Standard Error |
There is no # 3. Although it could be referencing a pipe called '3'. But lets call it undefined.
The control of where the output goes is depended on what instructions the saveqmgr program uses.
If it is written in C and uses printf() then the output will go to stdout. If it is using fprintf( stderr, "error msg" ) then the output will go to stderr. The same is true for other languages.
i.e. Java
System.out.println() goes to stdout
System.err.println() goes to stderr
Therefore, it seems that the saveqmgr program is only writting to stderr. If you have the source code, you could change it, if you wanted to.
Hope that helps.
later
Roger... _________________ Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter |
|
Back to top |
|
 |
GMcCarthy |
Posted: Mon Jul 21, 2003 3:19 am Post subject: |
|
|
 Centurion
Joined: 06 Nov 2001 Posts: 113 Location: Melville NY
|
Peter,
I'm sorry...didn't read your post carefully.  _________________ Regards,
Gina
IBM Certified MQSeries Specialist |
|
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
|
|
|
|