question: for the below program
i just printed the value for pid, child pid and parent pid
why does it give me 6 values? i assume ppid is 28086
but can't figure out why there are 5 values printed instead of just two!
can someone comment on that!
#include<stdio.h>
#define DIM 8
int... (3 Replies)
1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection?
2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Hi,
I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this.
Thanks in advance,
Amudha (7 Replies)
Hi,
I do not use the default linker, and instead us another one and pass this argument -Wl,--dynamic-linker=<path to linker> to gcc when compiling. However, what happens if the linker is not under /lib and /lib64 and I am not able to create a symlink to the linker in /lib or /lib64 due to no... (2 Replies)
Hi,
I have written a choice based shell script some thing like this:
if (y)
execute code
....
fi
else if(n)
terminating
the problem with the above scripting is it will work as far as the options are y or n.
but i want to reiterate the same code when the user inputs something else... (1 Reply)
Okay, I have an Asus A8NSLI board with an Athlon 64 and I dunno, maybe 8gig Ram and Windows has crashed for the last time so I've finally had enough and I'll make it a Unix machine.
I have a new 1Tera drive and I'm all set to go.
Which brand of Unix/Linux can you advise me to go for?
The... (3 Replies)
Discussion started by: abrogard
3 Replies
LEARN ABOUT MOJAVE
dappprof
dappprof(1m) USER COMMANDS dappprof(1m)NAME
dappprof - profile user and lib function usage. Uses DTrace.
SYNOPSIS
dappprof [-acehoTU] [-u lib] { -p PID | command }
DESCRIPTION
dappprof prints details on user and library call times for processes as a summary style aggragation. By default the user fuctions are
traced, options can be used to trace library activity. Output can include function counts, elapsed times and on cpu times.
The elapsed times are interesting, to help identify functions that take some time to complete (during which the process may have slept).
CPU time helps us identify syscalls that are consuming CPU cycles to run.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS -a print all data
-c print function counts
-e print elapsed times, ns
-o print CPU times, ns
-T print totals
-p PID examine this PID
-u lib trace this library instead
-U trace all library and user functions
EXAMPLES
run and examine the "df -h" command,
# dappprof df -h
print elapsed times, on-cpu times and counts for "df -h",
# dappprof -ceo df -h
print elapsed times for PID 1871,
# dappprof -p 1871
print all data for PID 1871,
# dappprof -ap 1871
FIELDS
CALL Function call name
ELAPSED
Total elapsed time, nanoseconds
CPU Total on-cpu time, nanoseconds
COUNT Number of occurrences
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
dappprof will sample until Ctrl-C is hit.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO dapptrace(1M), dtrace(1M), apptrace(1)version 1.10 May 14, 2005 dappprof(1m)