Thursday, October 7, 2010

Using ps to see the whole process command in Solaris

To see a long command line running in Linux you can use 'ps -efl', like this:



# ps -efl | grep chrome | tail -1 
1 S andre    12842  3822  2  80   0 - 344387 -     11:57 ?        00:06:56 /opt/google/chrome/chrome --type=renderer --lang=en-US --force-fieldtest=CacheSize/CacheSizeGroup_3/CacheThrottle/CacheThrottle_Off/ConnCountImpact/conn_count_6/ConnnectBackupJobs/ConnectBackupJobsEnabled/DnsImpact/default_enabled_prefetch/GlobalSdch/global_enable_sdch/IdleSktToImpact/idle_timeout_60/Prefetch/ContentPrefetchEnabled/ProxyConnectionImpact/proxy_connections_32/SpdyImpact/npn_with_spdy/ --enable-crash-reporter=1B284CE7461F92C501F326E117CE5DBE,Debian GNU/Linux testing (squeeze) --channel=3812.0x615ca00.296713068


But in Solaris it don't work the same way:


$ ps -efl | grep java | grep noaccess
 0 S noaccess  2258     1   0  40 20        ?  11434        ?   Aug 10 ?          64:33 /usr/java/bin/java -server -Xmx128m



But we can use the beautiful /usr/ucb/ps auxww


$ /usr/ucb/ps auxww | grep java | grep noaccess
noaccess  2258  0.0  0.39147284352 ?        S   Aug 10 64:32 /usr/java/bin/java -server -Xmx128m -XX:+UseParallelGC -XX:ParallelGCThreads=4


Hope this help some lost soul out there.

No comments: