Featured »

IMG_2308

File Compression Testing

January 27, 2019 – 5:29 pm

For some reason I haven’t used zip much on Linux, sticking to the standard tar/gzip combo. But zip seems to be a viable alternative. While not as space-efficient, it is definitely faster; syntax is simple; …

Read the full story »
Networking

Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.

Applications

Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.

Data

Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.

Monitoring

Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Security »

The Facebook Fracas

January 9, 2019 – 4:48 pm
gaabtjyr7kjlsqt1dsziphakwvj[1]

The Facebook privacy saga is getting ridiculous. You’re using a free service that you signed up for – nobody was holding a gun to your giant head. And it’s not Gulag either: just delete your profile, uninstall the damned app, and forget Facebook ever existed.

Read the full story »

Generating and Running Multiple Scripts

January 9, 2019 – 4:45 pm
lqmqmqhf574z485f4ldembi9vtv[1]

Admittedly, this has a limited range of practical applications and is more of a scripting exercise. The command shown here generates a bunch of temporary scripts each containing the sleep command for up to one minute.

Removing Chef Server Installation

January 9, 2019 – 4:44 pm
House cleaning product on wood table

Just a quick note on how to completely remove (more or less) Chef server installation from a CentOS/RHEL box.

Auto-Update /etc/hosts

January 9, 2019 – 4:39 pm
rkhctxih1a1jdqh7x0cgs00ljh5[1]

This was a silly solution to a silly problem, but may come in handy in the future for other things. A user process was establishing frequent connections to a handful of FQDNs. Not having any IP caching capability, every connection attempt was preceded by DNS lookup.

Find Large Folders

January 9, 2019 – 4:37 pm
7ddwbuyj227hyhwysjt7kn7zm27

When you get a filesystem space alert (and they tend to arrive at 3:37 on Saturday morning), deleting various supersized log files is one option I already covered in adequate detail. That is if you get so lucky as to find such a file to delete…

Deleting Hidden Files

August 7, 2018 – 4:14 pm
dztxi4tp1w58shuc1r6so6j9y5j

This simplest of problems just never fails to find a new victim. For whatever reason you want to delete all hidden files in the current directory and subfolders. Without much thinking you just type rm …

Quickly Grow tmpfs filesystem

August 6, 2018 – 4:13 pm
217rvcg47is2ea039rna0gdwlnp

Just a quick command to double the size of the /tmp filesystem that uses tmpfs. This is  for those situations when you can’t be bothered to think.

Duck Duck Go Search from Shell

August 5, 2018 – 4:10 pm
xr89tucp33a2bjoopkqf67nq290

The ddgr python script is a command line interface for Duck Duck Go  – a privacy-oriented search engine that, unlike Google, will not give away your data to the likes of Cambridge Analytica. In the …

Obfuscating Shell Scripts

August 1, 2018 – 4:04 pm
dd1gh0yb7yzbkvf8cyjpd4j2adq

Unix shell scripting language is run by the command-line interpreter and, as such, can be read and understood by anyone with sufficient access and experience. Sometimes this is not a good thing. Sometimes you want …

The Mystery of a Hemisphere

July 31, 2018 – 4:00 pm
vadgh6y3ejhsjuz41ztqtajgm12

To make this long (and embarrassing) story short: a friend’s kid had a homework assignment in geometry to calculate the surface area of a conjoined cone, a cylinder, and a hemisphere.

Raspbian ‘partitions on different devices’ Error

July 30, 2018 – 3:59 pm
oiuwoiuoiunoiune

After downloading a Raspbian image and writing it to an SD card, you get the following error when trying to boot the Pi: “Could not expand filesystem, please try raspi-config or rc_gui. Boot and root …

Tmux Bootstrap Configuration

February 17, 2018 – 3:22 pm
odsiuofisdufohuodsifugoisdgf

Just a list of commands to quickly configure tmux with some of the best (i.e. my favorite) plugins and options. Feel free to disagree – you may be right – but I don’t think so.

Find Large Files

February 17, 2018 – 3:21 pm
elephant

Every time a filesystem is running out of space and I need to find something to delete, I end up googling the syntax for the find command to make sure it stays off NFS and …

Show Logged In Users During a Time Window

February 17, 2018 – 2:59 pm
clock

Let’s say you want to see who was logged in on the server during last weekend. This includes users who, say, logged in on Thursday and haven’t logged out until Saturday afternoon.

Extracting Email Addresses from TCP Streams

December 5, 2017 – 7:06 pm
shell

Here’s a quick example of using tshark to extract email addresses from TCP streams. Let’s say some application on your server is sending emails and you want to find out who is receiving those emails.

Export WP Posts and Sync to Sharepoint

November 14, 2017 – 12:24 pm
DSC_6744 copy

Long story short: old wiki is overloaded and broken; new wiki is not a wiki but SharePoint – a glorified file server; people are forced to improvise and put documentation on a WP wiki; bosses …

Useful MySQL One-Liners

November 8, 2017 – 12:16 pm
DSC_6805 copy

I am by no means an expert SQL programmer. Having said that, I’ve been using MySQL for a very long time. This is a collection of simple but useful SQL queries and MySQL configuration options. …

Plotting Log Data

August 9, 2017 – 10:13 pm
logs_002

While I am on the subject of selecting time ranges from logs, a practical application presented itself. A lonely server in a far-away land with a habit of running out of memory could only be …

Croncal – the Cron Calendar

August 9, 2017 – 10:52 am
time clock watch

The croncal is a clever Perl script that reads entries in your crontab and outputs a schedule, showing the time when cron jobs will run.

Install and Configure Etckeeper

June 23, 2017 – 8:05 am
shell_0006

Etckeeper is a handy tool that uses git to keep track of changes to anything in /etc (or any other folder you choose). It’s very simple to use and can help you quickly identify and undo stupid …

Using IPTables to Allow Access to Private Networks

June 22, 2017 – 9:46 am
network_cable_01

Below is a quick example of how to use iptables to allow port access for all types of private networks. In this case we’re allowing access to ports 10000 and 20000, commonly used by webmin and usermin.

Get a List of all ESX Hosts in a Datacenter

April 17, 2017 – 3:18 pm
storage barrels cluster hpc

Another simple one-liner to get a list of hostnames of all ESX servers in the vCenter. This can be useful for a number of things, specifically as input for other PowerCLI scripts.

Use PowerCLI to Change NIC Type

April 17, 2017 – 11:52 am
machine-gun-001

This is a quick PowerCLI script that reads from a list of VM names and for each VM with network adapter type “E1000” changes it to “Vmxnet3”. Nothing fancy, no reboot is needed. MAC should …