Monitor Port, if active, pipe command to screen


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Monitor Port, if active, pipe command to screen
# 1  
Old 03-30-2010
Monitor Port, if active, pipe command to screen

I am a linux newbie and I am learning. I need a script that will monitor a port and if active -- only active, not listening or waiting -- then pipe some commands to the screen as if they were typed on the keyboard. Can a bash or perl script do this and if so, could someone help me out?

Thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cant log in from external monitor on laptop with broken screen.

Hello. I am installing Kali Linux on a laptop with no monitor. The installation goes fine through the external monitor and I can see the GRUB menu on boot, but once it comes time to log in it acts like my non existant laptop screen is my main monitor to type my login info on while my external is... (14 Replies)
Discussion started by: debpleb293
14 Replies

2. Red Hat

Screen Resolution on External Monitor from RHEL 6.3

Hey everyone, I have a KVM or External monitor (19" Dell) that I am trying to hook up to a laptop running RHEL 6.3 (via VGA which is the only option). When I connect it, and go to System->Preferences->Display, the max resolution option it provides me for these external devices is 1280x1024. ... (2 Replies)
Discussion started by: rchaud10
2 Replies

3. Hardware

get touch screen driver for Dell ST222OT Monitor

Hi We're looking for linux touch screen module (driver) for Dell ST222OT Monitor. BTW Has someone already tried to use this monitor under linux and the touch screen works? (0 Replies)
Discussion started by: ccc
0 Replies

4. Solaris

Port Active?

Hi, I have recently installed autosys R11 on my a container in solaris 10. the container has solaris 10. I am now trying to configure the autosys workload contol center on a windows VM. but i can not get the contol center to log into the the autosys server. when i try to estiblish a... (4 Replies)
Discussion started by: dshakey
4 Replies

5. Shell Programming and Scripting

Script to check if Port is Active

is there a better way to check if a port is active on linux and sunos systems? this is currently what I'm using in my script: netstat -an | egrep -i "$PORT" i know this isn't the best way as there could be numbers in that output that has my port number in it but isn't necessarily a... (0 Replies)
Discussion started by: SkySmart
0 Replies

6. AIX

command to monitor the Serial port

Hi, Can anyone please tell me how to check the status of the serial port ?? for example,in Sun os we use the command pmadm to see the status of the serial port-- So is there any command or method in AIX,So that i can see the serial port status ?? thanks in advance ... (1 Reply)
Discussion started by: smartgupta
1 Replies

7. Ubuntu

Using Xorg t extend laptop screen to external monitor

Hey, I was trying to configure my laptop's xorg.conf file so I could use a external monitor. But things got messed up and now I can't get the original back (meaning a high resolution desktop on the laptop). What went wrong? How is it possible that the server always gets stuck at the line: ... (1 Reply)
Discussion started by: ElJavi
1 Replies

8. What is on Your Mind?

Can you use a gps touch screen for a monitor?

I have been looking for a monitor wich i can hold in my hands comfortably and just sit back and relax with it doing my computer work on it via touch screen. Is it possible since the gps has usb to control my pc wich it? and view my desktop? If not does anyone know of a monitor that would work. Im... (3 Replies)
Discussion started by: FaoX666
3 Replies
Login or Register to Ask a Question
transfer::connect(n)                                         Data transfer facilities                                         transfer::connect(n)

__________________________________________________________________________________________________________________________________________________

NAME
transfer::connect - Connection setup SYNOPSIS
package require Tcl 8.4 package require snit ?1.0? package require transfer::connect ?0.1? transfer::connect object ?options...? object destroy object connect command _________________________________________________________________ DESCRIPTION
This package provides objects holding enough information to enable them to either connect to a counterpart, or to be connected to by said counterpart. I.e. any object created by this packages is always in one of two complementary modes, called active (the object initiates the connection) and passive (the object receives the connection). Of the two objects in a connecting pair one has to be configured for active mode, and the other then has to be configured for passive mode. This establishes which of the two partners connects to whom (the active to the other), or, who is waiting on whom (the passive on the other). Note that this is completely independent of the direction of any data transmission using the connection after it has been estab- lished. An active node can, after establishing the connection, either transmit or receive data. Equivalently the passive node can do the same after the waiting for it partner has ended. API
transfer::connect object ?options...? This command creates and configures a new connection object. The fully qualified name of the object command is returned as the result of the command. The recognized options are listed below. -mode mode This option specifies the mode the object is in. It is optional and defaults to active mode. The two possible modes are: active In this mode the two options -host and -port are relevant and specify the host and TCP port the object has to connect to. The host is given by either name or IP address. passive In this mode the option -host has no relevance and is ignored should it be configured. The only option the object needs is -port, and it specifies the TCP port on which the listening socket is opened to await the connection from the partner. -host hostname-or-ipaddr This option specifies the host to connect to in active mode, either by name or ip-address. An object configured for passive mode ignores this option. -port int For active mode this option specifies the port the object is expected to connect to. For passive mode however it is the port where the object creates the listening socket waiting for a connection. It defaults to 0, which allows the OS to choose the actual port to listen on. -encoding encodingname -eofchar eofspec -translation transspec These options are the same as are recognized by the builtin command fconfigure. They provide the configuration to be set for the channel between the two partners after it has been established, but before the callback is invoked (See method connect). object destroy This method destroys the object. This is safe to do for an active object when a connection has been started, as the completion callback is synchronous. For a passive object currently waiting for its parter to establish the connection however this is not safe and will cause errors later on, when the connection setup completes and tries to access the now missing data structures of the destroyed object. object connect command This method starts the connection setup per the configuration of the object. When the connection is established the callback command will be invoked with one additional argument, the channel handle of the socket over which data can be transfered. The detailed behaviour of the method depends on the configured mode. For an active object the connection setup is done syn- chronously. I.e. the object will wait until the connection is established. In that mode the method returns the empty string as its result. A passive object however operates asynchronously. The method will return immediately after a listener has been set up and the con- nection will be established in the background. In that mode the method returns the port number of the listening socket, for use by the caller, like transfering this information to the counterpart so that it may know where to connect to. This is necessary as the object might have been configured for port 0, allowing the OS to choose the actual port it will listen on. The listening port is closed immediately when the connection was established by the partner, to keep the time interval small within which a third party can connect to the port too. Even so it is recommended to use additional measures in the protocol outside of the connect and transfer object to ensure that a connection is not used with an unidentified/unauthorized partner. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category transfer of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
active, channel, connection, passive, transfer COPYRIGHT
Copyright (c) 2006 Andreas Kupries <andreas_kupries@users.sourceforge.net> transfer 0.1 transfer::connect(n)