Skip to content

uselog demo with jquery

With a focus on interactive video search for a thesis topic, having a dynamic environment is critical.  Within my lab and in my own research, a web-based environment has been the platform of choice.  This way we don't have to worry about specific operating systems, compiling with the right set of binaries, and dealing with a lot of graphic primitives.  With that said, within browsers, a new set of AJAX libraries has become popular.  Interested parties should look elsewhere for comparisons, but my library of choice is jQuery. This was chosen kit because it's pretty easy to understand, fairly lightweight, has spectacular documentation and has an ever-growing plugin base.  One example of that diverse plugin-space is the graph example on this page.

Live Example

Utilizing features from modern browsers, like the 'canvas' tag, a plugin called flot was developed for plotting basic graphs.  In only a few hours, this demo was cobbled together to plot some of the uptime and usage data being captured for my shared host.  This simple page allows the plotting of memory resources, processor load, and active users.

Bad Browser?

It worked for me on IE7, Safari, and Firefox. Perhaps you can do something with the excanvas library or just pop open a better browser.

Live Demo

Interactive Uptime Demonstration (2 days of activity, time is PST [GMT-8], highlights between 12-6 am, samples every 3 minutes)
-
Module not active. Please make sure that javascript is enabled in your browser!
Module not active. Please make sure that javascript is enabled in your browser!

Technical Mechanics

  • flot - the jQuery plugin whose functionality is shown here; thanks to the author for the numerous examples which are actually a far better illustration of the library than the documented API
  • mysql - store/query the results from the unix commands 'uptime'
  • php - server-side processing of query range and query type
    • JSON from pear - basic formatting for jQuery returned results

2 Comments

  1. David Gibbon wrote:

    Thanks for posting the page.
    This is a topic near and dear to my heart.

    --Dave.

    Tuesday, December 2, 2008 at 4:02 pm | Permalink
  2. grapeot wrote:

    this is amazing... i'll also try to deploy one on my ipod 😉 thanks Eric!

    Thursday, October 21, 2010 at 11:31 am | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*
CAPTCHA Image
*