ps bash command problem

ps bash command problem

Post by Arnaud Beaud'hu » Sat, 28 Dec 2002 18:55:00



Hi everyone,
I'm trying to custom-format the output of the ps command (creating a
pipe in a python script).
I did manage to display only the pid and process name but the problem
is that the second is too short.


--no-headers --columns=15
8118 lt-ncpd
8137 lt-plpnf

In fact, the second line should display

8137 lt-plpnfsd
(i.e. two missing letter, column not enough wide I guess)

It looks like my last argument (columns) is not taken into account. I
also tried cols and wide, with no result.
Thanks for your input,

Arnaud Beaud'huin

 
 
 

ps bash command problem

Post by whyte.. » Sat, 28 Dec 2002 19:51:45



> Hi everyone,
> I'm trying to custom-format the output of the ps command (creating a
> pipe in a python script).
> I did manage to display only the pid and process name but the problem
> is that the second is too short.


> --no-headers --columns=15
> 8118 lt-ncpd
> 8137 lt-plpnf

> In fact, the second line should display

> 8137 lt-plpnfsd
> (i.e. two missing letter, column not enough wide I guess)

> It looks like my last argument (columns) is not taken into account. I
> also tried cols and wide, with no result.
> Thanks for your input,

> Arnaud Beaud'huin

try comm instead of fname

--columns is for the screen length ... and defaults to the size
of your display

fname is just for the first 8 letters of the command
comm is for just the name of the command
and command is for the entire command line that is was run with
args seems to do the same as command .. but it might include
even more info

 
 
 

ps bash command problem

Post by Arnaud Beaud'hu » Sun, 29 Dec 2002 02:52:48



> try comm instead of fname

Problem solved !

Quote:> --columns is for the screen length ... and defaults to the size
> of your display

Without your help I would still be searching like mad in this
direction...

Quote:> fname is just for the first 8 letters of the command
> comm is for just the name of the command
> and command is for the entire command line that is was run with
> args seems to do the same as command .. but it might include
> even more info

Not self-evident even reading carefully through the ps man page...
Maybe these STANDARD FORMAT SPECIFIERS are common to other commands
and information about them is to be found somewhere else...

Anyway, thanks a lot !!

Arnaud

 
 
 

ps bash command problem

Post by whyte.. » Sun, 29 Dec 2002 04:56:22




>> try comm instead of fname
> Problem solved !

>> --columns is for the screen length ... and defaults to the size
>> of your display
> Without your help I would still be searching like mad in this
> direction...

it was the word screen that should have giving the hint about
this not being what you were looking for
you wern't trying to change the screen width but a varables
width

even still knowing that you still had 5 varables to try
with the discription COMMAND

Quote:

>> fname is just for the first 8 letters of the command
>> comm is for just the name of the command
>> and command is for the entire command line that is was run with
>> args seems to do the same as command .. but it might include
>> even more info
> Not self-evident even reading carefully through the ps man page...
> Maybe these STANDARD FORMAT SPECIFIERS are common to other commands
> and information about them is to be found somewhere else...

> Anyway, thanks a lot !!

no problem ... I had to run the man page through my sys admin
decoder ring a few times to figure out the diffrence ...
 
 
 

1. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

Is there a proper fixed bash on any of the FTP sites out there?

I know there bash is on the usual sites but I don't know if they are
bugged or not :(

Regards,

Neil.

--


------------------------------------| Edinburgh, EH14 2DE, United Kingdom
**Domino: There`s nothing you can do when you`re the next in line: Domino**

2. mail and news using ppp?

3. How to get ps info from C program without using ps command

4. GNUCHESS

5. can't run ps command: ps: getexecname() failed

6. install problem - can't load kernel

7. bash error - "bash: setenv: command not found"

8. dial in server admin

9. (patch for Bash) Python command substitution in Bash

10. Bash - multibyte characters in Bash command substitution

11. PS command - view initial command ?

12. How can i view entire command line in "ps" command

13. ps problem got worse (was: ps hiding problem)