I need a script that will do the following...
1) Begin monitoring user, process activity on the server.
2) Print the number of monitoring cycle you are on(i.e. the loop
number of monitoring ).
Print the current number of users running on the server.
Print the current number of processes running on the server.
(use ps -a , don't use -e . )
3) Wait one minute before you monitor the users, processes again.
Repeat step 2) fifteen times.
4) After step 3) is done:
- print the smallest and largest number of users during monitoring.
- print the smallest and largest number of processes during monitoring.
It seems like a pretty simple script, but I've never programmed a shell script, only C++ code. How would I go about doing it? And does anyone know the best place to learn to write c shell scripts online? Thanks, a lot!