[R] netstat in R in linux...

Henrik Bengtsson henr|k@bengt@@on @end|ng |rom gm@||@com
Tue Dec 6 19:49:15 CET 2022


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