LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-29-2007, 01:29 AM   #1
zymos
Member
 
Registered: Mar 2005
Location: Boulder, CO
Distribution: Debian, previously Gentoo
Posts: 39

Rep: Reputation: 15
more pretty output for 'ps'


I came up with a really pretty output style for ps

But, the way i did it is very poorly done. I was wondering if anyone knows a better way to do it.

Command:
Code:
 ps o user,pid,comm,args,pcpu,size,state -C bash -N -C xterm |egrep "$USER|USER"|sed "s/$USER   //" | sed 's/USER    //'
Output:
Code:
 
  PID COMMAND         COMMAND                     %CPU    SZ S
  4744 startx          /bin/sh /usr/bin/startx      0.0   524 S
  4760 xinit           xinit /home/zymos/.xinitrc   0.0   240 S
  4765 openbox         openbox                      0.0  5248 S
  4769 connectingTest  /bin/bash /usr/scripts/conn  0.0   524 S
  4771 fbpanel         fbpanel                      0.0  1360 S
  4772 conky           conky                        0.0   284 S

The goal is to have it output columns for
pid, command ,command w/ args, cpu, size, state
But only for the current user, and ignore command=bash|xterm

So any ideas,
ZyMOS

PS
You should try is any see how u like it, It much more pleasant and useful than 'ps x'

also if anyone knows how to put 'size' in human for that be cool too.....
 
Old 10-29-2007, 02:41 PM   #2
zymos
Member
 
Registered: Mar 2005
Location: Boulder, CO
Distribution: Debian, previously Gentoo
Posts: 39

Original Poster
Rep: Reputation: 15
a bit better......



Code:
ps o user,pid,comm,args,pcpu,size,state -C bash -N -C xterm |egrep "$USER|USER"|sed 's/^........//'
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'ps' showing threads... grrr deckert Slackware 7 06-11-2006 12:19 PM
Quick question about 'ps' Adrohak Linux - Security 4 05-12-2005 02:10 PM
Seeing all processes with 'ps' pfunk Linux - General 6 03-24-2004 12:34 PM
'ps' Blues Odd_Bloke Linux - Newbie 3 08-30-2003 12:03 AM
very pretty equipment bigjohn Linux - Hardware 2 04-13-2003 01:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:52 PM.

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
Open Source Consulting | Domain Registration