Ad Widget

Collapse

proc.num syntax

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thysk
    Junior Member
    • May 2013
    • 21

    #1

    proc.num syntax

    Hi all

    I want to monitor if a script of mine is running or not but i'm having some issues with the syntax, it seems to not like the . in the script name test.sh

    I have tried the following with no luck

    proc.num[test.sh]
    proc.num['test.sh']
    proc.num[,,,test.sh]

    Can anybody point me in the right direction ?

    Thanks
    T
  • Navern
    Member
    • May 2013
    • 33

    #2
    Originally posted by thysk
    Hi all

    I want to monitor if a script of mine is running or not but i'm having some issues with the syntax, it seems to not like the . in the script name test.sh

    I have tried the following with no luck

    proc.num[test.sh]
    proc.num['test.sh']
    proc.num[,,,test.sh]

    Can anybody point me in the right direction ?

    Thanks
    T
    You have to run your script at server where you want to monitor this script. Then you run in terminal "ps -eF" and you seek your script. This name you should write in proc.num[] statement

    Comment

    • thysk
      Junior Member
      • May 2013
      • 21

      #3
      Thanks !! that worked, I now have this

      proc.num[/bin/bash /usr/local/bin/test.sh]

      Comment

      • ascolaro
        Junior Member
        • Apr 2022
        • 2

        #4
        I keep attempting something that seems similar, though nothing is working.

        Here's what I received from ps -ef | grep nameofscript

        root 15963 1 0 Mar16 ? 00:18:12 /usr/lib/jvm/jdk1.8.0_60/bin/java -Xrs -classpath /home/script-admin/RoboRegistrar/RoboProd:/home/script-admin/RoboRegistrar/RoboProd/commons-codec-1.3.jar: RoboRegistrar 002863 Y8S5L9V2P0 LV1 LV2 LV3 LV4 LV5 LV6

        Comment

      • ascolaro
        Junior Member
        • Apr 2022
        • 2

        #5
        When the process stops, we have to restart the shell script though, will that make it any different?

        Comment

        Working...