removing older files with find

find . -mtime +7 -exec rm {} \; This finds and deletes files with a modified time exceeding 7 days… Every once in a while this becomes hugely necessary in pruning older logfiles, Since it has an “rm” command in it, I always look for the exact syntax and test. –doug

Continue Reading

reading out the history of a file under svn

I found this code on the web a year or so ago – I ran into a situation where I needed to look through change on a file kept in version control in subversion, in detail. I needed what change was made, by whom, and the sequence in which the changes were made to trace…

Continue Reading

wordpress code snippet plugin

I had a perl script code snippet I wanted to put in a post. I tried the <pre> tag, the <code> tag, nothing would work, so I gave up and moved it into a separate file with an <a href= > tag. But the webserver refused to allow the file to be accessed even once…

Continue Reading

Change the time cron.daily runs

I’ve had many environments where we get alerts or strange behavior at or about 4 AM – the time that linux’s cron.daily runs by default. You can change that 4 AM time – perhaps stagger it among groups of servers. You can change it through puppet if you bring /etc/crontab under puppet control, then a…

Continue Reading

transfer moinmoin wiki to mediawiki

I switched from Moin Moin wiki to Mediawiki for system admin notes. Moin Moin is file-based and the search function failed to return results after I got up into the thousands of entries. Originally in the long ago dark ages this was an Access database, then for a while it was mysql and then postgres…

Continue Reading

Wile E. Coyote, Super Genius…

I worked for a startup from 2000 to 2006. The company started out very very casual. Our first security system had blank badges, and then we had badges with our post title and a picture on them. I set up the badge system, and realized at one point that the other side of the badge…

Continue Reading

checking inside rpms

Nine years ago I was trying to find which RPM contained the executable “cluconfig” for configuring clustering – I made these notes on looking for a file in rpms SUMMARY: needed cluconfig for Cluster Manager – searched for cluconfig in install disks for RHAS NOTES: mount the disk, cd to RPMS directory, run: for i…

Continue Reading

apache semaphores…

Troubleshooting an application that wouldn’t come up. I found that apache refused to start… In the log I found: [emerg] (28)No space left on device: Couldn’t create accept lock Disk space was fine, and we are not using quotas on the application filesystem. That leaves semaphores… I always have to go find the commands to…

Continue Reading

troubleshooting puppet variables

This is a practical use of searching for strings and finding and setting a missing puppet variable. Error from a puppet run: err: Could not retrieve catalog from remote server: Error 400 on SERVER: sysloghost variable must be defined in app_site module at /etc/puppet/environments/directory/modules/dstributed/app/manifests/log4j.pp:11 on node servernamed warning: Not using cache on failed catalog err:…

Continue Reading

searching for a string in a directory hierarchy

Much of the puppet infrastructure I work with is unmapped – it is the result of tickets submitted and variables asked for by developers or placed as solutions. This exists above the structure we designed and created intentionally. To discover where a variable is set in puppet, often I search through the entire puppet working…

Continue Reading