ONTAP Discussions

How do I get all CIFS sesssions with a certain idle time?

sanadmin_stadtdo
6,218 Views

Hello, everyone,
I want to see all CIFS sessions whose idle time is higher/lower/equal to a certain duration.  Unfortunately I can't get the correct value after "-idle-time".
It always looks like this:
FAS80402::> vserver cifs session show -idle-time >0
Error: "0" is an invalid value for field "-idle-time <elapsed>"

FAS80402::> vserver cifs session show -idle-time 0
Error: "0" is an invalid value for field "-idle-time <elapsed>"

FAS80402::> vserver cifs session show -idle-time >3s
Error: "3s" is an invalid value for field "-idle-time <elapsed>"

Does anyone know how to set the value?

Thank you very much.
Best regards

Michael

1 ACCEPTED SOLUTION

paul_stejskal
6,182 Views

https://docs.netapp.com/ontap-9/index.jsp?topic=%2Fcom.netapp.doc.dot-cm-cmpr-950%2FTOC__vserver__cifs.html

 

[-idle-time <[<integer>d][<integer>h][<integer>m][<integer>s]>] - Idle TimeIf you specify this parameter, the command displays information about CIFS sessions on which there is no activity for the specified time duration.

 

Man pages show the syntax is something like "-idle-time 3m" or "-idle-time 1s".

View solution in original post

7 REPLIES 7

paul_stejskal
6,183 Views

https://docs.netapp.com/ontap-9/index.jsp?topic=%2Fcom.netapp.doc.dot-cm-cmpr-950%2FTOC__vserver__cifs.html

 

[-idle-time <[<integer>d][<integer>h][<integer>m][<integer>s]>] - Idle TimeIf you specify this parameter, the command displays information about CIFS sessions on which there is no activity for the specified time duration.

 

Man pages show the syntax is something like "-idle-time 3m" or "-idle-time 1s".

sanadmin_stadtdo
6,098 Views

Hello, Paul,

thanks for the answer, but unfortunately it doesn't work for me (no matter if with d, m, s):

FAS80402::*> vserver cifs session show -idle-time 0s
Error: "0s" is an invalid value for field "-idle-time <elapsed>"
FAS80402::*>

 

FAS80402::*> vserver cifs session show -idle-time 5s
Error: "5s" is an invalid value for field "-idle-time <elapsed>"
FAS80402::*>

 

Currently over 7000 CIFS sessions are active - I would have to get some hit with the query; the value itself cannot be "invalid" all the time.

 

The background of the query should be to determine how many sessions are active longer than a given time (e.g. 2 hours); i.e. also anything with "> value" or "< value".  But it already fails because of the value "-idle-time".  Maybe there is another query for this.

Greetings

Michael


Translated with www.DeepL.com/Translator

paul_stejskal
6,064 Views

I'm wondering if there might be a bug. I'd suggest opening a case.

tahmad
5,165 Views

Was the issue fixed, were you able to run the command?

not_a_Lone_wolf
5,128 Views

hi @sanadmin_stadtdo , @tahmad and @paul_stejskal :

This command works fine for me in 9.5P12. The syntax is :

 

 

Cluster::> vserver cifs session show -idle-time 5

Node: Cluster-01
Vserver: SVM1
Connection Session Open Idle Connection
ID ID Workstation Windows User Files Time Count
---------- ------- ---------------- ---------------- --------- ------------ ---------------
                                                                                       5s 1

 

sanadmin_stadtdo
5,050 Views

Hello,

The selection is now working. As you can see in my first question, no results were delivered (no idea why). The same queries now deliver the desired results:

 

FAS80402::> vserver cifs session show -idle-time >5h

Node: NA8xxxxx1
Vserver: SVM_Fxxxx
Connection Session Open Idle Connection
ID ID Workstation Windows User Files Time Count
---------- ------- ---------------- ---------------- --------- ------------ ---------------
1277368854 6517553085735903271 6h 18m 31s 1
172.18.111.18 XXXXXX\hostftp 0
1277368854 6517553085735903274 6h 18m 31s 1
172.18.111.18 XXXXXX\hostftp 0


Maybe it was a BUG in the ONTAP version we were using in the past - I don't know.

 

Best Regards

 

Michael

not_a_Lone_wolf
5,016 Views

hi @sanadmin_stadtdo Great to hear that Michael 🙂

Public