Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Shell Script

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 885
    Answer it

    HI everyone, I need help plz, to write a Linux shell script :
    write a utility program called spy that enables you to do just that. spy repeatedly scans the system process table, displaying processes that have started or ended since the last scan.

    The usage of spy is this:

    % spy [ list of patterns] [-t secs] [-n count]

    Here's what each field means: list of patterns: Is a list of patterns to look out for in the process list, possibly containing regular expressions, described briefly below. If no list is present, spy accepts all processes. tsecs: Tells spy how many seconds to wait between each scan of the system process table.

    The default value is one. count: Tells spy how many times the system process table should be scanned before quitting. The default value is five. During each scan, spy produces an intermediate file containing a list of current processes in the form: User- id process-id command which it then compares with the list constructed during the last scan.

    The differences between the two lists indicate which processes have ended and which have begun since the last scan. This difference is then displayed, in a readable format together with the date and time.

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: