JMX Timers and NTP

Hi,
Am using JMX Timers to execute scheduled tasks on Weblogic 7.0,they run fine
but i also use NTP to sync all servers in my production cluster,when NTP runs
all the Timers get screwed up and go haywire.This is documented in java.util.Timer
(which jmx timers are derived from) javadocs which says that the system clock
should not be tampered with after the Timers are scheduled.
Any of your folks have faced this problem bfor.
Parikshit

Timer is something that goes off at some interval, usually set to either go off one time then stop, or continually go off at a specified time period. A thread is another "process" of execution, running in parallel (as much as it can be time sliced to appear parallel in a single cpu system). So they aren't exactly one and the same.
As for timing accuracy, this is highly dependent on the OS, the hardware and probably many other factors (like number of processes running, if the bit of code your timer needs to execute is swapped out to page memory on disk, etc). However, a typical windows machine runs around 55ms timing accuracy, give or take a 100ms or so. It is not consistent by any means. The best thing I have found is the HRTimer component, but it runs through JNI and is only on windows right now. Do a google search on HRTimer (for Hi Res Timer) and you'll dig it up. The JMeter team is looking to port it to linux, aix, solaris and osx I believe so it may soon be on other platforms, but each would have their own JNI module for the specific platform it runs on.

Similar Messages

  • [solved] pacman -Su fails ("openntpd and ntp are in conflict")

    I have ntp installed. Today when I tried to do a full upgrade I got:
    # pacman -Su
    :: Starting full system upgrade...
    resolving dependencies...
    looking for inter-conflicts...
    :: openntpd and ntp are in conflict. Remove ntp? [y/N]
    error: unresolvable package conflicts detected
    error: failed to prepare transaction (conflicting dependencies)
    :: openntpd and ntp are in conflict
    If I accept to remove ntp, pacman tells me that the following packages will be upgraded:
    # pacman -Su
    :: Starting full system upgrade...
    resolving dependencies...
    looking for inter-conflicts...
    :: openntpd and ntp are in conflict. Remove ntp? [y/N] y
    Targets (155): archlinux-keyring-20121113-1 at-spi2-atk-2.6.2-1
    at-spi2-core-2.6.2-1 aurvote-1.5-1 automake-1.12.5-1
    binutils-multilib-2.23.1-1 bison-2.6.5-1 blas-3.4.2-1
    boost-1.50.0-3 boost-libs-1.50.0-3 brasero-3.6.1-1
    ca-certificates-20121105-1 colord-0.1.24-3 cronie-1.4.8-4
    emacs-24.2-3 evolution-data-server-3.6.2-1 farstream-0.2.2-1
    ffmpeg-1:1.0-2 ffmpeg-compat-20120509-2 firefox-17.0-1
    fontforge-20120731_b-2 fuse-2.9.2-1 gcr-3.6.2-2 gedit-3.6.2-1
    glib-networking-2.34.2-1 glib2-2.34.2-1 glpk-4.47-2
    gnome-desktop-1:3.6.2-1 gnome-icon-theme-3.6.2-1
    gnome-icon-theme-symbolic-3.6.2-1 gnome-keyring-3.6.2-1
    gnome-menus-3.6.1-1 gnome-mplayer-1.0.7-2
    gnome-online-accounts-3.6.2-1 gnome-panel-3.6.2-1
    gnutls-3.1.4-1 gobject-introspection-1.34.2-1
    gsettings-desktop-schemas-3.6.1-1 gst-plugins-bad-1.0.3-1
    gst-plugins-base-1.0.3-1 gst-plugins-base-libs-1.0.3-1
    gst-plugins-good-1.0.3-1 gstreamer-1.0.3-1
    gstreamer0.10-ugly-0.10.19-3
    gstreamer0.10-ugly-plugins-0.10.19-3 gucharmap-3.6.1-1
    gvfs-1.14.2-1 harfbuzz-0.9.6-1 icu-50.1-2 intel-dri-9.0.1-1
    iputils-20121114-1 khrplatform-devel-9.0.1-1 kmod-11-2
    lapack-3.4.2-1 ldns-1.6.16-1 lib32-cairo-1.12.8-1
    lib32-gdk-pixbuf2-2.26.5-1 lib32-glib2-2.34.2-1
    lib32-gnutls-3.1.4-1 lib32-harfbuzz-0.9.6-1 lib32-icu-50.1-1
    lib32-intel-dri-9.0.1-1 lib32-libdrm-2.4.40-1
    lib32-libgl-9.0.1-1 lib32-libglapi-9.0.1-1 lib32-mesa-9.0.1-1
    lib32-nspr-4.9.3-2 lib32-nss-3.14-2 lib32-pango-1.32.2-1
    lib32-pixman-0.28.0-1 lib32-qt-4.8.3-3 libcap-ng-0.7.3-1
    libegl-9.0.1-1 libgbm-9.0.1-1 libgl-9.0.1-1 libglapi-9.0.1-1
    libgles-9.0.1-1 libgsf-1.14.25-1 libgweather-3.6.2-1
    libpng12-1.2.50-2 libquicktime-1.2.4-3
    libreoffice-base-3.6.3-3 libreoffice-calc-3.6.3-3
    libreoffice-common-3.6.3-3 libreoffice-draw-3.6.3-3
    libreoffice-extension-nlpsolver-3.6.3-3
    libreoffice-extension-pdfimport-3.6.3-3
    libreoffice-extension-presentation-minimizer-3.6.3-3
    libreoffice-extension-presenter-screen-3.6.3-3
    libreoffice-extension-report-builder-3.6.3-3
    libreoffice-extension-wiki-publisher-3.6.3-3
    libreoffice-impress-3.6.3-3 libreoffice-math-3.6.3-3
    libreoffice-sdk-3.6.3-3 libreoffice-writer-3.6.3-3
    libsecret-0.12-2 libsoup-2.40.2-1 libsoup-gnome-2.40.2-1
    libtracker-sparql-0.14.4-2 libwnck3-3.4.4-1
    live-media-2012.11.08-1 logrotate-3.8.2-2 ltrace-0.7.0-1
    lv2-1.2.0-1 maxima-5.28.0-4 mesa-9.0.1-1 mkinitcpio-0.11.2-1
    mplayer-35421-1 nautilus-3.6.3-1 ntp-4.2.6.p5-11 [removal]
    openntpd-3.9p1-21 openssh-6.1p1-4 opera-12.11.1661-1
    pango-1.32.2-1 pkgfile-7-2 plotutils-2.6-3
    pygobject-devel-3.4.2-1 python-distribute-0.6.30-1
    python-pytz-2012h-1 python2-distribute-0.6.30-1
    python2-gobject-3.4.2-1 python2-logilab-astng-0.24.1-2
    python2-logilab-common-0.58.3-2 python2-matplotlib-1.2.0-3
    python2-opengl-3.0.2-2 python2-pytz-2012h-1 qjson-0.8.0-1
    qt-4.8.3-6 raptor-2.0.8-2 rfkill-0.4-6 sbcl-1.1.1-2
    sdl_mixer-1.2.12-3 shadow-4.1.5.1-2 skype-4.1.0.20-2
    sord-0.10.4-1 suil-0.6.6-1 telepathy-glib-0.20.1-1
    texmacs-1.0.7.16-1 thunderbird-17.0-1 tzdata-2012j-1
    util-linux-2.22.1-3 vi-1:050325-3 vlc-2.0.4-4
    vte-common-0.34.2-1 webkitgtk2-1.10.1-3 webkitgtk3-1.10.1-3
    wine-1.5.17-1 wxgtk-2.8.12.1-4 wxmaxima-12.09.0-1
    x264-20121113-1 xf86-video-intel-2.20.13-1 xmms-1.2.11-6
    xulrunner-17.0-1 yelp-3.6.2-1 zsh-5.0.0-3
    Total Download Size: 495.69 MiB
    Total Installed Size: 2334.87 MiB
    Net Upgrade Size: 61.25 MiB
    Proceed with installation? [Y/n] n
    How can I investigate what's the source of the problem? Is there a way to get pacman to tell me which package it is that is trying to pull in openntpd? (Or does anybody know right away how to resolve this issue?)
    Oh, by the way: "pacman -Sii openntpd" says
    Required By : networkmanager-dispatcher-openntpd
    but I don't use networkmanager.
    Last edited by halun (2012-11-23 07:54:51)

    Ha, how stupid of me...
    I thought openntpd was being pulled in, but it was already installed (by me, apparently) although I've never used it. Removing it by hand before upgrading resolved the problem. Thanks!

  • JMX, Firewall and javaagent option

    Hey all,
    I'm working on setting up JMX monitoring on the JVMs running in our environment. Most of those JVMs are running third party applications supplied by our customers and are heavily protected by firewalls. So i needed to use the JavaAgent strategy to be able to set a fixed port for the JMX agent. (see: http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html)
    This all works very nice except that the JVM will never exit. The RMI Reaper is a non-daemon thread and will have to be stopped manually before the JVM will shutdown. The application has no knowledge of the RMI Reaper (as it is started from the premain method). A ShutdownHook doesn't work because those are called after the JVM decided to shutdown or when an external event is triggered (Ctrl-C) for example.
    For now i have this horrible workaround. I create a thread that checks if there is still a main thread in the JVM. If there isn't it shuts down the JMX server and that allows the JVM to close down. Is there a better way of doing this? below is the code:
    public class JMXAgent {
        private static JMXConnectorServer cs;
        private static Logger logger;
        public static void premain(String agentArgs, Instrumentation inst) {
               /** snip */
               JMXServiceURL url =
                        new JMXServiceURL("service:jmx:rmi://0.0.0.0:" + RMIConnectorPort + "/jndi/rmi://:" + RMIRegistryPort + "/jmxrmi");
                cs = JMXConnectorServerFactory.newJMXConnectorServer(url, env, mbs);
            // Setup the failsafe
            Thread failsafeThread = new MainCheckerThread();
            failsafeThread.start();
            logger.fine("MainChecker Thread created.");
            // Setup the shutdown hook
            Thread shutdownThread = new ShutdownThread();
            Runtime.getRuntime().addShutdownHook(shutdownThread);
            logger.fine("SchutdownHook implemented.");
        public static void stop() {
            try {
                logger.info("Stop called");
                cs.stop();
            } catch (IOException ex) {
                ex.printStackTrace();
         * Shutdown thread that allows the tracer to write out any final
         * information.
        private static class ShutdownThread extends Thread {
            @Override
            public void run() {
                JMXAgent.stop();
                Runtime.getRuntime().halt(0);
        private static class MainCheckerThread extends Thread {
            @Override
            public void run() {
                boolean found = true;
                while (found) {
                    Logger.getLogger(this.getClass().getName()).finest("Ping!");
                    ThreadGroup root = Thread.currentThread().getThreadGroup();
                    while (root.getParent() != null) {
                        root = root.getParent();
                    Thread[] list = new Thread[400];
                    int threads = root.enumerate(list, true);
                    found = false;
                    for (int i=0; i<threads; i++) {
                        if (!list.isDaemon()) {
    if (list[i].getName().equals("main")) {
    found = true;
    if (!found) {
    /** No main found, stop the RMI server */
    JMXAgent.stop();
    } else {
    try {
    Thread.sleep(10000);
    } catch (InterruptedException ex) {
    JMXAgent.stop();
    found=false;

    Hi Hugo,
    This is a very interesting question.
    What happens here is that the RMI object exported by the JMX connector server prevents
    the RMIReaper thread from terminating: as long as the JMX connector server is active, its
    exported RMIServer object will remain active, and the RMI Reaper thread will stay there
    waiting for the RMIServer object to be unexported.
    This is in fact a feature: JMX connector servers where designed to be controlled by
    the application itself. In the usual way of using JMX Connector Server, you would start your
    server in main() (or some application equivalent of main) and stop it later on before exiting
    your application.
    Things got a little more complex when we introduced the 'out-of-the-box management'.
    In the 'out-of-the-box management' the default connector is not controlled by the application
    but by the VM - or more exactly by an agent loaded in the VM. As you rightly noticed, the
    agent has no idea as to when the application (the main) will exit.
    The default 'out-of-the-box management' agent is thus conspiring with RMI (using sun
    private APIs) to export its RMIServer object, so that its exported RMIServer doesn't
    prevent the RMI Reaper thread to terminate. These APIs are unfortunately private and
    non portables (and low-level).
    Maybe we should think of supporting some kind of 'daemon connector servers' for the future.
    The ability of starting JMX Connectors servers in premain agents obviously makes this desirable.
    Concerning your 'hack' that detects the end of the main thread I will make two observations:
    1) such a hack might work if indeed the application is expected to exit when the main thread
    terminates. This is not always the case - for instance consider this:
        public void main(String[] args) {
               final Thread myMainThread = new Thread("My real main thread") {
                     public void run() {
                            try {
                                  System.out.println("Strike <return> to exit: ");
                                  System.in.read();
                            } catch(Exception x) {
                                  x.printStackTrace();
                 myMainThread.start();
          }Such an application will wait for the user to strike enter to exit, although the main thread is
    already terminated and gone. So the termination of main thread doesn't necessarily means
    that the application is finished.
    2) The concept of detecting a main thread is tenuous. What happens if an application does
    new Thread("main") ?
    This being said - detecting the absence of "main" thread might be sufficient to your needs in
    most of the case. If you simply call JMXConnectorServer.stop() when you detect that the
    main thread is no longer there - the only risk you will be taking is stopping the
    JMXConnectorServer ahead of time, before the application actually exits. If you want
    to implement such a hack - you might wish to use the following logic:
        // Attempts to find a "main" thread
        public static Thread findmain() {
            // When the premain agent is loaded from the command line the
            // current thread is the main thread....
            final Thread current = Thread.currentThread();
            if (current.getName().equals("main")) return current;
            // If the premain agent was loaded from the attach API, or by some
            // other means, the current thread might not be the main thread.
            // Try to find a main thread using Thread.enumerate()
            // The main thread should be already there, allocate some
            // more space than needed just to be sure we do get it, even if
            // new threads are created in between.
            final Thread[] all = new Thread[Thread.activeCount()+100];
            final int count = Thread.enumerate(all);
            // Try to find the main thread
            for (int i=0;i<count;i++) {
                if (all.getName().equals("main")) return all[i];
    return null;
    public static void premain(String agentArgs)
    throws IOException {
    final JMXConnectorServer cs = .....
    cs.start();
    final Thread main = findmain();
    final Thread clean = new Thread("JMX Agent Cleaner") {
    public void run() {
    try {
    if (main != null) main.join();
    System.out.println("main thread exited...");
    } catch (Exception x) {
    x.printStackTrace();
    } finally {
    try {
    System.out.println("cleaning up JMX agent...");
    cs.stop();
    } catch (Exception x) {
    x.printStackTrace();
    clean.setDaemon(true);
    clean.start();
    If you really want your JMXConnectorServer to stop() at the latest possible time, you could
    for instance modify this logic to find the first non daemon thread (excluding RMI Reaper and
    DestroyJavaVM threads), join it, and loop over this until the only non daemon thread that
    remains is/are the RMI Reaper threads, in which case you would close the
    JMXConnectorServer.
    This would not be completely foolproof either because the normal behavior of the application
    could precisely be to be held alive by an exported object, and waiting on some
    external communication to stop. So even counting the non-daemon thread until only
    the RMI Reaper threads remain doesn't necessarily means that the application is
    finished...
    Here is an example of CleanThread class that implements the logic above:
    public class JMXAgent {
        public static class CleanThread extends Thread {
            private final JMXConnectorServer cs;
            public CleanThread(JMXConnectorServer cs) {
                super("JMX Agent Cleaner");
                this.cs = cs;
                setDaemon(true);
            public void run() {
                boolean loop = true;
                try {
                    while (loop) {
                        final Thread[] all = new Thread[Thread.activeCount()+100];
                        final int count = Thread.enumerate(all);
                        loop = false;
                        for (int i=0;i<count;i++) {
                            final Thread t = all;
    // daemon: skip it.
    if (t.isDaemon()) continue;
    // RMI Reaper: skip it.
    if (t.getName().startsWith("RMI Reaper")) continue;
    if (t.getName().startsWith("DestroyJavaVM")) continue;
    // Non daemon, non RMI Reaper: join it, break the for
    // loop, continue in the while loop (loop=true)
    loop = true;
    try {
    System.out.println("Waiting on "+t.getName()+
    " [id="+t.getId()+"]");
    t.join();
    } catch (Exception ex) {
    ex.printStackTrace();
    break;
    // We went through a whole for-loop without finding any thread
    // to join. We can close cs.
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    try {
    // if we reach here it means the only non-daemon threads
    // that remain are reaper threads - or that we got an
    // unexpected exception/error.
    cs.stop();
    } catch (Exception ex) {
    ex.printStackTrace();
    public static void premain(String agentArgs)
    throws IOException {
    final JMXConnectorServer cs = .....
    cs.start();
    final Thread clean = new CleanThread(cs);
    clean.start();
    Thanks for bringing this to my attention! I'm probably going to have to update my entry
    on this subject at
    http://blogs.sun.com/jmxetc/entry/connecting_through_firewall_using_jmx
    Hope this helps,
    -- daniel
    http://blogs.sun.com/jmxetc

  • MD5 and NTP on solaris

    Hello
    I want to use a solaris box as an NTP server but the cisco boxes use MD5. My questions are:
    Is MD5 supported on Solaris?
    If not is there an alternative that both support?
    Are there any configuration docs for MD5 and NTP for solaris?
    TIA
    Andrew

    Sure !! support
    You must set the key at /etc/inet/ntp.keys
    somthing like this
    4 M DonTTelL
    6 M hElloWorld
    22 M ImASecret
    M refer to MD5 encription

  • Lms install without dns server and NTP

    I know it sounds weird but ATM the deployment does not include this two cause the network is meant to be totally closed
    and ntp server will be implemented soon
    is there a way to ovecome this?
    how to set time in appliance bios? UTC? localtime?
    domain? (localdomain)?
    dns? (127.0.0.1)?
    thank you in advance

    It can talk NTP and DNS to any device on the network supporting the protocol.
    LMS talks NTP but takes the time from anyone. It doesn't verify the stratum. Any switch/router talking NTP will do.
    You could even run a DNS service on the server it self.
    Cheers,
    Michel

  • Call Timers and Message Counters ?? Where are they ?

    I mentioned this in another thread but will make it clearer by putting in the title.
    Where are the call timers and message counters on the 9105 ? I have 300 mins to use a month and 1000 texts so would like to keep tabs on how many I have left to use but have looked everywhere and can't find them.
    All I can find is last call and total call duration. Not much use really
    cheers

    sure .... when you deleted the tv show last night when it said removed..... was your ipod connected to your computer ... because if it wasnt ... then it just removed the tv show from your PLAYlist, but is obviously still there ... so just make sure your ipod is connected to your computer before deleting ... when it's connected to the computer and deleting ... it WILL delete the show from your ipod.

  • Tree from XML (JMX monitoring and management application)

    I am trying to create a tree structure from XML. I am setting
    the below XML as the dataProvider for the tree.
    Now I only want to see the "element" labels in the tree
    structure. But I also see the operationList and the operations
    under it too. Is there any way I can filter these out from the tree
    structure ?
    The reason why I have the operations is that I have to
    display them on the right hand side, i.e whenever someone clicks on
    an element the operations corresponding to that have to be
    displayed on the right hand side.
    If you see the "flex-admin" application under the livecycle
    data services ... my applications is exactly similar to that.
    If anyone needs more information, I would be happy to
    provide.
    <?xml version="1.0" encoding="UTF-8"?>
    <centralmbeanserver>
    <element label = "FMC-DropCopies-QA" canonicalName =
    "CentralMBeanServer:App=FMC-DropCopies-QA" >
    <element label = "Cache Manager" canonicalName =
    "CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Cache Manager"
    >
    <element label = "SACFixFilterRulesCache" canonicalName =
    "CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Cache Manager,DB
    Cache=SACFixFilterRulesCache" >
    <operationList>
    <operation name = "reloadDBCache" returnType =
    "java.lang.String">
    </operation>
    </operationList>
    </element>
    <element label = "SACFIXExecBrokerMapCache" canonicalName
    = "CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Cache
    Manager,DB Cache=SACFIXExecBrokerMapCache" >
    <operationList>
    <operation name = "reloadDBCache" returnType =
    "java.lang.String">
    </operation>
    </operationList>
    </element>
    </element>
    <element label = "Source Manager" canonicalName =
    "CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Source Manager"
    >
    <operationList>
    <operation name = "enableAllMsgSources" returnType =
    "void">
    </operation>
    <operation name = "disableAllMsgSources" returnType =
    "void">
    </operation>
    <operation name = "listMsgSourceNames" returnType =
    "java.util.List">
    </operation>
    <operation name = "reloadSources" returnType = "void">
    </operation>
    </operationList>
    <element label = "CS-SACFIX6-SS" canonicalName =
    "CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Source
    Manager,Msg Source=CS-SACFIX6-SS" >
    <operationList>
    <operation name = "enableMsgSource" returnType = "class
    java.lang.String">
    </operation>
    <operation name = "disableMsgSource" returnType = "class
    java.lang.String">
    </operation>
    </operationList>
    </element>
    <element label = "CS-SACFIX1-SS" canonicalName =
    "CentralMBeanServer:App=FMC-DropCopies-QA,Componet=Source
    Manager,Msg Source=CS-SACFIX1-SS" >
    <operationList>
    <operation name = "enableMsgSource" returnType = "class
    java.lang.String">
    </operation>
    <operation name = "disableMsgSource" returnType = "class
    java.lang.String">
    </operation>
    </operationList>
    </element>
    </element>
    </element>
    </centralmbeanserver>

    How is the WebSphere node connected to the cluster? Is it using TCMP? Extend?
    Local, Distributed, Replicated, Near, Overflow, External and Optimistic cache statistics appear in the Coherence JMX server. However, near and local caches created on extend nodes do not appear. Therefore the -Dtangosol.coherence.management.remote=true on an Extend client will not register the near or local caches.
    Thanks,
    Everett

  • JMX/RMI and Automatic Code Downloading

    There is a brief discussion of automatic code downloading in the JMX Best Practices document (http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/best-practices.jsp#mozTocId348704), but not enough to actually implement it.
    Would someone be kind enough to point me to some documentation on the subject, and/or maybe provide a few pointers?
    Thanks!
    Steve

    Hi Steve,
    If you want to know more about RMI dynamic code downloading have a look at the following link:
    http://download.java.net/jdk6/docs/technotes/guides/rmi/codebase.html
    You should also know that you can supply a ClassLoader to both the JMXConnectorServer and JMXConnector at instantiation time in the environment map. This ClassLoader will be used by the JMX connectors to serialize/deserialize the method parameters and return values when getting and setting attributes, or invoking operations on a given MBean.
    If you want to know more about how classloading works within the JMX connectors have a look at Chapter 13 "Connectors" in the JMX 1.4 specification:
    http://download.java.net/jdk6/docs/technotes/guides/jmx/JMX_1_4_specification.pdf
    Regards,
    Luis-Miguel Alventosa
    JMX Java SE development team
    Sun Microsystems, Inc.

  • Firewalling and NTP (Time) troubleshooting

    Hi all.  Recently after switching to using a Cisco router (891W, IOS 15.2) instead of a different vendor's router at our site, I began to notice that the time sync on the Windows domain is off.  This is causing major domain functionality problems.  This is a small business so there is a single domain controller, and it is configured to get time from a source on the Internet. 
    It's been a while since I set this up on the server so I forget offhand the Internet time server, but the current firewall config for the router matches what I had on the previous non-Cisco router.  I'll check into if the Internet time server is th eproblem but those don't tend to go down a lot to my knowledge.  The only thing that changed was this router and immediately after is when the problems began. 
    However in retrospect I wonder if the firewall is even correctly set up.  Currently I have udp port 123 open from the outside going to the inside IP of the domain controller on the LAN (using static NAT).  But as I think about this, I'm sure that time update traffic is not initiated from the time source (Internet-based time server) but rather by the time client (the domain controller).  Please correct me if I'm wrong. 
    So then with a stateful firewall and provided there are no restrictions from inside to outside for NTP, I should not have to open udp 123 from the outside at all, but instead just allow the inside server to request time from the outside, using whatever dynamic port the firewall allocates. 
    Is this right?  Again, ever since we switched to using the Cisco router, time sync is not working. 
    Thanks very much. 

    You're thinking is exactly correct. As a test you could also set the router to pull time from the public NTP server and see if it synch's.
    ntp server [ip of NTP server] prefer
    To see if it's synch'ing
    show ntp association
    show ntp status

  • What to do with ntp.conf and ntp.conf.pacnew

    Hi.
    I don't know if simply replace it with the pacnew.
    My current ntp.conf
    # With the default settings below, ntpd will only synchronize your clock.
    # For details, see:
    # - the ntp.conf man page
    # - http://support.ntp.org/bin/view/Support/GettingStarted
    # - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
    # Associate to public NTP pool servers; see http://www.pool.ntp.org/
    server 0.pool.ntp.org iburst
    server 1.pool.ntp.org iburst
    server 2.pool.ntp.org iburst
    # Only allow read-only access from localhost
    restrict default noquery nopeer
    restrict 127.0.0.1
    restrict ::1
    # Location of drift
    driftfile /var/lib/ntp/ntp.drift
    the ntp.conf.pacnew
    # For additional information see:
    # - the ntp.conf man page
    # - http://support.ntp.org/bin/view/Support/GettingStarted
    # - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
    # Associate to public NTP pool servers; see http://www.pool.ntp.org/
    server 0.arch.pool.ntp.org
    server 1.arch.pool.ntp.org
    server 2.arch.pool.ntp.org
    server 3.arch.pool.ntp.org
    # By default, the server allows:
    # - all queries from the local host
    # - only time queries from remote hosts, protected by rate limiting and kod
    restrict default kod limited nomodify nopeer noquery notrap
    restrict 127.0.0.1
    restrict ::1
    # Location of drift file
    driftfile /var/lib/ntp/ntp.drift
    Thanks.

    jasonwryan wrote:It depends which pool servers you'd like to sync to. I set mine to ones in my region.
    thanks.
    I did not remember what I did. If I replace it with the pacnew, will I get problems?

  • Timers and quite a lot code

    i have a certain piece of code that when i invoke it pressing a jbutton everything it's ok.
    i execute it in a background thread .
    but i want to schedule it to execute every minute let's say .
    i tried both java.util.timer and swing timer to start the back ground thread but then my code executes more than one tme in a magic way for me. !!!!!!
    i would be more than grateful if anyone could give me a hint.
    i feel that the problem is because timers are designed to execute only small pieces of code
    Thanks in advance
    mits

    Which schedule method did you use on the Timer? Some schedule methods are for repeated events, some methods are for onetime events.
    Cheers,
    --Arnout                                                                                                                                                                                                                                                                                                               

  • NAM and NTP

    I have a NAM blade in my 6513. I would like the packet captures to be time stamped with NTP time. I configured the NAM to pull time from the switch which uses NTP. There doesn't seem to be a way to get the packets stamped with the NTP time.

    Thanks for replies. I have set the time for:
    Current NAM System Time: Thu 06 Jul 2006, 09:09:35 PDT
    Synchronize NAM System Time With: X Switch
    The above shows that time is accurate, the switch gets it's time from NTP and the NAM gets it's time from the switch. The problem is that captures are not time stamped with the NTP absolute times.
    Times in the capture decodes start with 0.000, as a reference, and count up from there, not absolute times. Is there a way to make them true NTP times?
    I also tried setting the NAM's time source to NTP, using the gateway address for the NTP source. That produced the same results.
    There appears to be no real NTP time stamping capability, something that the Fluke Optiview Series II Gigabit sniffer won't do either, even from it's XP OS level.
    Thanks again. It appears that I may need to find a better method of using relative times or investigate other types of sniffers to run my tests, the sources of which are done in NTP times but not ethernet.

  • JMX Monitoring and Operations on Processors

    Hi,
    3 questions:
    1.) Is there any way I can view the current state of a particular time window (i.e. retrieve a List of events) thru JMX api?
    2.) Is it possible to clear the processor/channel contents without having to undeploy the application? (even implicitly by a sending a global heartbeat that will be cascaded to all processors)
    3.) Just to confirm, OSGI stop command causes all heap allocated to a particular application to be candidate for GC?
    Regards,
    Jarell

    Hi,
    1) No, there is no JMX API for doing this. You could, however, join to these view and output the whole relation (RSTREAM).
    2) No, this would be have to modeled in the application, for example, by setting the CQL queries to use an application-timestamped window, and sending heartbeats.
    3) Yes, for example, any thread that might have been used by a adapter, would have been let go. However, note that if it is a custom user-provided adapter, it is still the user's responsibility to release resources that might have been acquired in the suspend() callback.

  • Custom jmx client and jconole

    hi,
    i have a problem with a custom jmx client. i am connecting to activemq running under camel.
    this is the business part of the client :
    url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://sandbox:1099/jmxrmi");
    jmxc = JMXConnectorFactory.connect(url, null);
    mbsc = jmxc.getMBeanServerConnection();
    Set<ObjectName> beanNames = mbsc.queryNames(new ObjectName(
    "org.apache.activemq:BrokerName=localhost,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.a"), null);
    MBeanAttributeInfo[] mBeanAttrInfo = mbsc
                                  .getMBeanInfo(beanName).getAttributes();
    MBeanOperationInfo[] mBeanOpInfo = mbsc.getMBeanInfo(beanName)
                                  .getOperations();
                        for (int i = 0; i < mBeanAttrInfo.length; i++) {
                             MBeanAttributeInfo attInfo = mBeanAttrInfo;
                             echo("Attribute : " + attInfo.getName() + " Value : "
                                       +mbsc.getAttribute(beanName, attInfo.getName()));
    so, i make the connection, retrieve the attributes and display them.
    the problem is that, for the same address "service:jmx:rmi:///jndi/rmi://sandbox:1099/jmxrmi"
    jconsole shows me attributes with a different value then my client. Not to mention that
    the operations don't return anything.
    any ideas on why the value of the attributes will be different between jconsole and my custom client ?
    thanks

    hi,
    i have a problem with a custom jmx client. i am connecting to activemq running under camel.
    this is the business part of the client :
    url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://sandbox:1099/jmxrmi");
    jmxc = JMXConnectorFactory.connect(url, null);
    mbsc = jmxc.getMBeanServerConnection();
    Set<ObjectName> beanNames = mbsc.queryNames(new ObjectName(
    "org.apache.activemq:BrokerName=localhost,Type=Topic,Destination=ActiveMQ.Advisory.Consumer.Queue.a"), null);
    MBeanAttributeInfo[] mBeanAttrInfo = mbsc
                                  .getMBeanInfo(beanName).getAttributes();
    MBeanOperationInfo[] mBeanOpInfo = mbsc.getMBeanInfo(beanName)
                                  .getOperations();
                        for (int i = 0; i < mBeanAttrInfo.length; i++) {
                             MBeanAttributeInfo attInfo = mBeanAttrInfo;
                             echo("Attribute : " + attInfo.getName() + " Value : "
                                       +mbsc.getAttribute(beanName, attInfo.getName()));
    so, i make the connection, retrieve the attributes and display them.
    the problem is that, for the same address "service:jmx:rmi:///jndi/rmi://sandbox:1099/jmxrmi"
    jconsole shows me attributes with a different value then my client. Not to mention that
    the operations don't return anything.
    any ideas on why the value of the attributes will be different between jconsole and my custom client ?
    thanks

  • UCCX Failover and NTP

    According to what I've found in UCCX 9.0 installation guides, the secondary node in a HA installation looks at the primary for NTP. What happens in the case of failover when the primary is unavailable?
    Thanks in advance,
    Dillon

    When you issue a "show ntp status" on the secondary node, it in fact does list the primary node's address as its NTP source.  This is true whether the secondary node is Slave or Master.
    With that, in the event of a failover between UCCX nodes, as long as the primary node was reachable on the network, the secondary will continue to sync its clock to it.
    However, if the primary is offline all together, then this would mean that the secondary's clock could start to drift.  This is no different in a healthy UCCX HA pair when the NTP servers go offline and then the Primary's clock starts to drift.
    I'm not positive on what this looks like in production, but I would suspect it's not critical for the secondary to keep processing calls.  It doesn't depend on the time on any other server to function properly.  Maybe the log files will have timestamps which do not line up with your CUCM log files.
    Since we're on the topic of extended outages, if you do take a large enough hit to your primary node that you are worried about time drift, then you also have to consider this in an HAoW environment:
    Data in Agent Datastore, Historical Datastore and Repository Datastore of Informix IDS database start merging after the network partition is restored and this could potentially generate heavy data traffic over the WAN. Cisco recommends restoring the WAN link during after hours to minimize the performance impact.
    Source: UCCX SRND, Page 4-12
    Anthony Holloway
    Please use the star ratings to help drive great content to the top of searches.

Maybe you are looking for