• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

CPU Load in Solaris

htmlmasterdave

Golden Member
This is a really quick question, but for an assignment, I need to know how to be able to print out the cpu usage for the last 1, 5 and 15 minutes, but it must be in integers. Does anyone know? The help is greatly appreciated 🙂
 
Use sar.

NAME
sar - system activity reporter

SYNOPSIS
sar [ -aAbcdgkmpqruvwy ] [ -o filename ] t [ n ]

sar [ -aAbcdgkmpqruvwy ] [ -e time ] [ -f filename ] [
-i sec ] [ -s time ]

DESCRIPTION
In the first instance, sar samples cumulative activity
counters in the operating system at n intervals of t
seconds, where t should be 5 or greater. If t is specified
with more than one option, all headers are printed together
and the output may be difficult to read. (If the sampling
interval is less than 5, the activity of sar itself may
affect the sample.) If the -o option is specified, it saves
the samples in filename in binary format. The default value
of n is 1.
 
Back
Top