An easy solution would be to install the sysstat package. I am not sure whether Solaris is supported but the sources can be found at the download page, so you can try and compile it on your target distribution.
$ yum install sysstat
The command you are after is sar -q
, it will display the historical queue size and load average for the time-spans you are after. Like this:
05:53:13 AM runq-sz plist-sz ldavg-1 ldavg-5 ldavg-15 blocked
05:53:14 AM 0 200 5.00 4.00 3.00 0
05:53:15 AM 0 200 5.00 4.00 3.00 0
...
Where ldavg-1
, ldavg-5
, etc are the load averages for preceding 1 and 5 minutes respectively.
You also mentioned that you'd prefer to display the data yourself. In that case you will need to process the binary data stored in the /var/log/sa
directory with the sadf tool - it can produce JSON or XML that you can consume in java.