Sponsored Content
Operating Systems HP-UX get whole command arguments in ps -ef? Post 35197 by Perderabo on Tuesday 1st of April 2003 12:37:06 PM
Old 04-01-2003
Quote:
Originally posted by nhatch
Most strange
Well, I agree with that much of your post Smilie

This is what the HP man page for ps actually has:
Code:
 NAME
      ps - report process status

 SYNOPSIS
      ps [-adeflP] [-g grplist] [-p proclist] [-R prmgrplist] [-t termlist]
      [-u uidlist]

    XPG4 Synopsis
      ps [-aAcdefHjlP] [-C cmdlist] [-g grplist] [-G gidlist] [-n namelist]
      [-o format] [-p proclist] [-R prmgrplist] [-s sidlist] [-t termlist]
      [-u uidlist] [-U uidlist]


and later...

           args           The command line given when the process was
                          created.  This column should be the last one
                          specified, if it is desired.  Only a subset of the
                          command line is saved by the kernel; as much of
                          the command line will be displayed as is
                          available.  The output in this column may contain
                          spaces.  The default heading for this column is
                          COMMAND if -o is specified and CMD otherwise.

nhatch, run the "uname -a" command and post the results.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

GREP Command with several arguments

Hi! $ more file yoyo haha lili ... i want to test if a "grep yoyo AND lili" works in this file. In fact, my script will carry on only if it finds in the same line "yoyo" AND "lili" How can i do? Thx! (3 Replies)
Discussion started by: tomapam
3 Replies

2. Programming

command line arguments

Hi How to pass multi line text as a command line argument to a program. (i.e) ./a.out hi this is sample 0 file1 where hi this is sample should be stored in argv 0 in argv and so on... (3 Replies)
Discussion started by: bankpro
3 Replies

3. UNIX for Dummies Questions & Answers

arguments in command line

Hi all, How many arguments can we pass while testing a prgm at command line.. I encountered an issue while passing 10 arguments. For $10 its taking argument passed for $1 followed by 'zero'. can we pass more than 9 arguments /Is there any other way. Thanks, rrs (6 Replies)
Discussion started by: rrs
6 Replies

4. Shell Programming and Scripting

command line arguments

-------------------------------------------------------------------------------- I have this while loop and at the end I am trying to get it to tell me the last argument I entered. And with it like this all I get is the sentence with no value for $1. Now I tried moving done after the sentence... (1 Reply)
Discussion started by: skooly5
1 Replies

5. UNIX for Dummies Questions & Answers

Command line arguments.

I am working on a script wherein i need the user to enter the Build ID for eg:the command line will show enter the build ID Now on entering the build ID it should be assigned to @ARGV. How can this be done.? (1 Reply)
Discussion started by: Varghese
1 Replies

6. UNIX for Dummies Questions & Answers

command line arguments

hi, can someone how to accept command line arguments as a variable using in script? like: ./scriptname arguments by accept arguments, I can use it in my script? thx! (1 Reply)
Discussion started by: ikeQ
1 Replies

7. Shell Programming and Scripting

command line arguments

hi,,,, I want to create a command prompt, for example "prompt>", so my prompt need to handle commands, for example "prompt>cmd", so i want to know how to get arguments for my own commands cmd, i.e. default argc should contain arguments count and argv should point to the argument vector i.e, for... (2 Replies)
Discussion started by: vins_89
2 Replies

8. Shell Programming and Scripting

Special characters in command arguments

Hey Guys, I have a program that populates a database based on input I feed it. so it would look like: cmd arg1 arg2 ... argN Now some of the arguments have special characters in them so I wrote a small script to pull the args and wrap them in quotes ('arg'). The problem is sometimes... (10 Replies)
Discussion started by: aaron0001
10 Replies

9. Homework & Coursework Questions

Filter command arguments

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Execute command with integer list arguments such as myScript 8 7 2 3. Take those arguments and square all of... (2 Replies)
Discussion started by: Learn4Life
2 Replies

10. UNIX for Beginners Questions & Answers

Loop with command line arguments

Ubuntum, Bash version: 4.3.46 Hi, how can I create a loop where the command line arguments change (increase) and every time the number of arguments is different ? ### I have many gene names... that mean gene1=$2, gene2=$3, ...... geneN=$N+1 ### some time the number of gene is 25, other... (7 Replies)
Discussion started by: echo manolis
7 Replies
ps(1)							      General Commands Manual							     ps(1)

