Comware switch will show you when it transition last time.
GigabitEthernet1/0/2
Current state: DOWN
Line protocol state: DOWN
---
Last link flapping: 27 weeks 3 days 7 hours 3 minutes<
Last clearing of counters: Never
Current system time:2024-05-03 14:02:18
Last time when physical state changed to up:2023-10-23 13:57:00
Last time when physical state changed to down:2023-10-24 07:02:52
...
For 2540 you can check logs with
show log -r | include ports
In both cases you need to parse the output. Comware is more reliable as logs on ArubaOS-S switches will roll over.
Best, Gorazd
------------------------------
Gorazd Kikelj
MVP Guru 2024
------------------------------
Original Message:
Sent: Apr 29, 2024 07:01 AM
From: Haas
Subject: Command for switches to see inactive ports
Hello colleagues,
do you know a command to see how long switchports are already inactive or what time they were active the last time?
I have following switches:
- HP J9851A Switch 5412Rzl2
- Aruba JL357A 2540-48G-PoE+-4SFP+ Switch
Maybe this is not possible to see?
Thank you!