Linux

// find network interface
// this is required if you cannot get IP or ifconfig not available
ip link show

// get ip address of interfaces (to see if eth0 exist)
#!/usr/bin/env bash

## Get the primary and secundary IPs
awk '/\|--/ && !/\.0$|\.255$/ {print $2}' /proc/net/fib_trie

## Get only the primary IPs
awk '/32 host/ { print i } {i=$2}' /proc/net/fib_trie

// Monitoring processes that's running as root (think scheduled tasks which we cannot see as normal user)
https://github.com/DominicBreuker/pspy

Last updated

Was this helpful?