Sponsored Content
Operating Systems Linux Red Hat Ps command different behaviour Post 302981400 by Albert_Pinto7 on Monday 12th of September 2016 08:33:42 AM
Old 09-12-2016
Quote:
Originally Posted by Corona688
From man ps:

Code:
       args        COMMAND   command with all its arguments as a string.
                             Modifications to the arguments may be shown.  The
                             output in this column may contain spaces.  A
                             process marked <defunct> is partly dead, waiting
                             to be fully destroyed by its parent.  Sometimes
                             the process args will be unavailable; when this
                             happens, ps will instead print the executable
                             name in brackets.  (alias cmd, command).  See
                             also the comm format keyword, the -f option, and
                             the c option.
                             When specified last, this column will extend to
                             the edge of the display.  If ps can not determine
                             display width, as when output is redirected
                             (piped) into a file or another command, the
                             output width is undefined (it may be 80,
                             unlimited, determined by the TERM variable, and
                             so on).  The COLUMNS environment variable or
                             --cols option may be used to exactly determine
                             the width in this case.  The w or -w option may
                             be also be used to adjust width.

So if ps isn't abiding by your terminal width, be sure the COLUMNS variable is set to a sane value in the user environment and exported, etc.


Thanks but its not working, changed the COLUMNS variable. One thing which works is command line option of --cols which is not desirable as already stated by me in my original question. The value of COLUMNS is 168 but I see that ps command is showing output of much higher width.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help me to resolve uncertian behaviour of a sort command

I have got a file BeforeSort.txt having 40 fields seperated by "|" First field= RecordType (Value will be P or FP) Second field= CamCode Third field = UpdatingDate Fourth field = ProductType Fifth field = ActionCode (Value may be 01, 02 or 03) Sixth field = ProductCode and so on My... (1 Reply)
Discussion started by: pankajrai
1 Replies

2. UNIX for Advanced & Expert Users

Sort command - strange behaviour

Hi guys, I have the following example data: A;00:00:19 B;00:01:02 C;00:00:13 D;00:00:16 E;00:02:27 F;00:00:12 G;00:00:21 H;00:00:19 I;00:00:13 J;00:13:22 I run the following sort against it, yet the output is as follows: sort -t";" +1 -nr example_data.dat A;00:00:19 (16 Replies)
Discussion started by: miwinter
16 Replies

3. Shell Programming and Scripting

Why this behaviour of IF condition?

I have a variable, defndata, which is a number (fetched from a file using awk). I want that if defndata is not initialized (that is its not found in the file using awk), then to execute a block of statements, otherwise execute another block. if then .... else ... fi Now this... (4 Replies)
Discussion started by: indianjassi
4 Replies

4. Shell Programming and Scripting

cp -R behaviour

i 've noticed the following difference between freebsd cp and gnu cp from the freebsd cp man page: -R ... If the source_file ends in a /, the contents of the directory are copied rather than the directory itself. ... on gnu cp from the man pagewhile on gnu cp manpage: ‘-r'... (2 Replies)
Discussion started by: aegis
2 Replies

5. Shell Programming and Scripting

unix "trap" command behaviour

Hi I am using "trap" command in my script to prevent the user from running Ctrl-C during the its execution. My script creates number of children processes which in turn create some children processes as well during the execution. When user / tester tries to run Ctrl-C, the parent process is... (1 Reply)
Discussion started by: aoussenko
1 Replies

6. Shell Programming and Scripting

Strange "cut" command's behaviour

Hi, Suppose if I have a file having data like this: $ cat file.txt A B C D And, if I do a cut operation like this: $ cut -d" " -f2 file.txt The output is A C D This is the same for even if we try to get the field 3 with -f3 (assume line 2 has 3 fields : C E F). The above... (1 Reply)
Discussion started by: royalibrahim
1 Replies

7. Programming

different behaviour in fg and bg

fg = foreground bg = background I have a cobol program that I start with a very simple script. The script is not at fault as it has not changed and the program worked in fg and bg before. I have altered the logging in the program and moved my cursor declare to working storage. The program runs... (6 Replies)
Discussion started by: Bruble
6 Replies

8. UNIX for Dummies Questions & Answers

Behaviour of "find" command

Hi, I'm trying to understand why the find command below is not listing a directory which was modified long back from the number of days specified in the mtime part. :confused: user-aster :/mydir $ ls -ld 1607570a-4fed44bb-4988 drwxr-xr-x 3 xyz abc 4096 Jun 29 01:02 1607570a-4fed44bb-4988... (4 Replies)
Discussion started by: aster007
4 Replies

9. Shell Programming and Scripting

Exec command behaviour

Hello All, I came across this line in a shell script that I was looking at yesterday. Couldn't get a clue of what it does. :confused: .... .... blah blah .... ..... exec >&- 2>&- ...... blah blah ..... Can someone explain me this?? Usually I have seen exec commands used to... (3 Replies)
Discussion started by: PikK45
3 Replies

10. Shell Programming and Scripting

Behaviour of pwd command in sh and ksh

I have a script as below. bash-3.00$ cat test.sh #!/usr/bin/ksh path=`pwd` echo $path var=$path/temp11 echo $var If run it is giving output bash-3.00$ ksh test.sh //var/tmp/SB2/miscellaneous //var/tmp/SB2/miscellaneous/temp11 (5 Replies)
Discussion started by: millan
5 Replies
asadmin-create-custom-resource(1AS)				   User Commands			       asadmin-create-custom-resource(1AS)

NAME
asadmin-create-custom-resource, create-custom-resource - registers the custom resource SYNOPSIS
create-custom-resource --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile file- name ] [--terse=false] [--echo=false] [--interactive=true] --restype resource_type --factoryclass classname [--enabled=true] [--description text] [--property (name=value)[:name=value]*] jndi_name Registers the custom resource. This command is supported in remote mode only. OPTIONS
--user authorized domain application server administrative username. --password password to administer the domain application server. --host machine name where the domain application server is running. --port port number of the domain application server listening for administration requests. --secure if true, uses SSL/TLS to communicate with the domain application server. --passwordfile file containing the domain application server password. --terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well- formatted data for consumption by a script. Default is false. --echo setting to true will echo the command line statement on the standard output. Default is false. --interactive if set to true (default), only the required password options are prompted. --restype type of custom resource to be created. --factoryclass class that creates the custom resource. --enabled determines whether the resource is enabled at runtime. --description text description of the custom resource. --property optional attribute name/value pairs for configuring the custom resource. OPERANDS
jndi_name JNDI name of the custom resource to be created. Example 1: Using create-custom-resources asadmin> create-custom-resource --user admin1 --password adminadmin1 --host pigeon --port 5001 --restype customType factoryclass "com.custom.class" --description "this is a sample of creating a custom resource" sample_custom_resource Command create-custom-resource executed successfully Where sample_custom_resource is the custom resource created. EXIT STATUS
0 command executed successfully 1 error in executing the command asadmin-delete-custom-resource(1AS), asadmin-list-custom-resources(1AS) J2EE 1.4 SDK March 2004 asadmin-create-custom-resource(1AS)
All times are GMT -4. The time now is 03:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy