Determine whether networked terminals are currently in use
Moderator: General Moderators
Determine whether networked terminals are currently in use
In a couple of weeks I will be trying to integrate a feature into my website that will show whether certain networked unix systems are currently available for use. The approach I'm considering is to write a shell script that (A) ssh's into the systems whose status I want to display and then (b) executes the appropriate command and finally (c) prints the results in a useful way. I would use PHP to execute this shell script and interpret the results. It seems like there must be a better way to do this. If anyone has any advice I would really appreciate it. Thanks.
Re: Determine whether networked terminals are currently in u
Sounds about right - I can't think of any way to get that information without actually logging into the machine.
For (b), `who` outputs a parseable list of users, when they logged in, and their IP address. There should be only the one line: your PHP script (which you can probably identify with `who -m` - check the man page).
For (b), `who` outputs a parseable list of users, when they logged in, and their IP address. There should be only the one line: your PHP script (which you can probably identify with `who -m` - check the man page).
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Determine whether networked terminals are currently in u
There are probably a number of ports that you could access services on that might give you this information. SNMP comes to mind first. If these "networked unix systems" run webservers (even on port 8080) then you code access a webservice to get this information.
(#10850)