WordPress Clear Error Log

A Seismology Log

Just another WordPress.com weblog

QuakeML and the PDE catalogue

Over the last couple of days I dealt with something that was a tremendous pain in the butt: the change in format of the PDE earthquake catalogue from its old, simple EHDF format to QuakeML. I understand the reasons for the change — QuakeML files contain vastly more information — but for someone like me who just needs a listing of earthquakes with decent locations and magnitudes, getting information out of it is a royal pain. So here’s how I (finally) got it (sort of) working.

There isn’t a standard way (that I could find) of dumping information from a QuakeML file — the most workable approach seemed to be ObsPy, a Python seismology toolkit that seems to be updated reasonably regularly. I’m not much of a Python user, but at least the installation was fairly simple:

though it has a bunch of dependencies and such (there was some minor weirdness because some of my Python packages were installed directly from Homebrew, and others from pip). I then had to learn enough Python to write my first Python script ever:

This mostly works. It takes a zipped QuakeML file (like the ones from the PDE catalogue) as an argument, and spits out the first location in the file (as the catalogue can contain multiple locations for an individual event). It’s slow — something like 3 minutes per file (representing a week of events) — and it’s the QuakeML parsing that seems to be taking all of the time.

I say “mostly works” because the script fails on about a tenth of the files. Usually it’s the ObsPy read_events function that fails, due either to a bug in ObsPy or to something malformed in the QuakeML file (I’m not in a position to evaluate which). My workaround is to unzip the weekly archive and read the events individually (using essentially the same script) — thus I only lose one bad event out of the weekly listing. This is, of course, even slower than reading a single file.

There’s another failure that sometimes happens: my script assumes that a magnitude will be present for each event, and occasionally that isn’t the case. I could fix this in the script, but instead I’ve just been using the same workaround.

Hopefully this will save someone else a little work.

The operating system (Mac OS X 10.10), that is, not the national park. I rather impulsively upgraded over the weekend, which broke a few things — here’s how I un-broke them.

  1. MATLAB — this was the big one. I stupidly failed to check, and it turns out that the MATLAB version I had installed (2012b) isn’t compatible (something to do with Java versions). I installed 2013b instead (the latest version our IT has) and applied the patch available here (requires a Mathworks account).
  2. SAC — it failed to start after the upgrade, with an X11 error. To fix it, I added a symbolic link in /usr (either /usr/X11 or /usr/X11R6, I forget which one was missing) to where XQuartz lives (/opt/X11) and that fixed the problem.
  3. Fink — my previous Fink installation continued to work, but wouldn’t update without a reinstall of a new version. I tried the new version (0.38.0) which I managed to install with some fiddling, but most of the packages I need wouldn’t work, so I went back to my old installation. I’ll give them a few months to get the packages ported (I can’t work without GMT, and gnuplot is also pretty much essential to me).

Testing mathematical notation

So, apparently WordPress now supports LaTeX. Let’s try that out. This should be a Fourier integral:

Not bad (except for the white background) — looks like it’s using actual LaTeX behind the scenes to do the rendering. Beats trying to make sense of MathML, anyway.

Getting ready for AGU

I can sum up where things are at right now with a picture:

Plan section through "pre-SPREE" tomographic model, built from Canadian and US data through August, 2009. This slice is at 250 km depth below the surface.

This is a slice through a 3-D tomography model I’ve been working on — basically, I’ve spent odd moments over the past few months measuring relative arrival times of earthquakes at various instruments in central Canada and the US. Red zones are regions where the waves travel more slowly than average, and blue zones are the converse, as determined by a rather lengthy computation that finds an image that matches all of the measurements from different directions as accurately as possible.

So what does it mean? Well, this is a look into the lithosphere — the layer below the Earth’s crust that participates in plate tectonics. So you’d think that the structure of the lithosphere would closely match that of the crust above (the grey lines), but it doesn’t. There are features that match crustal structures (like the little red zone marked “Nipigon”, above), and other features that don’t. Notably, the big blue blob I’m calling the Western Superior Anomaly is a lot smaller than the western portion of the Superior Province, the crustal region it underlies.

