Linux

Dark Roasted Conspiracy


As the daylight hours grow shorter and darkness becomes the prevailing theme, the temperatures drop and the winds blow cold. It feels like the night never ends. The leaves are falling and swirling down the road. Without the sun’s energy and warmth, a good fire and a hot cup of dark roast coffee help take away the ever-present Autumn chill. Coffee is an ever-persistent habit for me. I like good coffee, and it keeps me going like high octane fuel.

No cream, no sugar, not for me.
I like coffee, just black coffee.

The darker the roast, the better I like it. It’s a basic thing. You can make it more complicated than it has to be, or you can learn to appreciate it’s simplicity. I don’t care what other people put in their coffee, everyone is different. I only worry about my own. Just don’t mess with mine. Sometimes all I need to keep me going is a hot cup of coffee. I have a thermos, it is a luxury I appreciate. I buy coffee I like and rarely buy coffee on the road, although I will order a cup if I stop somewhere for a bite to eat. I usually don’t stop anywhere long enough to eat. If I’m working I usually just go, do the job, and head home. I’ll eat when the work is done.
If I’m working at home, I have my coffee close at hand.

I use the same approach in what tools I use to get a job done, and this includes my choice of operating systems, and applications I use. Unlike choosing your preferred coffee blend, choosing a simple, useful, but stable operating system is not quite so easy.

My perfect setup

 A hot cup of coffee, and a laptop running one operating system with only the applications loaded  needed to get some quality work done.

How hard could that be?

Well, lately it hasn’t been as straightforward as I would like. Right off the bat, Windows 7 or 10 – both favored by large organizations, but remind me of instant coffee with too much nondairy cream and way too much artificial sweetener.
Next, up we have my rarely used MacBook Pro – great for creative inspiration, but not something I want to beat the hell out of on the road. So yes, again I lean on my Linux workhorse laptop as my go-to machine. When I’m working on a project I try to reduce any distractions. I’ll have the radio or a podcast on low in the background. I try to avoid the mainstream news/noise, it’s all goofy. I’ll stick to Linux focused news, usually not too wacky or controversial……Suddenly that illusion is dismissed.

What the heck is going on with all the “Code of Conduct” for developers?

  • Is this going to impact the future of Kernel development?
  • Is Linux’s future now sketchier than ever?
  • With Linus on “Holiday” could we see Microsoft becoming more of an “influence” in the fate of Linux?

Probably not, but there’s a change in the air. I’m not sure what it is, but it has the hint of stale coffee that means we should probably brew a fresh pot.
Now let’s turn off the background noise and get back to some less controversial productive topic.

Where was I? Oh yes, good coffee and the best work laptop setup.
I still have my Chromebook that seems to be working fine…..and fast. It’s great for much of my “non-work” work, but not so great for “work” type work. That probably doesn’t make sense to anyone other than me, but unfortunately, not everyone uses a Chromebook yet, although there’s always hope.
I wouldn’t want to limit anyone’s choices. Let each choose what works best for them. I see a lot of people still struggling with Microsoft’s Windows to do basic things a Chromebook would do with less complexity, and a would usually cost less than the new laptops they are getting frustrated with.
That’s a whole other thing.

Suddenly I just had a thought: should I give up on
Linux? Wait a minute, I thought I would forget about that as soon as I turned the radio/podcast off in the background.
Why is this bugging me now? 

Linux isn’t supposed to be political or controversial

….at least I never think of it that way. It’s just a tool to use for a multitude of tasks. For the moment I really should care less about the “CoC” controversy and more about getting some work done. The last big fuss was about Ubuntu turning into another Microsoft. How soon we forget.

Actually, I have recently started using Debian based Distros again in a feeble attempt to get away from the Ubuntu and Arch-based systems. This was more of a precautionary objective to see if I could still be productive without an Ubuntu or Arch based Distro on an underpowered laptop.
I was using Q4os on an old netbook. Had a great start, but the Trinity desktop soon was replaced by KDE. I do like the KDE approach to desktop design.

