CT320: Network and System Administration

Fall 2019

HW 4

CT320 HW4: You up?

Individual Work

Work on your own!                 


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.                 


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


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 0/3


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


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

    export STACK_FRAME_LINK_OVERRIDE=ffff-ad921d60486366258809553a3db49a4a


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.