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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

hold my shell without using resources

Status
Not open for further replies.

squash

MIS
May 21, 2001
99
US
Hello all,

Doug the amateur scripter again.

The setup:
I use a sun workstation to monitor about 80 other Unix boxes ( mostly sun some aix).
After my 12 hour shift I pull my card out of the sun workstation and it retains all my sessions ( way cool).
Next shift I reinsert my card and all 80 sessions come up as I left them, or so I would hope.
Most of my shells have timed out which loses dce connections etc.

Not really that big a deal but hey if I can prevent it great. I have a simple script that I use:

while :
date
sleep 14400
done

But think this may be using system resources.
Does anyone know if this is true, and if so what could I do otherwise?
Setting the TMOUT env is not really an option as I su to root as do others.

I always use the ksh.

As always I thank you for you support
Doug
 
Doug,

If your while script works I don't see any reason why you shouldn't go for it. Sleep takes very few resources, if your script works without the call to "date" it would use even less resources.

Oh - and I don't think someone who admins 80 boxes is really an amateur..... <smile> 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.
 
Mike,
Thankx for the note, always like reading your posts.

The reason for the date call is a hold over from other scripts I write to monitor funcitons. Then I have a visual that the script is not hung in some manner. But your right in this instance I probably dont need it as I am home sleeping while this script is running.

And yes I am not an amateur, as with out the ability to script I would sink in this job.

Doug
 
thx Doug 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.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top