I have had a great experience with KDE Neon in the past and may return to it if I can not find a suitable replacement, however, the Q4os KDE desktop was working very nicely for me until it froze while I was trying to change the taskbar settings. Most likely attributed to my older hardware.
That was enough for me to decide to go back to the most reliable Distro I have always been able to depend on (not perfect, but it usually gets the job done)…..Mint. (Boring but stable)

Oh, what a surprise

So I guess I can’t really get away from Ubuntu completely. Apparently, the combination of Debian and Ubuntu heritage works best for my current hardware.

At least I haven’t had to regress/default back to running Windows 10. I still have choices available for what Operating system I use.

Time for another cup of coffee.

If the future of Linux development is in question? Will developers abandon ship? Who knows? (At least it hasn’t yet directly affected my pursuit of the perfect work laptop setup.)

If you prefer to use a Mac, that’s great, if you like to use Windows, that’s great too. If you use Linux, perfect! I work with them all, and there are various things about each system I like, and some I’m not too pleased with. If you drink coffee …..cheers! I don’t drink coffee to make a political statement, nor does my choice of an Operating system have any significance on my political views. Why should it? I’m even aware that not everyone drinks coffee. I hear some people even drink water straight out of the tap. Now that’s a little extreme for sure.

2018

End of Year

It’s been an interesting year

Security alerts, Cyber threats, Fake news, and more critical patch updates than you can shake a stick at. Robots are competing in the job market, A.I is looming, and cold air from the far north is sweeping across the land.  Whether it was a good year, a bad year, or nothing too impressive, it’s just about over now. The new year is coming fast. Are you smarter than you were a year ago at this time? Hopefully, the answer is yes if you put any effort into improving your skills, knowledge, and confidence level. Now you can set down some goals for next year. You can also reflect on your hopes for next year.

New Year Goals

One of my goals is to continue to improve and refine my command line skills for both Linux and Windows. It’s the same goal every year, but I know I can continue to improve as operating systems and applications are further developed …..which is inevitable if such technologies remain relevant. Amazing enough will be the number of outdated operating systems that remain in operation. Over complex and poorly understood system designs will continue to frustrate many. Buzzwords will be bantered about as opposing views on remote vs local support, maintenance, and storage are pondered. Computer hardware and software skills will still be required in many industries, but knowing more about the core business these components support will also be crucial. Sadly this is often overlooked. If you are reading this then you most likely already know this. Will this all change next year? Probably not. Will more people drop Windows and move over to Linux and OSX? Some might, but most won’t, so you’ll still need to sharpen your “Microsoft” skills unless you’re adamantly opposed to all things “Windows”. Good luck with that. Most of the generic questions and issues techs get presented with are based in the Windows realm.

Sometimes Windows and Linux techs working together enhance each other’s skill sets and often the customer or end-user is the beneficiary.  I guess that’s a plug for “work with others” it isn’t always as painful as you may expect.

If you can navigate your way through all the “Fake News” (technology related of course) and Silo building you may encounter, plus sharpen and learn new skills, you should do well next year.

You don’t need anyone to tell you how good you are at anything. You know how good you are. That’s the bottom line. Resist the urge to speak when often it’s more productive to listen. Learn from any and all mistakes you or others may make, and try not to stress out too often. Make next year a great year whoever you are or wherever you are. Practice, practice, practice, it might just pay off in ways you don’t foresee. You can always improve your skills. The trick is to avoid wasting time and energy on the technology you’ll  never use or won’t encounter often. Distractions are everywhere. Know your strengths and weaknesses, but also be realistic about your limitations. Try to get the most out of what you already have. Your “experience” is often an asset, but getting more out of less is a skill.  Re-read some of those tech manuals that are still relevant. My best advice though will be to take a break once in a while. Enjoy all the non-tech parts of life. Take time to unplug and recharge.

nmon

Nigel’s performance Monitor for Linux (nmon)

Linux has many available tools that simply just work. That’s why I prefer it over other operating systems. I can get things done, usually faster and much simpler from a command line in a terminal, or multiple terminals.

