Network Management Assignment 1: probing ulam2

Due: Feb 6

You are to get (and log) the ifInOctets and ifOutOctets values from ulam2.cs.luc.edu every 15 minutes, for a day.

Here are some OIDs:
Individual ifInOctets values for specific interfaces (2 on ulam2) can be obtained as follows:
    ifInOctets.1 (loopback),  ifInOctets.2 (ethernet)

You will need to run your probes on xenon.cs.luc.edu or some other on-campus machine.

Use snmpget (or snmpwalk) to retrieve the actual values. These are in the directory xenon:/homes/users/cs/faculty/pld/snmp/bin
I suggest adding that to your PATH (at the command line and in your script file(s)):
    PATH=$PATH:/homes/users/cs/faculty/pld/snmp/bin

To run something every 15 minutes, you can use either crontab or a script. 
crontab method:
Create a script to gather the data, perhaps in $HOME/bin/myscriptname. Next, run "crontab -e" to open up an editor (probably nano), and create the following entry for your script: (This runs it when the minutes part of the clock is 0, 15, 30, or 45)

     0,15,30,45 * * * *     $HOME/bin/myscriptname >> myfile.out 2>&1

This redirects standard error (file descriptor 2) to myfile.out, mixed in consistently with the standard output. The actual snmpget standard error should be redirected to /dev/null.

Alternative method: create a script file, keep it running for 24 hours
(either from a home computer through a terminal session on xenon that remains connected for 24 hours, or using the "nohup" command to start the script on xenon and then disconnect while the script continues to run)

Suppose the actual data-collecting script is again $HOME/bin/myscriptname. Create a second script file foo.sh:
    while true
    do
        $HOME/bin/myscriptname >> myfile.out
        sleep 900
    done

To start this so it keeps going after you log off: nohup foo.sh >/dev/null 2>&1

snmpget & snmpwalk are in xenon:/homes/users/cs/faculty/pld/snmp/bin.
Either copy them to your own bin directory, or add this:
    PATH=$PATH:/homes/users/cs/faculty/pld/snmp/bin
And be sure to put the PATH statement in your script, as well.

A little late, I got a script running on ulam2 to transfer a certain amount of data over the loopback interface once an hour. If your assignment was submitted after Feb 6, you were to figure out when in the hour this occurred (to the nearest 15 minutes), and how much was transferred, and include those answers in your submission.