7 Replies Latest reply on Jan 25, 2016 2:05 PM by Bill Robinson

    Date output formatting in extended object

      I created a Linux extended object to retrieve the date and time when a server was last booted. The extended object has as command:


      boot=$(who -b); echo "System_Boot_Date=$(echo $boot | awk '{print $3}')"; echo "System_Boot_Time=$(echo $boot | awk '{print $4}')"


      Output is in "name = value" grammar. When running on any node, it will nicely return:


      System_Boot_Date = 2015-10-09

      System_Boot_Time = 11:35

      (for example)


      However there is 1 server where the output is:


      System_Boot_Date = Jul

      System_Boot_Time = 31


      If I run the "who -b" directly on the server, I get output:

      # who -b

               system boot  2015-07-31 10:58


      But when the Extended Object runs, it apparently gets as output:


      # who -b

               system boot  Thu Jul 31 2015 10:58


      Does anybody have any idea why the output of "who -b" is in a different format when being called from BSA?