Send email when Remote Desktop is not available
hii..
I would like my computer to send me an email every time a remote desktop connection is not available. Thanks in advance..:) |
that's so vague.
what's the remote desktop server software? what port is it on? if you lose remote desktop, do you lose ping? can a solution be to test ping instead of remote? what email service? do you have a sendmail server or will you use google or other? you will not get a solution with such a vague question. |
Sorry sorry for inconvenience...
Remote Desktop Connection is a technology that allows you to sit at a computer (sometimes called the client computer) and connect to a remote computer (sometimes called the host computer) in a different location. For example, you can connect to your work computer from your home computer and have access to all of your programs, files, and network resources as though you were in front of your computer at work. You can leave programs running at work and then, when you get home, you can see your work computer's desktop displayed on your home computer, with the same programs running. yeah if i lose ping then i lose remote desktop. i want when remote desktop is not working or not available, it should send an email. i dont have any sendmail server. what to do?? thnk u for d reply..:) |
oh goodness, i know what remote desktop is; what software (name and version) are you using on the host?
|
You can go about this in several ways. you can ping the host and perform a function based on the result.
Let's assume your host is 192.168.1.100 Code:
if ! ping -c 1 -W 1 192.168.1.100 2>&1>/dev/null ; then echo "offline" ; else echo "online" ; fi Let's assume your host is running RDP on port 3389. Let's assume you have netcat installed on your linux client. Code:
if ! nc -vz -w 2 192.168.1.100 3389 ; then echo "offline" ; else echo "online" ; fi here is a link concerning sending gmail from commandline: http://tuxtweaks.com/2012/10/send-gm...-command-line/ |
Quote:
Quote:
|
hey, it works, i got the solution..
thank u so much Sudowtf Habitual.... |
You are very welcome.
|
i have a question:
how does swap partition size affect the performance of large files transfer?? |
i have a question:
how does swap partition size affect the performance of large files transfer?? |
i have a question:
how does swap partition size affect the performance of large files transfer?? |
All times are GMT -5. The time now is 09:12 AM. |