Port monitoring question

Hello,
I'm new to the forum and to Network programming in particular.
My question concerns port monitoring. I have a server transmitting UDP packets to a specific port. I need to have a thread that monitors that port and sees that there is traffic going out. Yet, it does not have any connection to the server (different processes), but it knows the IP and port number (actually the IP is the same).
How do I make it happen? Do I need to use a DatagramSocket and read inputs? Could someone advise with a simple code sample?
Thanks

Hi,
Why you dont simply create a DatagramSocket object. And using the receive message you can monitor datagrampackets, and if there is message or not available, simply use the getLength() method from this object.
You can do it in two ways.
One would be creating two threads, one to do the job, and the other one to monitor if there is or not message available. As you should know, the receives method, will block if there is no message available. As u dont want your program to freeze, put this job, in one thread.
The other one, would also be using a timertask, which will monitor the waiting process. If then for x time, it doenst receive, you finish your program.
There are really many many possibilities, u just need the DatagramSocket object, the DataGrampacket and a thread!
If i misunderstood something, you can give me new directions

Similar Messages

  • Windows 8.1 Port Monitors

    I would like to state up front that I have almost zero experience in the area of printer drivers, port monitors, etc., other than that which I have acquired so far during this project.
    I am working on developing a PortMonitor that generates PS files in a predetermined location so that our Workflow system can collect them that I currently have set up to use the ghostpdf.inf file (came with GhostScript), which appears to use the PScript5
    DLLs.
    I would prefer to not use the ghostpdf.inf, but my own as I also want to be add a custom UI dll to the Printer GUI in order to allow display/control of the options available for our workflow (these options will vary based on the selected workflow).
    I need this to be able to install and work on most platforms from Windows 7 upwards for both 32 & 64 bit Windows.
    Having created a port I would like to be able to point it at the standard Microsoft PS Class Driver. When I do this on Windows 8.1 I get an error saying "Double check the printer name and make sure that the printer is connected to the network."
    As I want this to go to file on disk I don't have a printer to connect to the network.
    There are several, related, questions.
    1. Can I, and if so how, do I overcome the 'printer connected... ' issue or do I just adapt the ghostpdf.inf file for my own purposes?
    2. Can I, in the INF file, specify a custom UI dll so that I can manage the options?
    3. Do I need to provided a custom driver dll as well or can I just have a UI dll if I plan to store the settings in the registry and have the port monitor dll pick them up and run with them?
    Thanks,
    Peter Young

    Hi,
    So we are here encountering issues with the video lagging in Internet Explorer? How about the network connection?
    Have you checked the below KB article? (The issue here seems to be related with compatibilities. )
    Videos won’t play in Internet Explorer
    Please check the below steps for troubleshooting on a test PC:
    1. Test Video in compatibility View;
    2. Make sure the following add-ons are installed and enabled;
    Shockwave Active X Control
    Shockwave Flash Object
    Java Plug-in (may be multiple add-ons)
    QuickTime Plug-in (may be multiple add-ons)
    Windows Media Player
    3. Update add-ons;
    4. Turn off ActiveX filtering and Tracking Protection.
    Detailed information and steps, please refer to the KB article above.
    Best regards
    Michael Shao
    TechNet Community Support

  • Officejet 8600 Pro - software installation fails - "port monitor" issue

    I am trying to resolve a completely different issue with my printer, so I thought it made sense to follow instructions from the very beginning. I have been printing successfully on this printer for a year at least. It is the best working printer I've ever had.
    Back to the installation: Using Google Chrome as my browser, I downloaded the full package of software for the 8600. It came to about 118 MB.  The installation process went smoothly - until the end. That is when I got the message that installation had failed. The error message said the software was unable to make connection with the "port monitor."  
    I am going to reboot and retry the installation. If it works, I'll come back and say so. 
    Thanks to all who assist us.
    Jack Lavelle - Phoenix

    Hello-
    Uninstall the printer completely. Once the printer is uninstalled , try the install again. Make sure to turn off any firewalls that you have on your PC before installing.
    Also , when you install the printer, you should run the setup as administrator.
    Click on start button (if Windows PC) and type %temp% in the search box.
    This should open your temp folder. Once your in the folder , look for a file called 7z and a series of numbers.
    Open the folder and scroll down to the bottom. Find the Setup.exe file and right click and run as Administrator.
    I hope this helps.
    Also, remember a click on the Kudos star to the left is a quick "Thanks" for a helpful post.
    Please select the "Accept as Solution" button on the post that best answers your question.
    I appreciate your input !
    Thank You,
    Donald

  • Port monitoring performance issues

    We have 3500Xl series switches and some are running port monitoring so we can gather data on what kind of traffic is flowing through our network. The question is if 1 ethernet port is monitoring all the other ethernet ports on it, what kind of performance issues could we expect, if any. Is there a way to show the performance stats of the switch as well. For example, see below.
    interface FastEthernet0/47
    description ethereal87 port monitor
    no logging event link-status
    port monitor FastEthernet0/2
    port monitor FastEthernet0/1
    port monitor FastEthernet0/4
    port monitor FastEthernet0/3
    port monitor FastEthernet0/6
    port monitor FastEthernet0/5
    port monitor FastEthernet0/8
    port monitor FastEthernet0/10
    port monitor FastEthernet0/9
    port monitor FastEthernet0/12
    port monitor FastEthernet0/11
    port monitor FastEthernet0/14
    port monitor FastEthernet0/13
    port monitor FastEthernet0/16
    port monitor FastEthernet0/15
    port monitor FastEthernet0/20
    port monitor FastEthernet0/19
    port monitor FastEthernet0/22
    port monitor FastEthernet0/21
    port monitor FastEthernet0/24
    port monitor FastEthernet0/23
    port monitor FastEthernet0/26
    port monitor FastEthernet0/25
    port monitor FastEthernet0/28
    port monitor FastEthernet0/27
    port monitor FastEthernet0/30
    port monitor FastEthernet0/29
    port monitor FastEthernet0/32
    port monitor FastEthernet0/31
    port monitor FastEthernet0/34
    port monitor FastEthernet0/33
    port monitor FastEthernet0/36
    port monitor FastEthernet0/35
    port monitor FastEthernet0/38
    port monitor FastEthernet0/37
    port monitor FastEthernet0/40
    port monitor FastEthernet0/39
    port monitor FastEthernet0/42
    port monitor FastEthernet0/41
    port monitor FastEthernet0/44
    port monitor FastEthernet0/43
    port monitor FastEthernet0/46
    port monitor FastEthernet0/45
    switchport access vlan 87
    no snmp trap link-status
    spanning-tree portfast

    Hi,
    I noticed you are attempting this on a 3500XL switch.I'll attach a useful reference to some constraints with SPAN on XL
    http://www.cisco.com/en/US/partner/products/hw/switches/ps708/products_tech_note09186a008015c612.shtml#topic1
    These older switches use a blocking, shared memory architecture and shared buffers for groups of 4 ports. One performance condition that is possible in this type of scenario is intermittent packet loss within the group of ports when traffic is high. This condition becomes probable when utilisation of ports start exceeding about 70% of bandwidth simultaneously on all ports. The symptom is intermittent because of the nature of  traffic is typically bursty
    Example:
    Monitor port is 48.
    Servers are 45,46,47 -100MB
    Let's say a backup is run on the servers and all servers start to hit 70% of available bandwidth. If port is monitoring, then this is = 3 x 70MB = 210MB which exceeds monitor port.
    Monitor port would see overruns drops etc
    http://www.cisco.com/en/US/partner/products/hw/switches/ps607/products_tech_note09186a0080125913.shtml#troubleshoot_interface_errors
    but the server ports could intermittently start dropping traffic because of available buffer taken up by monitor port. There's no real way to determine at what rate this will happen but something to keep an eye out for. You may isolate the monitor port to it's own group of 4.
    HTH
    Eugene

  • SPAN Port Monitoring Setup

    We have three Cicso Catalyst 3750 switches that are stacked.  The primary switch has a VLAN ( # 99 ) setup on it. The VLAN has our incoming internet connection. The LAN ports from the two redundant firewalls are routed back to the primary switch ( non VLAN ). The WAN ports on the firewalls are connected to the VLAN. There are three unused ports ( 46, 47 & 48 ) available on the VLAN. There are also a couple of available ports ( 36 & 38 ) on the primary switch that are not in the VLAN.
    We want to connect a hardware device to one of the ports on the switch that monitors network traffic. Need to connect two ports on the hardware device. One for LAN/WAN traffic, and one for the SPAN port.
    Question:
    Which port would you setup as the LAN port ? 
    Which port would you setup as the SPAN port ?
    What commands would we run to set this up ?
    Thanks

    I would suggest moving this post here: https://supportforums.cisco.com/community/6016/lan-switching-and-routing
    3750 isn't considered a small business switch.

  • HT3382 Connect from a MacBook Pro's mini display port to a Display Port monitor?

    Hello everyone,
    Is it possible to connect from a MacBook Pro's mini display port to a Display Port monitor with resolutions higher than 1920 x 1200? It seems Apple does not supply a mini-DP to DP adapter.
    However, just as they do not make a mini-DP to HDMI adapter, but they do recommend a Belkin product for this purpose.
    Is there any reason that a mini-DP to DP adapter or cable wouldn't work and support high resolutions?
    Thanks for your feedback!

    danz0r wrote:
    Hey tjk,
    Thanks for the response.
    Do you have any recommendations for a potential set up? The audio output and Apple DVI are on different sides of my MBP, which is alright, I guess I can get two long cables to handle each. I was hoping to just have my MBP closer to where I use it, with a cord nearby plugged in on one side to the HDTV and resting near where I keep my MBP for when I want to use the HDTV as an external monitor.
    With a converter like this, you can run video out of the MBP's DVI port, and miniToslink (optical) audio out of the 3.5mm stereo mini jack to the converter, then it will combine the two and output audio and video through HDMI to the monitor.
    http://www.supermediastore.com/product/u/apogee-dvi-to-hdmi-converter-spdif-opti cal-toslink-coaxial-input-output?utm_source=cj&utm_medium=aff&utm_content=HDMI+A ccessories
    Otherwise, depending on the TV's inputs, for video you could run DVI to DVI on the TV, or DVI to HDMI to the TV. For audio you could run 3.5mm stereo mini plug from the MBP to RCA adapter on the TV. Toslink/optical is also an option.

  • Daisy chain two display port monitors (Dell U2913WM) to new Mac mini Thunderbolt?

    Everything I read said that I could hook up a display port monitor to a Thunderbolt port on the mac mini.  I purchased two display port monitors (Dell U2913WM) that can be daisy chained, and hooked them up.  All I get is mirroring.  Does anyone know how to turn off mirroring with this setup?  I did not get the "uncheck mirroring" option in preferences until I hooked up the second via the HDMI port instead of a daisy chain.  The problem with that is, I cannot take advantage of the full resolution through the HDMI.  It seems I have wasted my money on two monitors.
    Looking for advice on:
    1) How to daisy chain these two Dell monitors to the mac mini and turn off mirroring and use an extended desktop, or
    2) How to take advantage of the full resolution through HDMI port?
    Any help would be greatly appreciated.
    Thanks!

    So re-reading this thread, I now realize you did exactly what I wanted to do but your issue was having a cloned vs. extended desktop. Oops!
    I believe your "nothing plugged in" issue is the cable. I'm not sure that TB cables are backwards compatible with DP - I think it's only the ports. Do you see multiple monitors in "System Preferences > Displays" if you hook the monitors up like you described in your OP?
    My Dell U2713H arrived today and it works like a charm with the supplied Mini-DP to DP cable. The built-in display on my 13" mid 2009 MBP still works if not in clamshell mode, although I will mostly use mine in my HengeDock. In the OSD of the monitor, you can access "Display Settings > Display Info" and it will show you the DP capability. Mine is only DP 1.1a and I believe to run 2 of these at full resolution you will need the bandwidth in DP 1.2 which includes MST (daisy-chaining). This could be your problem.
    Can you access the same menu in your OSD and report back what your DP compatability is?
    Thanks!
    mgb

  • [SQL QUERY] Select TCP Port Monitors and their related Watcher Node

    Hi everybody,
    I'm working on a SSRS report and SQL Query, I have no problem to find all my TCP Port Monitor (SCOM 2012 R2) based on the DisplayName, but I can't figure out how to get their related watcher nodes (in my case only 1 computer is a watcher node).
    I can't find which table, which field, contains this information..?
    Here is the query i started to write (i select * since i still searching for the right column):
    SELECT
    FROM StateView s
    INNER JOIN BaseManagedEntity me on me.BaseManagedEntityId=s.BaseManagedEntityId
    INNER JOIN MonitorView mv on mv.Id=s.MonitorId
    INNER JOIN ManagedTypeView mtv on mtv.Id=s.TargetManagedEntityType
    --where mv.DisplayName like 'Ping Target Status Check%'
    AND me.IsDeleted = '0'
    where mv.DisplayName like '%tcpmon%'
    and mv.LanguageCode = 'ENU'
    --and s.HealthState in (@state)
    ORDER BY s.Lastmodified DESC
    It would be great if someone can help me !
    Thanks,
    Julien

    Hi,
    After creating a TCP port monitor, we can find a table for this monitor under operationsmanager database :
    SELECT *
    FROM [OperationsManager].[dbo].[MT_TCPPortCheck_******WatcherComputersGroup]
    You will find the warcher computer group.
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • Varying errors 1722 & 1726: Failed to add port monitor.

    Hi guys,
    I've got a problem installing the drivers for my litle HP deskjet 3050. I seem to be going around in circles.
    I've had this problem before but solved it.....although I can't for the life of me remember how I did it. This time around I just can't seem to knock it on it's head.
    The problem began after I reloaded an older system image backup after my HDD crashed (which I've replaced with a hybrid HDD). The printer wouldn't work from the moment I first tried after the reload.
    I've followed every instruction on this forum I can find, from uninstalling, stopping/starting the spooler servie, cleaning out temporary files, switching off the firewall (including Norton Antivirus), reinstalling the software (which fails),etc.....nothing seems to get passed the point of the driver installation.
    Have you guys got any ideas on what I must be overlooking?
    Cheers,
    Wayne.

    Hi @WayneCoburg 
    You have done so much I almost don't know what to suggest! I certainly do want to help though. I did some research and came up with some steps for you to follow. Please note; some of these steps will be steps you have tried already, but I would like you try perform these steps in the order they are presented in and let me know the outcome of your efforts;
    Click here to download and run the Microsoft Fix itWhat it fixes...
    Corrupted registry keys on 64-bit operating systems
    Corrupted registry keys that control the update data
    Problems that prevent new programs from being installed
    Hold down the Windows Logo key (  ) on the keyboard and the 'R' to open the run box,  type %temp%
    Delete all files and folders from the temp folder. Choose skip if any pop ups appear saying any of the files could not be deleted
    Uninstall the software again - Uninstalling the Printer Software Instructions
    When the uninstall has completed restart the computer
    Follow these steps to reset the registry settings and options for Windows Installer.
    Hold down the Windows Logo key on the keyboard and the 'R' to open the run box
    In the Open box, type msiexec /unregister, and then click OK.
    Hold down the Windows Logo key on the keyboard and the 'R' to open the run box
    In the Open box, type msiexec /regserver, and then click OK
     *Note: there is a space between the c and the /
    If you have any difficulty with this step, please use this link to perform it another way. Restarting Windows Installer
    Download and install this Patch Microsoft Visual C++ Runtime Error (if you didn't already do this)
    Run Disk cleanup from Accessories\ System Tool < How to Delete files using Disk Cleanup
    Download and install the latest version of Adobe flash player http://www.adobe.com/support/flashplayer/downloads.html
    Restart the computer
    Turn off the Real-Time Scanning and Firewalls; The image below is a McAfee example, if you have a different antivirus program and need help disabling Real-Time Scanning and Firewalls let me know.
     Image source
    Download and run the HP Printer Install Wizard for Windows
    If the issue persists, Try the Printer install Wizard on a new admin account; These instructions are helpful, and easy to follow; Creating a New Administrator Account.
    Finally, if the issue still remains unresolved, maybe the following steps posted by another community member would be helpful. The error code is different but the solution may be the same; failed to add monitor HP Discovery Port Monitor.
    I look forward to hearing back from you.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Error 1722: Failed to add port monitor HP Discovery Port Monitor (HP Officejet Pro 8600).

    Error 1722: Failed to add port monitor HP Discovery Port Monitor (HP Officejet Pro 8600). Plus (64 bit.)
    Is there a fix or do I go buy a different brand of printer?

    Thanks, X-23, I'll try it when I get home from work!
    Jim Stinson

  • Can i wrire a port monitor in java? if yes so how?

    can i wrire a port monitor in java? if yes so how?

    you can use the java comm api and finished it.I suspect the OP means IP port and not serial/parallel
    port.
    Could also have in mind a surveillance camera looking down over the docks.

  • Operations Manager 2012 - TCP Port Monitor

    Hi,
    Is it possible to have the TCP port monitor only alert if it fails on subsequent polls, instead of the single connection failure which is the default? We have 3 GPRS connections which intermittently
    fail, so we only need to be alerted if they don't come back online after a 5-10 minute inverval and 2 failed connection attempts in a row.  We have orchestrator so perhaps a runbook needs to be created?
    Thanks

    Hi,
    Yes. The Runbook could do this trick. I think you need to make the monitors not to generate alerts when health state changes. Then use runbook to monitor the Health State, if some conditions are ture, an alert will be generated.
    I am not so familiar with Orchestrator, you may ask at Orchestrator to get answered of how to design the Runbook.
    Juke Chou
    TechNet Community Support

  • Disable port monitoring task not working

    Hi,
    On SCOM 2012 SP1 the task "disable port monitoring" is not working. When I run it shows a success message but the port\interface keeps to be monitored on scom, the ports that I'm trying to disable the monitoring are members of the Relay Network
    Adapters Group. Is there any way to fix this task or manually stop the monitoring of the port\interface ?

    Hi Carlos,
    By coincidence I ran into the same problem today.
    It can be disabled by creating an override where you target the specific port object and set the parameter enabled=false.
    I am not 100% sure this is the correct way but it works. I am assuming the disable port does something similar but I have to open up the task to confirm this.
    For now I hope this helps.
    Regards Marthijn van Rheenen
    Blog: Heading To The Clouds

  • Cisco CE500 Switch and SPAN Port Monitoring

    Does the Cisco CE500 switch support SPAN/Port Monitoring? If so, how is this configured via the browser?
    Thanks

    Please check this document on Cisco.
    http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008015c612.shtml#Cat500

  • SCOM 2012 SP1 Cisco Interface/Port Monitoring

    Hey.
    We are trying to finish our parallel rollout of SCOM 2012 (previously used 2007 R2 with xSNMP) and have ran into a snag with a port that goes to a T3 connecting two of our offices.
    The device is a Cisco 7206 router (listed as Certified in the
    latest lists). SCOM sees the port and labels it IF-47 (stupidly) during discovery and rediscovery, but won't apply any type of performance monitoring on it. I could create the override to enable one but the only monitors it shows are three rollups (High
    Discard, High Error, and High Queue Drop percentages). We need to be able to monitor utilization like any other port on the router. Ironically, SCOM has added these monitors for disabled (admin-down) ports.
    We have the other endpoint router in SCOM and have added the interface/port to the "Critical Network Adapters Group" but that only seems to monitor availability (up or down). So besides creating my own SNMP monitors from the Cisco OIDs needed, anyone
    know of a way to get this interface/port monitored for performance (i.e. utilization)?
    One peculiarity, if I look at the monitors between this interface/port and another that has the perf monitors this one has "Network Adapter (Common)" whereas the one with the perf monitors shows "netcor cisco" of multiple fashions.
    thanks!

    Hi,
    Some monitors are disabled by default. For details about the monitors, please see the section “Tuning Alerts for Network Monitoring” in the following document:
    Tuning Network Monitoring
    http://technet.microsoft.com/en-us/library/hh282073.aspx
    For utilization information, we can check the views:
    Viewing Network Devices and Data in Operations Manager
    http://technet.microsoft.com/en-us/library/hh212706.aspx
    In addition, I would like to share the following post about network monitoring:
    What Gets Monitored with System Center Operations Manager 2012 Network Monitoring
    http://blogs.technet.com/b/momteam/archive/2011/09/20/what-gets-monitored-with-system-center-operations-manager-2012-network-monitoring.aspx
    Network Monitoring with System Center Operations Manager 2012
    http://blogs.technet.com/b/ptsblog/archive/2011/11/28/network-monitoring-with-system-center-operations-manager-2012.aspx
    Thanks.
    Nicholas Li
    TechNet Community Support

Maybe you are looking for

  • Row cannot be located for updating. Some values may have been changed...

    Hello, I have a legacy application written in VB6 and using Oracle OLEDB Provider (version 9 and updated to the last ones from oracle site) I've a problem during insert of a record using recordset method (AddNew). The returned message is "Row cannot

  • Shuffle of drive letters on computer ???

    WOW, I have never heard of this and if anyone told me that this happened to them, I would without reservation tell them they are incorrect and have no idea what they are talking about.... But trust me, what I am about to describe is accurate and not

  • Tranferring frm ipod to pc for free?

    i know i've seen a thread about a free program somewhere but i cant find it anywhere! does anyone know a good free program to transfer songs on to the pc? (around 3000 of them) thanks

  • How can I avoid throwing EmptyStackException?

    The following method will throw an EmptyStackException:      * Insert HTML into {@link javax.swing.JEditorPane} using {@link javax.swing.text.html.HTMLEditorKit}      * @throws java.io.IOException Thrown if an I/O error occurs      * @throws javax.sw

  • SQL Developer Migration Workbench - Data Type Mappings

    Hi, Using SQL Developer 1.1.3.2766 to migrate a MySQL 4.1.22 database. How do I change a system defined data type mapping? I would like to map "text" data type to "varchar2". This is something I could do in OMWB. I can create a new rule but cannot de