Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > General

Reply
 
Thread Tools Display Modes
  #1  
Old 08-22-2006, 02:47 PM
ericdp's Avatar
ericdp ericdp is offline
Registered User
 
Join Date: Jan 2006
Location: Sammamish, WA
Posts: 15
Send a message via AIM to ericdp
Thumbs down Anti-idle with top running

I've a string set up in my anti-idle setting to run every five minutes. It shows what processes are running and a date. This is fine when I have nothing running.

But today to watch the load on my system I had top running. It refreshes itself every few seconds. But every five minutes anti-idle attempts to do its stuff since I've not done anything.

Is there a way to tell it that, yes I am not doing anything, but there is something running that anti-idle should not attempt to interfere with?

Thanks
Eric
Reply With Quote
  #2  
Old 08-22-2006, 03:23 PM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Eric,

The only method to guarantee that the anti-idle will not affect a program being run on the remote is to turn anti-idle off.

Is the anti-idle string being used to prevent a disconnect from the server or so this information can be displayed regularly?

If it isn't to prevent a disconnect, this may work better if you create a shell script to run this command.

If it is to prevent being disconnected, does sending the protocol NO-OP work better?
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #3  
Old 08-23-2006, 12:57 AM
MrC MrC is offline
Registered User
 
Join Date: Mar 2004
Posts: 216
Ericdp,

Assuming a Unix-ish system, why not use a program like "watch" to fire off your periodical jobs directly on the host itself when you want to see such activity (vs. using anti-idle)?
Reply With Quote
  #4  
Old 08-24-2006, 07:17 AM
ericdp's Avatar
ericdp ericdp is offline
Registered User
 
Join Date: Jan 2006
Location: Sammamish, WA
Posts: 15
Send a message via AIM to ericdp
anti-idle

Good morning,

the Anti-ild string I use is this: 'wr' is a script to get information from ps of jobs running with the current user id.
lclear;wr;echo ---------- ---------- ----------;sar -s `date "+%H"`;echo ---------- ---------- ----------;date \n

when I've got top running, this pops up every five minutes and interrupts it. When I don't have top running this is not a problem. I was thinking that the anti-idle would recognize that something is bering written to the screen. Not just the fact that I've not moved a mouse or touched the keyboard..

Yes, the anti-idle is used to keep me from being disconnected. But with top running I wont get disconnected. It would be a hassle for each time I want to run top to have to go in and stop the anti-idle feature; then remember to turn it back on afterwards.


Thanks
Eric


Quote:
Originally Posted by tnygren
Hi Eric,

The only method to guarantee that the anti-idle will not affect a program being run on the remote is to turn anti-idle off.

Is the anti-idle string being used to prevent a disconnect from the server or so this information can be displayed regularly?

If it isn't to prevent a disconnect, this may work better if you create a shell script to run this command.

If it is to prevent being disconnected, does sending the protocol NO-OP work better?
Reply With Quote
  #5  
Old 08-24-2006, 07:39 AM
MrC MrC is offline
Registered User
 
Join Date: Mar 2004
Posts: 216
The anti-idle string was not really designed for that purpose. It is designed as a workaround to prevent auto-logouts due to inactivity.

Place you commands in a shell script; call it sar-stats. Then run

watch -n 300 sar-stats

whenever you want to see your output. Kill it and run top when desired, and restart the watch command. You can make simple aliases for this, or key-bindings.

Let me suggest you change your anti-idle string setting to first try out the Send Protocol NO-OP setting. If that does not maintain your connection, you can try setting the anti-idle string to ^Q^S which is Control-Q followed immediately by Control-S. This is the default pause/start output keybind on many systems, so will have little noticiable affect.
Reply With Quote
  #6  
Old 08-24-2006, 02:59 PM
ericdp's Avatar
ericdp ericdp is offline
Registered User
 
Join Date: Jan 2006
Location: Sammamish, WA
Posts: 15
Send a message via AIM to ericdp
watch

Hello,

Interesting idea. But I don't seem to have watch in my path. Is this a command common to Solaris systems? If so, do you know the direct path?

watch: not found


Thanks
Eric


Quote:
Originally Posted by MrC
The anti-idle string was not really designed for that purpose. It is designed as a workaround to prevent auto-logouts due to inactivity.

Place you commands in a shell script; call it sar-stats. Then run

watch -n 300 sar-stats

whenever you want to see your output. Kill it and run top when desired, and restart the watch command. You can make simple aliases for this, or key-bindings.

Let me suggest you change your anti-idle string setting to first try out the Send Protocol NO-OP setting. If that does not maintain your connection, you can try setting the anti-idle string to ^Q^S which is Control-Q followed immediately by Control-S. This is the default pause/start output keybind on many systems, so will have little noticiable affect.
Reply With Quote
  #7  
Old 08-24-2006, 03:14 PM
toloughlin's Avatar
toloughlin toloughlin is offline
Senior Member
 
Join Date: Feb 2004
Location: Nashua, NH
Posts: 378
'which watch' should help you find it, if it's located on the system.
ie:
Code:
Sun Microsystems Inc.   SunOS 5.9       Generic January 2003
bash-2.05$ which watch
no watch in /usr/bin /bin /usr/sbin /sbin
bash-2.05$ which man
/usr/bin/man
__________________
----------------------------------------------
Tom O'Loughlin
Reply With Quote
  #8  
Old 08-24-2006, 06:44 PM
MrC MrC is offline
Registered User
 
Join Date: Mar 2004
Posts: 216
Watch is not shipped in standard Solaris, but it is available via sunfreeware.com

http://www.sunfreeware.com/

Select your Solaris version / arch type in the upper right, and then in the lower right, scroll to find the watch package. You can download a pre-compiled binary, or the source to build it yourself.

Alternatively, you can get a program called Multitail:

http://www.vanheusden.com/multitail/download.html

which will do the same thing, and much more.
Reply With Quote
  #9  
Old 08-24-2006, 08:17 PM
FuzzyFox's Avatar
FuzzyFox FuzzyFox is offline
Registered User
 
Join Date: Feb 2005
Location: Dallas, TX
Posts: 59
Send a message via ICQ to FuzzyFox Send a message via AIM to FuzzyFox Send a message via MSN to FuzzyFox Send a message via Yahoo to FuzzyFox
I guess the question still remains, why do you get disconnected?

Is it because you are using a NAT router that erases your session when no TCP data flows for a certain amount of time? If that's the case, using SecureCRT's Protocol No-Op feature will remove that problem.

Is it because the system you're connecting to disconnects you if you don't enter a shell command in a certain amount of time? If so, you should be able to influence the shell's behavior by changing some local variables.

If your shell is bash, or some related variant (I think ksh is close enough), the variable $TMOUT determines how much idle time the shell will put up with before it logs you out. If this variable is set too small (like, say, 300, which is five minutes), you can set it to a much larger value (like 28800, which is 24 hours), or you can unset it altogether, so that the shell never logs you out.

If your shell is more akin to tcsh, the $autologout variable serves the same function, and you can try setting it larger (or unsetting it) in order to give yourself more time.

If there is some other mechanism at work that is logging you out, well, perhaps there is a way to combat that, too.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:04 AM.