* Mailx vs Idle Time
@ 1999-09-24 18:33 aaustin
0 siblings, 0 replies; only message in thread
From: aaustin @ 1999-09-24 18:33 UTC (permalink / raw)
To: tru64-unix-managers
<fontfamily><param>Times</param><bigger><bigger>To all ...
I've searched the archives and couldn't find a solution to what will
most probably turn out to be something simple. Hopefully, someone has
dealt with this before.
Here's the problem:
Using mailx, I need to send a mail message to one or more users
advising that their interactive terminal session has exceeded the
permitted idle time, and that they'll be killed in 15 minutes (the
session, not the user). The Korn Shell script to identify the
culprit(s) is written and works like a charm on a DEC 3300 running
under Digital UNIX 4.0D. However, when I port it over to an Alpha
system, also running under Digital UNIX 4.0D, mailx writes the header
and first line of the incoming message on the user's screen, which
resets their idle time, rendering the script moot. It occurred to me
that I needed to unset an option in the Mail.rc file on the Alpha, but
the Mail.rc files on both systems are identical. The Korn Shell script
is also identical, there are no .mailrc files present in the users'
home directories on either system to override the Mail.rc file, and the
yet mailx acts differently. It's probably some implementation of the
mailx top option that's active on the Alpha and not on the DEC 3300,
but I can't find where to turn it off. Any suggestions would be
appreciated.
Here's the chunk of code that sends the mail message ($i is the
username, $j is the PID of the offending terminal session):
for j in $badpid
do
badproc=`ps -ef | grep $j | sed '/grep/d' | awk
'{if ($2 == '"$j"') print $0}'`
mailx -s "Idle Process Alert" <<<<- +++ $i
The interactive terminal session listed below
has been inactive
for at least 1:45, and is eligible for
termination in 15 minutes.
$badproc
+++
done
And here are the contents of the Mail.rc files:
<bold><underline>DEC 3300
</underline></bold>/usr/share/lib> cat Mail.rc
set append dot save
ignore Received Message-Id Resent-Message-Id Status Mail-From
Return-Path Via
<bold><underline>Alpha 4100
</underline></bold>/usr/share/lib> cat Mail.rc
set append dot save
ignore Received Message-Id Resent-Message-Id Status Mail-From
Return-Path Via
Thanks in advance.
... Al Austin
</bigger></bigger></fontfamily>
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A. Austin | Phone: 610-430-6339
Competitive Media Reporting | FAX: 610-430-6355
1385 Enterprise Drive | email: aaustin@norfolk.cmr.com
West Chester, PA 19380 |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Diplomacy is learning how to say "Nice dog!" - until you can find
a big enough stick.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-09-24 18:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-24 18:33 Mailx vs Idle Time aaustin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox