# Yang action for who command

**URL:** https://dmap-community.ductus.global/t/yang-action-for-who-command/4698
**Category:** YANG
**Created:** [May 29, 2024, 2:05pm UTC](https://dmap-community.ductus.global/t/yang-action-for-who-command/4698 "2024-05-29T14:05:16Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ThanaKal](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@ThanaKal](https://dmap-community.ductus.global/u/ThanaKal)
#### Post date: [May 29, 2024, 2:05pm UTC](https://dmap-community.ductus.global/t/yang-action-for-who-command/4698/1 "2024-05-29T14:05:16Z")

</div>

hello, i would like if possible make the who command output available to other nb interfaces as well.  
is there an action-Yang for it available, so that all interfaces have access to its output?  
another way to do this, i was thinking to create an action/rpc myself and get the who command output from there (for example using tailf:exec calling “who” command and parsing the output, i am interested in user and source ip in particular), i thought if action yang for who command is available it might save some time

---

<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: [May 30, 2024, 9:03am UTC](https://dmap-community.ductus.global/t/yang-action-for-who-command/4698/2 "2024-05-30T09:03:45Z")

</div>

From your action callback, you can use MAAPI get\_user\_sessions() to get the session IDs and get\_user\_session() for each ID to get the user information. See the confd\_lib\_maapi(3) man page for C API details and the Python + Java docs.