NAME
ps - report process status SYNOPSIS
grplist] proclist] prmgrplist] termlist] uidlist] pset_list] UNIX Standard Synopsis cmdlist] grplist] gidlist] namelist] format] proclist] prmgrplist] sidlist] termlist] uidlist] uidlist] pset_list] DESCRIPTION
prints information about selected processes. Use options to specify which processes to select and what information to print about them. Refer to usergroupname(5) to understand the functionality changes with the Numeric User Group Name feature. Process Selection Options Use the following options to choose which processes should be selected. Note: If an option is used in both the default (standard HP-UX) and UNIX Standard (see standards(5)) environments, the description provided here documents the default behavior. Refer to the section for additional information on UNIX Standard behavior. (none) Select those processes associated with the current terminal. (UNIX Standard Only, see standards(5)) Select all processes. (Synonym for Select all processes except process group leaders and processes not associated with a terminal. (UNIX Standard Only, see standards(5)) Select processes executing a command with a basename given in cmdlist. Select all processes except process group leaders. Select all processes. Select processes whose process group leaders are given in grplist. (UNIX Standard Only, see standards(5)) Select processes whose effective group ID numbers or group names are given in gidlist. (see usergroup- name(5)). (UNIX Standard Only, see standards(5)) This option is ignored; its presence is allowed for standards compliance. Select processes whose process ID numbers are given in proclist. Select processes belonging to PRM process resource groups whose names or ID numbers are given in prmgrplist. See DEPENDENCIES. (UNIX Standard Only, see standards(5)) Select processes whose session leaders are given in sidlist. (Synonym for Select processes associated with the terminals given in termlist. Terminal identifiers can be specified in one of two forms: the device's file name (such as or if the device's file name starts with just the rest of it (such as If the device's file is in a directory other than or the terminal identifier must include the name of the directory under that contains the device file (such as Select processes whose real user ID numbers or login names are given in uidlist. (see usergroupname(5)). (UNIX Standard Only, see standards(5)) Select processes whose real user ID numbers or login names are given in uidlist. (see usergroup- name(5)). Select processes whose processor set ID's are given in pset_list. This option is supported only if the kernel supports processor sets functionality. If any of the or options is specified, the and options are ignored. If more than one of and are specified, the least restrictive option takes effect. If more than one of the and options are specified, processes will be selected if they match any of the options specified. The lists used as arguments to the and options can be specified in one of two forms: o A list of identifiers separated from one another by a comma. o A list of identifiers enclosed in quotation marks () and separated from one another by a comma and/or one or more spaces. Output Format Options Use the following options to control which columns of data are included in the output listing. The options are cumulative. (none) The default columns are: and in that order. Show columns and in that order. Show columns and in that order. Show columns and in that order. (UNIX Standard Only, see standards(5)) Remove columns and replace column with columns and (UNIX Standard Only, see standards(5)) Add columns and after column (or if is not being displayed). Add column before column / If and are not present, add column before column (Note that displays the kernel processor set id, where all kernel daemons run, as The option is supported only if the kernel supports processor sets functionality. Add column (for or (for or immediately before column See the section. (UNIX Standard Only, see standards(5)) format is a comma- or space-separated list of the columns to display, in the order they should be dis- played. (Valid column names are listed below.) A column name can optionally be followed by an equals sign and a string to use as the heading for that column. (Any commas or spaces after the equals sign become part of the column heading. If more columns are desired, they must be specified with additional options.) The width of the column will be the greater of the width of the data to be displayed and the width of the column heading. If an empty column heading is specified for every heading, no heading line will be printed. This option overrides options and if they are specified, they are ignored. (UNIX Standard Only.) Shows the process hierarchy. Each process is displayed under its parent, and the contents of the or column for that process is indented from that of its parent. Note that this option is expensive in both memory and speed. Shows the command line in extended format. The column names and their meanings are given below. Except where noted, the default heading for each column is the uppercase form of the column name. The memory address of the process, if resident; otherwise, the disk address. The command line given when the process was created. This column should be the last one specified, if it is desired. Only a subset of the command line is saved by the kernel; as much of the command line will be displayed as is available. The output in this column may contain spaces. The default heading for this column is if is specified and otherwise. Process scheduling class, see rtsched(1). The command name. The output in this column may contain spaces. The default heading for this column is if is specified and otherwise. Processor utilization for scheduling. The default heading for this column is Elapsed time of the process. The default heading for this column is Flags (octal and additive) associated with the process: Swapped In core System process Locked in core (e.g., for physical I/O) Being traced by another process Another tracing flag The default heading for this column is The priority of the process as it is stored internally by the kernel. This column is provided for backward compatibility and its use is not encouraged. The group ID number of the effective process owner. The group name of the effective process owner. Nice value; used in priority computation (see nice(1)). The default heading for this column is The percentage of CPU time used by this process during the last scheduling interval. The default heading for this column is The process group ID number of the process group to which this process belongs. The process ID number of the process. The process ID number of the parent process. The priority of the process. The meaning of the value depends on the process scheduling class; see above, and rtsched(1). The PRM process resource group ID number. The PRM process resource group name. The group ID number of the real process owner. The group name of the real process owner. The user ID number of the real process owner. The processor set ID on which this process is running. The login name of the real process owner. The session ID number of the session to which this process belongs. The state of the process: Nonexistent Sleeping Waiting Running Intermediate Terminated Stopped Growing The default heading for this column is Starting time of the process. If the elapsed time is greater than 24 hours, the starting date is displayed instead. The size in physical pages of the core image of the process, including text, data, and stack space. Physical page size is defined by in the header file (see sysconf(2) and unistd(5)). The cumulative execution time for the process. The controlling terminal for the process. The default heading for this column is if is specified and otherwise. The user ID number of the effective process owner. The login name of the effective process owner. The size of the process in (virtual) memory in kilobytes (1024 byte units). The event for which the process is waiting or sleeping; if there is none, a hyphen (-) is displayed. Notes prints the command name and arguments given at the time of the process was created. If the process changes its arguments while running (by writing to its argv array), these changes are not displayed by A process that has exited and has a parent, but has not yet been waited for by the parent, is marked (see in exit(2)). The time printed in the column, and used in computing the value for the column, is the time when the process was forked, the time when it was modified by To make the output safer to display and easier to read, all control characters in the and columns are displayed as "visible" equivalents in the customary control character format, The default length of the field is 128 (including the null terminator). This can be configured by setting in the file. The value of should be between 64 and 1020. However, when the column is displayed, by default, the length of the field will be 14 characters. If the environment variable is defined, then the length of the field will be between 64 and 255 characters. Under UNIX Standard (see standards(5)) environment, the following behavioral changes occur: o The column format changes from to [dd-] o When the and fields are included by default or the or flags are used, the column headings of those fields change to and respectively. o and will select processes based on session rather than on process group. o The uid or user column displayed by or will display effective user rather than real user. o The option will select users based on effective UID rather than real UID. o The and options, while they are not part of the UNIX Standard, are enabled. EXTERNAL INFLUENCES
For information about the UNIX standard environment, see standards(5). Environment Variables determines the format and contents of date and time strings. If it is not specified or is null, it defaults to the value of If is not specified or is null, it defaults to (see lang(5)). If any internationalization variable contains an invalid setting, all internationalization variables default to (see environ(5)). International Code Set Support Single-byte character code sets are supported. EXAMPLES
Generate a full listing of all processes currently running on your machine: To see if a certain process exists on the machine, such as the clock daemon, check the far right column for the command name, or try WARNINGS
Processes can change while is running. The command displays processes at only a snapshot in time. Data printed for defunct processes is irrelevant. If two special files for terminals are located at the same select code, that terminal may be reported with either name. The user can select processes with that terminal using either name. Users of must not rely on the exact field widths and spacing of its output, as these will vary depending on the system, the release of HP- UX, and the data to be displayed. When non-standard options are mixed with standard options, then the behavior may be non-standard. DEPENDENCIES
HP Process Resource Manager The and options require the optional HP Process Resource Manager (PRM) software to be installed and configured. See prmconfig(1) for a description of how to configure HP PRM, and prmconf(4) for the definition of "process resource group." If HP PRM is not installed and configured and or is specified, a warning message is displayed and (for hyphens (-) are displayed in the and columns. FILES
Directory of terminal device files User ID information Internal data structure SEE ALSO
kill(1), nice(1), acctcom(1M), exec(2), exit(2), fork(2), sysconf(2), standards(5), unistd(5), usergroupname(5). HP Process Resource Manager: prmconfig(1), prmconf(4) in STANDARDS COMPLIANCE
ps(1)
All times are GMT -4. The time now is 08:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy