none
Running NTTtcp in the background

    Question

  • Hi,

    I want to run NTTtcp in the background in the powershell.

    Is there a way to do it??

    I tried running but the background process always fails:

    PS C:\Users\Administrator>
    PS C:\Users\Administrator>
    PS C:\Users\Administrator> start-job {.\NTttcp.exe -s -m 8,*,172.17.100.197 -l 64k -a 2 -t 8}

    Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
    --     ----            -------------   -----         -----------     --------             -------
    1      Job1            BackgroundJob   Running       True            localhost            .\NTttcp.exe -s -m 8,*...


    PS C:\Users\Administrator> get-bjo
    get-bjo : The term 'get-bjo' is not recognized as the name of a cmdlet, function, script file, or operable program.
    Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + get-bjo
    + ~~~~~~~
        + CategoryInfo          : ObjectNotFound: (get-bjo:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException

    PS C:\Users\Administrator> get-job

    Id     Name            PSJobTypeName   State         HasMoreData     Location             Command
    --     ----            -------------   -----         -----------     --------             -------
    1      Job1            BackgroundJob   Failed        False           localhost            .\NTttcp.exe -s -m 8,*...

    Please let me know if there is any workaround here.

    Regards

    Sai

    Wednesday, February 08, 2017 12:16 AM

All replies

  • Hi,

    A key scenario where you would use Debug-Job is when you are running a long, complex script as a job and for one reason or another you suspect the script is not executing correctly. 

    Please check this link for more details:

    PowerShell Job Debugging

    https://blogs.msdn.microsoft.com/powershell/2014/12/11/powershell-job-debugging/

    If it doesn't help,I suggest you to post on Powershell forum for further assistant:

    https://social.technet.microsoft.com/Forums/windows/en-US/home?forum=winserverpowershell

    PS:How do you get NTTtcp work again?If you could,please share to other users in case of same issue on your last post,thank you.


    Best Regards
    Cartman
    Please remember to mark the replies as an answers if they help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, February 08, 2017 7:27 AM
    Moderator
  • Hi Cartman,

    Thanks for you reply. I tried using the start-process but it fails and there is no proper tool or way to debug this.

    Started using batch file which really helps out to overcome this.

    Regarding my previous post NTTTcp tool resulting in errors thing i am redirecting it to XML file and reading out the values.

    I still get negative values for the CPU statistics thing. No idea how i can overcome this.

    Friday, February 10, 2017 4:11 AM
  • I'm having this same problem. Really annoying. I've tried many different ways to get ntttcp to invoke on a remote machine and talk to it's peer running the other side and it just won't work. I can get ntttcp to work from powershell.exe by physically typing the command on the other machines powershell, but when invoking the same command or doing it in a pssession always fails in one way or another. I don't understand why this has to be so difficult.
    Thursday, March 30, 2017 8:24 PM