Archive

Archive for the ‘Linux’ Category

Reverse SSH Tunnel

November 14th, 2016 No comments

The idea is to have my IP autostart connect to my Cloud server,
this way I can remote control my Raspberry PI without having to configure DynDNS and firewall rules.
The only requsisite is that PI has internet and run a simple script on startup to estabilish the SSH tunnel

Read more…

Cisco auto login script

September 29th, 2016 No comments

Maybe you need to login in 500 differente switches and execute a command.

here is the solution:

Categories: Linux, Uncategorized Tags:

Nagios Notify html Script

September 29th, 2016 No comments

The default notification script for nagios is very simple, why not get more information on the email. Like: hostgroup, how long has the problem happened, link to the possible documentation. And format it in a nice html table.

Read more…

check hp array disk

September 21st, 2016 No comments

check HP array disks modified script to fix Upgrade situations

Read more…

Categories: bash, HowTo, Linux Tags:

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: , , ,