NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

Api call for list of open shaes per client machine.

MICHAEL_SAYGAK
3,403 Views

Hello!
I need to build a report to see which machine connected to what share and vice versa -- list of machines connected to some share.

In CLI cifs sessions %MACHINE_ADDRESS% works fine. It sows open shares, files etc. But in API browser I see that cifs-session-list-iter-next returns cifs-session-info structure where "shares" is an integer and returns only amount of open shares per client, but not names.

 

Any ideas how to get names of open cifs shares?

 

Thanks!

1 REPLY 1

FelipeMafra
3,080 Views
Hi,

To get the information you need first you must understand that CIFS sessions will bring you only session information. You'll get the user using that session, for example. But you want all shares opened by that session, this means you want to know what files (by the way directories are a kind of file) is a user accessing so you must use cifs-session-file-get-iter to get those information.

Thus, you simply relate both by session-id and optionally by connection-id too.

Sorry for any typo but I am using my mobile.
Public