Monitoring Script

Hi,

I want to write a script that will monitor cpu,mem usage and disk usage for entire day and data will be redirected to file,

What about sar? Do you have that enabled on your server? If not, enable sar. This is how you could do it.

Thanks for your quick response,But I want that it should display disk usage,
in disk logical name for example c0t0d0s0 usage and if another disk is there it should show,and swap usage also,in proper format means inone script all the things should be displayed and cpu usage which process is taking more resources of cpu like in top,

If u r working on Solaris 8 and above, look into kstat and its man pages and write a script to retrieve information on a regular basis.

example:

kstat -n system_pages
// gives info on memory and swap.

kstat -n cpu_info0
//gives info on CPU 0 on your system.

Well, you get the idea.

-GGR

In general, good monitoring tools :