1758641 Members
2056 Online
108874 Solutions
New Discussion юеВ

Re: tusc command

 
SOLVED
Go to solution
Shivkumar
Super Advisor

tusc command

Hi,

I want to examine java process of weblogic server on hpux.

Just wanted to know how to use "tusc" command to figure out if there is an issue ?

If someone has real time example, it would be appreciated.

Thanks,
Shiv
5 REPLIES 5
Arunvijai_4
Honored Contributor

Re: tusc command

Hi Shiv,

First of all, Install "tusc" in your system,
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-7.8/

Next, How to use "tusc" with Java

Here is a good article from HP's DSPP

http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,2894,00.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Steven E. Protter
Exalted Contributor
Solution

Re: tusc command

Shalom Shiv,

if the process is already running:

Get the process id and assign it to the variable proc

proc=$(ps -ef | grep | awk '{print $2}')
tusc -o $1 -p $proc &

All you need to make it work is to come up with a unique pattern for the weblogic daemon. You actually have enough admin experience that you should be able to id the process without my extra code.

This will hang a tusc collector on an already running process.

You can use tusc to start the process as well.

tusc -vfp -o /tmp/trace.log

Good Luck,

Happy to assist further,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Shivkumar
Super Advisor

Re: tusc command

Hi,

I tried to use "tusc" for Apache but got the output as shown below:-

[sksonkar@bigguy:/usr/local/bin]$proc=$(ps -ef | grep apache| awk '{print $2}')

[sksonkar@bigguy:/usr/local/bin]$ echo $proc
22025 22023 22024 22022 28054

[sksonkar@bigguy:/usr/local/bin]$ ./tusc -o $1 -p $proc &
[1] 28332
[sksonkar@bigguy:/usr/local/bin]$ tusc: getproc(28054): No such process
tusc: ttrace(TT_PROC_ATTACH, 22025, 0, 0, dad0001, 0): Permission denied
tusc: ttrace(TT_PROC_ATTACH, 22023, 0, 0, dad0001, 0): Permission denied
tusc: ttrace(TT_PROC_ATTACH, 22024, 0, 0, dad0001, 0): Permission denied
tusc: ttrace(TT_PROC_ATTACH, 22022, 0, 0, dad0001, 0): Permission denied
tusc: process 28054 (""): No such process.
tusc: no process to attach to
^C
[1] + Done(1) ./tusc -o $1 -p $proc &
[sksonkar@bigguy:/usr/local/bin]$

Can someone suggest what these errors are ?

Thanks,
Shiv
Arunvijai_4
Honored Contributor

Re: tusc command

Hi Shiv,

Try running "tusc" as root user. You were running from sksonkar. That is the reason for getting "Permission denied"

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Shivkumar
Super Advisor

Re: tusc command

I executed the $tusc command as a root user.
We use power broker to gain privileged access.