5 Replies Latest reply on Sep 12, 2014 10:30 AM by Dipak Gaigole

    Unable to run 'ps' command successfully in type 1 nsh script

    richard mcleod

      I have a simple script shown below

      #start

      PROCESS_LIST=$(ps -eo pid,args)

      echo ${PROCESS_LIST}

      #end

       

       

      This script runs as a type 1 nsh script against a linux target running agent version 8.5.01.218 (also tried against agent running 8.3.03 --same error)

       

       

      The job log returns the following errors

      Error 09/11/2014 14:16:12 ERROR: Garbage option.

      Error 09/11/2014 14:16:12 ********* simple selection *********  ********* selection by list *********

      Error 09/11/2014 14:16:12 -A all processes                      -C by command name

      Info 09/11/2014 14:16:12 Exit Code 0

      Error 09/11/2014 14:16:12 -N negate selection                   -G by real group ID (supports names)

      Error 09/11/2014 14:16:12 -a all w/ tty except session leaders  -U by real user ID (supports names)

      Error 09/11/2014 14:16:12 -d all except session leaders         -g by session OR by effective group name

      Error 09/11/2014 14:16:12 -e all processes                      -p by process ID

      Error 09/11/2014 14:16:12 T  all processes on this terminal     -s processes in the sessions given

      Error 09/11/2014 14:16:12 a  all w/ tty, including other users  -t by tty

      Error 09/11/2014 14:16:12 g  OBSOLETE -- DO NOT USE             -u by effective user ID (supports names)

      Error 09/11/2014 14:16:12 r  only running processes             U  processes for specified users

      Error 09/11/2014 14:16:12 x  processes w/o controlling ttys     t  by tty

      Error 09/11/2014 14:16:12 *********** output format **********  *********** long options ***********

      Error 09/11/2014 14:16:12 -o,o user-defined  -f full            --Group --User --pid --cols --ppid

      Error 09/11/2014 14:16:12 -j,j job control   s  signal          --group --user --sid --rows --info

      Error 09/11/2014 14:16:12 -O,O preloaded -o  v  virtual memory  --cumulative --format --deselect

      Error 09/11/2014 14:16:12 -l,l long          u  user-oriented   --sort --tty --forest --version

      Error 09/11/2014 14:16:12 -F   extra full    X  registers       --heading --no-heading --context

      Error 09/11/2014 14:16:12 ********* misc options *********

      Error 09/11/2014 14:16:12 -V,V  show version      L  list format codes  f  ASCII art forest

      Error 09/11/2014 14:16:12 -m,m,-L,-T,H  threads   S  children in sum    -y change -l format

      Error 09/11/2014 14:16:12 -M,Z  security data     c  true command name  -c scheduling class

      Error 09/11/2014 14:16:12 -w,w  wide output       n  numeric WCHAN,UID  -H process hierarchy

       

       

      Our appservers are Windows 2008 running BSA 8.5.01.218

       

      This a bug?