System Activity Report

Hi team ,

I am working on monitoring the solaris machine utilization continously with shell script without using any thirdparty software. I stuck at below commands which are limited to 1000000000 seconds.

CPU Utilization

sar -u 1 1000000000

Disk Utilization

sar -d 1 1000000000

Memory Utilization

sar -r 1 1000000000

Could you please help with continous monitoring commands to use for shell script to save them into file for future anlaysis.

Ummm, 1,000,000,000 is a lot of seconds.

60 * 60 * 24 = 86,400 seconds per day.
86,400 * 365 = 31,536,000 seconds per year
so it's
315,536,000 seconds per decade

1,000,000,000 seconds is over 31 years. You should reboot your systems at least once a decade anyway.

But if any server could survive three decades of non-interrupted use, it would be a Solaris server!

1 Like

Thank you Perderabo, seams this is the only option, I was thinking on other methods of collecting data.

There are built in scripts for sar continus monitoring and rotation.

Check out output of crontab -l sys
It should look like (commented) :

# 20,40 8-17 * * 1-5 /usr/lib/sa/sa1
# 5 18 * * 1-5 /usr/lib/sa/sa2 -s 8:00 -e 18:01 -i 1200 -A

Be sure to prepare filesystem /var/adm/sa with sufficient space for 7 days (default rotation of sar files)

Check out the documentation for your desired intervals (minute, 5 minutes or alike)

Hope that helps
Regards
Peasant.

1 Like