# How to get confd\_cli tty via Confd API?

**URL:** <https://dmap-community.ductus.global/t/how-to-get-confd-cli-tty-via-confd-api/899>\
**Category:** Other Northbound Interfaces\
**Created:** [December 20, 2016, 8:45am UTC](https://dmap-community.ductus.global/t/how-to-get-confd-cli-tty-via-confd-api/899 "2016-12-20T08:45:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@John](https://dmap-community.ductus.global/u/John)\
**Post date:** [December 20, 2016, 8:45am UTC](https://dmap-community.ductus.global/t/how-to-get-confd-cli-tty-via-confd-api/899/1 "2016-12-20T08:45:39Z")

</div>

Hi Team  
We have implemented a customized confd CLI command using clispec. In the clispec we run a script to start a binary, which will collect system statistics data. It’s expected that this binary could have the collected statistics data printed to confd CLI. I wonder how the process could show the statistics data to confd cli asynchronized ? Can the process get the confd CLI tty?or pty?  
Thanks  
John

---

<div class="post-metadata">

**Author:** ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)\
**Post date:** [December 20, 2016, 11:34am UTC](https://dmap-community.ductus.global/t/how-to-get-confd-cli-tty-via-confd-api/899/2 "2016-12-20T11:34:14Z")

</div>

Hi,

You can for example use maapi cli\_printf() and/or cli\_cmd() to run or print something in CLI sessions asynchronously
