Microsoft Virtualization Discussions

Unable to get session information correctly through Get-NcCifsSession

umemoto
211 Views

Hi everyone,

I am using the Get-NcCifsSession from the Powershell Toolkit to get the number of sessions connected to a Vserver on an AFF with FlexCache configuration. However, most of the time, only a few sessions are displayed (occasionally, a larger number is displayed). When I get the session information using the ONTAP CLI at the same time, a larger number of sessions are displayed.

 

- Number of sessions gotten using ONTAP CLI: 1226
--------------------
vserver cifs session show -Vserver vserver_name
--------------------

- Number of sessions gotten using PowerShell Toolkit: 4
--------------------
vserver cifs session show -Vserver vserver_name
--------------------

Our environment:
Configuration: FlexCache configuration AFF (cache)--- CVO (origin)
ONTAP version: 9.14.1 P1
Toolkit version: 9.14.1P1

Code for getting sessions:
$cvo_mgmt_param = @{
'ip_addr' = 'AFF IP Address'
'username' = 'admin';
'password' = 'admin password';
}

$password = ConvertTo-SecureString $cvo_mgmt_param['password'] -AsPlainText -Force

$cred = New-Object System.Management.Automation.PSCredential $cvo_mgmt_param['username'],$password

Connect-NcController $cvo_mgmt_param['ip_addr'] -credential $cred

Get-NcCifsSession -Vserver <vserver-name>
(Get-NcCifsSession -Vserver <vserver-name> | Measure-Object).Count

-----

Example output:
LifAddress SessionId ConnectionId ConnectedTime ProtocolVersion Address Vserver
---------- --------- ------------ ------------- --------------- ------- -------
XXX.XXX.XXX.XXX ...540379279 2633504152 15h 47m 5s smb3_1 XXX.XXX.XXX.XXX
XXX.XXX.XXX.XXX ...540379280 2633504153 15h 47m 10s smb3_1 XXX.XXX.XXX.XXX
XXX.XXX.XXX.XXX ...540379285 2633504161 15h 47m 10s smb3_1 XXX.XXX.XXX.XXX
XXX.XXX.XXX.XXX ...540379287 2633504163 15h 47m 6s smb3_1 XXX.XXX.XXX.XXX

4

 
0 REPLIES 0
Public