Find the answer to your Linux question:
Results 1 to 2 of 2
Hi everyone, I am new to scripting; I have an issue and would like to ask members for opinions. Recently I just wrote a script to detect the link status ...
  1. #1
    Just Joined!
    Join Date
    Jan 2009
    Posts
    4

    How to check a shell script running

    Hi everyone,

    I am new to scripting; I have an issue and would like to ask members for opinions. Recently I just wrote a script to detect the link status of NICs in the system and some how alert the other application if the link is down (every 5 seconds) . I was thinking the script would create a file, let's say, eth0 if eth0 is down. The other application periodically check the existence of these files. If any file exists in a XXX directory then the link is down. There is another way to do this; instead of creating a file when link down is detected, I can have a file containing:

    date: name of NICs: link status

    and the script constantly update the date and link status fields in the file. Any application wants to check link status would read this file.

    I wonder which solution is better. My co-worker thinks the 2nd one is better cause the date field will tell if the script is running or not. With the 1st solution if the file is not there we don't know if the script is running or not.

    OK let's say I will use the 1st solution, how do we know the shell script is running?

    Thanks in advance for your help!

  2. #2
    Just Joined!
    Join Date
    Jan 2009
    Posts
    4

    Angry

    Regarding to my question how to check the script running. I found it. I just need to use command jobs

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...