General :: Script To Monitor Port For Active, Then Send Command?

Mar 28, 2010

I need a script that would continuously monitor one port and when it is active (not listening or waiting) execute a series of commands to standard output.I am familiar with netstat but am not good with scripting so

View 15 Replies


ADVERTISEMENT

Programming :: Streamout Command To RS232 - Send Something Through Serial Port?

Aug 5, 2010

I want to send something through the serial port, for example

[code]...

the point here is send some numbers to a couple of 7 seg displays, so I will wire a RS232 chip on a protoboard, the logic after the RS232 is not an issue, but how can I assure the data is being sent right from my linux box to the RS232 chip, the one on the protoboard? Do I have to write a C program to read the strings and then send them to the serial port?For example if I wanted to send this to the displays:

[code]...

So I guess the simplest way is (Supposing I can deal with the stream so it is filtered and only display the number array) $ ifstat > /dev/ttyS0 But, how do I know if the RS232 will take them as the right characters?

View 3 Replies View Related

Server :: Postfix Port - Send Message Via Port 587 Not Port 25

May 2, 2010

I have a mail server i need it to send message via port 587 not port 25, i make some changes to my postfix server which i use and it is already successed making a telnet to 587 port like it :

[Code]....

View 3 Replies View Related

General :: Send The Output Of Send Command To A File?

Jan 20, 2011

in the middle of script, i need to send the output of (send command on line 8) to a file

#!/usr/bin/expect
spawn telnet 172.20.64.133
expect "ENTER USERNAM <"

[cod]....

i treid the below on line 8 :

1- send "show command;

" > logfile.txt : gives an error extra character after the "

2- logsave logfile.txt 'send "show command;

" ': error invalid command

3- i simply tried to send the output of the whole script to file logsave /home/logfile ./script : seems that logsave work under root only

4- ./script > logfile : the problem with this is that the output of echo or (read "enter your id") command will not be displayed on the screen (actually nothing will be displayed, i have to open the log file to see the output). is there any way to save the log of the "send" ? or to save the log of the complete script without hiding the output on the screen?

View 2 Replies View Related

General :: How Multitouch Monitor Send Touches To A PC

Jul 22, 2011

I'm fairly new to touch screens. I'm having a look on Amazon at multi touch monitors like an HP 2310ti and it seems everybody just accepts that Windows 7 can handle it out of the box.

How does it work? I can't find any resources explaining how the PC receives the input from the touch screen.

Do I need to connect the PC with the monitor via USB, or is there wireless/bluetooth technology embedded in the monitor like in a wireless keyboard/mouse? How does Linux handle such a monitor out of the box? Does it recognize something like 2 connected mouse devices? I read about a few projects trying to implement this stuff in Xorg/GTK, but it seems to be pretty experimental at current state (because there is little information, if any, on this topic).

View 3 Replies View Related

General :: Send Data Through A USB Port To A Printer Which Recieve Text File?

Jul 7, 2010

I am trying to send data through a USB port to a printer which can recieve text file. Now to send the data to the printer I am doing echo "Hello World" > /dev/usb/lp0

but the data doesnt seem to be sent to the printer because I have an analyzer to monitor the data sent to the printer. Is there anything else which I need to do

View 1 Replies View Related

General :: Netstat Command - Active Internet Connections / Domain Sockets?

Oct 12, 2010

When I typed netstat -lna, the output:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:580 0.0.0.0:* LISTEN
...
...

Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node
unix 2 [ ACC ] STREAM LISTENING 23581
...
...

Can anyone explain to me:
1. What is "Active Internet connections" & "Active UNIX domain sockets"?
2. What is unix Proto?
3. Difference between LISTEN and LISTENING state.

View 8 Replies View Related

General :: Graphic Tool To Monitor Traffic Over A USB Port?

Apr 19, 2011

Is there a graphic tool that can monitor the traffic over a USB port?

ie like system monitor for network traffic but over a specific port?

View 1 Replies View Related

General :: Solve An Intermittant Serial Port On An Embedded Medical Monitor?

May 16, 2011

I'm trying to solve an intermittant serial port problem on an embedded medical monitor. We have determined that the port is receiving characters from the external device but the serial thread is not transferring the chars from the buffer. Has anyone seen this before? Looking for some guidance on what to look for. this problem happens at start up about 1 in 50 boots. We're using kernal 2.6.29.6.

View 1 Replies View Related

