1

I need to check how many users are connected to server for specific applications through a browser. I'm mainly interested in Oracle. My server runs RHEL.

  • 2
    What do you mean by "connected through browser"? HTTP is a stateless protocol, so to know how many users are connected is server application thing? To list users logged in, use users or who. – peterph Jan 7 '13 at 11:13
  • Ok We have oracle Application installed on our server. So is it possible to check how many sessions are running and will it be possible to check for http also? – OmiPenguin Jan 7 '13 at 12:15
  • no unless the application reports the statistics somewhere you can access them (or you would have to analyze the packets belonging to the application and deduct from those). Check the application's documentation on how to get that information. – peterph Jan 7 '13 at 13:27
1

So is it possible to check how many sessions are running and will it be possible to check for http also?

A web application needs to be configured or programmed to enumerate active sessions, but for a list of users and idle times for SSH sessions...

w | tr -s " " | cut -d " " -f 1,5 | tail -n +3

See the NOTES section in the man page for w. The line above produces something like this:

username1 0.00s
username2 48.08s

Or, only idle times:

w | tr -s " " | cut -d " " -f 5 | tail -n +3

Or, just a count of SSH sessions:

 w | tr -s " " | cut -d " " -f 5 | tail -n +3 | wc -l
|improve this answer|||||
2

The command who tells you which users are logged in on which terminals. Read man who for more details about logged-in users.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.