Operating System - HP-UX
1836444 Members
2403 Online
110100 Solutions
New Discussion

Strange Behavior of RPC Program

 
Brian K. Arnholt
Frequent Advisor

Strange Behavior of RPC Program

I have an RPC program that is acting funny, I consulted the forums, and have used "lsof" to find the source of the strange behavior, but I am at a loss as to why it is acting strange. Here is my problem (output from lsof attached):

I have an rpc program that runs on several C3600s running HP-UX 11.00. Using "lsof" I found that if the program is started from the console (or as "root") it works fine, and doesn't hog CPU time. When started remotely, as a general user, the process immediately ramps up the CPU usage near 100%.

The difference was observed using "lsof" in that when the program is started as "root" or from the console, it attaches to 3 instances of /dev/console. And when its started remotely as a general user, it does not attach to the /dev/console, and runs the CPU near 100%.

Any ideas on why this attachment to the /dev/console file is necessary? Any RPC bugs out there that cause this?

On SunOS there is a command called "truss" that looks at what system calls a program is making, any equivalent on HPUX?

Thanks.
Some see things as they are and ask why, I dream of things that never were and ask why not?
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Strange Behavior of RPC Program

Brian,

Maybe tusc?


Pete

Pete
RAC_1
Honored Contributor

Re: Strange Behavior of RPC Program

There is tusc for tracing unix system calls.

Also can you post following

ps -efx|grep "your_process ---> when started from console

ps -efx|grep "your_process" ---> when started remotelt as general user?

What do you mean by started remotely?
There is no substitute to HARDWORK
Robert-Jan Goossens
Honored Contributor

Re: Strange Behavior of RPC Program

Brian K. Arnholt
Frequent Advisor

Re: Strange Behavior of RPC Program

Thanks for the links to "trusc", it shed a bit more light on the topic. It turns out after looking into it a bit more, there is a *svc.c routine that came from another system that wants read/write access to the console. Giving read/write access to the console to a non-root user solved the problem.

Some see things as they are and ask why, I dream of things that never were and ask why not?
Laurent Menase
Honored Contributor

Re: Strange Behavior of RPC Program

For the RPC programs you can also enable the XTI tracing:

you just define
export XTI_TRACE=255
export XTI_TRACE_FILE=yourlogfile
before running your application, then you will
get the xti calls of that rpc program
( you can tusc it to corelate)