piątek, 13 listopada 2015

MegaCLI

MegaCli -AdpAllInfo -aAll

View information about the battery backup-up unit state

MegaCli -AdpBbuCmd -aAll

View information about virtual disks Useful for checking RAID level, stripe size, cache policy and RAID state:

MegaCli -LDInfo -Lall -aALL

View information about physical drives

MegaCli -PDList -aALL

To see information about the patrol read state and the delay between patrol read runs:

MegaCli -AdpPR -Info -aALL

To find out the current patrol read rate, execute

MegaCli -AdpGetProp PatrolReadRate -aALL

To reduce patrol read resource usage to 2% in order to minimize the performance impact:

MegaCli -AdpSetProp PatrolReadRate 2 -aALL

To disable automatic patrol read:

MegaCli -AdpPR -Dsbl -aALL

To start a manual patrol read scan:

MegaCli -AdpPR -Start -aALL

To stop a patrol read scan:

MegaCli -AdpPR -Stop -aALL

If your system is not connected to a UPS, you should disable the physical disk cache in order to prevent data loss.

MegaCli -LDGetProp EnDskCache -LAll -aALL

To enable it (only do this if you have a UPS and redundant power supplies):

MegaCli -LDGetProp DisDskCache -LAll -aALL

Detail about disks:

MegaCli -ShowSummary -aALL

Check patrol read warnings:

MegaCli -AdpEventLog -GetSinceReboot -warning -fatal -a0

wtorek, 27 października 2015

Centos 7 wybór kernela

Listowanie możliwych do wyboru:

awk -F\' '$1=="menuentry " {print $2}' /etc/grub2.cfg

ustawienie:

grub2-set-default 2

chroot-prepare

#!/bin/bash

#
# bind-mount /proc, /sys and /dev
#


mountpoint=${1:-/mnt}


# usage
#
if [ "$1" = "" -o "$1" = "--help" ] ; then
  echo "Usage:  $(basename $0) <mountpoint (default=/mnt)>"
  exit 0
fi


# bind-mount proc sys and dev
#
for fs in proc sys dev ; do
  mkdir -p $mountpoint/$fs
  mount --bind  /$fs  $mountpoint/$fs
done

if [ -d $mountpoint/run ]; then
  mkdir $mountpoint/run/lock
fi

wtorek, 15 września 2015

zabbix tty sudo

suoders

Defaults:zabbix !requiretty
Cmnd_Alias ZABBIX_CMD = /sbin/fuser, /usr/sbin/lsof, /usr/sbin/dmidecode, /sbin/mii-tool, /sbin/ethtool, /usr/bin/ipmitool, /usr/sbin/iptstate, /usr/bin/ocaudit, /usr/sbin/smartctl, /usr/sbin/smartd
zabbix   ALL = (other_user)  NOPASSWD: ALL
zabbix   ALL = (root)        NOPASSWD: ZABBIX_CMD

wtorek, 28 lipca 2015

wtorek, 21 lipca 2015

Hasła wifi - Windows & Mac

Windows:

netsh wlan show profile name=ssid key=clear

ssid = nazwa sieci

OS X:

sudo security find-generic-password -ga ssid | grep password

środa, 15 lipca 2015

mdadm pause check

echo idle >> /sys/block/md1/md/sync_action

Z którego my.cnf korzysta MySQL...

mysql --verbose --help | grep -A 1 "Default options"

Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf