Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /s/bach/a/class/cs000/public_html/pmwiki/cookbook/date.php on line 68

Warning: String offset cast occurred in /s/bach/a/class/cs000/public_html/pmwiki/cookbook/steganography.php on line 9

Deprecated: Implicit conversion from float 1260.2884615384614 to int loses precision in /s/bach/a/class/cs000/public_html/pmwiki/cookbook/steganography.php on line 9

Warning: Undefined array key 2 in /s/bach/a/class/cs000/public_html/pmwiki/cookbook/AA-readassignments.php on line 15

Warning: Undefined array key 3 in /s/bach/a/class/cs000/public_html/pmwiki/cookbook/AA-readassignments.php on line 16

Warning: Undefined array key 2 in /s/bach/a/class/cs000/public_html/pmwiki/cookbook/AA-readassignments.php on line 15

Warning: Undefined array key 3 in /s/bach/a/class/cs000/public_html/pmwiki/cookbook/AA-readassignments.php on line 16
CT320 | Main / HW4

CT320: Network and System Administration

Fall 2019

HW 4

CT320 HW4: You up?                

Individual Work                

Work on your own!                 

Description                

For this assignment, you will write a perl script called up.                 

The purpose of this assignment is to have an easy way to verify that a remote system is “up” (responds to pings). The command is designed so that you can use it from cron. It is not much more than a thin veneer around ping.                 

You give it a hostname, and it pings the host. It displays the hostname, followed by how many ping packets came back, followed by how many ping packets were sent.                 

Arguments                

The script takes two optional arguments and a mandatory single hostname:                 

Examples                

In these sample runs, our computer denver.cs.colostate.edu responds to pings, but hp.com doesn’t. “$” is my shell prompt:                 

    $ ./up denver.cs.colostate.edu
    denver.cs.colostate.edu 3/3
    $ ./up -n1 denver.cs.colostate.edu
    denver.cs.colostate.edu 1/1
    $ ./up -n2 -s denver.cs.colostate.edu
    $ ./up hp.com
    hp.com 0/3
    $ ./up -s -n 10 hp.com
    hp.com 0/10
    $ ./up 192.0.2.12
    192.0.2.12 0/3

Note                

Wondering what the heck 192.0.2.12 is? Read https://wikipedia.org/wiki/Reserved_IP_addresses#IPv4.                 

Debugging                

If you encounter “STACK FRAME LINK OVERFLOW”, then try this:

    export STACK_FRAME_LINK_OVERRIDE=ffff-ad921d60486366258809553a3db49a4a

Requirements                

How to submit your homework:                

Via web checkin, or:                 

    ~ct320/bin/checkin HW4 up

How to receive negative points:                

Turn in someone else’s work.