Print this page
2989 Eliminate use of LOGNAME_MAX in ON
1166 useradd have warning with name more 8 chars


   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*


  23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24  * Use is subject to license terms.
  25  *
  26  * Portions Copyright 2009 Chad Mynhier
  27  */
  28 
  29 #ifndef _PRSTAT_H
  30 #define _PRSTAT_H
  31 
  32 #include <sys/sysmacros.h>
  33 #include <sys/time.h>
  34 #include <sys/types.h>
  35 #include <procfs.h>
  36 
  37 #ifdef  __cplusplus
  38 extern "C" {
  39 #endif
  40 
  41 /*
  42  * FRC2PCT macro is used to convert 16-bit binary fractions in the range


  56  */
  57 #define OPT_PSINFO      0x0001          /* read process's data from "psinfo" */
  58 #define OPT_LWPS        0x0002          /* report about all lwps */
  59 #define OPT_USERS       0x0004          /* report about most active users */
  60 #define OPT_UNUSED      0x0008          /* reserved for future use */
  61 #define OPT_REALTIME    0x0010          /* real-time scheduling class flag */
  62 #define OPT_MSACCT      0x0020          /* microstate accounting flag */
  63 #define OPT_TERMCAP     0x0040          /* use termcap data to move cursor */
  64 #define OPT_SPLIT       0x0080          /* split-screen mode flag */
  65 #define OPT_TTY         0x0100          /* report results to tty or file */
  66 #define OPT_FULLSCREEN  0x0200          /* full-screen mode flag */
  67 #define OPT_USEHOME     0x0400          /* use 'home' to move cursor up */
  68 #define OPT_TASKS       0x0800          /* report about system tasks */
  69 #define OPT_PROJECTS    0x1000          /* report about system projects */
  70 #define OPT_ZONES       0x2000          /* report about zones */
  71 #define OPT_PSETS       0x4000          /* report for specified psets */
  72 #define OPT_LGRP        0x8000          /* report home lgroups */
  73 #define OPT_UDATE       0x20000         /* print unix timestamp */
  74 #define OPT_DDATE       0x40000         /* print timestamp in date(1) format */
  75 #define OPT_NORESOLVE   0x80000         /* no nsswitch lookups */

  76 
  77 /*
  78  * Flags to keep track of process or lwp status
  79  */
  80 #define LWP_ALIVE       0x0008          /* this pid/lwp still exists */
  81 #define LWP_REPRESENT   0x0010          /* this LWP represents the process */
  82 
  83 /*
  84  * Possible list types
  85  */
  86 #define LT_LWPS         0x0001
  87 #define LT_USERS        0x0002
  88 #define LT_TASKS        0x0004
  89 #define LT_PROJECTS     0x0008
  90 #define LT_ZONES        0x0010
  91 #define LT_LGRPS        0x0020
  92 
  93 /*
  94  * Linked list of per-process or per-lwp statistics
  95  */




   3  *
   4  * The contents of this file are subject to the terms of the
   5  * Common Development and Distribution License (the "License").
   6  * You may not use this file except in compliance with the License.
   7  *
   8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 2013 Gary Mills
  24  *
  25  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  26  * Use is subject to license terms.
  27  *
  28  * Portions Copyright 2009 Chad Mynhier
  29  */
  30 
  31 #ifndef _PRSTAT_H
  32 #define _PRSTAT_H
  33 
  34 #include <sys/sysmacros.h>
  35 #include <sys/time.h>
  36 #include <sys/types.h>
  37 #include <procfs.h>
  38 
  39 #ifdef  __cplusplus
  40 extern "C" {
  41 #endif
  42 
  43 /*
  44  * FRC2PCT macro is used to convert 16-bit binary fractions in the range


  58  */
  59 #define OPT_PSINFO      0x0001          /* read process's data from "psinfo" */
  60 #define OPT_LWPS        0x0002          /* report about all lwps */
  61 #define OPT_USERS       0x0004          /* report about most active users */
  62 #define OPT_UNUSED      0x0008          /* reserved for future use */
  63 #define OPT_REALTIME    0x0010          /* real-time scheduling class flag */
  64 #define OPT_MSACCT      0x0020          /* microstate accounting flag */
  65 #define OPT_TERMCAP     0x0040          /* use termcap data to move cursor */
  66 #define OPT_SPLIT       0x0080          /* split-screen mode flag */
  67 #define OPT_TTY         0x0100          /* report results to tty or file */
  68 #define OPT_FULLSCREEN  0x0200          /* full-screen mode flag */
  69 #define OPT_USEHOME     0x0400          /* use 'home' to move cursor up */
  70 #define OPT_TASKS       0x0800          /* report about system tasks */
  71 #define OPT_PROJECTS    0x1000          /* report about system projects */
  72 #define OPT_ZONES       0x2000          /* report about zones */
  73 #define OPT_PSETS       0x4000          /* report for specified psets */
  74 #define OPT_LGRP        0x8000          /* report home lgroups */
  75 #define OPT_UDATE       0x20000         /* print unix timestamp */
  76 #define OPT_DDATE       0x40000         /* print timestamp in date(1) format */
  77 #define OPT_NORESOLVE   0x80000         /* no nsswitch lookups */
  78 #define OPT_TRUNC       0x100000        /* truncate long names */
  79 
  80 /*
  81  * Flags to keep track of process or lwp status
  82  */
  83 #define LWP_ALIVE       0x0008          /* this pid/lwp still exists */
  84 #define LWP_REPRESENT   0x0010          /* this LWP represents the process */
  85 
  86 /*
  87  * Possible list types
  88  */
  89 #define LT_LWPS         0x0001
  90 #define LT_USERS        0x0002
  91 #define LT_TASKS        0x0004
  92 #define LT_PROJECTS     0x0008
  93 #define LT_ZONES        0x0010
  94 #define LT_LGRPS        0x0020
  95 
  96 /*
  97  * Linked list of per-process or per-lwp statistics
  98  */