Forum Discussion

g_kucharski's avatar
g_kucharski
Occasional Contributor
11 years ago

Bytes sent / received by proccess

Hello,

I need a solution for checking total amount of bytes sent / received via LAN by tested application (proccess) on Windows 7, virtual machine (Hyper V).



At the moment I use netstat - e  command (WScript.Shell) but it gives me info on total use of net. Is there a simple method of getting information on single proccess?



regards

2 Replies

  • g_kucharski's avatar
    g_kucharski
    Occasional Contributor
    Solved:



    1. To see TCPView I need launch TC as administrator. Thanks support!



    2. To get data from TCView I created function in VBS:


    Function GetTCPViewData



      SET APP = NameMapping.Sys.Process("Tcpview").Window("TCPViewClass", "TCPView - Sysinternals: www.sysinternals.com", 1)

      SET LV = APP.Window("SysListView32", "", 1)

      SET TB = APP.Window("ToolbarWindow32", "", 1)



    'TCPViewer is launched minimized. Maximize it  

      Call APP.Maximize



    'TCPViewer is launched in Pause mode. Refresh it to get data

      Call TB.ClickItem(4)



      redim ArrTCP(LV.wColumnCount,LV.wItemCount)

      For i=0 To LV.wItemCount-1

        For k=0 to LV.wColumnCount-1

          ' Obtains item caption

          ArrTCP(k,i) = LV.wItem(i,k)

        Next

      Next

     

      GetTCPViewData = ArrTCP



    'Minimizes  TCPViewer to allow Tested application to be proccessed 

      Call APP.Minimize



    END Function


  • g_kucharski's avatar
    g_kucharski
    Occasional Contributor
    I tried using TCPView v3.05 but its proccess is not even detected by TC



    Command-line version Tcpvcon does not return info on bytes sent / received