Posts

How to Setup an Automatic Investment Plan

An Automatic Investment Plan (AIP) is offered by most brokerage firms.  This do it yourself strategy uses a few simple principles which are ideal for beginning investors.  It may also be possible to avoid brokerage fees entirely. The plan is to use Dollar Cost Averaging with automation, and look for the lowest possible fees.  The idea of Dollar Cost Averaging is to select an amount to invest regularly, and something to invest in while ignoring the price fluctuations of the market.  Since it is difficult to consistently time the market, or beat the market, a low cost index fund is an easy way to get started. Get Started Decide how much you want to invest each month, and then get started right away.  You can always make adjustments later, but try to set it up as a "set it and forget it" type of investment. 1.) Open brokerage account(s) (Roth IRA, brokerage, Traditional IRA). Optional:  Also open a free cash management, or checking account with the brokerage ...

Create a Symlink as a Workaround for Partition Full Error

Sometimes, a mounted partition does not have enough space, and it may take time to expand the LVM volume, if there is not currently enough physical space available, and a separate team handles storage.  Of course making a separate partition is a more proper fix, and LVM is flexible enough to accommodate the changes, but sometimes space is filling up, and something has to be done right away.  Maybe /var/log, or /opt is filling up, and you did not think ahead to make it a separate partition. As a quick workaround, it is fairly common to use a symbolic link, or as sysadmins affectionately call it, a symlimk. Let's say an application wants to install under /opt, and you are out of space in /opt, but have plenty of space in /app.  You can use a symlink to trick the system into thinking that it is using /opt, when in fact it is using /app/opt. I like to perform a directory move and symlink creation at the same time.  Note that both /opt and /app already exist, but w...

Career Resources

I thought it might be helpful to point out some career resources for those who may be interested, or actively involved in job hunting.   I realize we all  need to update our resume from time to time, and some of you may not have a LinkedIn profile. Here are some learning resources, and some useful links for career research.   Some of you know me as someone who is always promoting self-learning. Learning Resources Paid Learning Sites are often made available by your employer, so check to see if you have a subscription, or if you can expense it (get reimbursed for the expense).  It doesn't hurt to ask. http://www.safaribooksonline.com  -- Huge selection of technical books, videos, seminars, etc. http://www.pluralsight.com   -- High Quality, from overview to advanced topics for programmers http://www.lynda.com   -- High Quality, some topics are not very advanced, but courses are very well done https://skillport.com  -- Books,...

Use ssh instead of ping to check server status

Server Availability cannot always be checked by using ping, since often a secured subnet will not allow traffic back.  That common practice of dropping packets is an attempt to hide servers and provide additional security, but it can make troubleshooting more difficult. Since ssh is typcially running and responding on any linux servers that need to be managed, check_ssh seems to be more practical than the default check_ping as the check_command for each host definition in Nagios. This simple shell script uses a Nagios plugin /usr/local/nagios/libexec/check_ssh to quickly check the status of a server.  One thing to note is that a Nagios installation is not required, just the plugins have to be compiled so the binary can be available to the wrapper script. #!/bin/sh # checkssh.sh # # Author: Scott McClelland # 2017-03-29 # # checkssh, uses Nagios plugin check_ssh # /usr/local/nagios/libexec/check_ssh # # nagios-plugins are downloadable from: # https://www.nagios.org...

Useful nmap Tips

OS Fingerprint Scanning Sometimes there is a question about what  OS  is running on a server. There are advanced options from –help, but usually running nmap with -A is enough to tell you exactly what  OS  is running on the server in question. Edit Simple nmap scan, which includes OS detection: nmap -v -A $s Find an Available IP Note that your company may have another system of record, so check there for the final authoritative answer. A quick way to find an IP that is not in  DNS , and not responding to ping, or ssh, is to run an nmap scan of the subnet. Edit Use nmap to find available IPs net=10.1.1.0;p=24;nmap -v -R -sn ${net}/${p} -o /tmp/subnet-${net}-${p}.txt Note : This may scan a large number of IPs, so it may be more convenient to write to a file to analyze later, rather tthan running the scan multiple times. An available IP would be one that shows an IP address with no DNS name, and also “host down....

How to Obtain Bitcoin and Other Cryptocurrencies

How to Buy, Accept, or Mine Bitcoin and Other Cryptocurrencies - Quick Intro Buy Bitcoin on an Exchange One easy way to get started with owning bitcoin is to buy some on an exchange, such as Coinbase. I offer this link because I think it is helpful, not just because I could get $10.  Sometimes you can't tell why people recommend things.  I figure, if you plan to sign up anyway, why not save a little money? With this referral link, we each get $10 in bitcoin after the new account is opened, and a trade of $100 or more is completed: https://www.coinbase.com/join/592f371c2ae3540ae4a4eb70 Note that it is not necessary to buy a full coin, but there are commissions for buying and selling, and  mining fees for transfers.   To minimize commissions, try entering different amounts to see how much makes sense, before completing the transaction.  For example, buying $100 of bitcoin may cost as much in commissions as buying $200 worth, or around $3.00.  In 2...

