Tag Info

I'm sure you understand the general method of collecting the data along with the time of the collection and tracking the values over time. The specifics would be quite a complicated script and we're not a script writing service.
If you wanted to go down that route you might find sar or iostat are more useful YMMV.
However there are better tools than top ...

You can use iostat for this very purpose. Simply run iostat -y 3600 | grep -A 1 avg-cpu
The above command will report each hour the various CPU states (idle, iowait, ecc) and the following grep will extrapolate only the two lines about you care. Obviously, do some tests with lower wait time (eg: 5 seconds) before putting the script into production.
EDIT: ...