Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SONiC system telemetry Support #1526

Merged
merged 2 commits into from
Mar 27, 2018
Merged

Conversation

jipanyang
Copy link
Collaborator

@jipanyang jipanyang commented Mar 23, 2018

Signed-off-by: Jipan Yang jipan.yang@alibaba-inc.com

- What I did
Add system telemetry support for SONiC via gRPC channel.

- How I did it
For now, detailed design could be found together with the code:
https://github.com/Azure/sonic-telemetry/blob/master/doc/grpc_telemetry.md
&
https://github.com/Azure/sonic-telemetry/blob/master/doc/dialout.md

- How to verify it
Test cases executed could be found in the links above.

system telemetry not included in the default build. To enable it set "ENABLE_SYSTEM_TELEMETRY=y". Ex.:

make ENABLE_SYSTEM_TELEMETRY=y target/sonic-broadcom.bin

A telemetry docker will be started with the image:

root@sonic:~# docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS               NAMES
8867b38ea5d3        docker-sonic-telemetry:latest    "/usr/bin/supervisord"   2 weeks ago         Up 3 hours                              telemetry
01208fb110b2        docker-dhcp-relay:latest         "/usr/bin/docker_init"   2 weeks ago         Up 2 weeks                              dhcp_relay
18d7a81d9298        docker-syncd-brcm:latest         "/usr/bin/supervisord"   2 weeks ago         Up 4 days                               syncd
f84360ac6a96        docker-orchagent-brcm:latest     "/usr/bin/supervisord"   2 weeks ago         Up 4 days                               swss
418039b5d5ab        docker-lldp-sv2:latest           "/usr/bin/supervisord"   2 weeks ago         Up 2 weeks                              lldp
00a6d0eefe47        docker-teamd:latest              "/usr/bin/supervisord"   2 weeks ago         Up 2 weeks                              teamd
2aa4bcfc5dd3        docker-platform-monitor:latest   "/usr/bin/supervisord"   2 weeks ago         Up 2 weeks                              pmon
482d2c275709        docker-fpm-quagga:latest         "/usr/bin/supervisord"   2 weeks ago         Up 2 weeks                              bgp
912d26443c24        docker-database:latest           "/usr/bin/supervisord"   2 weeks ago         Up 2 weeks                              database


root@sonic:~# docker exec -it telemetry /bin/bash
root@sonic:/# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  1.4  0.2  56284 16472 ?        Ss+  19:38   0:00 /usr/bin/python /usr/bin/supervisord
root        13  0.0  0.0 258680  3208 ?        Sl   19:38   0:00 /usr/sbin/rsyslogd -n
root        18 87.7  0.1 293328 12808 ?        Rl   19:38   0:14 /usr/sbin/telemetry -logtostderr --insecure --port 8080 --allow_no_client_auth -v=2
root        30  0.6  0.1 293696 12508 ?        Sl   19:38   0:00 /usr/sbin/dialout_client_cli -insecure -logtostderr -v 2
root        52  0.5  0.0  20244  3132 ?        Ss   19:38   0:00 /bin/bash
root        58  0.0  0.0  17500  2036 ?        R+   19:38   0:00 ps aux

@@ -0,0 +1 @@
telemetry_0.1_amd64.deb net extra
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is autogenerated file, please remove.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@@ -0,0 +1,20 @@
export GOPATH=/tmp/go
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to move all these files into telemtry repo, the idea is that people can build debian package in the repo and can use it independent of other projects.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having problem creating debian package for the sonic-telemetry application in its own repo. Probably need more time to figure out the appropriate way to do it.

@@ -0,0 +1,5 @@
# telemetry package

