473,383 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

db2 CLP and PS output on AIX

Hi,

When I run a DB2 command:
i.e.: db2 list tablespaces show detail

and while this is running do: ps -ef | grep "db2 "

then I can see in the output the db2 command as: db2 list tablespaces show
detail

however, when I then rerun the command I see in the PS output: db2
and not the "list tablespaces show detail".

If I do a db2 terminate and then try again I see the full command again.

Does anyone know why this is and how to fix this so that I can see the full
DB2 command each and every time without having to issue a db2 terminate
first?

Thanks
Nov 12 '05 #1
2 4146
cmc
I am no expert on DB2 - just a guess:
I think this is related to the db2 CLP contains two processes. The front
end process db2.exe (aka the CLP) and the backend process db2bp.exe (which
actually execute the command on behalf of the user and return to the user).
When the first time your start the command, DB server will start a backend
processs to handle all your commands - this will take a little bit time for
the startup and therefore you have time to "grep" your front end process
which contain the whole command.

After the first CLP command, the back end process will stay for the same
user (backend process know by the parent PID who send the command and
therefore know your process ID next time you send in another command). I
guess the CLP simply send the command to it's own backend process (of course
it knows there is a backend process already there) and wait for the result
with the CLP in wait mode.

When you use the TERMINATE command, CLP will tell the backend process to
shut down and the user session quit the connection.

So you start the whole thing all over again.
------
Just a two cent guess.

"Erik Hendrix" <he**********@hotmail.com> wrote in message
news:1113870666.1f1b4ecf01f4c48a89ff5b871a322907@t eranews...
Hi,

When I run a DB2 command:
i.e.: db2 list tablespaces show detail

and while this is running do: ps -ef | grep "db2 "

then I can see in the output the db2 command as: db2 list tablespaces show
detail

however, when I then rerun the command I see in the PS output: db2
and not the "list tablespaces show detail".

If I do a db2 terminate and then try again I see the full command again.

Does anyone know why this is and how to fix this so that I can see the full DB2 command each and every time without having to issue a db2 terminate
first?

Thanks

Nov 12 '05 #2
I would go with this if not for the following:

1) We can see it every time on Solaris.
2) Although the back end process indeed exists, the front-end process also
still exists. It is the fron-end proces s which thus would normally show the
command.

Thanks.

"cmc" <cm*****@yahoo.com> wrote in message
news:WE******************@news20.bellglobal.com...
I am no expert on DB2 - just a guess:
I think this is related to the db2 CLP contains two processes. The front
end process db2.exe (aka the CLP) and the backend process db2bp.exe (which
actually execute the command on behalf of the user and return to the user). When the first time your start the command, DB server will start a backend
processs to handle all your commands - this will take a little bit time for the startup and therefore you have time to "grep" your front end process
which contain the whole command.

After the first CLP command, the back end process will stay for the same
user (backend process know by the parent PID who send the command and
therefore know your process ID next time you send in another command). I
guess the CLP simply send the command to it's own backend process (of course it knows there is a backend process already there) and wait for the result
with the CLP in wait mode.

When you use the TERMINATE command, CLP will tell the backend process to
shut down and the user session quit the connection.

So you start the whole thing all over again.
------
Just a two cent guess.

"Erik Hendrix" <he**********@hotmail.com> wrote in message
news:1113870666.1f1b4ecf01f4c48a89ff5b871a322907@t eranews...
Hi,

When I run a DB2 command:
i.e.: db2 list tablespaces show detail

and while this is running do: ps -ef | grep "db2 "

then I can see in the output the db2 command as: db2 list tablespaces show detail

however, when I then rerun the command I see in the PS output: db2
and not the "list tablespaces show detail".

If I do a db2 terminate and then try again I see the full command again.

Does anyone know why this is and how to fix this so that I can see the

full
DB2 command each and every time without having to issue a db2 terminate
first?

Thanks


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
3
by: edgekaos | last post by:
Is method 2 valid? Method 1: wstring input = L"STRING"; wstring output = input; transform(output.begin(), output.end(), output.begin(), towupper); Method 2: wstring input = L"STRING";...
4
by: Kevin Mansel via .NET 247 | last post by:
Ok, basically this is my problem. I'm building a console app tocall a dos program. So i'm using the Shell command to call theprogram, now depending on what happens, I want to read theoutput that...
24
by: kalamantina | last post by:
#include "stdafx.h" #include <stdio.h> #define output( x ) printf( #x "\r\n" );fflush( stdout ) class CMyBase { public: CMyBase() { output( CMyBase() ); f(*this);
0
by: newbie | last post by:
i'm a newbie of c language. can anyone help me to implement the code so that I can get the ciphertext from the output. thanks. #ifndef _3DES_H #define _3DES_H #ifndef uint8 #define uint8 ...
32
by: spibou | last post by:
Is the output of the C preprocessor deterministic ? What I mean by that is , given 2 compilers which conform to the same standard, will their preprocessors produce identical output given as input...
3
by: MatsL | last post by:
Hi, This is seriously driving me crazy, could anyone explain to me why neither of these doesn't produce XHTML compliant output (it is being called in Render() btw): output.WriteLine("<img...
3
by: undshan | last post by:
I am writing a code that needs to open a file, create an output file, run through my function, prints the results to the output file, and closes them within a loop. Here is my code: #include...
5
by: amit.uttam | last post by:
Hey everyone, I've recently jumped big time into python and I'm working on a software program for testing automation. I had a question about proper logging of output. What I would like is: 1....
2
by: gabosom | last post by:
Hi! I've been breaking my head trying to get the output variables from my Stored Procedure. This is my SP code CREATE PROCEDURE GetKitchenOrderDetail( @idService int, --outPut Variables ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.