2015-09-09 16:45:09 +03:00
|
|
|
#!/bin/bash
|
|
|
|
# info: list system network status
|
|
|
|
# options: [FORMAT]
|
|
|
|
#
|
|
|
|
# The function lists network status
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Variable&Function #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
2015-11-06 17:38:58 +02:00
|
|
|
# Argument definition
|
2015-09-09 16:45:09 +03:00
|
|
|
#format=${1-shell}
|
|
|
|
|
|
|
|
# Includes
|
|
|
|
#source $VESTA/func/main.sh
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Action #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
# Displaying network stats
|
|
|
|
ss -s
|
|
|
|
echo -en "\n-------------------------------------"
|
|
|
|
echo -en "-------------------------------------\n\n"
|
|
|
|
|
|
|
|
# Displaying network usage
|
|
|
|
lsof -itcp -n -P
|
|
|
|
echo -en "\n-------------------------------------"
|
|
|
|
echo -en "-------------------------------------\n\n"
|
|
|
|
|
|
|
|
# Displaying network interfaces
|
|
|
|
ifconfig
|
|
|
|
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
# Vesta #
|
|
|
|
#----------------------------------------------------------#
|
|
|
|
|
|
|
|
exit
|