1N/A * sar-c.d - sar -c demo in DTrace. 1N/A * Written using DTrace (Solaris 10 3/05). 1N/A * This has been written to demonstrate fetching similar data as sar -c 1N/A * from DTrace. This program is intended as a starting point for other 1N/A * DTrace scripts, by beginning with familiar statistics. 1N/A * $Id: sar-c.d 3 2007-08-01 10:50:08Z brendan $ 1N/A * scall/s System calls 1N/A * rchar/s read characters 1N/A * wchar/s write characters 1N/A * IDEA: David Rubio, who also wrote the original. 1N/A * As this program does not use Kstat, there is no summary since boot line. 1N/A * COPYRIGHT: Copyright (c) 2005 Brendan Gregg. 1N/A * The contents of this file are subject to the terms of the 1N/A * Common Development and Distribution License, Version 1.0 only 1N/A * (the "License"). You may not use this file except in compliance 1N/A * See the License for the specific language governing permissions 1N/A * and limitations under the License. 1N/A * 12-Jun-2005 Brendan Gregg Created this. 1N/A * 12-Jun-2005 " " Last update. 1N/A * Initialise variables 1N/A printf(
"%-20s %7s %7s %7s %7s %7s %8s %8s\n",
1N/A "Time",
"scall/s",
"sread/s",
"swrit/s",
"fork/s",
1N/A "exec/s",
"rchar/s",
"wchar/s");
1N/A printf(
"%20Y %7d %7d %7d %4d.00 %4d.00 %8d %8d\n",
1N/A /* clear counters */