Discover Switch Port Using tcpdump and wireshark

Discover the Switch Port to which the Server is Connected A previous article, Advanced Linux Networking Tools , covered the basic usage of tcpdump and tshark to discover switch ports on a Cisco switch, but there are times a system may be connected to a different brand, or using a different protocol.  Also, wireshark is not always installed, so relying on tshark is not always the most convenient way to get the required info. By default, Cisco uses a proprietary method of communication between switches and routers called Cisco Discovery Protocol (CDP).  There is another protocol called Link Layer Discovery Protocol (LLDP), which used by other brands, so it is useful to list other options. Find switch information First, use ifconfig to find the interface names.  Then, use tcpdump to listen for packets.  Optional:  write the packet capture output to a .cap file, and use tshark to read the output. Cisco Discovery Protocol (CDP) YOUR_INTERFACE=eth0 ...

Bash One-Liners for Ping

Image
Here are a few notes to add to the previous article on ping. This time, we look at some bash one-liner tips and tricks. Combine multiple commands Return Values Ping Multiple Hosts Using Bash Nmap and Fping Ping, and Command Line Variables Start from the beginning. We want to see what happens when attempting to ping a host that resolves an IP address from DNS, but is not reachable from our network at the moment. This is to show how we might build a simple monitoring tool from scratch, and also to see what kind of fun we can have with the command line. To ping a host only one time use the count option, which in Windows is -n, and in Linux is -c. Windows C:\>set host=google.com C:\>ping -n 1 %host% Pinging google.com [216.58.219.46] with 32 bytes of data: Request timed out. Ping statistics for 216.58.219.46: Packets: Sent = 1, Received = 0, Lost = 1 (100% loss), Bash: Linux, Mac, Unix Note that in bash, we don't use the set command to assign a varia...

Git Quick Start

When attempting to learn new tools, such as git, or vim, it is easy to get lost in all the features.  Here is a quick start guide that focuses on the essentials for a single user to get started with a local git repo.  Working with a team, and advanced features can be added later. Git Quick Start Commands Git Core Commands git init git add . git commit -m “initial commit” Supporting Commands git status git log Remote Repository Commands git clone [url] git pull git push Git Notes on github goes into more detail https://github.com/systemnotes/gitnotes

Online Learning Resources

I recently started exploring online resources that my company provides for free to their employees.  I was pleasantly surprised to see all my favorite O'Reilly books on SafariBooksOnline, but also amazed at how much new technology has been developed over the last few years.  Areas that I thought I was very familiar with have suddenly shifted to include new tools, and new ways of doing things with cloud, big data, automation, and all kinds of new Apache products. Check to see if your company provides free subscriptions, and then have a look at some of these resources: Paid Learning Sites http://www.safaribooksonline.com -- Huge selection of technical books http://www.pluralsight.com -- High Quality, from overview to advanced topics for programmers http://www.lynda.com -- High Quality, some topics are not very advanced, but courses are very well done When discussing career development ideas with my colleagues, I usually recommend training courses, or books, o...

How to Protect Online Activity

Introduction to Online Security, Internet Privacy, Anonymous browsing.   As an honest hard-working citizen, you may think you have nothing to hide, but at the same time you may be annoyed with intrusive advertizing, or you may be concerned with the ability of hackers to see your bank accounts, or for governments, foreign or domestic to watch what you do online. Advertising Some people are surprised to see ads shortly after visiting a website.  For example, suppose you want to check the price of flights to Seattle, just out of curiosity to compare prices to different cities, but with no intention of ever going there.  Then, you notice over the next few days, that there all kinds of advertisements in your browser for flights, or hotels in Seattle.  Then you wonder how did those advertisers get the crazy idea that I might be interested in going to Seattle?  Or why do I keep seeing ads for something in which I have no interest?  That is tracking te...

Get a List of rpms for a Specific Program or Version

Image
Systems that use rpm as the package manager can often be managed by using yum, but sometimes a simple rpm command can quickly give the required information. The RPM Package Manager has a huge number of options, but most commonly only a few are used on a regular basis. Get a list of rpms for mysql-5.1   Check for mysql version 5.1   $ rpm -qa |grep mysql | grep 5.1 mysql-test-5.1.52-1.el6_0.1.x86_64 mysql-connector-java-5.1.12-2.el6.x86_64 mysql-bench-5.1.52-1.el6_0.1.x86_64 mysql-server-5.1.52-1.el6_0.1.x86_64 mysql-connector-odbc-5.1.5r1144-7.el6.x86_64 mysql-5.1.52-1.el6_0.1.x86_64 mysql-libs-5.1.52-1.el6_0.1.x86_64 mysql-devel-5.1.52-1.el6_0.1.x86_64 Of course we can use egrep, and sort to get a more specific list $ rpm -qa |egrep -i "bash|ntpdate|httpd"|sort bash-4.1.2-8.el6.x86_64 ntpdate-4.2.4p8-2.el6.x86_64 xargs - build and execute command lines from standard input Now suppose we want to remove all the rpms found by the rpm query. Sometimes we can ...

