manojsharma
28th July 2005, 09:49
Hi everybody,

I am using bshcmd6.1 command on unix. It is working fine except for bshcmd6.1 -p <pid>.

Can anyone tell me why it is not working while bshcmd6.1 -k <pid> and with other options its working fine.

Thanx in advance

victor_cleto
28th July 2005, 11:27
There were discussions already explaining the limitations of the -k flag, start by reading this one (http://www.baanboard.com/baanboard/showthread.php?t=6115&highlight=bshcmd6.1) , you can only kill processes of other users if you are root. Makes sense, of course, otherwise everybody could kill the other users...

manojsharma
28th July 2005, 12:06
sorry victor,

-p flag is not working

sanjayroongta
28th July 2005, 12:29
Hi Manoj

Pls try bshcmd6.1 -u1 -w1 -p -s <pid>

rgds

manojsharma
28th July 2005, 13:21
No, its not working, it comes to next line giving no result

manojsharma
28th July 2005, 13:44
:)

Thanx everybody, its now working. I got it.

Viplov
28th July 2005, 14:14
Thnxs Sanjay

This adds to my knowledgebase.

Dikkie Dik
28th July 2005, 14:32
Pls try bshcmd6.1 -u1 -w1 -p -s <pid>


sanjayroongta was very right about this, but I prefer to use

bshcmd6.1 -u10 -w10 -p -s <pid>

Else, if the user is wating for a second (or more) or has a query that is taking a second (or more) the command gives no result. Setting it to 10 seconds increases the maximum wait time and gives directly results when a user is running.

Kind regards,
Dick

manojsharma
29th July 2005, 07:38
Hi, Dikkie

Yes, roongta was right but in my case it was not working. What I did, I use the following command.

bshcmd6.1 -p -s -w 10 <pid>

And its working

sanjayroongta
29th July 2005, 09:27
Hi Manoj

Mr Dikkie syntax seems logical. Can u please explain why you putting like this syntax this really help to upgrade myself.

rgds

Viplov
8th August 2005, 14:01
In addition the following is a list of command line arguments for bshcmd6.1.
You can use these as a guide for writing a custom shell script to determine which sessions are in use on your system at any given time.

Usage: bshcmd6.1 [options] <bshell_pid>

-v: Print version
-p: Show process list
-m: Show memory usage
-d <dbglvl>: Set DEBUG_LEVEL to (octal) <dbglvl>
-k <pid>: Kill bshell process id <pid>
-e: Kill all bshell processes
-M "message": Send "message" to bshell
-W <sec> Wait until the previous issued command is executed
After this the previous command will be overwritten
-w <sec> Wait <sec> seconds for bshell to execute command
-u <sec> Send SIGUSR1 to bshell (wakeup). Only to be used in
combination with -w option. Waits <sec> seconds to
see if the command is executed.
-s Show entire contents of logfile (if accessible)
-l Print logfile name of bshell (for later examination)
-T "cmdstr" Modify BDB_DEBUG and TT_SQL_TRACE tracing variables.
"cmdstr" may contain multiple commands of the form:
<trace variable>=<value>: set variable to value
<trace variable>+<value>: add bits to variable
<trace variable>-<value>: remove bits from variable

manojsharma
9th August 2005, 07:31
Hi Viplov,

Thanx for pasting the syntex. In my case, since no session was running so bshcmd6.1 was giving no result.

But when I run a session and then give the Bshcmd6.1 command, it start working with -p option.