|
Home > Archive > Unix Programming > March 2004 > Is there a way to see what a process is doing?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Is there a way to see what a process is doing?
|
|
| music4 2004-03-24, 4:34 am |
| Greetings,
I developed a socket server program, now I am testing it.
In the test, I let the socket client keep sending same data to server
program at same speed. But I find the server process normally occupy about
20% CPU usage, but sometime over 50%.
So I am wondering if there is to let me see what server program is doing
what high CPU usage time.
I developer the program on Solaris 8, C++ language, Sun Forte 6 compiler.
Any ideas will be greatly appreciated.
Evan
| |
| Paul Pluzhnikov 2004-03-24, 10:39 am |
| "music4" <music4@163.net> writes:
> So I am wondering if there is to let me see what server program is doing
> what high CPU usage time.
Yes: "man truss" and "man pstack"
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
| |
| Chuck Dillon 2004-03-24, 10:39 am |
| music4 wrote:
> Greetings,
>
> I developed a socket server program, now I am testing it.
>
> In the test, I let the socket client keep sending same data to server
> program at same speed. But I find the server process normally occupy about
> 20% CPU usage, but sometime over 50%.
>
> So I am wondering if there is to let me see what server program is doing
> what high CPU usage time.
>
> I developer the program on Solaris 8, C++ language, Sun Forte 6 compiler.
>
> Any ideas will be greatly appreciated.
>
> Evan
>
>
That's what a debugger is for. The dbx debugger (part of forte) can
also do profiling and report how much time is spent in each function.
See the manpage for dbx and the help command of dbx.
-- ced
--
Chuck Dillon
Senior Software Engineer
NimbleGen Systems Inc.
|
|
|
|
|