Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

chudremotectrl(1) [osx man page]

CHUDREMOTECTRL(1)					      General Commands Manual						 CHUDREMOTECTRL(1)

chudRemoteCtrl - start or stop the collection of performance monitor data in a performance monitor remote server application. SYNOPSIS
chudRemoteCtrl [ -m ] [ executable [args... ] ] chudRemoteCtrl -s label chudRemoteCtrl -e chudRemoteCtrl -k PID DESCRIPTION
chudRemoteCtrl is a command line tool that allows for the collection of performance data by any active performance monitor remote server application. There are currently two CHUD Tools that can be put in remote performance monitor server mode: MONster, and Shark (as well as their command line counterparts). Typically, chudRemoteCtrl is invoked on the command line or in a shell script, followed by the path to an executable to be measured and its arguments. chudRemoteCtrl issues a chudStartRemotePerfMonitor message immediately after launching the specified target program. When the launched program terminates, chudRemoteCtrl issues a chudStopRemotePerfMonitor message, and then exits. When the '-s', '-e' or '-k PID' options are used, no program is launched. OPTIONS
-r seconds: If the 'chudStartRemotePerfMonitor' message fails to either acquire or start the remote monitoring service, then keep try- ing to start again, until the specified number of seconds has elapsed. The same thing is true of the '-e' option. If there is a '-r <seconds>' argument on the command line, and a failure occurs trying to stop the remote profiling program, the stop message will be sent again until the retry time limit is reached. -s label: Issue a chudStartRemotePerfMonitor message with the specified label and exit. A 'label' is a string of up to 32 characters. -e Issue a chudStopRemotePerfMonitor message and exit. -q silence some of the non-essential warning and error output. -kPID Send a UNIX signal (SIGUSR1 to start profiling, SIGUSR2 to stop profiling) to the specified process-id. For example, if a command- line profiling tool, is running as PID 4267, using '-k 4267' along with a '-s' will send a SIGUSR1 to the command-line profiling tool and it will start sampling, while '-k 4267' along with a '-e' will send a SIGUSR2 to the command-line profiling tool and it will stop sampling. A 'start' example: % chudRemoteCtrl -s session_42 -k 4267. And a 'stop' example: % chudRemoteCtrl -e -k 4267. The command-line CHUD tool 'shark' responds to UNIX signals and toggles performance profiling. You can repeatedly send '-s <label> -k <PID#>' to shark and it will toggle profiling start or stop. Sending '-e -k <PID#>' to shark will stop sampling (if it's run- ning) and cause shark to EXIT. -m Set the performance monitor mark bit in the main thread of the launched child process. DIAGNOSTICS
chudRemoteCtrl returns a zero (0) upon success and a non-zero value on failure. BUGS
Please send your comments, suggestions and bug reports to: SEE ALSO
monster(1), shark(1) CHUD
6 October 2003 CHUDREMOTECTRL(1)

Check Out this Related Man Page

MONITOR(3)						     Library Functions Manual							MONITOR(3)

monitor, monstartup, moncontrol - prepare execution profile SYNOPSIS
monitor(lowpc, highpc, buffer, bufsize, nfunc) int (*lowpc)(), (*highpc)(); short buffer[]; monstartup(lowpc, highpc) int (*lowpc)(), (*highpc)(); moncontrol(mode) DESCRIPTION
There are two different forms of monitoring available: An executable program created by: cc -p . . . automatically includes calls for the prof(1) monitor and includes an initial call to its start-up routine monstartup with default parame- ters; monitor need not be called explicitly except to gain fine control over profil buffer allocation. An executable program created by: cc -pg . . . automatically includes calls for the gprof(1) monitor. Monstartup is a high level interface to profil(2). Lowpc and highpc specify the address range that is to be sampled; the lowest address sampled is that of lowpc and the highest is just below highpc. Monstartup allocates space using sbrk(2) and passes it to monitor (see below) to record a histogram of periodically sampled values of the program counter, and of counts of calls of certain functions, in the buffer. Only calls of functions compiled with the profiling option -p of cc(1) are recorded. To profile the entire program, it is sufficient to use extern etext(); . . . monstartup((int) 2, etext); Etext lies just above all the program text, see end(3). To stop execution monitoring and write the results on the file mon.out, use monitor(0); then prof(1) can be used to examine the results. Moncontrol is used to selectively control profiling within a program. This works with either prof(1) or gprof(1) type profiling. When the program starts, profiling begins. To stop the collection of histogram ticks and call counts use moncontrol(0); to resume the collection of histogram ticks and call counts use moncontrol(1). This allows the cost of particular operations to be measured. Note that an output file will be produced upon program exit irregardless of the state of moncontrol. Monitor is a low level interface to profil(2). Lowpc and highpc are the addresses of two functions; buffer is the address of a (user sup- plied) array of bufsize short integers. At most nfunc call counts can be kept. For the results to be significant, especially where there are small, heavily used routines, it is suggested that the buffer be no more than a few times smaller than the range of locations sampled. Monitor divides the buffer into space to record the histogram of program counter samples over the range lowpc to highpc, and space to record call counts of functions compiled with the -p option to cc(1). To profile the entire program, it is sufficient to use extern etext(); . . . monitor((int) 2, etext, buf, bufsize, nfunc); FILES
mon.out SEE ALSO
cc(1), prof(1), gprof(1), profil(2), sbrk(2) 4th Berkeley Distribution May 15, 1985 MONITOR(3)
Man Page