Windows has useful and powerful shells, and I use them when I need to work on that OS, but I prefer to work in bash. I make use of simple, but elegant installation applications, most notably Apt and PacMan – depending on which of my two preferred distros I have installed. I can install simple, but powerful tools to pull out information about my system’s operation and performance.

nmon:

One of my goto tools is nmon. (Nigel’s performance Monitor for Linux) – originally used by IBM and released as open source in 2009.

I wouldn’t categorize “nmon” as old school, but it sure has that vibe going on. Anything I can run in a terminal from a command line to see what is not always obvious is useful. The ability to export the data it gathers as .csv to use in a graph or for use in analyses applications is sometimes overlooked by casual users – but it’s available.

I don’t use the export function, but I expect that it might be beneficial in some situations. I mostly use nmon in the “Interactive mode” Just a quick glance at some of the output screens presents you with a lot of useful performance information.

nmon

From NMON (nmon -h) Hints:

For Data-Collect-Mode

-f            Must be the first option on the line (switches off interactive mode)

Saves data to a CSV Spreadsheet format .nmon file in the local directory

Note: -f sets a default -s300 -c288    which you can then modify

Further Data Collection Options:

-s <seconds>  time between data snapshots

-c <count>    of snapshots before exiting

-t            Includes Top Processes stats (-T also collects command arguments)

-x            Capacity Planning=15 min snapshots for 1 day. (nmon -ft -s 900 -c 96)

nmon

 

Although you can gather and present much data quickly,

don’t just glance at the data – really look at what it’s telling you, and if you don’t understand what you’re looking at – then look it up and find out what you may be missing.

nmon

 

Key

— Toggles on/off to control what is displayed —

b   = Black and white mode (or use -b command line option)

c   = CPU Utilization stats with bar graphs (CPU core threads)

C   = CPU Utilization as above but concise wide view (up to 192 CPUs)

d   = Disk I/O Busy% & Graphs of Read and Write KB/s

D   = Disk I/O Numbers including Transfers, Average Block Size & Peaks (type: 0 to reset)

g   = User Defined Disk Groups            (assumes -g <file> when starting nmon)

G   = Change Disk stats (d) to just disks (assumes -g auto   when starting nmon)

h   = This help information

j   = File Systems including Journal File Systems

J   =  Reduces “j” output by removing unreal File Systems

k   = Kernel stats Run Queue, context-switch, fork, Load Average & Uptime

l   = Long term Total CPU (over 75 snapshots) via bar graphs

L   = Large and =Huge memory page stats

m   = Memory & Swap stats

M   = MHz for machines with variable frequency 1st=Threads 2nd=Cores 3=Graphs

n   = Network stats & errors (if no errors it disappears)

N   = NFS – Network File System

     1st NFS V2 & V3, 2nd=NFS4-Client & 3rd=NFS4-Server

o   = Disk I/O Map (one character per disk pixels showing how busy it is)

     Particularly good if you have 100’s of disks

q   = Quit

r   = Resources: Machine type, name, cache details & OS version & Distro + LPAR

t   = Top Processes: select the data & order 1=Basic, 3=Perf 4=Size 5=I/O=root only

u   = Top Process with command line details

U   = CPU utilization stats – all 10 Linux stats:

     user, user_nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice

v   = Experimental Verbose mode – tries to make recommendations

V   = Virtual Memory stats

nmon

 

I find the info useful and sometimes will set up multiple terminals using Terminator.

You may find NMON useful, and a good tool to see what’s going on behind the scenes on your LINUX system.

Resource monitor

Linux type solutions on Windows

The “Microsoft” Ubuntu command line “App”

Sometimes you find yourself working on a Windows-based machine, have to perform a quick task that might normally be very straightforward on a LINUX machine, and you don’t want to spend too much time fumbling through the GUI pointing and clicking until you stumble across what you’re looking for.
My first gut instinct usually is to get to the command line quickly and work from there.
I installed the “Microsoft” Ubuntu command line “App” on a Windows 10 test machine recently hoping it would become the perfect solution to such situations, but it has been a disappointing experience so far. Maybe I’ll have a better opinion after I spend more time with it, but I doubt I’ll see this installed on too many machines I run into – at least for a while. Luckily Windows command line tools are pretty robust – especially PowerShell.