General :: How To Send Command To Daemon

Jan 20, 2011

I have a minecraft server running as a daemon. When you run it normally (not as a daemon), you can type commands into the console. How can you get to the console so I can send it commands while it's running as a daemon?

View 1 Replies View Related

General :: Particular Command To Send Different Signals?

Mar 10, 2010

We all know how to kill multi process but if we want to send different signals to different process like to stop,-9,to hungup simultaneously at the same time then how we will do it,is there any particular command to do it.

View 1 Replies View Related

General :: Net Send Command In Linux

Dec 20, 2010

hope you will know the net send command of windows.in the same way we are working on linux red hat 5.0 we want to know the equivalent command of net send for linux if any body know then please tell us? we are here only when we not found on google so please do not give the suggestion of searching on google.

View 5 Replies View Related

General :: Send Enter Command To Screen ?

Apr 5, 2011

I'm currently writing a C++ application to manage some screen functions in Debian(server).

However this issue have bothered me for 2 days now...

What I want to do is to send a command to an attached screen which is running.

Used the following command: Code: screen -S screenwindow So I send a command with the -X parameter, which works just fine... Code: screen -S screenwindow -X stuff yes The command I want to send is "yes" and it does appear in my screen window when I attach it.

But the problem is that I need it to submit it... well I need to press "enter" and I've been looking everywhere on how to do that.

Because right now it hangs on a line like this: Code: Something here, do you want bla bla: yes Obviously I could just press enter myself, but the problem is that it's running as a deamon and but it is supposed to do this all by itself .

So are there any way I can submit it?

View 4 Replies View Related

General :: Configure The At Command To Send To Someone Other Than Root?

Jul 6, 2010

Is there a way to configure the at command to send to someone other than root?

View 1 Replies View Related

General :: [Bash] Send Command To Another Terminal?

Sep 10, 2010

I open up 2 xterms on my desktop, A(/dev/pts/0) and B(/dev/pts/1).I can write from A to B using redirection e.g. echo "test" > /dev/pts/1How do I run a command from A on B? e.g. "clear"Basically I'm putting the 2 terminals side by side, and using terminal B to display the contents of the current working directory, by running the following in A:export PROMPT_COMMAND="ls -a > /dev/pts/1"but this fills up the screen pretty fast. I was actually looking for a way to clear up the second terminal.

View 6 Replies View Related

General :: Send Email From Command Line?

Mar 2, 2011

I'm looking for an easy way to send basic emails for the command line. I have tried configuring sendmail and mailx, but I have yet been able to receive a test email at my remote address. I have read through a fair amount of "how to" on this but I am a little confused and obviously not doing something right. My sendmail.mc file is as follows

