LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-27-2005, 07:38 AM   #1
jaimese
LQ Newbie
 
Registered: Oct 2005
Posts: 11

Rep: Reputation: 0
subprocedure control


Hi friends.

I have another question for u,. As I have explained in my last post (scripts that kill themselves), Im working on a script that manage telnet connections. The procedure is something like this...

(
code to be done inside the console
) telnet xx.xx.xx.xx >> destination.txt

By this way I can manage the consoles of the devices in the network, login inside them and extracting parameters in order to monitorize the network.

This code works perfectly if the console responses but if anything fails, the script hangs. If for example I try to enter to one console that is busy by other user, the console doesnt response but the script is not able to detect it and hangs.

I need to establish any kind of processes control in order to be able to close this sub-procedure if after a time, there is no response. Now, the main script continue running even if the sub-procedure is hanged, but it doesnt work right since its not able to connect to any console, probably because the old connection is still alive.

Im completely lost and if u can give me some hints or ideas, I will thank a lot.

Thanks!

Jaime.
 
Old 10-27-2005, 08:56 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
The Advanced Bash-scripting Guide, chapter 16, I/O redirection, may give you some ideas on how to redirect errors to a file and not hang the system.

In order to use a console with another users parameters, try using 'xhost +localhost', or some variation of that command, before trying to access that user's console.

See the man pages or info files for xhost for more information on how to use the command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Control amount of time a user may be logged in. (Parental Control) darrensnospam Mandriva 13 02-18-2006 06:01 PM
remote control kjs Linux - Software 5 02-24-2005 04:09 PM
X out of control! erickFis Linux - Hardware 13 01-23-2004 12:41 PM
Can't launch redhat-network-control after updating gnome-control-center fedetxf Red Hat 0 12-12-2003 08:12 AM
control dummyagain Programming 1 10-04-2003 08:09 AM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration