1#!/usr/sbin/dtrace -s
2/*
3 * uname-a.d - "uname -a" demo in DTrace.
4 *             Written using DTrace (Solaris 10 3/05).
5 *
6 * This has been written to demonstrate fetching the "uname -a" info
7 * from a DTrace script, which turns out to be all kernel variables.
8 * This is intended as a starting point for other DTrace scripts, by
9 * beginning with familiar statistics.
10 *
11 * $Id: uname-a.d,v 1.1.1.1 2015/09/30 22:01:06 christos Exp $
12 *
13 * USAGE:	uname-a.d
14 *
15 * FIELDS:	See uname(1) manpage for documentation.
16 *
17 * SEE ALSO:	uname
18 *
19 * COPYRIGHT: Copyright (c) 2005 Brendan Gregg.
20 *
21 * CDDL HEADER START
22 *
23 *  The contents of this file are subject to the terms of the
24 *  Common Development and Distribution License, Version 1.0 only
25 *  (the "License").  You may not use this file except in compliance
26 *  with the License.
27 *
28 *  You can obtain a copy of the license at Docs/cddl1.txt
29 *  or http://www.opensolaris.org/os/licensing.
30 *  See the License for the specific language governing permissions
31 *  and limitations under the License.
32 *
33 * 24-Jul-2005	Brendan Gregg	Created this.
34 * 24-Jul-2005	   "      "	Last update.
35 */
36
37#pragma D option quiet
38#pragma D option bufsize=8k
39
40/* print system info */
41dtrace:::BEGIN
42{
43	printf("%s %s %s %s %s %s %s",
44	    `utsname.sysname,
45	    `utsname.nodename,
46	    `utsname.release,
47	    `utsname.version,
48	    `utsname.machine,
49	    `architecture,
50	    `platform);
51
52	exit(0);
53}
54