Archive

Archive for the ‘Linux’ Category

webinject auto create config

September 15th, 2016 No comments

Script to auto create webinject xml config files from a list of URL

./buildskel SKELFILE URLFILE FILEOUTPUT

Read more…

Categories: bash, HowTo, Linux Tags:

How to force ntpd time sync

September 14th, 2016 No comments

How to force time sync
Find out your ntpd servers:

grep server /etc/ntp.conf
service ntpd stop
ntpdate -s
service ntpd start

Read more…

Categories: HowTo, Linux Tags: , , , , ,

Can’t locate Sys/Statistics/Linux.pm

August 5th, 2016 No comments

When using check_stats.pl on Centos 7 I got a known error but not so easy to fix…

PROBLEM:
# su – nrpe -c “/usr/lib64/nagios/plugins/check_stats.pl -C -w 90% -c 95%”
Can’t locate Sys/Statistics/Linux.pm in @INC (@INC contains: /usr/lib64/nagios/plugins /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /usr/lib64/nagios/plugins/check_stats.pl line 33.
BEGIN failed–compilation aborted at /usr/lib64/nagios/plugins/check_stats.pl line 33.

Read more…

Categories: Linux Tags: , ,

Access log to DB

May 24th, 2016 No comments

This script loads tomcat or apache logs into a mysql database.

Here is the code:

#!/bin/bash
#
# 2015-03-04 Nereu - versao Tomcat
#

 Read more...
Categories: HowTo, Linux Tags:

Relax and Recover

May 24th, 2016 No comments

Relax and Recover (ReaR)
http://relax-and-recover.org/

. Thread sobre ReaR na Symantec
http://www.symantec.com/connect/forums/netbackup-linux-bare-metal-restore-using-open-source-relax-and-recover-rear

Read more…

centos 6 change keyboard layout command line

May 20th, 2016 No comments

centos 6 change keyboard layout command line

vi /etc/sysconfig/keyboard
KEYTABLE=”br-abnt2″
MODEL=”abnt2″
LAYOUT=”br”
KEYBOARDTYPE=”pc”

Read more…

Categories: HowTo, Linux Tags: , , ,

iptables block country script

April 25th, 2016 No comments

My own server is daily attacked by SSH scanner and bruteforce scripts.
My fail2ban solution

Read more…

Linux Monitoring Tools

December 17th, 2015 1 comment

linuxperftools

Categories: HowTo, Linux Tags:

apache tuneup

November 16th, 2015 1 comment

Apache Tune Up

I was able to do about 4K concurrent connections with this setup.

Using Centos 6.7 64bit Apache httpd-2.2.15-47.el6.centos.x86_64
a Virtual Machine 4x CPU’s and 4GBs of memory, I have 2 disks, one for /var and other for the rest.

Read more…

How to find what process are using Swap

July 23rd, 2015 No comments

How to find what process are using Swap

/proc/meminfo – This file reports statistics about memory usage on the system. It is used by free to report the amount of free and used memory (both physical and swap) on the system as well as the shared memory and buffers used by the kernel. You can also use free, vmstat and other tools to find out the same information.

Read more…

Categories: Linux Tags: , ,