psinfo.d (179189) | psinfo.d (239972) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 7 unchanged lines hidden (view full) --- 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 * 22 * Portions Copyright 2006 John Birrell jb@freebsd.org 23 * | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * --- 7 unchanged lines hidden (view full) --- 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 * 22 * Portions Copyright 2006 John Birrell jb@freebsd.org 23 * |
24 * $FreeBSD: head/cddl/lib/libdtrace/psinfo.d 179189 2008-05-22 04:26:42Z jb $ | 24 * $FreeBSD: head/cddl/lib/libdtrace/psinfo.d 239972 2012-09-01 08:14:21Z rpaulo $ |
25 */ 26/* 27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 28 * Use is subject to license terms. 29 */ 30 31typedef struct psinfo { 32 int pr_nlwp; /* number of threads */ --- 4 unchanged lines hidden (view full) --- 37 uid_t pr_uid; /* real user id */ 38 uid_t pr_euid; /* effective user id */ 39 gid_t pr_gid; /* real group id */ 40 gid_t pr_egid; /* effective group id */ 41 uintptr_t 42 pr_addr; /* address of process */ 43 string pr_psargs; /* process arguments */ 44 u_int pr_arglen; /* process argument length */ | 25 */ 26/* 27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 28 * Use is subject to license terms. 29 */ 30 31typedef struct psinfo { 32 int pr_nlwp; /* number of threads */ --- 4 unchanged lines hidden (view full) --- 37 uid_t pr_uid; /* real user id */ 38 uid_t pr_euid; /* effective user id */ 39 gid_t pr_gid; /* real group id */ 40 gid_t pr_egid; /* effective group id */ 41 uintptr_t 42 pr_addr; /* address of process */ 43 string pr_psargs; /* process arguments */ 44 u_int pr_arglen; /* process argument length */ |
45 u_int pr_jailid; /* jail id */ |
|
45} psinfo_t; 46 47#pragma D binding "1.0" translator 48translator psinfo_t < struct proc *T > { 49 pr_nlwp = T->p_numthreads; 50 pr_pid = T->p_pid; 51 pr_ppid = (T->p_pptr == 0) ? 0 : T->p_pptr->p_pid; 52 pr_pgid = (T->p_leader == 0) ? 0 : T->p_leader->p_pid; 53 pr_sid = (T->p_pgrp == 0) ? 0 : ((T->p_pgrp->pg_session == 0) ? 0 : T->p_pgrp->pg_session->s_sid); 54 pr_uid = T->p_ucred->cr_ruid; 55 pr_euid = T->p_ucred->cr_uid; 56 pr_gid = T->p_ucred->cr_rgid; 57 pr_egid = T->p_ucred->cr_groups[0]; 58 pr_addr = 0; 59 pr_psargs = stringof(T->p_args->ar_args); 60 pr_arglen = T->p_args->ar_length; | 46} psinfo_t; 47 48#pragma D binding "1.0" translator 49translator psinfo_t < struct proc *T > { 50 pr_nlwp = T->p_numthreads; 51 pr_pid = T->p_pid; 52 pr_ppid = (T->p_pptr == 0) ? 0 : T->p_pptr->p_pid; 53 pr_pgid = (T->p_leader == 0) ? 0 : T->p_leader->p_pid; 54 pr_sid = (T->p_pgrp == 0) ? 0 : ((T->p_pgrp->pg_session == 0) ? 0 : T->p_pgrp->pg_session->s_sid); 55 pr_uid = T->p_ucred->cr_ruid; 56 pr_euid = T->p_ucred->cr_uid; 57 pr_gid = T->p_ucred->cr_rgid; 58 pr_egid = T->p_ucred->cr_groups[0]; 59 pr_addr = 0; 60 pr_psargs = stringof(T->p_args->ar_args); 61 pr_arglen = T->p_args->ar_length; |
62 pr_jailid = T->p_ucred->cr_prison->pr_id; |
|
61}; 62 63typedef struct lwpsinfo { 64 id_t pr_lwpid; /* thread ID. */ 65 int pr_flag; /* thread flags. */ 66 int pr_pri; /* thread priority. */ 67 char pr_state; /* numeric lwp state */ 68 char pr_sname; /* printable character for pr_state */ --- 27 unchanged lines hidden --- | 63}; 64 65typedef struct lwpsinfo { 66 id_t pr_lwpid; /* thread ID. */ 67 int pr_flag; /* thread flags. */ 68 int pr_pri; /* thread priority. */ 69 char pr_state; /* numeric lwp state */ 70 char pr_sname; /* printable character for pr_state */ --- 27 unchanged lines hidden --- |