1 Reply Latest reply on May 16, 2018 7:56 AM by Bertrand Martin

    How long has a patrol agent been running

    Steve Robinson

      Is there a PSL style command that can tell me how long a patrol agent has been running ?

        • 1. Re: How long has a patrol agent been running
          Bertrand Martin

          Hi Steve,

           

          Yes indeed there is!

           

          To get the agent's start time (EPOCH) with:

          print(get("/agentStartEpoch")."\n");

           

          To get the agent's start time (in clear) with:

          print(get("/agentStartTime")."\n");

           

          So, how long has the agent been running?

          running = time() - get("/agentStartEpoch"); print("Agent running for ".int(running)." seconds\n"); print("Agent running for ".int(running/3600)." hours\n");

          Hope this helps! :-)

          -- Bertrand