Entrez la requête de recherche
Buscar en la comunidad...
Article: 100029891
Dernière publication: 2021-12-14
Evaluations: 0 0
Produit(s): InfoScale & Storage Foundation
Description
How to monitor the physical interface of a Network Card using Solaris kstatSolution
Solaris records quite a bit of kernel information. Much of this is available using the kstat facility.
One of things it keeps track of is the physical link status.
When used, it returns a Boolean value with 1 being true(online).
One of things it keeps track of is the physical link status.
When used, it returns a Boolean value with 1 being true(online).
One can see the link status of any NIC (plumbed or unplumbed) with the following command:
One can use the NIC type on the command if only interested in a particular subset:
# kstat -p:::link_up
hme:0:hme0:link_up 1
qfe:0:qfe0:link_up 0
qfe:1:qfe1:link_up 0
qfe:2:qfe2:link_up 0
qfe:3:qfe3:link_up 0
One can use the NIC type on the command if only interested in a particular subset:
#kstat -phme:::link_up
hme:0:hme0:link_up 1
One can monitor the status of the link every 10 seconds with the following script:
===
#!/bin/sh
whiletrue
do
kstat-p ce:::link_up >>/tmp/linkstats
date >>/tmp/linkstats
sleep 10
done
===
.