Changes

Jump to: navigation, search

OPS435 Assignment 2 for Section C

986 bytes added, 22:15, 24 March 2021
Sample Outputs
10.43.115.162
</pre>
 
==== List For Specific Day ====
Specifying a <code>--date</code> in YYYY-MM-DD format should list all users or hosts that were logged in at some point during that date, even if their start time or end time is different. For example, user <code>cwsmith</code> logged in on Feb 14 and logged off on Feb 15, but they show up when the following command is run:
<pre>
[eric@centos7 a2]$ ./assignment2.py -l user -d 2018-02-14 usage_data_file
</pre>
 
<pre>
User list for usage_data_file
=============================
cwsmith
</pre>
 
This should work for hosts as well:
<pre>
[eric@centos7 a2]$ ./assignment2.py -l host -d 2018-02-14 usage_data_file
</pre>
 
<pre>
Host list for usage_data_file
=============================
10.40.105.130
</pre>
 
If the user types in an invalid date, the script should halt and print the following error message:
<pre>
[eric@centos7 a2]$ ./assignment2.py -l host -d 2018-02-xx usage_data_file
</pre>
 
<pre>
Date not recognized. Use YYYY-MM-DD format.
</pre>
 
==== Daily Usage Report by User ====

Navigation menu