The sys admin's daily grind: Snoopy

Guide Dog

Article from Issue 152/2013
Author(s):

Sometimes sys admin Charly needs to know when exactly he did something ingenious on one of his servers. Finding an infallible memory aid is difficult, you might think. "Peanuts!" says Charly.

At work, I'm sometimes plagued by annoying gaps in my memory: What exactly was the name of that neat tool that I used to flash the LEDs on a specific network adapter to help me find the NIC in the rack? Or: How exactly did I delete all files that were more than a week old in a directory? The answer to all of these questions is in the Bash history, but Murphy's Law dictates that the history is always a little bit too short. And, in my case, there's another degree of uncertainty: Which server did I do this on?

Snoopy potentially offers a solution. The small library with the dog's name, wraps around execve() and always wakes up when the computer runs a command. Many distributions have Snoopy in the pen, but if not, GitHub [1] will help you out. To enable Snoopy at boot time, you need an entry in /etc/ld.so.preload. I added the following line: /<path>/snoopy.so. The path is typically lib. If you are building Snoopy yourself, the library is likely to be found in /usr/local/lib/ or something similar.

Building Snoopy yourself does offer some benefits. For example, you can edit the snoopy.h header file in the source up front. If you enter

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $0.99
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Charly's Column

    Users log on to services such as SSH, ftp, SASL, POP3, IMAP, Apache htaccess, and many more using their names and passwords. These popular access mechanisms are a potential target for brute-force attacks. An attentive bouncer will keep dictionary attacks at bay.

  • Charly's Column: Corkscrew

    Sys admin columnist Charly never takes a vacation from the Internet. A beach bar with WiFi is quickly found, but it runs a forced proxy, which thinks that the SSH port (22) is in league with the devil and blocks the connection. Time to drill a tunnel.

  • Charly's Column: Backup2l

    At his cozy home, sys admin Charly has always used rsnapshot to back up his data. Although things will be staying this way for server backups, he has found something more manageable for backing up the Kühnast family's desktop PCs.

  • Charly's Column

    Charly often gets suggestions and ideas for his column at community get-togethers. Last week, he picked up a tip for an early warning system that quickly secures login attempts.

  • Charly's Column: Fish

    Columnist Charly serves up Fish as the "shellfish" of the day. His conclusion: tasty, but not something you would want every day.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News