top -d 5 -b|grep "load average" -A 15
Here is what the above code is Doing:
1. The top command is used to show all the running processes.
2. The -d option is used to specify the delay between updates.
3. The -b option is used to run top in batch mode.
4. The grep command is used to filter the output of top and show only the lines containing the string “load average”.
5. The -A option is used to show the next 15 lines after the lines containing the string “load average”.