Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

port setup, user logins 1

Status
Not open for further replies.

mradmin

Technical User
Mar 20, 2001
82
US
Hi, I'm new to AIX but experienced with "older" minicomputer environments. We run an F50 with the 128-port asynch susbsystem, not networked. There are about 40 users on Wyse50 terminals, 5(local) PCs running HyperTerminal (connected via serial ports), one modem, and 14 serial printers. This system replaced a Prime mini and is running a UniVerse database (an Informix, "pick-like" DBMS) because we have a huge investment in custom software (in an environment "mimicked" by UniVerse). We have a few problems (that the reseller hasn't answered) which I thought I'd bring to you...

1. Can you prevent new logins, like when you do maintenance, program changes, backup, etc.? Of course, we then need a simple way to allow users back in...
2. Can serial lines be set to "logout" after a set period of inactivity? I've seen parameters re. (ksh) timeout, but these are ignored if UniVerse is still running.
3. My boss logs-in from home and I've tested that if he disconnects (modem &/or phone) without exiting from the running software, the port is still active and open. Is there a way to prevent this?

Thanks in advance...
 
Well here is a stab at your questions. I am sure others can come up with
better solutions....Good luck!

1)There is the ability to make the system unavailable to users other than root.
create /etc/nologin file (there doesn't have to be anything in it...just that it exists.
Of course when you are done doing your stuff, you can rm /etc/nologin

2) if the TIMEOUT or TMOUT does not work for you, you might have to look at a program that reads cpu cycles...No guarantee and I have not used it...so I cannot recommend it...or endorse it.....but there is a third party buy program
about $1200+ But remember that your each user is probably logged in as a database user...with processes owned by the database...not by the individual user, and that is probably why TMOUT does not work...since they are not shell processes. If a database process starts a process and never gathers additional cpu cycles, not sure how the above program will work for it...

3) I know of no way to prevent the port from staying open except to kill the process. A lot of users complained that their phone bill was high because the modem never dropped the signal to the port....
======================
Data Carrier Detect Handling

The server uses the Data Carrier Detect (DCD) signal to monitor the true state of a modem. If the DCD signal on the modem's port is "high," the server believes the modem to be in use. It is therefore important to know which circumstances cause this signal to be forced into a "high" state. The DCD signal can be raised high for the
following reasons:

The use of clocal in the stty attributes for runtime field on the SMIT TTY Configuration panel.

Having the Ignore Carrier Detect field set to enable on the SMIT TTY Configuration panel for ttys connected to a 128-port adapter.

The modem forces DCD high with either AT commands or switches.

The tty port is already in use by an application.

Note: When modems make a connection with another modem, the modem raises the CD. Most modem defaults settings set this signal "high" at all times even when the modem is idle. CD should not be forced "high."
=================================
If the port is hung you can try the following:
You can kill the process and then try to issue:

fuser -k /dev/ttyx
This sends a hangup signal to all processes registered on the port. Or try:
/usr/lbin/tty/stty-cxma flush ttyx
------------
Get the major and minor numbers of the tty by typing:

ls -l /dev/tty0
The output should look like the following:
crw--w--w- 1 root system 44,129 Aug 28 13:12 /dev/tty0
The major and minor numbers are 44 and 129 respectively. To reset this tty type:

/usr/sbin/strreset -M 44 -m 129
----------------------------

Maybe others will have different answers that are more helpful. Sorry

#-)
 
"if the TIMEOUT or TMOUT does not work for you, you might have to look at a program that reads cpu cycles"

Wouldn't be too difficult to write your own. Write a script that runs [tt]finger[/tt] and examines the idle field. If the process is idle longer than the time you like, the login can be terminated using the [tt]kill[/tt] command on every process belonging to that tty. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
you're right Mike,

Either buy one or write one.......my guess is that every user or process is listed
as Universe....so that there is never any individual users....I may be wrong...
If that is the case, it would be hard...since the process to start the database may be
idle for days and yet not really be idle....
and user processes may be idle for keystrokes....but running longer programs...and not really idle either...

Thanks for mentioning that!
#-}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top