Use awk to Extract a Column from a Text File

Image
Here is an example of how to use awk to extract a column from a text file. The default field separator is a space, so this will work with some text files:    cat somefile.txt | awk '{print $2}' But, if the fields are separated by a delimiter, such as tab, or comma, just specify the field separator by using "-F" before the print statement    cat somefile.txt | awk -F"\t" '{print $2}'   Unix and linux distributions generally come with sed and awk, among other things. The problem. You want to get a list of companies to research before investing in them, and paste only the stock symbols into a Yahoo finance portfolio.   You run a stock screen on a site such as  magicformulainvesting.com , or investors.com but if you try to paste the text into a spreadsheet it may show up as a single row, with no way to extract the column. Here is the process 1.)  Run a Stock Screen Get output similar to this: Company Name (in alphabetical...

Free Tax Preparation Software

Image
At SystemNotes, we love free software. Especially when it is Open Source (source code is readable and may be freely modified by the end users), and available on different platforms (Linux, Mac, Windows, iPad, Android, etc.). When preparing tax returns, many people turn to paid software, or tax professionals. There's nothing wrong with paying for a useful service or software, but linux geeks often turn to shell scripts, or whatever open source software they can find before shelling out any cash -- no pun intended. Here are some useful tools for preparing the US 1040 tax return and most common schedules: Open Tax Solver If your needs are simple, Open tax solver is quick and easy. There are even options for some state taxes. Open Tax Solver http://opentaxsolver.sourceforge.net There is a simple interface that takes inputs, and when finished, just click "Compute Tax." for the results. Microsoft Excel Spreadsheet Income Tax Calculator If you prefer to ha...

Advanced Linux Networking Tools

Image
Some of the more common tools for advanced networking include: tcpdump, netstat, wireshark, and tshark. A previous article covered Basic Linux Networking Tools . Discover Switch Information Now for the advanced stuff. We use tcpdump, and write it to a file pkt.cap. Then we use tshark to read the file. How to check the router to which the linux host is connected. # tcpdump -nvi eth0 -c 1 -s 1500 -w pkt.cap ether proto 0xaa and ether dst 01:00:0c:cc:cc:cc and ether\[20\] \=\= 0x20 and ether\[21\] \=\= 0x00 # tshark -V -r pkt.cap # tcpdump -nvi eth0 -c 1 -s 1500 -w pkt.cap ether proto 0xaa and ether dst 01:00:0c:cc:cc:cc and ether\[20\] \=\= 0x20 and ether\[21\] \=\= 0x00;tshark -V -r pkt.cap tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 1500 bytes 1 packets captured 1 packets received by filter 0 packets dropped by kernel Running as user "root" and group "root". This could be dangerous. Frame 1 (416 bytes on wire, 416 bytes captured) Arrival T...

Free AntiVirus and AntiSpyware Software

Image
Computers running Windows seem to have virus and spyware problems quite often. When fixing other peoples computers, I have found these free options to be very useful. Free Windows Anti Virus Software ClamWin Free Antivirus http://www.clamwin.com ClamWin is a Free Antivirus program for Microsoft Windows 7 / Vista / XP / Me / 2000 / 98 and Windows Server 2008 and 2003. avast! Free Antivirus http://www.avast.com Free Anti-Adware / Anti-Spyware Information Some of this Windows software is offered as a free version, with an option to upgrade. Generally, the free version is enough to clean any problems, but has to be run manually. Ad-Aware – check for updates, and run occasionally http://www.lavasoftusa.com Spy Bot Search and Destroy http://www.safer-networking.org Malwarebytes http://www.malwarebytes.org Malwarebyes Anti-Malware is often the best tool to remove fake anti-virus software. Super Anti Spyware http://www.superantispyware.com Super Anti Spyware: ...

CPAN on Windows

When trying to install Catalyst on Windows, I noticed some differences between Windows XP and Windows 7 64-bit installation of ActiveState perl. Namely, that dmake, and gcc would not install on the 64-bit version of Windows. Here are some of the problems I had. On Windows XP C:\Documents and Settings\scottm>cpan gcc.exe: Extraneous argument to `--' option gcc.exe: No input files specified. Set up gcc environment - It looks like you don't have a C compiler and make utility installed. Trying to install dmake and the MinGW gcc compiler using the Perl Package Manager. This may take a a few minutes... Downloading ActiveState Package Repository packlist...done Updating ActiveState Package Repository database...done Syncing site PPM database with .packlists...done Downloading MinGW-5.1.4.1...done Downloading dmake-4.11.20080107...done Unpacking MinGW-5.1.4.1...done Unpacking dmake-4.11.20080107...done Generating HTML for MinGW-5.1.4.1...done Generating HTML for dmake-4.11.200801...