Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Find Memory and activity from command output Post 303041747 by Varja on Tuesday 3rd of December 2019 04:33:37 PM
Old 12-03-2019
Find Memory and activity from command output

Hello -
I have a requirement to get the Memory(Xmx) and the activity name using it.

Sample input info :

Code:
1502       02:57 /bin/sh /opt/rather/bar/deploy/bar_run.sh
1545       02:57 java -Drather.repository=/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count/../lib -Xms1024M -Xmx2048M -cp .:/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count:/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count/../lib/routines.jar:/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count/../lib/advancedPersistentLookupLib-1.2.jar:/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count/../lib/rather_file_enhanced_20070724.jar:/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count/../lib/rathercsv.jar:/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count/../lib/trove.jar:/opt/rather/bar/deploy/JobSyng_Barol_Count/JobSyng_Barol_Count/JobSyng_Barol_count_0_1.jar: intlbar_tac.JobSyng_Barol_count_0_1.JobSyng_Barol_Count --context=Default
9738    03:05:12 java -Xms3002M -Xmx3002M -cp /opt/rather/raal/raal.jar com.aexp.raal.main.controller.raalMainController

Command running for the o/p:

Code:
ps -eo pid,etime,command | grep rather | egrep -sv "$$|bash|tail|cat|sshd|grep|less|more|su"

Result looking from it (or something similar/meaningful):
Code:
ActivityName1:  bar
Memory for ActivityName1:2048M
ActivityName2:  raal
Memory for ActivityName2:3002M

Few pointers :
All these are running under process: rather
The memory is looking under value "Xmx"
always the activity name is after "/opt/rather/"

Can someone help me on the code for me?

Thanks in adv.

Last edited by Varja; 12-03-2019 at 05:46 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

output of find command

Hi, I am confused about the output of find command. Please see the two find commands below. When i put "*.c" i get lots of files. But when i put *c only i get only one file. Any answer?? $ find . -name "*c" ./clarify/cheval/hp_server/rulemanager/rulemansvc... (3 Replies)
Discussion started by: shriashishpatil
3 Replies

2. Shell Programming and Scripting

hiding output from find command

when I do the find command from / , there are a lot of directories that I do not have access to and so I get "find: cannot open ..." How can I suppress these messages so only what was found is output. I was thinking on find / -name 'searchterm' | grep -v find but this doesnt work ... (5 Replies)
Discussion started by: JamesByars
5 Replies

3. Shell Programming and Scripting

Incorrect output using find command

I'm using the below command to list files older than 2 hours but it returns redundant output, am I missing something. # find . -mmin +120 -exec ls -l {} \; total 0 -rw-r--r-- 1 root system 0 Oct 13 09:52 test1 -rw-r--r-- 1 root system 0 Oct 13 09:52 test2 -rw-r--r-- 1 root ... (5 Replies)
Discussion started by: mbak
5 Replies

4. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

5. AIX

Command to find TOP 5 Memory consuming process

HI All, Can anyone send me a command to find TOP 5 Memory consuming process. It would be lelpful if I get output something like below processname - pid - memory(in MB) - command I tried few commands from the internet but the result only give the real memory usage or pagging, I want total... (4 Replies)
Discussion started by: bce_groups
4 Replies

6. Shell Programming and Scripting

Command to find the Memory and CPU utilization using 'top' command

Hi all, I found like top command could be used to find the Memory and CPU utilization. But i want to know how to find the Memory and CPU utilization for a particular user using top command. Thanks in advance. Thanks, Ananthi.U (2 Replies)
Discussion started by: ananthi_ku
2 Replies

7. Shell Programming and Scripting

Wrong output in find command

Hi guys - I am trying a small script to tell me if there is a file that exists less than 1k. It should report ERROR, otherwise the check is good. I wrote this script down, however it never runs in the if/then statement. It always returns the echo ERROR. MYSIZE=$(find /home/student/dir1... (8 Replies)
Discussion started by: DallasT
8 Replies

8. Shell Programming and Scripting

indication of find activity - bash script

Hi All, I wanted to show on stdout that a file was found right after it happens due to indicate the activity of long search. Further more I want to store the result of the find in a file. I have tried this: echo -n "Searching" find . -name Makefile -type f -print -exec echo -n "." \; >... (16 Replies)
Discussion started by: vercsab
16 Replies

9. Red Hat

How to find memory taken by a process using top command?

I wanted to know how to find the memory taken by a process using top command. The output of the top command is as follows as an example: Mem: 13333364k total, 13238904k used, 94460k free, 623640k buffers Swap: 25165816k total, 112k used, 25165704k free, 4572904k cached PID USER ... (6 Replies)
Discussion started by: RHCE
6 Replies
appclient(1M)						    Application Server Utility						     appclient(1M)

NAME
appclient - launches the Application Client Container and invokes the client application packaged in the application JAR file SYNOPSIS
appclient -client client_application_jar [-mainclass client_application_main_classname|-name display_name] [-xml sun-acc.xml file] [-tex- tauth] [-user username] [-password password] Use the appclient command to launch the application client container and invoke a client application that is packaged in an application JAR file. The application client jar file is psecified and created during deployment either by the deploytool or by using the asadmin deploy command. The application client container is a set of java classes, libraries and other files that are required to execute a first-tier application client program on a Java Virtual Machine (JVM). The application client container communicates with the Application Server using RMI-IIOP. The client.jar that is retrieved after deploying an application , should be passed with the -client option while running the appclient utility. The -mainclass and -name options are optional for a single client application. For multiple client applications use either the -classname option or the- name option. -client required; the name and location for the client application jar file. The application client JAR file is specified and created during deployment, either by the deploytool or by the asadmin deploy command. -mainclass optional; the full classname of the main client application main() method that will be invoked by the Application Client Container. Used for a single client application. By default, uses the class specified in the client jar. The class name must be the full name. For example, com.sun.test.AppClient -name optional; the display name for the client application. Used for multiple client applications. By default, the dis- play name is specified in the client jar application-client.xml file which is identified by the display-name attribute. -xml optional if using the default domain and instance, otherwise it is required; identifies the name and location of the client configuration XML file. If not specified, defaults to the value of $AS_ACC_CONFIG identified in asenv.conf file. -textauth optional; used to specify using text format authentication when authentication is needed. Example 1: Using the appclient command appclient -client appserv/bin/myclientapp.jar -mainclass com.sun.test.TestAppClient -xml sun-acc.xml scott sample Where: appserv/bin/myclientapp.jar is the full path for the client application .jar file, com.sun.text.TestAppClient is the full Java pack- age name of the main client application, scott and sample are arguments to pass to the application, and sun-acc.xml is the name of the client configuration XML file. If sun-acc.xml is not in the current directory, you must give the absolute path location; otherwise the rel- ative path is used. The relative path is relative to the directory where the command is being executed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Unstable | +-----------------------------+-----------------------------+ package-appclient(1M), asadmin(1M) Sun Java System Application Server March 2004 appclient(1M)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy