CPU and Memory Utilization every 5 minutes interval

Hi,

Anyone can help me on how to collect the CPU and Memory usages every 5 minutes interval.

Thanks in advance.

Regards,
FSPalero

This will collect CPU and memory usage for one day with a 5 mn interval:

vmstat 120 720 > /var/tmp/vmstat.out.$(date +%Y%m%d-%H%M%S)

Edit: actually a two minute interval.

Hi Jlliagre,

Work great. Many thanks for the helps.

Regards,
FSPalero

,hi Jlliagre ,
i am new to solaris can you explain 120 720 meaning ( it mean time interval)

Glad you asked, made me notice my example was incorrect (and likely why you were asking clarifications about it).

For a 5 minute interval, that should be:

vmstat 300 288

What I posted is a 2 minute sampling for 24 h.

2 mn = 120 s
5 mn = 300 s

In one day there are 288 five minute and 720 two minute periods.