IoX Application

IoX Application

How do I verify the IoX Application is running on the switch?

Run the show app-hosting list command.

App State should be RUNNING to indicate that it is running.

Switch# show app-hosting list
App id                                   State
---------------------------------------------------------
cisco_dnas_wired_iox_app                 RUNNING

How do I start an interactive shell session for the IoX Application?

Run the app-hosting connect appid cisco_dnas_wired_iox_app session /bin/bash command.

This command starts a shell that runs inside the IoX Application container.

Switch# app-hosting connect appid cisco_dnas_wired_iox_app session /bin/bash
root@5c423778c2d6:/var/dnas_wired#

How can I see the logs for the IOx application?

Run the tail -F /tmp/dnas_ble.log command.

You can see the logs for the IoX Application.

root# tail -F /data/logs/dnas_wired.log
Tue Jun 15 04:26:36 2021 [INFO]: Starting DNA Spaces Wired IOx Application
Tue Jun 15 04:26:36 2021 [INFO]: gRPC Server IP Address: 10.22.243.59
Tue Jun 15 04:26:36 2021 [INFO]: gRPC Server Port: 8003
Tue Jun 15 04:26:36 2021 [INFO]: gRPC Server Token: eyJhbGciOiJIUzI1NiIsInR5cCI66
IkpXVCJ9.eyJ0aWQiOjE2Mzc0LCJjaWQiOjMyMjQ5NzMxMDYzOTkwNzEwMDAsImVwIjoiMTAuMjIuMjQQ
zLjU5OjgwMDAiLCJpYXQiOjE2MjIwOTQ5OTV9.KOK6EYM6_8r7nTs2U-13CotT8S-qOUphKf7s57L-Kxx
U
Tue Jun 15 04:26:36 2021 [INFO]: Application Host ID: 44:b6:be:37:a0:00
Tue Jun 15 04:26:36 2021 [INFO]: Application Host IP: 10.22.243.63
Tue Jun 15 04:26:36 2021 [INFO]: Product ID: C9300-24U
Tue Jun 15 04:26:36 2021 [INFO]: Attempting to connect using MAC address: 52:54::
dd:59:c2:51
Tue Jun 15 04:26:36 2021 [INFO]: HTTP Post: https://10.22.243.59:8000/streaming//
token/validate Post String: {"apMacaddress":"52:54:dd:59:c2:51","streamAuthKey"::
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aWQiOjE2Mzc0LCJjaWQiOjMyMjQ5NzMxMDYzOTT
kwNzEwMDAsImVwIjoiMTAuMjIuMjQzLjU5OjgwMDAiLCJpYXQiOjE2MjIwOTQ5OTV9.KOK6EYM6_8r7nn
Ts2U-13CotT8S-qOUphKf7s57L-KxU"}
Tue Jun 15 04:26:36 2021 [INFO]: HTTP Post Resonse from perform
Tue Jun 15 04:26:36 2021 [INFO]: HTTP Post Resonse code: 200
Tue Jun 15 04:26:36 2021 [INFO]: HTTP Post Response: {"endpoint":"10.22.243.59:88
000","streamAccessKey":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0aWQiOjE2Mzc0LCJJ
jaWQiOjMyMjQ5NzMxMDYzOTkwNzEwMDAsImlhdCI6MTYyMzczMTIyNCwiZXhwIjoxNjIzODE3NjI0fQ..

How do I monitor metrics in the IoX Application?

Run the tail -F /data/logs/dnas_wired_metrics.log command.

This command reads the log file for IoX Application metrics. The log file updates metrics every 5 minutes. The log file updates any detected MAC addresses every 5 minutes.

Metrics Name Metrics Description
Application Version IoX Application version currently running
Start Time Local time on the AP that the application was started and indicates how long the application has been running
Total Physical Memory Total physical memory used for the container
Physical Memory Used Physical memory used for the container
Total AP Percent CPU Used Percent CPU used in the container
Process Virtual Memory Process virtual memory used
Process Physical Memory Process physical memory used
Process CPU Used Process CPU Used
gRPC Reconnect Count Number of times gRPC was reconnected while the application has been running
Log Rotation Count Number of times the dnas_ble.log file has been rotated while the application has been running
Event Data Message Count Number of scan data messages sent since the application started
Event Data Message Rate Per Second Number of scan data messages sent per second
Source MAC Dest MAC UUID Name Count Interval Last-heard

Periodically the scanned are dumped in the log with the attributes

Source MAC: Source MAC address of the device scanned

Dest MAC: Destination MAC address of the device scanned

UUID: Universal Unique Identifier

NAME: Device name

Count: Number of times the device was heard since last scan values dumped

Interval: Number of seconds between each device scan

Last-heard: Last heard since the last scan values dumped

root# tail -F /data/logs/dnas_wired_metrics.log
Tue Jun 15 07:08:12 2021 [INFO]: Application Version: 1.0.16
Tue Jun 15 07:08:12 2021 [INFO]: Start Time: Tue Jun 15 06:03:12 2021 Up Time: 0000D:01H:05M:00S
Tue Jun 15 07:08:12 2021 [INFO]: Total Physical Memory: 6443 MB
Tue Jun 15 07:08:12 2021 [INFO]: Physical Memory Free: 868 MB
Tue Jun 15 07:08:12 2021 [INFO]: Physical Memory Used: 5574 MB
Tue Jun 15 07:08:12 2021 [INFO]: Total Physical Shared Memory: 277 MB
Tue Jun 15 07:08:12 2021 [INFO]: Total Physical Buffer Memory: 390 MB
Tue Jun 15 07:08:12 2021 [INFO]: Total AP Percent CPU Used: 1.723203
Tue Jun 15 07:08:12 2021 [INFO]: Process Virtual Memory: 655436 kB
Tue Jun 15 07:08:12 2021 [INFO]: Process Physical Memory: 25820 kB
Tue Jun 15 07:08:12 2021 [INFO]: Process CPU Used: 0.100417
Tue Jun 15 07:08:12 2021 [INFO]: gRPC Reconnect Count: 0
Tue Jun 15 07:08:12 2021 [INFO]: Log Rotation Count: 20
Tue Jun 15 07:08:12 2021 [INFO]: Event Data Message Count: 8284
Tue Jun 15 07:08:12 2021 [INFO]: Event Data Message Rate Per Second: 20
Tue Jun 15 07:08:12 2021 [INFO]: Source MAC        Dest MAC          UUID                           Name            Count  Interval    Last-heard
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 0001-17-6827193bcd4a           i0.1_POWER      44     3.87        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 0002-17-6827193bcd4a           i0.2_ENERGY     44     3.87        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2002-17-6827193bcd4a           d0.2_RGB        44     3.87        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2004-17-6827193bcd4a           d0.4_ALS        43     7.74        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2005-17-6827193bcd4a           d0.5_PIR        44     3.87        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2103-17-6827193bcd4a           d1.3_R          232    0.02        0000D:00H:00M:00S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2104-17-6827193bcd4a           d1.4_ALS        231    0.04        0000D:00H:00M:00S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2106-17-6827193bcd4a           d1.6_TEMP       226    0.04        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2107-17-6827193bcd4a           d1.7_HUM        225    0.02        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2108-17-6827193bcd4a           d1.8_AQ         130    0.03        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed 2109-17-6827193bcd4a           d1.9_CO2        41     0.03        0000D:00H:00M:01S
Tue Jun 15 07:08:12 2021 [INFO]: 68:27:19:3b:cd:4a 00:50:56:87:db:ed e4c5-17-6827193bcd4a                           68     1.47        0000D:00H:00M:01S

What files exist in the IoX Application?

The following log files are created while the IoX Application is running. These files are located in the /data/logs directory.

Log File Name Description
dnas_wired.log Active log file for debug message for the application.
dnas_wired_1.log Rotated log file for the debug messages for the application
dnas_wired_metrics.log Active log file for metric messages
dnas_wired_metrics_1.log Rotated log file for metric messages
dnas_wired_stdout.log Standard output and standard error messages are written to the file
dnas_wired_last_restart.log If the IoX Application is restarted, then the dnas_wired_last_restart.log file is copied to this file. You can use this file to troubleshoot the reason for the restart
dnas_wired_metrics_last_restart.log If the IoX Application is restarted, then the dnas_wired_metrics_last_restart.log file is copied to this file. You can use it to troubleshoot the reason for the restart.

The following are binary files installed specifically for the IoX Application. All the files are located in the /var/dnas_wired directory.

File Name Description
dnas_wired_iox_app IoX Application binary which scan for wired devices
dnas_wired_iox_app_start.sh Script to start and in the case of a failure restart the application again

How do I verify that the IoX Application is receiving span session data?

pen the interactive shell of the IoX Application.  Refer to Start an interactive shell session for the IoX Application.

Run the tcpdump -i eth1 command.

eth1 is the interface that receives the span traffic. This command begins a TCP dump on the eth1 interface.

The dump should show that the interface is receiving GRE. If the GRE traffic is not seen, then you can conclude that the span session is not working as expected.

root# tcpdump -i eth1
 
07:38:03.153932 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 130: gre-proto-0x88be
07:38:03.154147 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 186: gre-proto-0x88be
07:38:03.154214 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 314: gre-proto-0x88be
07:38:03.166872 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 74: gre-proto-0x88be
07:38:03.173112 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 74: gre-proto-0x88be
07:38:03.173119 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 74: gre-proto-0x88be
07:38:03.173128 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 138: gre-proto-0x88be
07:38:03.173764 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 610: gre-proto-0x88be
07:38:03.173772 IP 124.124.124.5 > 124.124.124.10: GREv0, seq 0, length 130: gre-proto-0x88be

Why am I not seeing span session data in the IoX Application?

First, ensure that you have enabled ip routing on the switch using the show running-config | inc ip routing command.

This command displays the running configuration and show if you have enabled ip routing.

switch# show running-config | inc ip routings

ip routing

If you have not enabled ip routing on the switch, then run the ip routing command in the configuration mode.

switch# configure terminal
switch(config)# ip routing
switch(config)# exit