SKS splitting times for the same map region as above — contours and colour scale are in seconds, triangles are measurement points.

There’s another, independent line of evidence indicating that the western Superior has something unusual underneath it: the contour map above. More measurements made from earthquakes here, this time looking at the effect of mantle fabric on polarized SKS waves. If the rock in the upper mantle (including the lithosphere) has a strong fabric to it, it will cause the incoming polarized wave to split into two waves that arrive at different times. The map above shows the time difference between the two — and, looking at the contours, it seems clear that the western Superior anomaly stands out in this way as well.

So, what does this all mean? Well, I’m working on that. Hopefully I’ll have something semi-sensible to say at AGU in a few weeks.

I don’t have much to say about the human side of the Haitian earthquake except that it’s terrible, as media reports will tell you. I saw the waves coming in on our seismograph drum, which gave some idea of the distance and size of the earthquake but not the location. The location in itself is about as bad as possible — a large, shallow earthquake very close to a major city, in a country too poor to afford earthquake-resistant construction. All I can do is suggest that you donate to relief organizations and press the Canadian and other governments to get aid in place as quickly as possible.

I can, at least, say something meaningful about the seismology. Continue reading →

Peace, Love, and Moodle

Fails, successes, tears, & joys of an EdTech Advocate, Developer, & MySQL DBA

Getting a blank or undefined popup error? Check your PHP config.

After upgrading my Moodle sites to 3.3 I was met with a few errors that were simply undefinable. There was no rhyme nor reason, nor any error message displayed. They were blank. It was inconsistent and frustrating.

The error message was pretty clear once debugging was turned on and the PHP error log was examined:

Many times I leave deprecated errors and fix them when I get time; however, this one needed to be fixed immediately.

Following the super-helpful PHP notice and the PHP docs, I set

in my php.ini file and restarted Apache. Just like that, my issue disappeared.

Moodle does document this and says it is specifically for those running PHP 5.6. They also link to an officially posted bug on the PHP tracker. Reading through that, take note, developers, ini_set won’t do anything here.

So, what is this variable? HTTP_RAW_POST_DATA contains all of the raw post data from posting. It seems a tad insecure and is removed completely in PHP 7+. This isn’t limited to Moodle, so if your code doesn’t need it, and you are running PHP 5.6, go ahead and get that set.

If you are on your own server or have access to php.ini:

Make sure the below is set with no comment(;):

Shared server? Apply to your .htaccess file:

And, to verify:

Search for “phpinfo” in your Moodle site administration panel. Click on the PHPInfo link, and verify that the setting is set to -1.

How to FIX “Metric Collection Error”

A Common Issue which everyone usually faces, while new installation of Agent on any server. Agent is up and running but still status is not up in EM Console show “METRIC COLLECTION ERROR”.

Check on the server and perform following steps to resolve this Issue.

D:\oracle\product\agent12c\agent_inst\bin>emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
—————————————————————
Agent Version : 12.1.0.4.0
OMS Version : 12.1.0.4.0
Protocol Version : 12.1.0.1.0
Agent Home : D:/oracle/product/agent12c/agent_inst
Agent Log Directory : D:/oracle/product/agent12c/agent_inst\sysman\log
Agent Binaries : D:\oracle\product\agent12c\core\12.1.0.4.0
Agent Process ID : 5632
Parent Process ID : 10516
Agent URL : https://HANXXX.TEST.com:3872/emd/main/
Local Agent URL in NAT : https://HANXXX.TEST.com:3872/emd/main/
Repository URL : https://HANXXX.TEST.com:4904/empbs/upload

Started at : 2015-05-13 18:35:17
Started by user : HANXXX3$
Operating System : Windows version 6.1 (amd64)
Last Reload : (none)
Last successful upload : 2015-05-13 18:35:45
Last attempted upload : 2015-05-13 18:35:45
Total Megabytes of XML files uploaded so far : 0
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 50.84%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2015-05-14 14:17:49
Last successful heartbeat to OMS : 2015-05-14 14:17:49
Next scheduled heartbeat to OMS : 2015-05-14 14:18:49

