Setting a device online or offline
Use the online device group attribute to set a CTCM device online or offline.
About this task
You must know the interface name to access the CTCM group device. To determine the
assigned interface name, use the lszdev --existing command. For each
online interface, the interface name is shown in the Name column. Alternatively, to determine the
assigned interface name issue a command of the form:
# ls /sys/devices/ctcm/<device_bus_id>/net/
For each online interface, there is a symbolic link of the form /sys/class/net/<interface_name>/device in sysfs. You can confirm that you found the correct interface name by reading the link.
Procedure
To set a CTCM group device online, set the online device
group attribute to
1
. To set a CTCM group device
offline, set the online device group attribute to 0
.
Issue a command of this form:
# echo <flag> > /sys/bus/ccwgroup/drivers/ctcm/<device_bus_id>/online
Example
# echo 1 > /sys/bus/ccwgroup/drivers/ctcm/0.0.2000/online
To determine
the interface name issue:
# lszdev --existing
TYPE ID ON PERS NAMES
ctcm 0.0.2000:0.0.2001 yes no ctc0
or # ls /sys/devices/ctcm/0.0.2000/net/
ctc0
The interface name that was assigned to the CTCM group device in the example is mpc0. To confirm
that this name is the correct one for the group device issue:
# readlink /sys/class/net/mpc0/device
../../../0.0.2000
To set group device 0.0.2000 offline issue:
# echo 0 > /sys/bus/ccwgroup/drivers/ctcm/0.0.2000/online