Solaris Ascendancy To Demonstrate Long Declaration Listing Of A Running Process
One of the employment alongside ps command, which is a pop tool to notice whatever processes along alongside grep ascendence inwards Solaris operating arrangement is that it doesn't exhibit total ascendence delineate of piece of work declaration of process. This way if you lot are doing grep on whatever text which seem at tail halt of long ascendence line, you lot volition probable non able to capture that procedure past times using ps and grep. This is unsafe because it may Pb you lot to assume that sure as shooting procedure is non running together with you lot may restart it again, despite its existence running together with entirely because you lot didn't notice the process. This is quite mutual acre running Java procedure inwards whatever UNIX operating arrangement e.g. Solaris, Linux, IBM AIX etc because Java procedure commonly has long listing of arguments e.g. system properties, JVM options, and name of master copy class. I bring faced this employment quite few fourth dimension fifty-fifty after using ps -ef option. Until straight off I bring non flora whatever compelling solution for this employment which volition plough over all UNIX systems, except for Solaris, which I am going to portion alongside you lot guys. So, my entirely advice is to seat the keyword inwards caput of long ascendence delineate of piece of work declaration together with endeavour to proceed Java ascendence delineate of piece of work equally small-scale equally possible. Also prefer using ps -auxww over ps -ef, former improve display long ascendence delineate of piece of work than after together with you lot bring higher guide chances of capturing the procedure past times using grep alongside tail keywords.
which shows total ascendence delineate of piece of work of a procedure if you lot know procedure id (PID). It's non a replacement of ps command precisely even thence a skilful tool to come across total ascendence delineate of piece of work of whatever procedure inwards Solaris. Here is an representative of how you lot tin flame usage prstat together with pargs ascendence inwards Solaris to notice a running procedure together with exhibit its consummate listing of argument.
Command to notice out procedure which is using high CPU
You tin flame come across hither that our Java procedure 28525 is using 3.5% of CPU together with it has 833 threads. Now nosotros require to notice out consummate listing of arguments passed to this procedure from ascendence delineate of piece of work acre starting it. It doesn't affair if it is started from a script or straight because inwards UNIX, start-up script volition last a unlike procedure than your Java application.
Solaris ascendence to exhibit consummate listing of arguments of a running process
Bingo, straight off you lot tin flame come across that what declaration has passed to procedure alongside PID 28525. You tin flame come across that starting fourth dimension declaration is Java executable itself. You tin flame notice out your JDK location equally good equally Java version seat out e.g. hither JDK is located at /opt segmentation together with Java version is JDK 1.6.0_22. Next you lot tin flame come across the declaration exceed to JVM e.g. -server shows that its running on server mode. You tin flame also come across other garbage collection options, startup together with max memory provided to server together with it's classpath. I bring non shown total classpath hither purposefully precisely when you lot run this ascendence inwards Solaris past times yourself, you lot volition come across all the arguments passed to your Java process.
That's all on How to exhibit long ascendence delineate of piece of work of a procedure running on Solaris operating system. This is a really useful ascendence to troubleshoot Java procedure alongside long listing of arguments e.g. you lot tin flame banking corporation agree what JVM parameters has been passed to your Java process, value of key configuration parameters together with you lot tin flame also notice how much maximum retentivity is allocated to your Java application.
Further Learning
Linux Command Line Basics
Linux Command Line Interface (CLI) Fundamentals
Learn Linux inwards five Days together with Level Up Your Career
Solaris ascendence to display long arguments of running process
Putting of import keywords e.g. cite of your Java procedure at the start of declaration listing is Ok precisely what if you lot actually require total ascendence delineate of piece of work declaration of whatever procedure inwards UNIX environment? Sure in that location must last to a greater extent than or less ascendence which tin flame give you lot consummate ascendence delineate of piece of work of a running process, no? Well, I didn't know most it despite using UNIX together with Linux from long fourth dimension until of late when I actually needed total ascendence delineate of piece of work declaration a Java procedure which is taking most of CPU from that machine. I flora the procedure id (PID) of that Java procedure using prstat ascendence together with and thence I tried to come across that procedure using ps ascendence for that procedure precisely didn't come across total ascendence line. Few Google search reveals a ascendence called pargsCommand to notice out procedure which is using high CPU
[test@localhost] > prstat -scpu PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 28525 test 860M 615M slumber 59 0 80:35:02 3.5% java/833 19681 test 431M 361M cpu0 thirty 0 2:57:43 3.1% ksh/2
Solaris ascendence to exhibit consummate listing of arguments of a running process
[test@localhost]> pargs 28525 pargs: Couldn't produce upwards one's heed locale of target process. pargs: Some strings may non last displayed properly. 28525: /opt/jdk1.6.0_22/bin/java -server -Dsun.rmi.dgc.cli argv[0]: /opt/jdk1.6.0_22/bin/java -server -Dsun.rmi.dgc.cli argv[1]: -server argv[2]: -Dsun.rmi.dgc.client.gcInterval=3600000 argv[3]: -Dsun.rmi.dgc.server.gcInterval=3600000 argv[4]: -verbose:gc argv[5]: -Xloggc:./logs/GC.log argv[6]: -XX:+PrintGCTimeStamps argv[7]: -verbose:gc argv[8]: -Xloggc:./logs/GC.log argv[9]: -XX:+PrintGCTimeStamps argv[12]: -Xms2048M argv[13]: -Xmx2048M argv[14]: -cp
Bingo, straight off you lot tin flame come across that what declaration has passed to procedure alongside PID 28525. You tin flame come across that starting fourth dimension declaration is Java executable itself. You tin flame notice out your JDK location equally good equally Java version seat out e.g. hither JDK is located at /opt segmentation together with Java version is JDK 1.6.0_22. Next you lot tin flame come across the declaration exceed to JVM e.g. -server shows that its running on server mode. You tin flame also come across other garbage collection options, startup together with max memory provided to server together with it's classpath. I bring non shown total classpath hither purposefully precisely when you lot run this ascendence inwards Solaris past times yourself, you lot volition come across all the arguments passed to your Java process.
That's all on How to exhibit long ascendence delineate of piece of work of a procedure running on Solaris operating system. This is a really useful ascendence to troubleshoot Java procedure alongside long listing of arguments e.g. you lot tin flame banking corporation agree what JVM parameters has been passed to your Java process, value of key configuration parameters together with you lot tin flame also notice how much maximum retentivity is allocated to your Java application.
Further Learning
Linux Command Line Basics
Linux Command Line Interface (CLI) Fundamentals
Learn Linux inwards five Days together with Level Up Your Career
0 Response to "Solaris Ascendancy To Demonstrate Long Declaration Listing Of A Running Process"
Post a Comment