Notice: register_sidebar was called incorrectly. No id was set in the arguments array for the "Sidebar 1" sidebar. Defaulting to "sidebar-1". Manually set the id to "sidebar-1" to silence this notice and keep existing sidebar content. Please see Debugging in WordPress for more information. (This message was added in version 4.2.0.) in /usr/share/wordpress/wp-includes/functions.php on line 4139 Tech Notes » 2014 » November

Scheduling Cyclic Jobs in MacOSX

How to No Comments »

Many of us UNIX old-timers are quite accustomed to cronjobs, but MacOSX has a centralized “LaunchDaemon” called launchd — to leverage it to run cronjobs gives an OS-specific, perhaps OS-preferred, method of doing so.

The TL;DR:

<?xml version=”1.0″ encoding=”UTF-8″?>

<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>

<plist version=”1.0″>

<dict>

<key>Label</key><string>com.example.rsync.SyncTheRepos</string>

<key>Program</key><string>/usr/bin/rsync</string>

<key>ProgramArguments</key>

<array>

<string>-avr</string>

<string>–delete-after</string>

<string>rsync.example.com::repos</string>

<string>~/Documents/Repos</string>

</array>

<key>EnableGlobbing</key><true/>

<key>StartCalendarInterval</key>

<dict>

<key>Hour</key><integer>3</integer>

<key>Minute</key><integer>14</integer>

</dict>

<key>ProcessType</key><string>Background</string>

</dict>

</plist>

In general, there is a lot of flexibility in setting up a launchd plist — the config info on https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/launchd.plist.5.html plus the various examples on the internet should help, but I generally take this example and re-use it.

Once this plist is saved as a local text file in ~/Library/LaunchAgents/ (for example, I’ll save mine as ~/Library/LaunchAgents/rsync-repos.plist), I activate it using:

launchd load -w ~/Library/LaunchAgents/rsync-repos.plist

If I want to disable the job, I use:

launchd unload -w ~/Library/LaunchAgents/rsync-repos.plist

The files are not modified in either case.

How to Convert Nicknames to JSON for VirtualWisdom4

fcfae No Comments »

VirtualWisdom4 enables a deeper insight to the metrics behind performance and available of large-scale data networks, but has a few challenges in the initial setup. One we see fairly often in the deployment side is the fact that few customers know what JSON is. Sure, a developer will say “JSON, yeah I got that”, but VirtualWisdom4 users are not all developers. Heck, our field staff don’t interpret JSON, don’t recognize when a “{” is where a “[” should be.

VirtualWisdom4 collects data as soon as it gets access, but that data is not aggregated into upper-level entities such as Hosts and Storage Arrays until those entities exist. In essence, VW4 collects immediately, but the data is of limited benefit until those entities are created, so creating those entities is critical to return-on-investment. The sooner we get to visualizing data, the sooner we can begin trouble-killing.

Often, it’s easier just to convert from a common format that our customers understand, or can produce from other tools, into JSON.

Read the rest of this entry »

Git-Backed Icinga

How to No Comments »

I want to make git commits to configure my icinga2 monitor: commit to a “devel” tree for config validation, commit to a “prod” tree to validate-and-activate a config.

wpg_div_wp_graphviz_1

 

Felipe Contreras has slowly converted me to using git.  I fight with git, but it seems the way forward based on critical mass of user-base, and only takes 7 more steps to do each thing, so my fingers get used to the additional commands.

 

I’m looking at a few tasks to get this done:

  1. init the repository
  2. load the example config shipped with icinga2 to pre-seed the “master” branch
  3. create “prod” (from “master”) and “devel” branches
  4. pre-commit hooks (both branches): run a “/etc/init.d/icinga2 configcheck” on the content
  5. post-commit hook on “prod”: export to running directory and “/etc/init.d/icinga2 configcheck”

Let’s see how this goes…

Read the rest of this entry »

Blog Engine Moved Again! Hello world!

Uncategorized No Comments »

The underlying blog engine for the blog stack was moved again… and since I used an import to sanitize the data, some things get restarted.  This isn’t as fatal as past moves, but we do get another “Hello World!” post 🙂

10 PRINT 'Hello World!'
20 GOTO 10

DCNM CIMXML CQL Notes

self-notes No Comments »

A while ago — ages, I’m certain — I refused to do a CIM_XML client for DCNM to be able to write name/pwwn pairs. It had nothing to do with us: it was a CISCO thing to a CISCO service, and didn’t even touch our application.

Then I refused again.

Then I refused again.

Finally, I figured I’d give it a look, but I cautioned heavily that there are a number of risks, and we needed a way to test.

So here we are, weeks later, lacking a method of testing. Because we’re not Cisco, and we’ve only purchased a little bit of Cisco product, Cisco isn’t delivering demo licenses — so we cannot test the CISCO thing talking to the CISCO service because we’re not Cisco. If I know how this is going to go: the PM is going to give up and invalidate many late nights of investigation and work behind “oh well, it was a cheap hack that took no time, right?” BTW: software is hard.

Memo to my future self (beside “just say ‘no'”), these tabs are where I got my information and where debugging notes can be reaped:

  • http://www.cisco.com/c/en/us/td/docs/switches/datacenter/mds9000/sw/nx-os/smi_s/programming/guide/smi_s/MOF.pdf
  • http://www.cisco.com/c/en/us/td/docs/switches/datacenter/mds9000/sw/6_x/programming/guides/smi-s/smi_s/smis_client.html#wp1157277
  • http://www.cisco.com/c/en/us/td/docs/switches/datacenter/mds9000/sw/5_2/programming/guides/smi-s/smi_s/profiles.html
  • http://sblim.sourceforge.net/cim-client2-doc/
  • http://sblim.sourceforge.net/cim-client2-v2-doc/javax/cim/CIMElement.html#getName()
  • http://sblim.sourceforge.net/cim-client2-v2-doc/org/sblim/cimclient/discovery/WBEMServiceAdvertisement.html
  • http://cvs.opengroup.org/cgi-bin/viewcvs.cgi/pegasus/src/Clients/cimcli/

In the Brocade space:

  • http://www-01.ibm.com/support/docview.wss?uid=nas7f530c1afd86f53d8862577c40012b9de
  • Really cool Brocade breakouts: https://github.com/dell-asm/dell-brocade/blob/master/lib/puppet/brocademodel.rb
  • It’s better because it’s in ruby: https://github.com/dell-asm/dell-brocade/blob/master/lib/puppet/type/brocade_alias.rb

In the LMI Space:

  • https://fedorahosted.org/openlmi/wiki/CimProviderHowto

… and a (nonworking for me) client that gives really cool toMof breakouts:

  • http://ter2011asic.googlecode.com/svn-history/r87/trunk/src/parser/wbem/ClientWbem.java
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in