[R] netstat in R in linux...

Henrik Bengtsson henr|k@bengt@@on @end|ng |rom gm@||@com
Tue Dec 6 20:14:18 CET 2022


> By the by, what advantages does port4me have as compared to netstat?

As I said in my previous email, it doesn't require external tools, so
it's more likely to work out of the box for more people. But that
wasn't the main reason for this package. For the full motivation
behind port4me, see the vignette
<https://cran.r-project.org/web/packages/port4me/vignettes/port4me-overview.html>.

/Henrik

On Tue, Dec 6, 2022 at 11:00 AM akshay kulkarni <akshay_e4 using hotmail.com> wrote:
>
> Dear Henrik
>                       It is working....thanks a lot! I had actually previously tried this:  sudo yum install netstat rather than sudo yum install net-tools
>
> By the by, what advantages does port4me have as compared to netstat?
>
> THanking you,
> Yours sincerely,
> AKSHAY M KULKARNI
>
> ________________________________
> From: Henrik Bengtsson <henrik.bengtsson using gmail.com>
> Sent: Wednesday, December 7, 2022 12:19 AM
> To: akshay kulkarni <akshay_e4 using hotmail.com>
> Cc: R help Mailing list <r-help using r-project.org>
> Subject: Re: [R] netstat in R in linux...
>
> Okay,
>
> that means that the Linux machine where you run this on does not have
> the 'netstat' software installed.  That is something that needs to be
> installed outside of R.  For example, if it's Ubuntu, I think 'sudo
> apt info net-tools' will do.
>
> (Disclaimer: I'm the author)
> A cross-platform alternative to netstat::free_port(), is
> port4me::port4me(), which is also available from CRAN
> (https://cran.r-project.org/package=port4me). It requires no external
> tools, but R (>= 4.0.0).
>
> /Henrik
>
> On Tue, Dec 6, 2022 at 10:41 AM akshay kulkarni <akshay_e4 using hotmail.com> wrote:
> >
> > Dear Henrik,
> >                         The error is:
> >
> > > library(netstat)
> > > free_port()
> > sh: netstat: command not found
> > Error in system("netstat -n -a", intern = TRUE) :
> >   error in running command
> >
> > Thanking you,
> > Yours sincerely
> > AKSHAY M KULKARNI
> > ________________________________
> > From: Henrik Bengtsson <henrik.bengtsson using gmail.com>
> > Sent: Tuesday, December 6, 2022 11:53 PM
> > To: akshay kulkarni <akshay_e4 using hotmail.com>
> > Cc: R help Mailing list <r-help using r-project.org>
> > Subject: Re: [R] netstat in R in linux...
> >
> > What's the error?!?
> >
> > /Henrik
> >
> > On Tue, Dec 6, 2022 at 10:19 AM akshay kulkarni <akshay_e4 using hotmail.com> wrote:
> > >
> > > dear members,
> > >
> > > I am using free_port() in netstat package in R. It is working in windows but not in linux. It is throwing an error in linux. ANy help please?
> > >
> > > THanking you,
> > > Yours sincerely
> > > AKSHAY M KULKARNI
> > >
> > >         [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> > > and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list