[nylug-talk] constant port number for rstatd?

Chris Knadle Chris.Knadle at coredump.us
Mon Dec 24 15:29:30 EST 2007


On Monday 24 December 2007, C Thala wrote:
> I am running rstatd through portmapper/rpcbind. It seems that  rstatd
> runs on a different port every time I start the service (rpcinfo -p
> verifies this.) How can I get it to stick to the same port?

   I had a look.  It might be possible, but it looks like it would require 
some reprogramming work in C and recompiling the source for rstatd to get it 
to happen.  [And then installing the modified package on all of the 
machines...]

   I found two possibilities in the code for what needs to change.


Possibility 1:
   It sounds like the call to svcudp_create() within rstat_main.c might need 
to specify the port number.  This is based on what I found within the third 
paragraph of:

   http://www.iana.org/assignments/sun-rpc-numbers


Possibility 2:
   The setting of:

      server_addr.sin_port = 0;

   in rsysinfo.c and/or rup.c needs to be set to the port number you want, 
rather than 0.



   That's my quick stab at this, anyway.

   -- Chris

-- 

Chris Knadle
Chris.Knadle at coredump.us


More information about the nylug-talk mailing list