Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Unanswered: 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

  2. #2
    Join Date
    Sep 2009
    Location
    Ontario
    Posts
    1,057
    Provided Answers: 1
    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 10:40. Reason: typo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •