If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Tocfind the user count for a running application

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-13-11, 00:50
ashish_Gupta39 ashish_Gupta39 is offline
Registered User
 
Join Date: Sep 2011
Posts: 2
Tocfind the user count for a running application

Hi All,
I am working on project in which I need to do some shell scripting .But I got stuck with a problem.
My Project has some online and batch server on which many Jvm are running.
and in one jvm one application is running which is being used by certain users
so I want to know about how we can calculate the total user count for the application running in all jvm using unix scripting .

Please respond to my mail on ashish.sept@gmail.com
Thanks and Regards
Ashish
Reply With Quote
  #2 (permalink)  
Old 09-13-11, 09:38
kitaman kitaman is offline
Papabi's friend
 
Join Date: Sep 2009
Location: Ontario
Posts: 629
Start with fuser.
Code:
fuser filename
will list all the process id's that have filename open.
Then use "ps" to examine each of the processes to qualify them.
Or:
add the following lines at the beginning and end of the application script
Code:
echo START $LOGNAME `tty` $$ `date` >>application_usage.log
echo THEND $LOGNAME `tty` $$ `date` >>application_usage.log
Then analyze the log file.

Last edited by kitaman; 09-13-11 at 09:40. Reason: typo
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On