Posts

Linux tools under Windows

Microsoft Apps in Window Ubuntu on Windows allows you to use Ubuntu Terminal and run Ubuntu command line utilities including bash, ssh, git, apt and many more.   WSL on the Microsoft store = The Windows Subsystem for Linux Linux VMs Pre-built Linux Images through VMWare and VirtualBox (you will have to install one of these VMs first) [from Coursea Git&GitHub W1 forum] VMs https://www.virtualbox.org/ https://www.vmware.com/products/workstation-player.html Linux Platforms https://ubuntu.com/  Education, general Linux based on debian https://www.debian.org/ https://www.raspbian.org/ https://www.centos.org/

Getting started with Git

Best Resources: Git Book from GitHub   Book starts explaining version control, then install, then config and continues as git is used locally, to branches, to uploading to gitHub, and beyond to collabrating. Git Docs Getting git 0)    Check if  git already installed?  From cmd line: git --version   to see if installed  Installed? Skip to 2) 1)  (Ch.1.5) Install Git - by going to Git docs or online book and follow directions for your O/S. 2)  (Ch.1.6)  First-Time Git Setup using git config  set your name, email, and optionally editor and more. Basic git config settings: Identity git config --global user.name "John Doe" git config --global user.email johndoe@example.com Editor git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin" (lab1.3) End of Line Preferences git config --global core.autocrlf true git config --global core.safecrlf true Check your settings: ...

Avoiding Slowness

Don't exaust resources find ways to free up  don't use in parallel unless have enough resources Don't repeat a slow action if result can be stored for faster access Avoid expensive actions if needed do once and store before using in loop keep only what is needed ex: last 5 users who logged on break out of loop when found what is needed

Monitoring Tools

  Most or all tools mentioned from Google Automation: Trouble Shooting & Debugging Coursera course. Resources include: CPU  top shows % cpu used;  system usage; Total should not be more than the # of cores time <call to script or pgm> the memory  memcached the disk IO topio the network connection iftop - monitors bandwidth the graphics card multiple ab -n <times> to get the average timing of <times> requests code profilers profilers are specific to each programming language. So we would use: gprof to analyze a C program c-Profile module to analyze a Python program.   pprofile3 for example: pprofile3 -f callgrind -o profile.out   < call to script or pgm> kcachegrind   a graphical interface for looking into pprofile 3 output files used to see  which functions are called by our program,  how many times each function was called and  how much time are programs spent on each of them. Where and what is the ...

Trouble Shooting & Debugging - Tools

 Initially tools mentioned in Google Automation: Trouble Shooting & Debugging Coursera course Useful Tools WEEK 2 Videos - review for tools! to get more info: tcpdump  and  Wireshark  can show us ongoing network connections, and help us analyze the traffic going over our cables ps, top, or free  can show us the number and types of resources used in the system.   strace  to look at the system calls made by a program, or  ltrace  to look at the library calls made by the software. Debuggers  (often programming language specific) let us  follow  the code line by line,  inspect  changes in variable assignments,  interrupt  the program when a specific condition is met,  and more . we can modify the code,  we can change it so that it provides more  logging  information. To check for  IO problems : iotop  similar to top that lets us see which processes are using the most i...

Trouble Shooting & Debugging - Terms & Steps

Notes and basics from Google Automation: Trouble Shooting & Debugging Coursera course Trouble shooting - fixing system Debugging - fixing program code Cache stores data in a form that's faster to access than its original form.   M emory leak -  when memory which is no longer needed is not getting released.  WEEK 2 Videos - review for terms and steps! Debugging Process figuring out the problem and its solution require some creativity.  We need to come up with new ideas of what could be failing, and ways to check for that.  And once we know what's failing, we need to imagine how to solve it.  To take it a step further, once we've solved a problem, we can start thinking about how to prevent it from happening again Steps to solve a problem Gather information super important resource to solve a problem is the reproduction case , which is a clear description of how and when the problem appears Finding the root cause most difficult step.  key: ...