Il comando lnstat è offerto dal pacchetto iproute2. Fornisce statistiche di rete Linux unificate.
Esempi di comando lnstat
1. Per ottenere le statistiche della rete unificata:
# lnstat
2. Per stampare il numero di intervalli:
# lnstat -c 10
3. Per scaricare l'elenco di file/chiavi disponibili:
# lnstat -d # lnstat --dump
4. Per ottenere il file delle statistiche da utilizzare:
# lnstat -f file.txt # lnstat --file file.txt
5. Per impostare l'intervallo sui secondi specificati:
# lnstat -i 10 # lnstat --interval 10
6. Per visualizzare solo le chiavi specificate:
# lnstat -k k,k,k # lnstat --keys k,k,k
Ad esempio:
# lnstat -k arp_cache:entries,rt_cache:in_hit,arp_cache:destroys
7. Per specificare la stampa dell'intestazione:
# lnstat -s 0 (No header at all) # lnstat -s 1 (Prints a header only at start) # lnstat -s 2 (prints a header every 20 lines)
8. Per specificare la larghezza per ogni campo:
# lnstat -w 1,2,3, # lnstat --width 2,2,2
9. Per ottenere assistenza per lnstat:
# lnstat --help
10. Per ottenere le informazioni sulla versione:
# lnstat --version