1#!/usr/sbin/dtrace -s 2/* 3 * pgpginbypid.d - pages paged in by PID. 4 * Writen using DTrace (Solaris 10 3/05). 5 * 6 * $Id: pgpginbypid.d,v 1.1.1.1 2015/09/30 22:01:06 christos Exp $ 7 * 8 * USAGE: pgpginbypid.d # hit Ctrl-C to end sample 9 * 10 * FIELDS: 11 * PID process ID 12 * CMD process name 13 * PAGES number of pages paged in 14 * 15 * This is based on a script from DExplorer. 16 * 17 * COPYRIGHT: Copyright (c) 2005, 2006 Brendan Gregg. 18 * 19 * CDDL HEADER START 20 * 21 * The contents of this file are subject to the terms of the 22 * Common Development and Distribution License, Version 1.0 only 23 * (the "License"). You may not use this file except in compliance 24 * with the License. 25 * 26 * You can obtain a copy of the license at Docs/cddl1.txt 27 * or http://www.opensolaris.org/os/licensing. 28 * See the License for the specific language governing permissions 29 * and limitations under the License. 30 * 31 * CDDL HEADER END 32 * 33 * 28-Jun-2005 Brendan Gregg Created this. 34 * 20-Apr-2006 " " Last update. 35 */ 36 37#pragma D option quiet 38 39dtrace:::BEGIN 40{ 41 printf("Tracing... Hit Ctrl-C to end.\n"); 42} 43 44vminfo:::pgpgin 45{ 46 @pg[pid, execname] = sum(arg0); 47} 48 49dtrace:::END 50{ 51 printf("%6s %-16s %16s\n", "PID", "CMD", "PAGES"); 52 printa("%6d %-16s %@16d\n", @pg); 53} 54