Operating System - HP-UX
1753931 Members
9697 Online
108810 Solutions
New Discussion юеВ

How to use tusc utility on hp-ux

 

How to use tusc utility on hp-ux

Hi gurus,
I installed tusc utility to trace the process as i am getting problem in my database and Oracle recommend to trace the process when my DB listener hangs.
Steps done by me:
--Downloaded the file "tusc-7.8-ia64-11.23.depot.gz"
-- unzip on windows.
-- send as binary to /var/spool/sw/tusc-7.8-ia64-11.23.depot
-- installed software from sam
-- i can view the software from swlist

I run tusc as
# ps -ef|grep PMON
root 17706 17577 0 10:59:21 pts/0 0:00 grep PMON
# tusc -afpo 17706
sh: tusc: not found.

Please help to solve the problem.

Thanks,
Syed MOin

13 REPLIES 13
Sivakumar TS
Honored Contributor

Re: How to use tusc utility on hp-ux


Hi,

Its because the PATH variable is not set.

1. #find / -name tusc -print

==> to check the location of the binary.

2. Add this folder to the existing PATH variable in .profile.

3. Alternatively you can excute the tusc with FULL PATH.

With Regards,

Siva.
Nothing is Impossible !

Re: How to use tusc utility on hp-ux

Hi Siva,

Thanks for ur prompt response,
# find / -name tusc -print
/var/adm/sw/products/tusc
/usr/local/bin/tusc
/usr/local/doc/tusc

Which path should be set in .profile
and how can i run tusc with fullpath . can you pls explain me clearly
Amitkumar_1
Occasional Advisor

Re: How to use tusc utility on hp-ux

HELLO SYED,

add /usr/local/bin/tusc entry in your .profile file.
it will help succesful execution of tusc binary.
Yogeeraj_1
Honored Contributor

Re: How to use tusc utility on hp-ux

hi,

you should use /usr/local/bin/tusc

hence /usr/local/bin should be in the PATH

see: http://hpux.cs.utah.edu/hppd/cgi-bin/wwwtar?/hpux/Sysadmin/tusc-7.8/tusc-7.8-src-11.11.tar.gz+tusc-7.8/HPUX.Install+text

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Sivakumar TS
Honored Contributor

Re: How to use tusc utility on hp-ux


Hi Syed,

Normally "bin" folder contains the binaries/executables for any product.

So pls add the ../bin folder to the PATH and it should work now.

With Regards,

Siva.
Nothing is Impossible !
Sivakumar TS
Honored Contributor

Re: How to use tusc utility on hp-ux


To run with full path,

taking your example itself

1. # ps -ef|grep PMON
root 17706 17577 0 10:59:21 pts/0 0:00 grep PMON


2. instead of doing,

#tusc -afpo 17706

Please run,

#/usr/local/bin/tusc -afpo 17706


With Regards,

Siva.
Nothing is Impossible !

Re: How to use tusc utility on hp-ux

Hi,
Thanks for all , when i read .profile file it mention as
# Do not put "/usr/local/bin" in PATH; it is a security potential breach

PATH=/usr/sbin:$PATH:/sbin:/home/root
where should i add in the path or just as /usr/local/bin/tusc

when i run as
# /usr/local/bin/tusc -afpo 20992
Usage: tusc [-] -OR-
-a: show exec arguments
-A: append to output file
-b bsize: dump 'bsize' max bytes (-r/-w)
-B start[/stop]: show targets of taken-branches
-c: count syscalls instead of printing trace
-C: like -c but also print high/low/average stats
-d [+][!][fd | all]: select only syscalls using fd
-e: show environment variables
-E: show syscall entries
-f: follow forks
-F: show kernel's ttrace feature level
-g: don't attach to members of my session
-h: show state of all processes when idle
-i: don't display interruptible syscalls
-I start[/stop]: single-step and show instructions
-k: keep alive (wait for *all* processes)
-l: print lwpids
-L [!]lwps: [un]select these lwps
-n: print process names
-o [file|fd]: send trace output to file or fd
-p: print pids
-Q: be quiet about some warnings
-r [!][fd | all]: dump read buffers
-R: show syscall restarts
-s [!]syscalls: [un]select these syscalls
-S [!]signals: [un]select these signals
-t: detach process if it becomes traced
-T timestamp: print time stamps
-u: print user thread IDs (pthreads)
-v: verbose (some system calls only)
-V: print version
-w [!][fd | all]: dump write buffers
-x: print raw (hex) arguments
-X: print data in an exportable format
-y: register verbosity (with -I)
-z: only show failing syscalls


Thanks for all participants

Syed MOin
Steven E. Protter
Exalted Contributor

Re: How to use tusc utility on hp-ux

Shyalom Syed,

Set the Process ID to the process you want to monitor.

#ppid collected above
proc=$ppid
/usr/contrib/bin/tusc -o $1 -p $proc &


Basically you have two usual methodologies.

You can hang tusc on a process and redirect the output to a file or you can use tusc to start the process.

In the case of monitoring an Oracle Listener process, the methodology above should work because I'd surmise the listener is started at the same time as the database.

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

Re: How to use tusc utility on hp-ux

Hello experts,

let me explain u guys my exact problem
my Oracle listener is hanging and i want to trace by using tusc recommended by oracle to view the log
when i use as lsnrctl and want to check the status its hang
i dont know how to trace the process and which process id should db traced at the time when listener hangs
if any oracle DBA's got the same problem let me know pls
i am just getting the process id by
#ps -ef|grep PMON
#/usr/local/bin/tusc -za 22071
and it gives me error as
tusc: getproc(22071): No such process
tusc: process 22071 (""): No such process.
tusc: no process to attach to

no replies about mentioning /usr/local/bin/tusc in ".profile"

any recommendations will be highly appreciated and helpful for me

Thanks,
Syed Moin