As a side note, I really find Sysinternals very useful as a nice set of tools for some very interesting challenges you might run into while doing some diagnostic investigation on problematic systems.
For the most part, Windows usually has some nice built-in diagnostic tools – if you know where to look and can find them in a timely manner.

I had a question come up recently about port connections. Usually, I suggest Wireshark as a go-to tool for any supporting operating system, but this situation was for a system that did not have it available – disregarding the fact that you might or might not have the ability to monitor the packet traffic with a tap or port forwarding access via a test laptop. The discussion was on using the computer in question for any diagnostics – and of course, it wasn’t a LINUX machine. Anyhow, here’s a few ideas I floated for such situations – try a few if you haven’t already and see what you think.

Finding port connections in Windows

Use Wireshark to parse out port numbers by adding Destination and Source port columns for both TCP and UDP port numbers. Under each corresponding Wireshark header right-click on destination/source and apply as a column. Edit the name to differentiate between UDP or TCP.
Filtering for a specific protocol number is just as straightforward.
Examples:
tcp.dstport == 80
tcp.srcport == 80

TCP

 

 

If you’re a fan of Sysinternals you may find TCPView a nice alternative to monitor your PC’s connections – close to a real-time view of connections made and unmade.

TCP

 

 

 

Either from the basic Windows CMD or from within Powershell “netstat” similar to its LINUX long-lost cousin is a simple and quick way to view connection status.

Netstat

 

 

 

 

While you’re working in Powershell, check out network connections with Get-NetTCPConnection.

Powershell

 

 

 

If your set on using the GUI on Windows, the “Resource Monitor” Network – Listening Ports works quite well.

Resource monitor

 

 

 

 

 

Back on Linux, you can run netstat, lsof, ss, or nmap.
Each has many options and allow you to customize your scans.
Here a few quick checks:

netstat -a | grep CONNECTED

or

lsof -i

or

ss | less

You could always load nmap and scan your own local ports as an alternative port check.

Ubuntu Studio 16.04.3 LTS

Halloween will soon be here, so I figured I’d get with the spirit of the season and do something scary!

Yes, that’s right, venture out of my comfort zone and take the long and twisted path through the spooky digital dark woods of lonely Linux distributions.

In a world where Mac OS and Windows dominate the DAW (Digital Audio Workstation) world, Linux offers some impressive potential. That said, it’s time I put a little effort into actually doing something with all that potential.

My favorite DAW has been Logic Pro X on a MacBook Pro. I’ve even used it on a Mac Air with some success. I’ve never been too impressed with using a standard Windows laptop for a portable DAW, but let’s see what I can do with a somewhat low powered laptop and Linux.

To build this “Frankenstein” I chose Ubuntu Studio 16.04.3 LTS.

(Xenial Xerus) 64-bit. I’m using an old Thinkpad (Intel N2940 @ 1.83 GHz) with 4 gigs of ram. This is not a powerhouse by any means, but it might be closer to what some Linux users have available if they are on a budget.

“It’s Alive!” Well, it’s running. I installed the Distro, ran apt update & apt upgrade – then went right into LMMS 1.1.3.  For a basic DAW LMMS is pretty straightforward. The built-in samples are solid, and the Beat+Baseline Editor is easy to use with the Piano-Roll. Audacity 2.1.2 is a very good sound recorder/editor. This is probably the most useful software for what I would use. There are a lot of audio utilities and effects. As far as a software studio, Ubuntu Studio packs a lot in the audio production selection. Add these tools to the provided Graphic Design and Video production selections and you have a lot of tools to leverage with some creativity.

I’m going to try to explore as much of this Distro as I can in the coming weeks and see what I can do with all these tools. Maybe I’ll learn a few new tricks along the way. I might even treat myself to some play time on some of these software synths.

Check out our blog post on Music Production with a home studio!