Manage platform log files
Download platform logs (including CAF and system logs)
You can view the list of platform log files, choose one of them and download it current working directory.
~$ ioxclient platform logs download
Currently active profile : local
Command Name: plt-logs-download
1. boot.log
2. syslog.1
3. alternatives.log.1
4. caf.log
5. syslog.2.gz
6. syslog
Choose the log file you want to download [1-6] : 4
Retrieved log file successfully. Content stored at plog-Y2FmLmxvZy40
Get CAF logger levels
View the current log levels for different CAF loggers.
$ ioxclient platform logs getlevel
Currently active profile : local
Command Name: plt-logs-getlevel
-------------CAF Log levels----------------
{
"cartridge": "debug",
"command_wrapper": "debug",
"connector_management": "debug",
"oauth_service": "debug",
"oauthlib": "debug",
"other": "debug",
"overrides": "debug",
"pdservices": "debug",
"rest_apis": "debug",
"rfs_composer": "debug",
"runtime.proxy": "debug",
"system_information": "debug",
"utils": "debug"
}
Set CAF logger levels
$ ioxclient platform logs setlevel info
Currently active profile : local
Command Name: plt-logs-setlevel
Successfully set log level to info
View platform capability information
Each platform exposes its capabilities in terms of available resources, supported language runtimes, application types etc.,
~$ ioxclient platform capability
Currently using profile : default
Command Name: plt-capability
-------------Platform Capability----------------
{
"compute_nodes": [
{
"apphosting_cpu_shares": 8192,
"id": "564D7AD1-641A-3FC3-0C41-3313E82D27AB",
"installed_cartridges": [
{
"author": "Cisco Systems",
"authorLink": "http://www.cisco.com",
"cpuarch": "x86_64",
"dependson": null,
"description": "Yocto 1.7.2 iox-core-image-minimal rootfs",
"handleas": [
"overlay",
"mountable"
],
"id": "Yocto_1.7.2_for_IR800_1.0_x86_64",
"name": "Yocto 1.7.2 for IR800",
"payload": "ir800_yocto-1.7.2.ext2",
"provides_info": [
{
"id": "urn:cisco:system:cartridge:baserootfs:yocto",
"used_by": [
{
"id": "Azul_Java_1.8_for_IR800_1.0_x86_64",
"type": "cartridge"
},
{
"id": "Python_2.7_for_IR800_1.0_x86_64",
"type": "cartridge"
}
],
"version": "1.7.2"
}
],
"runtime": "None",
"runtime_version": "None",
"type": "baserootfs",
"version": "1.0"
},
{
"author": "Cisco Systems",
"authorLink": "http://www.cisco.com",
"cpuarch": "x86_64",
"dependson": [
{
"id": "urn:cisco:system:cartridge:baserootfs:yocto",
"version": "1.7.2"
}
],
"description": "Python 2.7 language runtime bundle",
"handleas": [
"overlay",
"mountable"
],
"id": "Python_2.7_for_IR800_1.0_x86_64",
"name": "Python 2.7 for IR800",
"payload": "ir800_yocto-1.7.2_python-2.7.3.ext2",
"provides_info": [
{
"id": "urn:cisco:system:cartridge:language-runtime:python",
"used_by": [
{
"id": "nettest",
"type": "app"
}
],
"version": "2.7.3"
}
],
"runtime": "None",
"runtime_version": "None",
"type": "language-runtime",
"version": "1.0"
},
{
"author": "Cisco Systems",
"authorLink": "http://www.cisco.com",
"cpuarch": "x86_64",
"dependson": [
{
"id": "urn:cisco:system:cartridge:baserootfs:yocto",
"version": "1.7.2"
}
],
"description": "Java 1.8 language runtime bundle 1.8.0_65-8.10.0.1",
"handleas": [
"overlay",
"mountable"
],
"id": "Azul_Java_1.8_for_IR800_1.0_x86_64",
"name": "Azul Java 1.8 for IR800",
"payload": "ir800_yocto-1.7.2_zre1.8.0_65.8.10.0.1.ext2",
"provides_info": [
{
"id": "urn:cisco:system:cartridge:language-runtime:java",
"used_by": [],
"version": "1.8"
}
],
"runtime": "None",
"runtime_version": "None",
"type": "language-runtime",
"version": "1.0"
}
],
"installed_services": [],
"name": "hvishwanath-tiramisu",
"resources": {
"cpu": {
"available": 800,
"info": {
"cpu_arch": "x86_64",
"family": 0,
"frequency": 0,
"model": 0,
"model_name": "",
"number_cores": 4,
"stepping": 0
},
"total": 1000,
"vcpu_count": 1
},
"devices": {
"serial": [
{
"available": true,
"device_id": "/dev/ttyS2",
"device_name": "async1",
"port": null,
"slot": null,
"used_by": null
},
{
"available": true,
"device_id": "/dev/ttyS1",
"device_name": "async0",
"port": null,
"slot": null,
"used_by": null
}
]
},
"memory": {
"available": 192,
"total": 256
},
"networks": [
{
"app_ip_map": {},
"external_interface": "VPG0",
"gateway_ip": null,
"ip_end": null,
"ip_start": null,
"name": "iox-bridge0",
"network_type": "bridge",
"private_route_table": "10",
"repofolder": "/sw/opt/cisco/caf/work/network",
"source_linux_bridge": "svcbr_0",
"subnet_mask": null
},
{
"app_ip_map": {
"nettest": {
"eth0": {
"ipv4": "192.168.223.10",
"mac_address": "52:54:99:99:00:00"
}
}
},
"external_interface": "VPG0",
"gateway_ip": "192.168.223.1",
"ip_end": "192.168.223.254",
"ip_start": "192.168.223.10",
"name": "iox-nat0",
"network_type": "nat",
"private_route_table": "10",
"repofolder": "/sw/opt/cisco/caf/work/network",
"source_linux_bridge": "svcbr_0",
"subnet_mask": "255.255.255.0"
}
],
"storage": {
"available": 246,
"total": 256
}
},
"supported_app_schemas": [
{
"validator_schema": "schema_1.0.json",
"version": "1.0"
},
{
"validator_schema": "schema_2.0.json",
"version": "2.0"
}
],
"supported_app_types": [
"docker",
"paas",
"lxc",
"vm"
],
"supported_profile_types": [
"c1.tiny",
"c1.small",
"c1.medium",
"c1.large",
"default",
"custom"
]
}
],
"mgmt_api_version": "2.0",
"min_app_manifest_version": "1.0",
"product_id": "default"
View platform events
Every operation on a platform generates events. Events can be viewed using this command.
~$ ioxclient platform events
Currently using profile : default
Command Name: plt-events
Host ID : 564D7AD1-641A-3FC3-0C41-3313E82D27AB
Event : 1
event_type : caf_started
severity : INFO
timestamp: 2016-01-08 09:30:50 +0530 IST
app_id : <nil>
message : CAF started
sequence_number : 1
This command also can take optional [fromseq] and [toseq] numbers that fetches a subset of events.
~$ ioxclient platform events -h
NAME:
events - Get platform events
USAGE:
command events [fromseq] [toseq]. If not specified, default value is -1
Get system health
System health information provides valuable data about the what is going on in the platform.
~$ ioxclient platform health
Currently using profile : default
Command Name: plt-health
-------------System Health----------------
{
"cpu": {
"cpu_count": 4,
"load_average": {
"min1": 0.45,
"min15": 0.3,
"min5": 0.42
},
"tasks": {
"stopped": 0,
"total": 547,
"zombie": 0
},
"utilization": {
"idle": 0.9764563446970509,
"io_wait": 0.00015042774858185456,
"system": 0.004910452673346573,
"user": 0.017777448568410233
}
},
"interfaces": [
{
"bandwidth_available": "N/A",
"bandwidth_used_rx": 0,
"bandwidth_used_tx": 0,
"name": "docker0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 0,
"packets_tx": 0,
"tx_queue_len": 0
},
{
"bandwidth_available": "N/A",
"bandwidth_used_rx": 512,
"bandwidth_used_tx": 512,
"name": "lo",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 3039,
"packets_tx": 3039,
"tx_queue_len": 0
},
{
"bandwidth_available": "N/A",
"bandwidth_used_rx": 0,
"bandwidth_used_tx": 0,
"name": "virbr0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 0,
"packets_tx": 0,
"tx_queue_len": 0
},
{
"bandwidth_available": "10000Mb/s",
"bandwidth_used_rx": 217,
"bandwidth_used_tx": 806,
"name": "vnet0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 7542,
"packets_tx": 18277,
"tx_queue_len": 1000
},
{
"bandwidth_available": "10Mb/s",
"bandwidth_used_rx": 0,
"bandwidth_used_tx": 0,
"name": "dpbr_0-nic",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 0,
"packets_tx": 0,
"tx_queue_len": 500
},
{
"bandwidth_available": "10000Mb/s",
"bandwidth_used_rx": 517,
"bandwidth_used_tx": 506,
"name": "veth0_0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 7037,
"packets_tx": 3082,
"tx_queue_len": 1000
},
{
"bandwidth_available": "N/A",
"bandwidth_used_rx": 762,
"bandwidth_used_tx": 261,
"name": "svcbr_0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 33114,
"packets_tx": 28337,
"tx_queue_len": 0
},
{
"bandwidth_available": "10Mb/s",
"bandwidth_used_rx": 0,
"bandwidth_used_tx": 0,
"name": "dpbr_n_0-nic",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 0,
"packets_tx": 0,
"tx_queue_len": 500
},
{
"bandwidth_available": "N/A",
"bandwidth_used_rx": 302,
"bandwidth_used_tx": 721,
"name": "dpbr_n_0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 7535,
"packets_tx": 8219,
"tx_queue_len": 0
},
{
"bandwidth_available": "N/A",
"bandwidth_used_rx": 1024,
"bandwidth_used_tx": 0,
"name": "dpbr_0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 2955,
"packets_tx": 0,
"tx_queue_len": 0
},
{
"bandwidth_available": "10000Mb/s",
"bandwidth_used_rx": 506,
"bandwidth_used_tx": 517,
"name": "veth1_0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 3082,
"packets_tx": 7037,
"tx_queue_len": 1000
},
{
"bandwidth_available": "1000Mb/s",
"bandwidth_used_rx": 706,
"bandwidth_used_tx": 317,
"name": "eth0",
"packets_dropped_rx": 0,
"packets_dropped_tx": 0,
"packets_rx": 30039,
"packets_tx": 35810,
"tx_queue_len": 1000
}
],
"memory": {
"free": 1.787211776e+09,
"swap_used": 507904,
"total": 4.130541568e+09,
"used": 2.343329792e+09
},
"storage": [
{
"free": 1.2095512576e+10,
"name": "/dev/sda1",
"reads_sec": 1.010304e+09,
"size": 1.89862912e+10,
"writes_sec": 2.5219072e+08
},
{
"free": 1.1388100608e+10,
"name": "/dev/sdb1",
"reads_sec": 5.52911872e+08,
"size": 3.1571570688e+10,
"writes_sec": 3.9825408e+08
},
{
"free": 3.075072e+06,
"name": "/dev/loop0",
"reads_sec": 0,
"size": 1.2762112e+07,
"writes_sec": 0
},
{
"free": 0,
"name": "/dev/loop1",
"reads_sec": 0,
"size": 5.7787392e+07,
"writes_sec": 0
},
{
"free": 0,
"name": "/dev/loop2",
"reads_sec": 0,
"size": 1.9841024e+07,
"writes_sec": 0
},
{
"free": 1.872896e+06,
"name": "/dev/loop3",
"reads_sec": 0,
"size": 2.018304e+06,
"writes_sec": 0
},
{
"free": 1.0617856e+07,
"name": "/dev/loop4",
"reads_sec": 0,
"size": 1.2131328e+07,
"writes_sec": 0
}
],
"system": {
"localtime": 1.452264874e+09,
"tzone": "IST(UTC+5:30:00)",
"uptime": 17568
}
}
View platform information
Platform information provides details about cpu, network, storage etc., on the platform.
~$ ioxclient platform info
Currently using profile : d829
Command Name: plt-info
-------------System Info----------------
{
"arp_cache": [
{
"address": "10.78.106.27",
"hwaddress": "00:0c:29:53:8d:6b",
"iface": "svcbr_0"
},
{
"address": "9.42.7.33",
"hwaddress": "88:5a:92:f0:51:b9",
"iface": "svcbr_0"
},
{
"address": "192.168.1.1",
"hwaddress": "5c:a4:8a:54:02:c7",
"iface": "svcbr_0"
},
{
"address": "10.78.106.98",
"hwaddress": "00:0c:29:dd:9d:f2",
"iface": "svcbr_0"
},
{
"address": "10.78.106.1",
"hwaddress": "00:00:0c:07:ac:0a",
"iface": "svcbr_0"
},
{
"address": "10.78.106.18",
"hwaddress": "00:0c:29:f1:8f:10",
"iface": "svcbr_0"
},
{
"address": "10.78.106.3",
"hwaddress": "00:1b:2b:f6:86:80",
"iface": "svcbr_0"
},
{
"address": "10.78.106.107",
"hwaddress": "00:0c:29:4d:4d:6c",
"iface": "svcbr_0"
},
{
"address": "9.42.5.36",
"hwaddress": "3c:08:f6:5c:5e:c8",
"iface": "svcbr_0"
},
{
"address": "10.78.106.2",
"hwaddress": "00:1b:2b:f6:92:80",
"iface": "svcbr_0"
},
{
"address": "10.78.106.90",
"hwaddress": "4c:4e:35:e5:4a:46",
"iface": "svcbr_0"
}
],
"cpu": {
"cpu_arch": "x86_64",
"family": 0,
"frequency": 0,
"model": 0,
"model_name": "",
"number_cores": 2,
"stepping": 0
},
"dns_resolver": {
"domain": "",
"nameservers": [
"72.163.128.140"
],
"search": "cisco"
},
"hostname": "iox-caf",
"interfaces": [
{
"ipv4_address": "172.17.42.1",
"ipv4_netmask": "255.255.0.0",
"mtu": 1500,
"name": "docker0",
"type": "Ethernet"
},
{
"ipv4_address": "",
"ipv4_netmask": "",
"mtu": 1500,
"name": "dpbr_0",
"type": "Ethernet"
},
{
"ipv4_address": "10.10.10.1",
"ipv4_netmask": "255.255.255.0",
"mtu": 1500,
"name": "dpbr_n_0",
"type": "Ethernet"
},
{
"ipv4_address": "",
"ipv4_netmask": "",
"mtu": 1500,
"name": "eth0",
"type": "Ethernet"
},
{
"ipv4_address": "127.0.0.1",
"ipv4_netmask": "255.0.0.0",
"mtu": 65536,
"name": "lo",
"type": "Local"
},
{
"ipv4_address": "10.78.106.63",
"ipv4_netmask": "255.255.255.128",
"mtu": 1500,
"name": "svcbr_0",
"type": "Ethernet"
},
{
"ipv4_address": "192.168.122.1",
"ipv4_netmask": "255.255.255.0",
"mtu": 1500,
"name": "virbr0",
"type": "Ethernet"
}
],
"ipv4_routing": [
{
"destination": "0.0.0.0",
"flags": "UG",
"gateway": "10.78.106.1",
"genmask": "0.0.0.0",
"iface": "svcbr_0",
"metric": 0
},
{
"destination": "10.10.10.0",
"flags": "U",
"gateway": "0.0.0.0",
"genmask": "255.255.255.0",
"iface": "dpbr_n_0",
"metric": 0
},
{
"destination": "10.78.106.0",
"flags": "U",
"gateway": "0.0.0.0",
"genmask": "255.255.255.128",
"iface": "svcbr_0",
"metric": 0
},
{
"destination": "172.17.0.0",
"flags": "U",
"gateway": "0.0.0.0",
"genmask": "255.255.0.0",
"iface": "docker0",
"metric": 0
},
{
"destination": "192.168.122.0",
"flags": "U",
"gateway": "0.0.0.0",
"genmask": "255.255.255.0",
"iface": "virbr0",
"metric": 0
}
],
"memory": {
"size": 2.098847744e+09,
"swap": 1.071640576e+09
},
"ntp_server": "",
"storage": [
{
"filesystem": "ext4",
"mount": "/",
"name": "/dev/sda1",
"size": 1.5718137856e+10
},
{
"filesystem": "ext2",
"mount": "/sw/opt/cisco/caf/cartridges/rootfs-dhcp_1.0_x86_64/mntpoint",
"name": "/dev/loop0",
"size": 2.537984e+07
},
{
"filesystem": "ext2",
"mount": "/sw/opt/cisco/caf/cartridges/python2.7_0.4_x86_64/mntpoint",
"name": "/dev/loop1",
"size": 6.90432e+07
},
{
"filesystem": "ext2",
"mount": "/sw/opt/cisco/caf/cartridges/mnt/Yocto_1.7.2_for_IR800_1.0_x86_64",
"name": "/dev/loop2",
"size": 1.275392e+07
},
{
"filesystem": "ext2",
"mount": "/sw/opt/cisco/caf/cartridges/mnt/Python_2.7_1.0_x86_64",
"name": "/dev/loop3",
"size": 1.9838976e+07
}
],
"system_id": "564DB932-AA60-7A0F-EC55-EA3B0E23C966",
"version": ""
}
SCP files to the platform
On supported platforms, it is possible to copy local files over SCP. Please note that for this feature to work, you should be using ioxclient
in an environment where scp
executable is available in $PATH
. If present, the operation is automatically started. If ioxclient encounters an error, it prints out a command that has to be manually executed.
$ ./ioxclient platform scp test_resources/cartridge.tar.gz
Currently active profile : local
Command Name: plt-scp
Downloaded scp keys to pscp.pem
Running command : [scp -P 22 -i pscp.pem test_resources/cartridge.tar.gz scpuser@127.0.0.1:/]
cartridge.tar.gz 100% 1167 1.1KB/s 00:00
Note that the certificate from the platform will be downloaded to pscp.pem
Auto Configuring the platform
Today, when we start a application in IOX, it gets the IP address from DHCP server (on IR8xx) platform. In order to connect to application from outside world we need to configure IOS ( specifically NAT configuration ). That configuration is done manually today and it requires change every time the application IP is changed. The autoconfig feature will automate the addition of these NAT configuration on IOS whenever a application is deployed without any user intervention. It will also delete the configuration that was added to IOS when the application is stopped. The feature is available on IR800 platform (829). This feature is disabled by default. The user has to enable this feature using iox-client. The autoconfig feature uses telnet to connect to ios and make the configuration changes in ios.
How to enable the feature:
You can enable the autoconfig feature using the ioxclient. ioxclient uses REST-API's to pass the information to CAF which it stores in a config file and the values set are persisted across reboots.
path_for_ioxclient>/ioxclient platform autoconfigcli setconfig -h
NAME:
setconfig - Set Autoconfigcli Configuration.
USAGE:
command setconfig [command options]
OPTIONS:
--enable Enable autoconfig
--disable Disable autoconfig
--ios-host Provide the ip address of the host. If no value is provided, the default gateway will be used.
--ios-port '0' Telnet Port to use to communicate with ios.
--ios-exec-password Exec password to log into ios
--external-interface External interface to use when configuring NAT rules.
--external-interface-type Type for option "external-interface". Valid values are {intf|vlan|tag}.
Options explained:
- --enable: This is to enable the feature. If the feature is enabled, NAT entries are added/deleted in ios when the container starts/stops.
- --disable: This is to disable the feature. If the feature is disabled after NAT entries were added in ios, the entries will be deleted when the feature is disabled.
- --ios-host: IP address of ios. if no value is configured, the default gateway is used which works for 829 platform.
- --iox-port: The telnet port to communicate with ios. The default value of 23 is used.
- -- ios-exec-password: The exec password for ios. This feature will not work if the password is not configured. Please note that this value is saved as plain text on the guest-os.
- --external-interface: The external interface or vlan that one can use to connect to ios.
- it could be a interface (example:gigabitEthernet2) that is configured for connectivity from outside.
- it could be a vlan (example:vlan200) that is configured for connectivity from outside,
- A tag can be placed on a interface or a vlan in the description text as shown below. In the vlan config below, we have used the tag as "iox-apps". You can use this tag as external interface and select the external-inteface-type as tag
tag usage
interface Vlan1
description iox-apps
ip dhcp relay information check-reply
no ip dhcp client request tftp-server-address
ip dhcp client lease 365 0 0
ip address dhcp
ip nat outside
ip virtual-reassembly in
- --external-interface-type. Valid values are "intf|vlan|tag"
Examples:
# To enable the feature.
<path_for_ioxclient>/ioxclient platform autoconfigcli setconfig --enable
Currently active profile : sandeep
Command Name: plt-ac-setconfig
Autoconfigcl:
-------------------------------------
"The following key:values were saved. enabled:True "
# To disable the feature
<path_for_ioxclient>/ioxclient platform autoconfigcli setconfig --disable
Currently active profile : sandeep
Command Name: plt-ac-setconfig
Autoconfigcl:
-------------------------------------
"The following key:values were saved. enabled:False "
# To set external-interface-type as tag iox-apps
<path_for_ioxclient>/ioxclient platform ac sc --external-interface iox-apps --external-interface-type tag
Currently active profile : sandeep
Command Name: plt-ac-setconfig
Autoconfigcl:
-------------------------------------
"The following key:values were saved. external_interface_type:tag external_interface:iox-apps "