zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Remove logs older than X days

July 12, 2011 by Igor Drobot Leave a Comment

The simplest way to remove files older than $NUMBER of days..

Dry run (files will be NOT deleted, you will see a list with files older than 100 days)

1
find -mtime +100 | less

find -mtime +100 | less

Another dry run, see what would be delete:

1
2
3
find -mtime +600 | xargs echo rm
rm /var/log/squid3/access.log.0
rm /var/log/squid3/access.log.2

find -mtime +600 | xargs echo rm rm /var/log/squid3/access.log.0 rm /var/log/squid3/access.log.2

Finally if you decided to remove the files – the final command to delete them:

1
find -mtime +600 | xargs rm

find -mtime +600 | xargs rm

Filed Under: Bash, Linux Tagged With: bash, find, Logs, rm, xargs

OpenVZ adjust RAM

June 30, 2011 by Igor Drobot Leave a Comment

Long Long time ago I wrote how I migrated from Xen to OpenVZ. This post will show you how to manage your VE memory.

First you set the veid=yournumberofve and the rest is copy paste ; Look at the examples:
[Read more…]

Filed Under: Bash, Debian, Linux, Virtualization Tagged With: OpenVZ, openvz set memory, VE, VM

WordPress Munin Plugin

June 13, 2011 by Igor Drobot 2 Comments

The original Plugin was written by Chris Bair, after some tunings it worked fine for me.

I made some useful modifications to this Plugin:
– Visualization of the number of Drafts
– Set table prefix (I hate hardcodet things)



And now how to use it, first you need to create a configuration file for the plugin(replace the needed credentials) [Read more…]

Filed Under: Bash, Linux, Monitoring, Networking Tagged With: Monitoring, Munin, munin-node, Wordpress

Weekend Security Check

June 7, 2011 by Igor Drobot 2 Comments

Some of my servers providing FTP service and I check every weekend all the uploaded and system files for viruses and rootkits.
If somebody starts a upload, nobody think about potential danger e.g. virus.

You can start all this checks separated or as a script.

Here are some examples: [Read more…]

Filed Under: Bash, Debian, Kernel, Linux Tagged With: antivirus, Clamav, rkhunter, rootkit, security check, virus, weekend scan

Icinga/Nagios server room temperature

May 5, 2011 by Igor Drobot 6 Comments

After I wrote the posts about your own digital temperature sensor and Nagios/Icinga Traffic-Light its time to combine the two ideas and bring some lights to switch.

We have two working independent components, with a plugin is it possible to get the sensor status. If your temperature is higher then normal you should get a signal (Warning or Critical).

Define the new check command, with name and a plugin with some arguments:
[Read more…]

Filed Under: Bash, Debian, Linux, Monitoring Tagged With: digitemp, Icinga, Monitoring, Nagios, room temerature

  • « Previous Page
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 10
  • Next Page »
Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok