Ps complete output

Print Friendly

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.

From: http://www.unix.com/shell-programming-scripting/221509-ps-complete-output.html

FavoriteLoadingAdd to favorites

Leave a Reply

Your email address will not be published. Required fields are marked *