Grabbing connection and link status with nmcli
- From: <colin helliwell ln-systems com>
- To: <networkmanager-list gnome org>
- Subject: Grabbing connection and link status with nmcli
- Date: Wed, 30 Aug 2017 17:17:49 +0100
I've not used nmcli in any of its more intricate ways, but are there some
easily-parsed commands which will allow me to tell whether an Ethernet
interface is up (a la 'nmcli conn up/down') AND the cable is connected
('link/carrier state')?
I can grab some hints of the latter with /sys/class/net/eth0/carrier, but
would prefer an approach that is harmonised through nmcli. Are there a
couple of sub-commands that can be used rather than parsing the full 'nmcli
dev show' output? e.g. to output a couple of specific fields.
Thanks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]