[comp.unix.internals] rstat problem

skdutta@cs.tamu.edu (Saumen K Dutta) (02/22/91)

Sorry wiazrds! this is a simple programming problem
for those who have worked with the remote statistics
package of SUN(R) RPC. I want to collect some performance
data from the remote workstation which runs the rstatd.
The following program bounces every time when the rstat
function gets executed.

#include <rpcsvc/rstat.h>

main()
{
int value;
struct statstime *statp;
value = havedisk("sparc10");
rstat("neuron", statp);
}

I compiled it with the rpcsvc library. Execution
gives Segmentation fault and core dump. What I
am doing wrong? please don't ask me to RTFM.


Thanks in advance
S.K. Dutta

--
     _                                   ||Internet: skdutta@cssun.tamu.edu  
    (   /_     _ /   --/-/- _            ||Bitnet : skd8107@tamvenus.bitnet 
   __)_/(_____(_/_(_/_(_(__(_/_______    ||Uucp : uunet!cssun.tamu.edu!skdutta
                                 ..      ||Yellnet: (409) 846-8803

skdutta@cs.tamu.edu (Saumen K Dutta) (02/22/91)

In article <12448@helios.TAMU.EDU> skdutta@cs.tamu.edu (Saumen K Dutta) writes:
->Sorry wiazrds! this is a simple programming problem
->for those who have worked with the remote statistics
->package of SUN(R) RPC. I want to collect some performance
->data from the remote workstation which runs the rstatd.
->The following program bounces every time when the rstat
->function gets executed.
->
->#include <rpcsvc/rstat.h>
->
->main()
->{
->int value;
->struct statstime *statp;
->value = havedisk("sparc10");
->rstat("neuron", statp);
->}
->
->I compiled it with the rpcsvc library. Execution
->gives Segmentation fault and core dump. What I
->am doing wrong? please don't ask me to RTFM.
->
->
->Thanks in advance
->S.K. Dutta

Sorry about the carelessness of passing uninitialized pointer        
to the program. Also sorry about sending this query to the
place where it does not belong.

Thanks for the patience
S.K. Dutta



--
     _                                   ||Internet: skdutta@cssun.tamu.edu  
    (   /_     _ /   --/-/- _            ||Bitnet : skd8107@tamvenus.bitnet 
   __)_/(_____(_/_(_/_(_(__(_/_______    ||Uucp : uunet!cssun.tamu.edu!skdutta
                                 ..      ||Yellnet: (409) 846-8803