D:\oracle\product\agent12c\agent_inst\bin>emctl upload agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
—————————————————————
EMD upload completed successfully

D:\oracle\product\agent12c\agent_inst\bin>emctl verifykey
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

—————————————————–
verifykey: Successfully Completed communication with agent
EMD pingOMS completed successfully

d:\oracle\product\agent12c\agent_inst\bin>emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
The Oracleagent12c1Agent service is stopping………….
The Oracleagent12c1Agent service was stopped successfully.

Deleted files from $ORACLE_HOME/sysman/emd/state and $ORACLE_HOME/sysman/emd/upload
D:\oracle\product\agent12c\agent_inst\bin>emctl clearstate agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
EMD clearstate completed successfully

D:\oracle\product\agent12c\agent_inst\bin>emctl secure agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
Agent successfully stopped… Done.
Securing agent… Started.
Enter Agent Registration Password :
Agent successfully restarted… Done.
Securing agent… Successful.

——————————————-
D:\oracle\product\agent12c\agent_inst\bin>emctl config agent addinternaltargets
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.

——————————————-
D:\oracle\product\agent12c\agent_inst\bin>emctl config agent listtargets
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
[agent12c1_2_HANXXX.TEST.com, oracle_home]
[HANXXX.TEST.com, host]
[HANXXX.TEST.com:3872, oracle_emd]

——————————————-
D:\oracle\product\agent12c\agent_inst\bin>emctl upload agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
—————————————————————
EMD upload completed successfully

———————————————
D:\oracle\product\agent12c\agent_inst\bin>emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.
—————————————————————
Agent Version : 12.1.0.4.0
OMS Version : 12.1.0.4.0
Protocol Version : 12.1.0.1.0
Agent Home : D:/oracle/product/agent12c/agent_inst
Agent Log Directory : D:/oracle/product/agent12c/agent_inst\sysman\log
Agent Binaries : D:\oracle\product\agent12c\core\12.1.0.4.0
Agent Process ID : 7188
Parent Process ID : 3536
Agent URL : https://HANXXX.TEST.com:3872/emd/main/
Local Agent URL in NAT : https://HANXXX.TEST.com:3872/emd/main/
Repository URL : https://HANXXX.TEST.com:4904/empbs/upload

Started at : 2015-05-14 15:27:47
Started by user : HANXXX3$
Operating System : Windows version 6.1 (amd64)
Last Reload : (none)
Last successful upload : 2015-05-14 15:32:38
Last attempted upload : 2015-05-14 15:32:38
Total Megabytes of XML files uploaded so far : 0.12
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 50.81%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2015-05-14 15:34:56
Last successful heartbeat to OMS : 2015-05-14 15:34:56
Next scheduled heartbeat to OMS : 2015-05-14 15:35:56

Finally The Agent was having Status up in Console.

WordPress.org

Open /wp-admin/ in a browser.

Adds, removes, fetches, and flushes the WP Object Cache object.

Adds, removes, and lists capabilities of a user role.

Review current WP-CLI info, check for updates, or see defined aliases.

Creates, updates, deletes, and moderates comments.

Generates and reads the wp-config.php file.

Downloads, installs, updates, and manages a WordPress installation.

Tests, runs, and deletes WP-Cron events; manages WP-Cron schedules.

Performs basic database operations using credentials stored in wp-config.php.

Create a distribution archive based on a project’s .distignore file.

Inspects oEmbed providers, clears embed cache, and more.

Executes arbitrary PHP code.

Loads and executes a PHP file.

Exports WordPress content to a WXR file.

Find WordPress installations on the filesystem.

Get help on WP-CLI, or on a specific command.

Provides internationalization tools for WordPress projects.

Imports content from a given WXR file.

Installs, activates, and manages language packs.

Imports files as attachments, regenerates thumbnails, or lists registered image sizes.

Lists, creates, assigns, and deletes the active theme’s navigation menus.

Perform network-wide operations.

