Chroot grub2

Today I forgot my root password, it must be Alzheimer. Anyhow here is the quick recipe to reset it. On the grub boot screen type ‘e’ for edit. Next edit the line starting with linux, at the end add init=/bin/bash it should look like this. linux /boot/vmlinuz-version root=UUID=hex rw quite init=/bin/bash Next hit Ctrl-X to boot, you should land on a prompt without having to type your password. Next enter the following two commands: [Read More]

Block domain or email addr. in postfix

In /usr/local/etc/postfix/access_sender, add email or domain which you want to block. debelan88@gmail.com reject_unverified_sender To reject and send explanation message, that mail server wont accept the mail, you must use reject_unverified_sender not REJECT. REJECT rejecting the mail without explanation message. after add desirable domain or address, you need to update access sender database: postmap hash:access_sender – YOU MUST BE IN THE DIRECTORY WHERE IS ACCESS SENDER FILE [Read More]

Cacti spine snmp responce time

Ако има графики които , не чертаят след поставянето на spine и при лога има грешка от сорта:

03/20/2014 04:44:25 PM – SPINE: Poller[0] Host[256] TH[1] DS[2833] WARNING: SNMP timeout detected [500 ms], ignoring host ‘192.168.55.140’

Влизаш в настройките на хоста и увеличаваш snmp timeout-a 🙂

Cacti Spine

Add in crontab these 2 scrypts to rebuild poller cache and reindex hosts in databse 27 3 * * * www /usr/local/bin/php -q /usr/local/www/html/cacti/cli/rebuild_poller_cache.php > /dev/null 2>&1 52 3 * * * www /usr/local/bin/php -q /usr/local/www/html/cacti/cli/poller_reindex_hosts.php -id=All > /dev/null 2>&1 Минимални настройки на php.ini – Колкото повече, толкова повече! max_execution_time = 180 ; Maximum execution time of each script, in seconds max_input_time = 180 ; Maximum amount of time each script may spend parsing request data; [Read More]

Mysql tuning – cacti

Enable Slow Query Log Enter the MySQL shell and run the following command: set global slow_query_log = ‘ON’; Enable any other desired options. Here are some common examples: Log details for queries expected to retrieve all rows instead of using an index: set global log_queries_not_using_indexes = ‘ON’ Set the path to the slow query log on my.cnf: log_slow_queries = 1 slow_query_log_file = /var/log/mysql/slow-query. [Read More]

Cacti Monitor – Grouping

Console –> Settings –> Misk- Grouping -> Device Template

Patch Windows 7 x86 to use more than 3.5 gb RAM

C:/windows/System32 then copy and paste the following commands in your cmd and after each command press ENTER: C:PatchPaePatchPae.exe -type kernel -o ntkrnlpx.exe ntkrnlpa.exe This will patch the kernel to enable a maximum of 128GB of RAM. C:PatchPaePatchPae.exe -type loader -o winloadp.exe winload.exe This will patch the loader to disable signature verification. bcdedit /copy {current} /d “Windows 7 (PAE Patched)” This will create a new boot entry. A message should appear: [Read More]

Flash LSI controller

За да се виждат дисковете директно от IPACCT Флаш под efi shell: След като сме в efi shell-a и флашката с фърмуера е сложена, map -r за да релоудне мапнатите дивайси, намираме флашката кой дивайс е ( най вероятно е fs0). Влизаме в нея с fs0: и изпълняваме командите, които са по долу. Тази команда изтрива сегашния IR режим. Необходимо е да се направи преди флаш. НЕ СЕ РЕСТАРТИРА СЛЕД ИЗПЪЛНЕНИЕ на командата ! [Read More]

Seek and Destroy mp3 and avi

#!/bin/bash</p> <p>kasa=$(ifconfig | grep inet | awk '{print $2}' | cut -d ":" -f 2 | grep -v 127 | sed /^$/d)<br /> rm /root/daily/$kasa<br /> updatedb &&<br /> locate *.mp3 | awk '{print """$0"""}' >> /root/daily/$kasa<br /> locate *.avi | awk '{print """$0"""}' >> /root/daily/$kasa<br /> cat /root/daily/$kasa | xargs rm -r<br /> updatedb

pick-from-cacti — Cacti Weathermap

Edit in ~/cacti/plugins/weathermap/editor-config.php

$cacti_base = "/var/www/html/cacti";

Edit to working directory of cacti.