/*
* loads.d - print load averages. Written using DTrace (Solaris 10 3/05).
*
* These are the same load averages that the "uptime" command prints.
* The purpose of this script is to demonstrate fetching these values
* from the DTrace language.
*
* $Id: loads.d 3 2007-08-01 10:50:08Z brendan $
*
* USAGE: loads.d
*
* SEE ALSO: uptime(1)
*
* The first field is the 1 minute average, the second is the 5 minute,
* and the third is the 15 minute average. The value represents the average
* number of runnable threads in the system, a value higher than your
*
* COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* See the License for the specific language governing permissions
* and limitations under the License.
*
* CDDL HEADER END
*
* 10-Jun-2005 Brendan Gregg Created this.
* 10-Jun-2005 " " Last update.
*/
{
/* fetch load averages */
/* print load average */
printf("%Y, load average: %d.%02d, %d.%02d, %d.%02d\n",
exit(0);
}