Retrieves and sets site options, including plugin and WordPress settings.

Lists, installs, and removes WP-CLI packages.

Manages plugins, including installs, activations, and updates.

Manages posts, content, and meta.

Retrieves details on the site’s registered post types.

Lists or flushes the site’s rewrite rules, updates the permalink structure.

Manages user roles, including creating new roles and resetting to defaults.

Generates code for post types, taxonomies, plugins, child themes, etc.

Searches/replaces strings in the database.

Launches PHP’s built-in web server for a specific WordPress installation.

Opens an interactive PHP console for running and testing PHP code.

Lists registered sidebars.

Creates, deletes, empties, moderates, and lists one or more sites on a multisite installation.

Lists, adds, or removes super admin users on a multisite installation.

Retrieves information about registered taxonomies.

Manages taxonomy terms and term meta, with create, delete, and list commands.

Manages themes, including installs, activations, and updates.

Adds, gets, and deletes entries in the WordPress Transient Cache.

Manages users, along with their roles, capabilities, and meta.

Manages widgets, including adding and moving them within sidebars.

WordPress.org

WP Database Backup

Pro Version

WP Database Backup plugin helps you to create Database Backup and Restore Database Backup easily on single click.Manual or Automated Database Backups And also store database backup on safe place- Dropbox,FTP,Email,Google drive, Amazon S3

  • Create Database Backup
    WP Database Backup plugin helps you to create Database Backup easily on single click.
  • Autobackup
    Backup automatically on a repeating schedule
  • Download backup file direct from your WordPress dashboard
  • Easy To Install(Very easy to use)
    WP Database Backup is super easy to install.
  • Simple to configure(very less configuration), less than a minute.
  • Restore Database Backup
    WP Database Backup plugin helps you to Restore Database Backup easily on single click.
  • Multiple storage destinations
  • Store database backup on safe place- Dropbox,Google drive,Amazon s3,FTP,Email
  • Reporting- Sends emailed backups and backup reports to any email addresses
  • Exclude Table
  • Database backup list pagination
  • Search backup from list(Date/ Database Size)
  • Sort backup list (Date/ Database Size)
  • Save database backup file in zip format on local server And Send database backup file to destination in zip format
  • Documentation

Few of the Key Features

  • Database Backup easily on single click.
  • Autobackup.
  • Restore Database Backup easily on single click.
  • Store database backup on safe place- Dropbox,Google drive,Amazon s3,FTP,Email.
  • Pagination.
  • Search and sort database backup feature.
  • Documentation

Get Pro ‘WP All Backup’ Plugin

  • https://wpallbackup.com
  • www.wpseeds.com

WP All Backup will backup and restore your entire site at will, complete with FTP & S3 integration

Pro Features

  • Complete Backup
  • Create Database Backup easily on single click.
  • Autobackup Backup automatically on a repeating schedule
  • Backup Listing : Pagination.
  • Manual backup
  • Multisite compatible
  • Backup entire site
  • Exclude specific folders and files
  • Downloadable log files
  • Simple one-click restore
  • Set number of backups to store
  • Automatically remove oldest backup
  • Multiple storage destinations
  • FTP integration
  • Dropbox integration
  • Google drive integration
  • Amazon s3 integration
  • Email Notification
  • Reporting- Sends emailed backups and backup reports to any email addresses
  • ZipArchive
  • Backup zip labeled with the site name(Help when backing up multiple sites).
  • Select Backup Type: Only Database,Only Files, Complete Backup
  • Inline Help
  • Search backup from list(Date/Size)
  • Sort backup list (Date/Size)
  • Easy To Install(Very easy to use)
  • Simple to configure(very less configuration).
  • PclZip
  • Clone Site
  • Move Site
  • Change Backup folder name
  • Uses zip and mysqldump for faster back ups if they are available.
  • Exclude Tables from your back ups.
  • System Check (i.e backup folder permission, execution time etc)
  • Disk space checkup(memory available).
  • Support
  • Статусы
  • And More….

Leave a Reply

Your email address will not be published. Required fields are marked *