Operating System - HP-UX
1825795 Members
2242 Online
109687 Solutions
New Discussion

Re: How to set up an trace log on HP-UX ?

 
Thierry Doppler
Frequent Advisor

How to set up an trace log on HP-UX ?

Hi,

I want to set up a trace to log all the processes running on my rx2620/HP-UX 11.23, to find a database sporadic error-job.

Is in HP-UX a tool available to to that ?

Thank you

Thierry
6 REPLIES 6
Robert-Jan Goossens
Honored Contributor

Re: How to set up an trace log on HP-UX ?

Hi Thierry,

Download and install tusc/truss from the link below.

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/tusc-7.8/

Best regards,
Robert-Jan
Thierry Doppler
Frequent Advisor

Re: How to set up an trace log on HP-UX ?

I'm understandig that i have to give a process-id to look what this proces is doing. But I want to log something as the top-command, every second, in a file.

Thierry
Arunvijai_4
Honored Contributor

Re: How to set up an trace log on HP-UX ?

Hi,

If you use tusc with your process, you will get to know all the system calls it makes, return values, it is similar to "truss" on solaris. You can get detailed output when you use it with your erring process.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Muthukumar_5
Honored Contributor

Re: How to set up an trace log on HP-UX ?

You can log all process with ps command as,

#!/bin/ksh
# process.ksh
LOGFILE=/tmp/process.log

while [[ 1 ]]
do

ps -ef >> ${LOGFILE}

# sleep time
sleep 60

done

# END
exit 0

#################################

Note: If you did not change sleep time then it will load more contents in log file. File will be added more and more. So keep sleep time more.

-Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: How to set up an trace log on HP-UX ?

Using top utility then,

#!/bin/ksh
# process.ksh
LOGFILE=/tmp/top.log

while [[ 1 ]]
do

top -d 1 >> ${LOGFILE}

# sleep time
sleep 60

done

# END
exit 0

##############################

Note: top will not all process informations. You have to use ps command only to get all informations.

-Muthu
Easy to suggest when don't know about the problem!
Robert-Jan Goossens
Honored Contributor

Re: How to set up an trace log on HP-UX ?

Thierry,

Maybe this tool can help you to pinpoint the source of your problem.

http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1174,00.html

--
HP Caliper is a general-purpose performance analysis tool for applications on Itanium®-based HP-UX and Linux systems. HP Caliper allows you to understand the performance and execution of your application and to identify ways to improve its run-time performance
--

Regards,
Robert-Jan