TELEMETRY = telemetry_0.1_amd64.deb
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you rename the package name to sonic-telemetry?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
Signed-off-by: Jipan Yang <jipan.yang@alibaba-inc.com>
@lguohan lguohan merged commit f74de89 into sonic-net:master Mar 27, 2018
stephenxs added a commit to stephenxs/sonic-buildimage that referenced this pull request Dec 16, 2020
sonic-swss:
[Dynamic buffer calc]  Support dynamic buffer calculation (sonic-net#1338)
[dvs] Clean-up dvs_database and dvs_common (sonic-net#1541)
[VxlanMgr] changes for EVPN VXLAN (sonic-net#1266)
Statistics support for Tx and Rx counters of different frame sizes (sonic-net#1536)
[orchagent/phy]: Add firmware info propagation (sonic-net#1540)
[vxlanorch] Use PRI instead of %l to avoid warnings in 32-bit arch (sonic-net#1539)
[FDBSYNCD] Added support for EVPN as described in the PR sonic-net/SONiC#437 (sonic-net#1276)
[everflow] Add retry mechanism for mirror sessions and policers (sonic-net#1486)
Enable ACL table type  mirror_v6 for Innovium Platform (sonic-net#1527)
[fgnhgorch] Change format specifier %lu to %zu for size_t (sonic-net#1529)
[dvs] Fix issue where concurrent netns operations cause test setup to fail (sonic-net#1535)
Add support for headroom pool watermark (sonic-net#1453)
Change gAsicInstance to type string with max length limit (sonic-net#1526)

sonic-utilities:
[Dynamic buffer calc] Support dynamic buffer calculation (sonic-net#973)
show tech with platform dump option (sonic-net#1158)
[kdump]: Parse sonic_platform kernel command line parameter to read the platform identifier string (sonic-net#1291)
[pcieutil] Remove 'pcie-' prefix from arguments (sonic-net#1297)
Added 'detailed' option for 'show interface counters' command (sonic-net#1299)
Fix show ip route summary on pizzabox platforms (sonic-net#1302)
[acl_loader] Fix default DENY rule for V6 dataplane ACLs (sonic-net#1281)
Add show and clear commands for headroom pool watermark  (sonic-net#1144)
[unit test][CLI][pfcwd] Added pfcwd config tests for single and multi ASIC platform. (sonic-net#1248)
[sflow] Fix traceback seen for show sflow interface (sonic-net#1282)
[config/console][consutil] Support enable/disable console switch (sonic-net#1275)
[fast-reboot] Fix fast-reboot when NDP entries are present (sonic-net#1295)
Fast-reboot: add a new flag to ignore ASIC config checksum verification failures (sonic-net#1292)
Kdump improvements (sonic-net#1284)

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Sabareesh-Kumar-Anandan pushed a commit to Sabareesh-Kumar-Anandan/sonic-buildimage that referenced this pull request Dec 20, 2020
[fgnhgorch] Change format specifier %lu to %zu for size_t (sonic-net#1529)
[dvs] Fix issue where concurrent netns operations cause test setup to fail (sonic-net#1535)
Add support for headroom pool watermark (sonic-net#1453)
Change gAsicInstance to type string with max length limit (sonic-net#1526)

Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
Sabareesh-Kumar-Anandan pushed a commit to Sabareesh-Kumar-Anandan/sonic-buildimage that referenced this pull request Dec 21, 2020
Add support for headroom pool watermark (sonic-net#1453)
Change gAsicInstance to type string with max length limit (sonic-net#1526)

Signed-off-by: Sabareesh Kumar Anandan <sanandan@marvell.com>
jleveque added a commit that referenced this pull request Dec 24, 2020
* src/sonic-swss c7ee75f...cadf28f (24):
  > Revert "Add support for headroom pool watermark (#1453)"
  > [VxlanOrch] pytest for EVPN VXLAN (#1318)
  > [restore_neighbors] python3 support for restore_neighbors.py (#1542)
  > [buffermgmt] more build error fixes when compiling for armhf (32-bit) (#1559)
  > Sflow fix to avoid NULL in field. (#1531)
  > [fgnhgorch] Fg Nhg link handling (#1537)
  > [dpb]: make sure port is in admin down state before remove port. (#1513)
  > [FPMSYNCD/FDBSYNCD] EVPN Type-5 route removing prefix-len for host route and removing junk character present in the mac (#1553)
  > Added support for EVPN L3 VXLAN as described in the PR sonic-net/SONiC#437 (#1267)
  > [crm]: Typecast to unit64_t to avoid divide by 0 during overflow (#1550)
  > [vxlanmgr] Fix build error when compiling for armhf (32-bit) (#1552)
  > [Dynamic buffer calc]  Support dynamic buffer calculation (#1338)
  > [dvs] Clean-up dvs_database and dvs_common (#1541)
  > [VxlanMgr] changes for EVPN VXLAN (#1266)
  > Statistics support for Tx and Rx counters of different frame sizes (#1536)
  > [orchagent/phy]: Add firmware info propagation (#1540)
  > [vxlanorch] Use PRI instead of %l to avoid warnings in 32-bit arch (#1539)
  > [FDBSYNCD] Added support for EVPN as described in the PR sonic-net/SONiC#437 (#1276)
  > [everflow] Add retry mechanism for mirror sessions and policers (#1486)
  > Enable ACL table type  mirror_v6 for Innovium Platform (#1527)
  > [fgnhgorch] Change format specifier %lu to %zu for size_t (#1529)
  > [dvs] Fix issue where concurrent netns operations cause test setup to fail (#1535)
  > Add support for headroom pool watermark (#1453)
  > Change gAsicInstance to type string with max length limit (#1526)
yxieca added a commit to yxieca/sonic-buildimage that referenced this pull request Apr 8, 2021
* d58ba82 2021-04-05 | Fix fast-reboot fdb filtering for IPv6 addresses (sonic-net#1548) (github/201811) [Vaibhav Hemant Dixit]
* cc7ad9e 2021-03-24 | Fast reboot: check if the files are present before accessing (sonic-net#1526) [Vaibhav Hemant Dixit]
* 410323a 2021-03-24 | [201811] Add missing variable DEVPATH to fast-reboot script (sonic-net#1525) [Vaibhav Hemant Dixit]
* eb5023a 2021-03-21 | [201811] soft-reboot (sonic-net#1487) [Sujin Kang]
* 3f10540 2020-12-08 | [fast-reboot] Fix fast-reboot when NDP entries are present (sonic-net#1295) (HEAD -> 201811) [shlomibitton]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
yxieca added a commit that referenced this pull request Apr 9, 2021
* d58ba82 2021-04-05 | Fix fast-reboot fdb filtering for IPv6 addresses (#1548) (github/201811) [Vaibhav Hemant Dixit]
* cc7ad9e 2021-03-24 | Fast reboot: check if the files are present before accessing (#1526) [Vaibhav Hemant Dixit]
* 410323a 2021-03-24 | [201811] Add missing variable DEVPATH to fast-reboot script (#1525) [Vaibhav Hemant Dixit]
* eb5023a 2021-03-21 | [201811] soft-reboot (#1487) [Sujin Kang]
* 3f10540 2020-12-08 | [fast-reboot] Fix fast-reboot when NDP entries are present (#1295) (HEAD -> 201811) [shlomibitton]

Signed-off-by: Ying Xie <ying.xie@microsoft.com>
theasianpianist pushed a commit to theasianpianist/sonic-buildimage that referenced this pull request Feb 5, 2022
…1526)

**What I did**
1. Change gAsicInstance to type string with max length limit
2. Replace malloc with calloc to prevent risk of integer overflow, in test code

**Why I did it**
1. Remove `calloc` manual memory management.
2. Graceful release memory before exiting. 
3. Save memory if input is very long

**How I verified it**
Ad-hoc test with different input arguments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants