Skip to content

Instantly share code, notes, and snippets.

@PierreZ
Last active April 11, 2018 22:55
Show Gist options
  • Save PierreZ/eef66ae913be38f868277d77d4477513 to your computer and use it in GitHub Desktop.
Save PierreZ/eef66ae913be38f868277d77d4477513 to your computer and use it in GitHub Desktop.

Name ideas

netinfo

Ideas

  • show interfaces stat (using /proc/net/dev)
  • -w option to watch. Watching for file descriptor will provide stream of events
  • search for process should include:
    • systemd service
    • process name
    • PID
  • reduce.count functionality
    • socket state
    • foreign address

User experience

ni # display all sockets for the user
ni -w -n 2 # watch for all sockets (refresh every 2sec) 
ni -p kafka.service # display all sockets for kafka unit
ni -p python # display for all sockets for process name containing python
ni -p 1234 # display all sockets for PID 1234
ni -s # statistic for interfaces
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment