Hello,
i would like to track media/state changes on my interfaces. I only need up/down messages in my message log.
I did not found anything for syslog settings.
ifstated may be a possible solution and my config looks like:
Code:
/etc/ifstated.conf
init-state auto
if em0.link.up
run "logger -st ifstated 'em0 is active'"
if em0.link.down
run "logger -st ifstated 'em0 is down'"
if em1.link.up
run "logger -st ifstated 'em1 is active'"
if em1.link.down
run "logger -st ifstated 'em1 is down'"
if em2.link.up
run "logger -st ifstated 'em2 is active'"
if em2.link.down
run "logger -st ifstated 'em2 is down'"
if em3.link.up
run "logger -st ifstated 'em3 is active'"
if em3.link.down
run "logger -st ifstated 'em3 is down'"
so far, so good. but if one interfcace changed the state, the current state from all other will be printed to messages log too. How can I prevet this, so only the changed interface is logged?
Thx for any hints.
Thomas