200 likes | 400 Views
Debugging HAWK . Tips , Tools, and Common approaches . Hector Claudio Jan. 18 2013. Special thanks to:. Randall Bollig for flow chart and training EVERYONE!! – for the help and practice. Lunch and Learn. This is meant to be quick and fast paced. You may know most of this:
E N D
Debugging HAWK Tips, Tools, and Common approaches. Hector Claudio Jan. 18 2013
Special thanks to: • Randall Bollig for flow chart and training • EVERYONE!! – for the help and practice
Lunch and Learn • This is meant to be quick and fast paced. • You may know most of this: • BUT every body (Ops, Dev) does not know the same things. • Sharing is Caring • Some items listed are NOT meant for Ops to perform. • I am always available for questions.
Tools What are we without tools? (With a few tips as we go)
Tools • KMS • LogMeIn • Fleet Reporting Builds • WinMerge • Mothership Database
KMS • Browse kiosk interface • Understanding what this entire right column means and what affects it is very important • Doctor and Survey interfaces would be good to know.
LogMeIn • Remote control • Is NOT your friend • Frozen misconceptions, lockout, all screen view, b/w, chat, audio • Command prompt • IS your friend • Can perform php actions behind • Mysql behind the scenes….no phpmyadmin • Mysqldumpfor backups and research • File manager • Great for many fixes • Backup for ‘just in case’ and later research • Small files • Large copies (firefox, mysql, all of xampp) • Be mindful of the manner in which you copy files over. Be sure to stage before overwriting • Other tools (hardware inventory, processes,dashboard,reboot)
Fleet Reporting Builds • Fleet reporting builds • Used for kiosks to tell something about itself that I need to know • Custom Build Script which tells kiosk to report to endpoint that logs information to database or file. • Example: mothership.solohealth.com/hector/kiosk_report_intel.php
WinMerge(or anything similar) • Comparison tool that compares two files. (php,js,css,txt) • Free tool – www.winmerge.org
Mothership Database • In rare situations it takes some digging through commands issued • Learn about kiosk group related tables • Learn about kiosk command related tables
Tips Macro understanding of communication between kiosks and Mothership will go a long way.
Tips • Learn and remember communication processes • How logs get from kiosk to mothership • How surveys get to kiosk • How crontab and scheduled tasks works • API endpoints on HAWK • HAWK/runtime/cron/ • HAWK/commLink/cron/ • Mothership API endpoints • Mothership.solohealth.com/api/ • Mothership.solohealth.com/processUploads/ • Mothership.solohealth.com/kiosk_management/
Tips • Get comfortable with command prompt • Approach all requests that the problem DOES exists. • Trust thy colleague • We are past the days of “It works fine on my lab” • Take reports from the general public with a grain of salt. • Challenge EVERYONES use of the words: sometimes, always, often, fleet, etc.. • Ask for facts, proof • Seek proof if not enough provided. • Be Organized (autopsy file folder)
Command Prompt (examples) • Change Directory ( cd , cd.. , cd {full path}) • Directory listing (dir , dir /p) • Up arrow key helps • Run php by first stating the location (relative or absolute) of php executable then full path to the file you want to run. Ex: • C:\xampp\php\php.exe c:\xampp\htdocs\HAWK\commLink\cron\crontab.php • Use the more tag at end of line for long output actions (ex |more) • Enter mysql via: • C:\xampp\mysql\bin\mysql.exe –u root –p –h localhost • You will be prompted for password (Eyesite123) • First command will usually be (use hawk_runtime) to change databases. • MySQL dump (backup db or table) is a little more type. Enter the mysql location, specify db and table (if applicable) then the location of where you want to place file. Ex: • C:\xampp\mysql\bin\mysqldump.exe –u root –p –h localhosthawk_runtime pages > c:\xampp\tmp\pages.sql • You will be prompted for pass • To import sql to mysql is similar to mysqldump: • C:\xampp\mysql\bin\mysql.exe –u root –p –h localhosthawk_runtime< c:\xampp\tmp\pages.sql
Methods & Approaches Still Awake?
Methods & Approaches • Of course it depends on the symptom. • My most common general approach for general kiosk status • Pull up kiosk in KMS • Load up Log me into two windows (remote control, and command prompt) • If connection is really really slow, then try command prompt only • The first goal is to determine the general status of the kiosk • With KMS • Check that the status parameters are all in proper time frames. • Check for failed commands • Sometimes spot checking for missing builds like patches
Methods & Approaches • Kiosks is not picking up command • Randall has a great flow chart to help debug this.
Methods & Approaches • Common issues on kiosk that no longer function properly • Error in build • (Assumed) Corruption of file…repaired by mass copy over • Non escaped data being transferred • Missing zip codes (soon to be no longer relevant) • Change in API or database structure in mothership, but is not compatible in HAWK • Our unknown freeze issues (possible memory, hardware, platform, browser, flash) • Or simply missed situations in development and QA phase
Methods & Approaches • Personal Suggestions • Assumption can get you in trouble. Validate steps. • Simple things you can do quickly….go ahead and knock that out. Even if it checks out fine it can present a clue to something. • Screen Grabs • Keep your actions as simple as possible. (if applicable)