Difference between revisions of "OPS435 Assignment 1 - Bash"
(Created page with 'Due: 19 March (midnight) Worth: 10% Write a script that will run for ever (unless it's killed). Every 5 seconds it will check which users have how many SSH connections open to s…') |
m (Andrew moved page OPS435 Assignment 1 to OPS435 Assignment 1 - Bash) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | Due: 19 March (midnight) | + | '''Due:''' 19 March (midnight) |
− | Worth: 10% | + | |
+ | '''Worth:''' 10% | ||
+ | |||
+ | '''Late penalties:''' 10% per day. | ||
Write a script that will run for ever (unless it's killed). Every 5 seconds it will check which users have how many SSH connections open to server where your script is running (you can get this information from the process list). It will display this information in the following format: | Write a script that will run for ever (unless it's killed). Every 5 seconds it will check which users have how many SSH connections open to server where your script is running (you can get this information from the process list). It will display this information in the following format: | ||
<pre>Users logged in: | <pre>Users logged in: | ||
− | * andrew.smith (can not see home directory) | + | * andrew.smith (can not see home directory) - 2 sessions |
− | * johndoe (can not see home directory) | + | * johndoe (can not see home directory) - 1 session |
− | * janesmith (CAN see home directory!)</pre> | + | * janesmith (CAN see home directory!) - 1 session</pre> |
The statement in brackets will communicate to the user whether they can see the contents of the listed user's home directory. | The statement in brackets will communicate to the user whether they can see the contents of the listed user's home directory. |
Latest revision as of 12:33, 22 August 2017
Due: 19 March (midnight)
Worth: 10%
Late penalties: 10% per day.
Write a script that will run for ever (unless it's killed). Every 5 seconds it will check which users have how many SSH connections open to server where your script is running (you can get this information from the process list). It will display this information in the following format:
Users logged in: * andrew.smith (can not see home directory) - 2 sessions * johndoe (can not see home directory) - 1 session * janesmith (CAN see home directory!) - 1 session
The statement in brackets will communicate to the user whether they can see the contents of the listed user's home directory.
The script may not work great on matrix (becauase it's a cluster, not just one machine) but you should be able to test it on there.
That's all. Make sure you do the work individually, I would recommend that you don't even discuss the assignment among yourselves, so you're not tempted to use someone else's solution.
Submit the script on Blackboard.