Microsoft Virtualization Discussions

powershell cmdlet that gives cifs stat info

neilwilson

Hi ,

I'm running version 2.1 of the powershell toolkit, is there a cmdlet that give me the same information as the "cifs stat" command run from the console?

For Example:

      cifs stat

                              reject        0  0%

                               mkdir        0  0%

                               rmdir        0  0%

                                open        0  0%

                              create        0  0%

                               close      627  2%

                             X&close        0  0%

                               flush        0  0%

                             X&flush        0  0%

                              delete        0  0%

                              rename        1  0%

                            NTRename        0  0%

                              getatr        0  0%

                              setatr        0  0%

                                read        0  0%

                              X&read        0  0%

                               write        0  0%

                             X&write        0  0%

                                lock        0  0%

                              unlock        0  0%

                               mknew        0  0%

                              chkpth        0  0%

                                exit        0  0%

                               lseek        0  0%

                            lockread        0  0%

                          X&lockread        0  0%

                         writeunlock        0  0%

                            readbraw        0  0%

                           writebraw        0  0%

                              writec        0  0%

                           gettattre        0  0%

                           settattre        0  0%

                            lockingX        1  0%

                                 IPC      233  1%

                               open2        0  0%

                         find_first2      116  0%

                          find_next2        9  0%

                       query_fs_info      264  1%

                     query_path_info      789  3%

                       set_path_info        0  0%

                     query_file_info      847  3%

                       set_file_info      260  1%

                         create_dir2        0  0%

                        Dfs_referral      563  2%

                          Dfs_report        0  0%

                                echo        0  0%

                          writeclose        0  0%

                               openX        0  0%

                               readX      413  1%

                              writeX     3523 11%

                           findclose        0  0%

                                tcon        0  0%

                                tdis      499  2%

                             negprot     1911  6%

                               login     5919 19%

                              logout     2777  9%

                               tconX    11530 37%

                             dskattr        0  0%

                              search        0  0%

                              fclose        3  0%

                           NTCreateX      733  2%

                       NTTransCreate        0  0%

                        NTTransIoctl        0  0%

                       NTTransNotify      285  1%

                       NTTransSetSec        0  0%

                     NTTransQuerySec        0  0%

                    NTNamedPipeMulti        0  0%

                         NTCancel CN       16  0%

                      NTCancel Other        0  0%

                            SMB2Echo        0  0%

                         SMB2Negprot        0  0%

                    SMB2TreeConnnect        0  0%

                  SMB2TreeDisconnect        0  0%

                           SMB2Login        0  0%

                          SMB2Create        0  0%

                            SMB2Read        0  0%

                           SMB2Write        0  0%

                            SMB2Lock        0  0%

                          SMB2Unlock        0  0%

                      SMB2OplkBrkAck        0  0%

                          SMB2ChgNfy        0  0%

                           SMB2CLose        0  0%

                           SMB2Flush        0  0%

                          SMB2Logout        0  0%

                          SMB2Cancel        0  0%

                       SMB2IPCCreate        0  0%

                         SMB2IPCRead        0  0%

                        SMB2IPCWrite        0  0%

                        SMB2QueryDir        0  0%

              SMB2QueryFileBasicInfo        0  0%

               SMB2QueryFileStndInfo        0  0%

                SMB2QueryFileIntInfo        0  0%

                 SMB2QueryFileEAInfo        0  0%

                SMB2QueryFileFEAInfo        0  0%

               SMB2QueryFileModeInfo        0  0%

                SMB2QueryAltNameInfo        0  0%

             SMB2QueryFileStreamInfo        0  0%

                SMB2QueryNetOpenInfo        0  0%

                SMB2QueryAttrTagInfo        0  0%

                 SMB2QueryAccessInfo        0  0%

            SMB2QueryFileUnsupported        0  0%

                SMB2QueryFileInvalid        0  0%

                  SMB2QueryFSVolInfo        0  0%

                 SMB2QueryFSSizeInfo        0  0%

                  SMB2QueryFSDevInfo        0  0%

                 SMB2QueryFSAttrInfo        0  0%

               SMB2QueryFSFullSzInfo        0  0%

                SMB2QueryFSObjIdInfo        0  0%

                  SMB2QueryFSInvalid        0  0%

               SMB2QuerySecurityInfo        0  0%

                    SMB2SetBasicInfo        0  0%

                   SMB2SetRenameInfo        0  0%

                 SMB2SetFileLinkInfo        0  0%

                 SMB2SetFileDispInfo        0  0%

                   SMB2SetFullEAInfo        0  0%

                     SMB2SetModeInfo        0  0%

                    SMB2SetAllocInfo        0  0%

                      SMB2SetEOFInfo        0  0%

                  SMB2SetUnsupported        0  0%

                  SMB2SetInfoInvalid        0  0%

                 SMB2SetSecurityInfo        0  0%

             SMB2FsctlPipeTransceive        0  0%

                   SMB2FsctlPipePeek        0  0%

              SMB2FsctlEnumSnapshots        0  0%

               SMB2FsctlDfsReferrals        0  0%

                  SMB2FsctlSetSparse        0  0%

                SMB2FsctlSecureShare        0  0%

            SMB2FsctlFileUnsupported        0  0%

             SMB2FsctlIpcUnsupported        0  0%

                         cancel lock        0   

                           wait lock        0   

                       copy to align        1   

                        alignedSmall     2545   

                        alignedLarge     2544   

                     alignedSmallRel        0   

                     alignedLargeRel        0   

                       FidHashAllocs        1   

                       TidHashAllocs        0   

                       UidHashAllocs        0   

                            mbufWait        0   

                             nbtWait        0   

                            pBlkWait        0   

                    BackToBackCPWait        0   

                             cwaWait        0   

                   short msg prevent        0   

                         multipleVCs      437   

                         SMB signing        0   

                    mapped null user        0   

                          PDCupcalls        0   

                           nosupport        0   

                      read pipe busy        0   

                     write pipe busy        0   

                     trans pipe busy        0   

                    read pipe broken        0   

                   write pipe broken        0   

                   trans pipe broken        0   

                     queued writeraw        0   

                      nbt disconnect     1911   

                      smb disconnect        3   

                      dup disconnect        0   

                  OpLkBkXorBatchToL2        1   

                OpLkBkXorBatchToNone        0   

                      OpLkBkL2ToNone        0   

                    OpLkBkNoBreakAck        0   

                  OpLkBkNoBreakAck95        0   

                  OpLkBkNoBreakAckNT        0   

                    OpLkBkIgnoredAck        0   

                OpLkBkWaiterTimedOut        0   

                  OpLkBkDelayedBreak        0   

                 SharingErrorRetries        0   

                        FoldAttempts        0   

                         FoldRenames        0   

                  FoldRenameFailures        0   

                       FoldOverflows        0   

                      FoldDuplicates        0   

                     FoldWAFLTooBusy        0   

                     NoAllocCredStat        0   

                   RetryRPCcollision        0   

                        TconCloseTID        0   

                     GetNTAPExtAttrs        0   

                     SetNTAPExtAttrs        0   

                          SearchBusy        0   

                      ChgNfyNoMemory        0   

                      ChgNfyNewWatch       16   

                     ChgNfyLastWatch       16   

                   UsedMIDTblCreated        0   

                 UnusedMIDTblCreated        0   

                   InvalidMIDRejects        0   

                SMB2InvalidSignature        0   

           SMB2DurableCreateReceived        0   

          SMB2DurableCreateSucceeded        0   

          SMB2DurableReclaimReceived        0   

         SMB2DurableReclaimSucceeded        0   

          SMB2DurableHandlePreserved        0   

             SMB2DurableHandlePurged        0

            SMB2DurableHandleExpired        0

                     SMB2FileDirInfo        0

                 SMB2FileFullDirInfo        0

               SMB2FileIdFullDirInfo        0

                 SMB2FileBothDirInfo        0

               SMB2FileIdBothDirInfo        0

                   SMB2FileNamesInfo        0

              SMB2FileDirUnsupported        0

                       SMB2QueryInfo        0

                         SMB2SetInfo        0

                           SMB2Ioctl        0

              SMB2RelatedCompRequest        0

            SMB2UnRelatedCompRequest        0

                     SMB2FileRequest        0

                     SMB2PipeRequest        0

                  SMB2_1_LeaseBreaks        0

                SMB2_1_LeaseUpgrades        0

            SMB2_1_LeaseBreakExcuses        0

        SMB2_1_LeaseBreakAckTimeouts        0

            SMB2_1_HandleLeaseBreaks        0

            SMB2_1_LeaseBreaksToNone        0

        SMB2_1_LeaseBreakAcksIgnored        0

                       SMB2nosupport        0

