Posts Tagged ‘Linux’

Wait for processes to end with Ansible

I’ve been doing a lot in stuff in ansible recently where I needed to fire up, kill and relaunch a bunch of processes. I wanted to find a quick and reliable way of managing this… This is possible using a combination of the pids and wait_for modules… First get the pids of your process… – […]

Linux: Reclaim disk space used by “deleted” files

I had a misbehaving application consuming a large amount of space in /tmp. The files were visible in the /tmp volume itself but lsof allowed me to identify them. lsof -a +L1 -c s3fs /tmp COMMAND PID USER FD TYPE DEVICE SIZE/OFF NLINK NODE NAME s3fs 59614 root 28u REG 253,3 584056832 0 22 /tmp/tmpfMIMLU4 […]

Staged service restart with Ansible

I’ve been working on a small project to create a Cassandra Cluster for Development purposes. I’m using Vagrant and Ansible to deploy a 5-node Cassandra Cluster and node #5 would always fail to join the cluster. I checked /var/log/cassandra/cassandra.log and this is what I found; INFO [InternalResponseStage:1] 2017-09-09 18:49:07,673 ColumnFamilyStore.java:406 – Initializing system_auth.roles INFO [main] […]

The blame game: Who deleted that file? Working with auditd

I’ve recently had an issue where a file was disappearing that I couldn’t explain. Without something to blame it on I search for a method to log change to file and quickly found audit. Audit is quite extensive and can capture a vast array of information. I’m only interested in monitoring a specific file here. This […]

Getting started with osquery on CentOS

I recently stumbled across osquery which allows you to query your Linux, and OS X, servers for various bits of information. It’s very similar in concept to WQL for those in the Windows world. Here’s my quick getting started guide for CentOS 6.X… First download and install the latest rpm for your distro. You might want to […]