https://github.com/stevecondylios/netstat
Network statistics in R
https://github.com/stevecondylios/netstat
cran cran-r r r-package r-programming r-stats r-studio
Last synced: about 1 year ago
JSON representation
Network statistics in R
- Host: GitHub
- URL: https://github.com/stevecondylios/netstat
- Owner: stevecondylios
- License: other
- Created: 2019-12-23T03:53:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-09-13T01:45:21.000Z (over 2 years ago)
- Last Synced: 2025-04-06T08:24:28.766Z (about 1 year ago)
- Topics: cran, cran-r, r, r-package, r-programming, r-stats, r-studio
- Language: R
- Homepage: https://stevecondylios.github.io/netstat/
- Size: 1.58 MB
- Stars: 3
- Watchers: 2
- Forks: 4
- Open Issues: 8
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
[](https://cran.r-project.org/package=netstat)
[](https://travis-ci.org/stevecondylios/netstat)

`netstat` allows you to easily view which TCP ports are in use and which are free to use.
```{r results = 'hide', warning=FALSE, message=FALSE}
# install.packages("netstat")
library(netstat)
```
### See which TCP ports are currently in use with `ports_in_use()`
```{r}
ports_in_use()
```
### Find a free TCP port using `free_port()`
```{r}
free_port()
```
- `free_port()` returns an available TCP port from Internet Assigned Numbers Authority (IANA) listed
unassigned ports.
- `free_port()` will not return any TCP port currently in use - so
`free_port()` can safely be used to allocate a ports programmatically without collisions - great for
automated testing or browser automation in general
