tst.psinfo1.d revision 178476
146686Sbrian/*
246686Sbrian * CDDL HEADER START
346686Sbrian *
446686Sbrian * The contents of this file are subject to the terms of the
546686Sbrian * Common Development and Distribution License (the "License").
646686Sbrian * You may not use this file except in compliance with the License.
746686Sbrian *
846686Sbrian * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
946686Sbrian * or http://www.opensolaris.org/os/licensing.
1046686Sbrian * See the License for the specific language governing permissions
1146686Sbrian * and limitations under the License.
1246686Sbrian *
1346686Sbrian * When distributing Covered Code, include this CDDL HEADER in each
1446686Sbrian * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1546686Sbrian * If applicable, add the following below this CDDL HEADER, with the
1646686Sbrian * fields enclosed by brackets "[]" replaced with your own identifying
1746686Sbrian * information: Portions Copyright [yyyy] [name of copyright owner]
1846686Sbrian *
1946686Sbrian * CDDL HEADER END
2046686Sbrian */
2146686Sbrian
2246686Sbrian/*
2346686Sbrian * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
2446686Sbrian * Use is subject to license terms.
2546686Sbrian */
2650479Speter
2746686Sbrian#pragma	ident	"%Z%%M%	%I%	%E% SMI"
2846686Sbrian
2946686Sbrian/*
3046686Sbrian * ASSERTION:
3146686Sbrian * To print psinfo structure values.
3246686Sbrian *
3346686Sbrian * SECTION: Variables/Built-in Variables
3446686Sbrian */
3546686Sbrian
3646686Sbrian#pragma D option quiet
3746686Sbrian
38196514SbrianBEGIN
3946686Sbrian{
40196514Sbrian	printf("number of lwps in process = %d\n", curpsinfo->pr_nlwp);
4147769Sbrian	printf("unique process id = %d\n", curpsinfo->pr_pid);
4246686Sbrian	printf("process id of parent = %d\n", curpsinfo->pr_ppid);
4346686Sbrian	printf("pid of process group leader = %d\n", curpsinfo->pr_pgid);
4446686Sbrian	printf("session id = %d\n", curpsinfo->pr_sid);
4546686Sbrian	printf("real user id = %d\n", curpsinfo->pr_uid);
4646686Sbrian	printf("effective user id = %d\n", curpsinfo->pr_euid);
4746686Sbrian	printf("real group id = %d\n", curpsinfo->pr_gid);
4846686Sbrian	printf("effective group id = %d\n", curpsinfo->pr_egid);
4946686Sbrian	printf("address of process = %u\n", curpsinfo->pr_addr);
5046686Sbrian	exit (0);
5146686Sbrian}
5246686Sbrian
5346686SbrianERROR
5446686Sbrian{
5546686Sbrian	exit(1);
5646686Sbrian}
5746686Sbrian