Max Multiplex = 1, Max pBlk Exhaust = 0, Max pBlk Reserve Exhaust = 0

Max FIDs = 126, Max FIDs on one tree = 127

Max Searches on one tree = 1, Max Core Searches on one tree = 0

Max sessions = 5

Max trees = 4

Max shares = 5

Max session UIDs = 2, Max session TIDs = 2

Max locks = 126

Max credentials = 4

Max group SIDs per credential = 272

Max pBlks = 4144 Current pBlks = 4144 Num Logons = 0

Max reserved pBlks = 32 Current reserved pBlks = 32

Max gAuthQueue depth         = 2

Max gSMBBlockingQueue depth  = 2

Max gSMBTimerQueue depth     = 7

Max gSMBAlfQueue depth       = 1

Max gSMBRPCWorkerQueue depth = 1

Max gOffloadQueue depth      = 2

Local groups: builtins = 6, user-defined = 4, SIDs = 16

RPC group count = 10, RPC group active count = 0

Max Watched Directories = 3, Current Watched Directories = 0

Max Pending ChangeNotify Requests = 3, Current Pending ChangeNotify Requests = 0

Max Pending DeleteOnClose Requests = 12432, Current Pending DeleteOnClose Requests = 0

Is there a powershell cmdlet that displays this information?

I looked at get-nacifsstatistics - but that displays the top cifs clients, not the actual cifs service statistics.

If there isnt a cmdlet is there an easy way that I can get this info in a powershell script?

Thanks

Neil.

1 REPLY 1

cknight

Hi, Neil.  There is no API, hence no cmdlet, to do that.  But you can use "Invoke-NaSsh cifs stat" plus some regular expressions to parse the output.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public