Code:
divert(0)dnl
VERSIONID(`$Id: generic-linux.mc,v 8.1 1999/09/24 22:48:05 gshapiro Exp $')
OSTYPE(linux)dnl
DOMAIN(generic)dnl
MAILER(local)dnl
MAILER(smtp)dnl

When I try to send a test mail via

[Code]....

View 14 Replies View Related

Networking :: Port Bonding Won't Use Active-backup Using Round-robin?

Dec 9, 2010

I'm trying to configure my Red Hat server to use port bonding for two interfaces going to a switch, and I followed this redhat guide [URL]...-redhat-server but when I attempt to bring the bond up, it simply uses mode 0 (round robin) instead of mode 1, which I specifically configured in /etc/modprobe.conf by doing

Code:
options bond0 mode=1

Any ideas why the bond would continue to use round robin when I set it to active-backup?

View 2 Replies View Related

General :: Send Command To Another User's Screen Terminal

Mar 22, 2011

I have two users; user1 and user2. I have a bash script run by user1, that needs to run a command on a screen terminal started by user2.

View 1 Replies View Related

General :: Unix Command To Send File To Printer?

Mar 28, 2010

Is it true that the UNIX commands to send a file to a printer for printing are system-dependent?

View 2 Replies View Related

General :: Send A File From One Computer To Another By Command Line?

Jan 27, 2010

I've got a Debian Squeeze computer on which the graphics have packed up, but the terminal in single user mode work perfectly fine.

There are a few files on this Debian computer that I want to transfer off, to a networked computer, but I have no idea how to do this.

The destination computer is a freshly re-setup Mandriva install, without (as yet) samba. I don't think it's necessary though. The Mandriva install works fine, has graphics, etc, but can't see the Debian Squeeze computer on the network, possibly because it's in single user mode, thus prompting the problem of how to transfer the files, using only a command line.

View 6 Replies View Related

General :: Failing To Send Mail From Command Line?

Mar 16, 2010

I am using Ubuntu 9.10 and when I tried to send mail from the command line I get: /usr/lib/sendmail: Permission denied. any takers on this.

View 6 Replies View Related

General :: Send A Message In RHEL4 ES Thru Command Prompt?

Mar 18, 2010

I am working on RHEL4 ES server. In our system Talk is not activated(i did not find it in services). To send a mail thru web based mail it is time taking process. I want to send a message(or a mail) to other server. How can I do this? Example: my server IP is 10.xx.xx.xx and the other is 10.xx.xx.xx

View 1 Replies View Related

General :: Send Internal Email Using The Mail Command?

Jun 3, 2009

Send an E-mail to your local account. Try two different ways to send and read it. How can you check that it really arrived? I decided to try using the 'mail' and 'pine' commands. So:

1) Using the root account, intending to send an e-mail to myself (root):

Code:

# mail -s "Hello root!" root
Simple form of sending e-mails internally.
^D (this keystroke is to finish the e-mail)
EOT

2) Using 'pine', another e-mail client: The mail is composed correctly, with 'To:' field set to:

Quote:

[URL]

which is my hostname, as my box runs in a VMWare Slack 12.2 image. In both cases, nothing was received in my mailbox (by typing #mail)... Additionally I don't see any new e-mails when I look at the file '/var/spool/mail/root'. Do I need extra information configuring my mail client/server/service?

View 6 Replies View Related

General :: Send With Ftp Files From Computer1 To Computer2 (shell Command)?

Jun 29, 2010

I have 2 computers with linux, How can i send with ftp files from computer1 to computer2 them(shell command)? Steps that i think should be done (miss shell commands): find inner ip of computer1 open the ftp port (21) of computer1 (make computer1 ftp server) send file from computer2 to computer1 with shell command

View 2 Replies View Related

General :: Send Gpg Encrypted Mail Automatically From The Command Line?

Sep 14, 2010

How can I send gpg encrypted mail automatically from the linux command line?

I'm a little stumped on this one, I've tried using mutt but it doesn't encrypt mail unless it's used interactively.

Does anyone know if you can use the build in mail command to do this some how?

View 1 Replies View Related

General :: Send Email With Attachment By Postfix From Command-line?

Dec 11, 2010

I've just setup a new Ubuntu 10.04 LTS server on linode for myself. Followed an excellent instruction at: here to finish the installation of some basic stuff including postfix.

I am trying to figure out a way to send an email to my gmail address with an attachment, but cannot find how. Already confirmed that email can reach my gmail account.

In the end I have to use mutt to send the email with attachments, probably SendEmails will also do well, but I am wondering how to do the same thing in postfix from command-line?

View 3 Replies View Related

General :: Include Command Results To Send To Admins Via Mail

Jul 16, 2010

how to include my command results in a script? Basically what the script does is it checks the status of a service within the linux server, then sends an email when done. I want to include the results of my status check to my mail when sent.

i.e.
service dhcp3-server status Status of DHCP server: dhcpd3 is running. <---this I want to include in the mail that is sent out via script.

View 6 Replies View Related

General :: Make A Script To Send Output Of Top Command In Mail?

Mar 4, 2010

How can i make a script to send the output of top command in mail.
i have to mail the output to another person , tell me how can i do this

View 3 Replies View Related

General :: Which Command Is Used To Block Tcp Port

Mar 26, 2010

i want to block tcp port with the help of iptables commands linux.which command is used for this purpose?

View 2 Replies View Related

Ubuntu Servers :: Firestarter And Webmin Bandwidth Monitor Not Logging Anything When FS Is Active

Jan 7, 2010

I'm installing a server to act as a firewall between a local network and internet. I've installed Firestarter becaused it worked straitgh away (it seems that FS is configuring the routing as well). I've tried to remove it, and then I lost the access from LAN to Internet. (I don't know why -perhaps the routing is disabled then- , so I prefer to keep it).

The problem is that Webmin Bandwidth Monitor (bandwidthd) is not logging anything when FS is active. Does someone has an idea on how I could make it work? I've tried cacti and some other stuff, but it is far too complicated for me.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved