Port status information file via SSH

Hi,
If I log into the router via SSH, which file will show the port status information, i.e. which LAN ports are being used to an active connection?
Thanks!

What is in ubus call system board?
It is either ip link or swconfig show

ubus call luci-rpc getNetworkDevices

I guess this only works when luci is installed?

PS: No, dear software I would like to that the quote stays in place. For **** sake.

no idea, don't have any devices without LuCI.

got lazy and ran an ubus trace while accessing the webUI :wink:

1 Like

Ok I have not a single device with luci since 2012 :smiley:

Sorry for slightly off-topic, but is there a luci meta package like with all the functions but without the web-server/config?

What do you mean, exactly?

Which ethernet ports are connected to a wire? Which IP ports on the router are being used to an active connection? Which client connections to external servers are active? ...?

1 Like

Yes, which LAN ports are being used to an active connection

Which router you got, swconfig and dsa methods are different,

1 Like

DSA: Asus TUF AX4200 (OpenWrt 23.05.4)

Post output of

ubus call system board

This is valid

(and upgrade if you want any wifi speed from that device)

{
	"kernel": "5.15.162",
	"hostname": "OpenWrt",
	"system": "ARMv8 Processor rev 4",
	"model": "ASUS TUF-AX4200",
	"board_name": "asus,tuf-ax4200",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.4",
		"revision": "r24012-d8dd03c46f",
		"target": "mediatek/filogic",
		"description": "OpenWrt 23.05.4 r24012-d8dd03c46f"
	}
}
ubus call network.device status '{"name":"lo"}'

I'll try to be more explicit: for example if I have a device connected to LAN 1 and another device connected to LAN 3, I just need the script to return: 1, 3 - in some way or another. I just need to know which ports are actively connected and which are not.