LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-17-2002, 09:12 AM   #1
alexander
LQ Newbie
 
Registered: Dec 2002
Location: Eastern Europe
Posts: 2

Rep: Reputation: 0
ps (process status) command, PS_FORMAT how to set?


Hi!
I often use:
ps -e -o pid,ppid,user,tty,cmd

man page states that I could use $PS_FORMAT to set default format for ps. But it fails:


$ export PS_FORMAT='pid,ppid,user,tty,cmd'
$ ps
spec value pid,ppid,user,tty,cmd not found

at the same time
the following works fine:
$ export PS_FORMAT='pid'


Any idea?

PS> I tried a lot of options with $PS_FORMAT (AIX, BSD style) and no success
 
Old 12-17-2002, 10:53 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 47
The man page isn't really clear on the PS_FORMAT variable. It does say that in general it's not good to set these variables. When I try setting it to more then one field ps just crashes and generates a core file.

Something you could do instead of setting the variable is create an alias, something like:

alias ps="ps -o pid,ppid,user,tty,cmd"
 
Old 12-18-2002, 04:38 AM   #3
alexander
LQ Newbie
 
Registered: Dec 2002
Location: Eastern Europe
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:

alias ps="ps -o pid,ppid,user,tty,cmd"
That must be a good solution, thank you.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Process Status D webee Linux - General 12 07-08-2019 05:03 PM
about "Create Process", how to get the return status? iclinux Programming 2 01-12-2005 09:02 PM
Ps command status description gstasica Linux - General 1 11-10-2004 10:01 AM
command(s) for checking ip status stupidloser Linux - Wireless Networking 5 08-10-2004 11:21 AM
child process -1 exited with status 1 ashfaq Linux - Software 3 04-09-2004 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration