Ps complete output


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ps complete output
# 1  
Old 04-18-2013
Ps complete output

HI ALl
I am creating a script where i can print ps output to find out most CPU utilised process.but in ps -ef we can get arg list only up to 80 character.

Code:
ps -ef | more
     UID   PID  PPID   C    STIME TTY         TIME CMD
    root     0     0   0   Feb 20 ?           0:40 sched
    root     5     0   0   Feb 20 ?        3642:11 zpool-rpool
    root     1     0   0   Feb 20 ?           5:49 /sbin/init
    root     2     0   0   Feb 20 ?           0:00 pageout
    root     3     0   1   Feb 20 ?         910:25 fsflush
    root   551     1   0   Feb 20 ?           0:17 /usr/lib/utmpd
    root     9     1   0   Feb 20 ?           1:23 /lib/svc/bin/svc.startd
    root    11     1   0   Feb 20 ?           4:48 /lib/svc/bin/svc.configd
    root    66     1   0   Feb 20 ?           2:03 devfsadmd

I am not getting complete list of argument as -f option limits it to 80 character only.
Can anyone share me command by which i can get complete argument for all process at anytime.
# 2  
Old 04-18-2013
In Solaris or SunOS, use the University of California, Berkeley (ucb) version:
Code:
/usr/ucb/ps -auxwww

# 3  
Old 04-18-2013
Have you read the man page for ps or any variations?


Would ps -el help?



Robin
Liverpool/Blackburn
UK
# 4  
Old 04-18-2013
Quote:
Originally Posted by devesh123
HI ALl
I am creating a script where i can print ps output to find out most CPU utilised process.but in ps -ef we can get arg list only up to 80 character.

Code:
ps -ef | more
     UID   PID  PPID   C    STIME TTY         TIME CMD
    root     0     0   0   Feb 20 ?           0:40 sched
    root     5     0   0   Feb 20 ?        3642:11 zpool-rpool
    root     1     0   0   Feb 20 ?           5:49 /sbin/init
    root     2     0   0   Feb 20 ?           0:00 pageout
    root     3     0   1   Feb 20 ?         910:25 fsflush
    root   551     1   0   Feb 20 ?           0:17 /usr/lib/utmpd
    root     9     1   0   Feb 20 ?           1:23 /lib/svc/bin/svc.startd
    root    11     1   0   Feb 20 ?           4:48 /lib/svc/bin/svc.configd
    root    66     1   0   Feb 20 ?           2:03 devfsadmd

I am not getting complete list of argument as -f option limits it to 80 character only.
Can anyone share me command by which i can get complete argument for all process at anytime.
Are you in solaris? It has more than one version of ps, the standard one only prints 80 characters. Try /usr/ucb/ps

On other systems, you can try COLS=9999 ps ...
This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. HP-UX

Anybody wants to help a complete Noob?

Hello there, first post here so go easy on me! :D I just aquired an old HP 9000 Dclass d220 server, all I know is that it's running HP-UX, and it appears to boot fine (I see the modules loading, etc..) Now, I have been an MS guy all my life (yeah I know, make fun of me), so I really have no... (9 Replies)
Discussion started by: Marvio
9 Replies

2. Shell Programming and Scripting

cant complete lab ???

heres the lab i did everything but when i issue the automated lab check. but it gives me this everytime ''you are missing the /home/smichaels/Labs/lab2b/group file, please create it as per step 12 of the lab. once you have corrected this problem, re-run the uli101.023 program'' im... (1 Reply)
Discussion started by: ink
1 Replies

3. Shell Programming and Scripting

Complete Screen Output to Log File

Hi, I would need to log the whole screen ouput to a log file. All Inputs from the Agent, all echo´s and DBMS Outputs from the PL/SQL. Basicly everything what I can see during the run on the screen. I tried it already with #exec 2>$BASELOG/RUN.log #exec 1>$BASELOG/RUN.log #exec >... (1 Reply)
Discussion started by: enjoy
1 Replies

4. UNIX for Dummies Questions & Answers

A complete New Bie Here

Hello Guys I am a complete New bie in UNIX ( Just know a few of the commands ). Please guide how should I learn Unix In a proper way . I am doing a job, so i will have to do the study at home . Which books , Links, Pages you will suggest me so that i can learn UNIX fast . Thanks (5 Replies)
Discussion started by: supercops
5 Replies

5. UNIX for Dummies Questions & Answers

BASH complete-filename & menu-complete together

Hi, Does anyone know how to make BASH provide a list of possible completions on the first tab, and then start cycling through the possibilites on the next tab? Right now this is what I have in my .bashrc: bind "set show-all-if-ambiguous on" bind \\C-o:menu-complete This allows... (0 Replies)
Discussion started by: Mithu
0 Replies

6. UNIX for Dummies Questions & Answers

To output complete record with JOIN

Hi I have 2 files file1 12312341231612634 34534368463786347 23472364287687263 23472357841007237 file2 12123561235176351*dhfsdhfh*2347623462*sdfjshehweu*123651235*sdgfsgfsy*23237346* 23472357841007237*defsjdf*12378234*hsdhfsdhgfsh*12837238947*dsjshgdfs*2348972348*... (1 Reply)
Discussion started by: unxusr123
1 Replies

7. UNIX Desktop Questions & Answers

Auto complete

How can I set up the profile for a use so when entering a eg first charachter of a file and then pressing the tab OS will complete the file name. Thanks in advance Tom (4 Replies)
Discussion started by: Tom_Zamani
4 Replies

8. UNIX for Dummies Questions & Answers

complete newbie

ok so i am trying redhat linux and i create a partiton and install it no worries then i start and i cant access any of my other drives i can mount cd roms and floppies so i am logged in as root what i want to do is mount the following drives drive 1 ide partition 2 drive 2 to 5 seen... (2 Replies)
Discussion started by: davidjk
2 Replies
Login or Register to Ask a Question