How to sort command name + arguments output of ps in solaris
0
votes
0
answers
161
views
Below is my sample output of
ps
command in solaris
myuser 26856 0.0 0.1 1716368 118576 ? S Feb 18 2:17 /web/bea/platform1221/jdk1.8.0_221/bin/java -Djava.security.manager -Djava.security.policy=/web/bea/platform1221/wlserver/common/derby/derbyServer.policy -Dderby.system.home=/web/bea_apps/domains/common/db -classpath /web/bea/platform1221/wlserver/common/derby/lib/derby.jar:/web/bea/platform1221/wlserver/common/derby/lib/derbynet.jar:/web/bea/platform1221/wlserver/common/derby/lib/derbytools.jar:/web/bea/platform1221/wlserver/common/derby/lib/derbyoptionaltools.jar:/web/bea/platform1221/wlserver/common/derby/lib/derbyclient.jar org.apache.derby.drda.NetworkServerControl start
myuser 934 0.0 0.0 11112 9064 ? S Jan 28 0:10 /web/bea_apps/apache/2.4.37/httpd-prod.viewlogs/bin/httpd -k start
root 1621 0.0 0.0 0 0 ? S Jan 24 0:00 zsched
myuser 2140 0.0 0.0 14368 10152 ? S Feb 07 0:00 /bin/sh /web/bea_apps/domains/bin/startWebLogic.sh
root 2369 0.0 0.0 15624 11168 ? S 21:15:17 0:00 /usr/share/centrifydc/sbin/sshd -R
myuser 2372 0.0 0.0 6016 4752 pts/24 S 21:15:17 0:00 -ksh
I tried -o
but then it does not print arguments
I wish to sort on whatever is left after discarding the below ahead of the actual command.
Discard the below for each process before sorting on the rest
root 1621 0.0 0.0 0 0 ? S Jan 24 0:00
I'm on : `$ uname -a
SunOS myhost 5.11 11.4.28.82.3 sun4v sparc sun4v
`
Here is the solaris ps
man page: https://www.unix.com/man-page/OpenSolaris/1/ps/
Kindly suggest.
Asked by Ashar
(527 rep)
Feb 21, 2021, 04:03 AM