Copyright (C) 2000-2012, Tony R. Kuphaldt
http://openbookproject.net/electricCircuits/
Units
http://www.knowledgedoor.com/2/units_an ... fixes.html
Circuit Simulation DC only, Java
http://phet.colorado.edu/en/simulation/ ... ion-kit-dc
Calculating an resistor value
http://www.kpsec.freeuk.com/components/led.htm
Kirhoff's Law explained
http://electron9.phys.utk.edu/phys136d/ ... chhoff.htm
http://www.regentsprep.org/Regents/phys ... efault.htm
http://www.physics.uoguelph.ca/applets/ ... index.html
[ add comment ] ( 6 views ) | [ 0 trackbacks ] | permalink
signály jsou softwarová přerušení běhu procesu a slouží ke komunikaci mezi procesy nebo v rámci procesu.
přehled signálů, jak je popisuje standard POSIX.1-1990
------------------------------------------------------
Signal Value Action Comment
------------------------------------------------------
HUP 1 Term Hangup detected on controlling terminal
or death of controlling process
INT 2 Term Interrupt from keyboard
QUIT 3 Core Quit from keyboard
KILL 4 Core Illegal Instruction
ABRT 6 Core Abort signal from abort(3)
FPE 8 Core Floating point exception
KILL 9 Term Kill signal
SEGV 11 Core Invalid memory reference
PIPE 13 Term Broken pipe: write to pipe with no readers
ALRM 14 Term Timer signal from alarm(2)
TERM 15 Term Termination signal
TERM is a default signal sent by kill(1) command
------------------------------------------------------
Signal Value Action Comment
------------------------------------------------------
USR1 30,10,16 Term User-defined signal 1
USR2 31,12,17 Term User-defined signal 2
CHLD 20,17,18 Ign Child stopped or terminated
CONT 19,18,25 Cont Continue if stopped
STOP 17,19,23 Stop Stop process
TSTP 18,20,24 Stop Stop typed at tty
TTIN 21,21,26 Stop tty input for background process
TTOU 22,22,27 Stop tty output for background process
handler zajišťuje mapování signálu na obslužný kód. obsluhu signálů KILL a STOP přebírá vždy operační systém. v jiných případech je možno určit, zda signál je ignorován (SIG_IGN), zpracován v operačním systému definovaným obslužným programovým kódem - default (SIG_DFL), nebo obsloužen pro proces specifickým programovým kódem.
http://www.enderunix.org/docs/signals.pdf
Catching signal in BASH, example 1
#!/bin/bash
trap "echo 'ahoj ahoj, jsem signal USR1'" USR1
echo $$
while true
do
sleep 1
done
Catching signal in BASH, example 2
if [ ! -e $lockfile ]; then
trap "rm -f $lockfile; exit" INT TERM EXIT
touch $lockfile
critical-section
rm $lockfile
trap - INT TERM EXIT
else
echo "critical-section is already running"
fi
[ add comment ] ( 3 views ) | [ 0 trackbacks ] | permalink
http://www.gme.cz/keramicke-kondenzator ... -p120-053/
0.01u je 10nF, 0.022u je 22n
www.mouser.com
http://cz.mouser.com/Home.aspx
skripta
http://elektross.gjn.cz/skripta/
Books
http://www.magsmoke.com/TH-101-Sheboygan-566-VCO.asp
[ add comment ] ( 150 views ) | [ 0 trackbacks ] | permalink
http://www.youtube.com/watch?feature=en ... D-cNc6StVI
http://brightstorm.com/science/
http://www.youtube.com/watch?v=VrNLVQZ-CZo
simple vco
http://www.sentex.ca/~mec1995/gadgets/pll/pll.html
[ add comment ] ( 6 views ) | [ 0 trackbacks ] | permalink
http://www.paia.com/bckit1/simpletheory.asp
Building Synthetizers
http://www.magsmoke.com/thomas_henry_books.asp
Stavebnice Voltik
http://e-shop.voltik.cz/stavebnice-volt ... 50047.html
Rozcestnik - DIY Effect Projects
http://www.squidoo.com/buildASynth
Electronic circuit simulator.
http://www.falstad.com/circuit/
Electronic circuit designer.
http://www.tina.com
Some other electronic cirtuit designers
http://www.electronics-lab.com/download ... index.html
A pad sound with Voyager
http://www.moogmusic.com/forum/viewtopic.php?t=8173
Roland Juno service manual
http://servicerepairmanuals.net/others/ ... ual-notes/
Roland Juno 80 schematics
http://www.fantasyjackpalance.com/fjp/s ... juno6.html
[ add comment ] ( 5 views ) | [ 0 trackbacks ] | permalink
Postfix: mail for root loops back to myself when using transport_maps (or, how make postfix use /etc/aliases BEFORE sending to smart relayhost? )
The aliases(5) file is used only for local(8) deliveries. Whenmail is forwarded, you may be able to get by with the virtual(5)
alias map.
If the transport_maps or smart relay option is used and the server is a mail forwarder for a domain which he itself is a member of, then the root mail is also forwarded to the next hop as is defined in transport_maps or smart relay.
Iif the root mail should be sent to other address which has mailbox elsewhere than on a next hop, then the virtual must be used.
cat /etc/postfix/virtual
root@somedomain.cz log@fsit.cz
root@somedomain.cz log@fsit.cz
localhost.somedomain.cz log@fsit.cz
root@localhost log@fsit.cz
[ add comment ] ( 6 views ) | [ 0 trackbacks ] | permalink
snippets:
cat /sys/class/fc_host/host*/port_name | speed
multipath -v2 -d
http://www.softpanorama.org/Commercial_ ... ager.shtml
http://www.datadisk.co.uk/main/lvm.htm
----------
lvscan <- logical volume scan
lvremove vol1 vol2 <- remove logical vomumes
vgscan <- volume group scan
vgremove raid5 <- remove volume group
pvscan <- physical volume scan
pvremove /dev/cciss/c0d1 <- wipe the device rom lvm2
------------------------------------------------------
physical device to (pvcreate, pvremove, pvscan)
------------------------------------------------------
volume group of physical devices (vgcreate, vgremove, vgscan)
------------------------------------------------------
logical volume (lvcreate, lvremove, lvscan)
------------------------------------------------------
------------------------------------------------------
lvmdiskscan - reads all the partitions
---
pvs -vvvvv
vgs
lvs
[ add comment ] ( 4 views ) | [ 0 trackbacks ] | permalink
Marking a directory sticky (t) directory users can have read and/or write permissions for that directory, but they can only remove or rename files that they own.
Marking a directory setgid (g+s) will make new files inherit the group ownership of the directory
[ add comment ] ( 6 views ) | [ 0 trackbacks ] | permalink
#!/bin/bash
# Nagios check
# check name: sec_file_integrity-etc
# uses: ssh and private key to check the server
# log: logs the result using system log
# script args
# $0 - full path to command (default system)
# $1 - user parameter (host to check)
# $2 - user parameter (none)
# SSH credentials
SSH_HOST_TO_CHECK=$1
SSH_USERNAME="xxx"
SSH_PRIVATE_KEY="/home/xxx/.ssh/id_rsa.plain"
SYSLOG_FACILITY="user"
SYSLOG_SEVERITY="info"
# nagios check result states (default)
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4
# check pid, run date, name of the check, output to file
MY_PID=$$
# date triggers the interval between the checks (weekly check this time)
#DATE=$( date +%Y%m%d%H%M%S )
DATE=$( date +%Y%W )
DATE_HIST=$( date +%Y%W --date="1 week ago" )
SCRIPT_NAME=`basename $0`
CHECK_RESULT="/tmp/$MY_PID.tmp"
CHECK_RESULT_FILTERED="/tmp/$MY_PID.filtered.tmp"
> $CHECK_RESULT
chown nagios.nagios $CHECK_RESULT
#######################
# check id the ssh command proceeded
function ssh_reachable {
# if host is not reachable exit with STATE_UNKNOWN
if [ $? -ne 0 ]; then
echo "UNKNOWN: host is not reachable"
rm $CHECK_RESULT
exit $STATE_UNKNOWN
fi
}
#######################
# test for parameter
if [ ! $1 ]; then
echo "please state server to check"
exit
fi
#######################
# the actual check body
DATABASE="/usr/local/nagios/hostdb/etc/"
EXECUTABLES="scan.executables"
ssh_reachable
# get the previous database results
EXECUTABLES_HIST=${DATABASE}${SSH_HOST_TO_CHECK}-${DATE_HIST}-${EXECUTABLES}
# check if the historical data exists
if test -f ${DATABASE}${SSH_HOST_TO_CHECK}-${DATE_HIST}-${EXECUTABLES}; then
EXECUTABLES_HIST=${DATABASE}${SSH_HOST_TO_CHECK}-${DATE_HIST}-${EXECUTABLES}
else
EXECUTABLES_HIST="none"
fi
# when the check result file exists for the week, do not run it again
if ! test -f ${DATABASE}${SSH_HOST_TO_CHECK}-${DATE}-${EXECUTABLES}; then
ssh -q -o StrictHostKeyChecking=no -o ConnectTimeout=8 \
-l $SSH_USERNAME -i $SSH_PRIVATE_KEY $SSH_HOST_TO_CHECK '/usr/bin/find /etc/ -type f 2>/dev/null | xargs md5sum' \
1> ${DATABASE}${SSH_HOST_TO_CHECK}-${DATE}-${EXECUTABLES} 2>$CHECK_RESULT
fi
if [ $EXECUTABLES_HIST == "none" ]; then
echo "OK: reinitialize-instance "
exit $STATE_OK
fi
# now to the comparision ( compare new with old )
while read record
do
FILE_MD5SUM=$( echo $record | cut -d" " -f1 )
FILE_NAME=$( echo $record | cut -d" " -f2 )
# get rid of special characters
[ $FILE_NAME == "/usr/bin/[" ] && FILE_NAME="/usr/bin/\["
if [ $( cat $EXECUTABLES_HIST | grep " ${FILE_NAME}\$" 2>/dev/null | wc -l ) -eq 0 ]; then
echo "WARNING: a new executable ( $FILE_NAME )" >> $CHECK_RESULT
else
#echo "OK: in a database ( $FILE_NAME )"
# now check if the file has the same md5sum
MD5SUM=$( cat $EXECUTABLES_HIST | grep " ${FILE_NAME}\$" 2>/dev/null | cut -d" " -f1 )
if [ "$FILE_MD5SUM" != "$MD5SUM" ]; then
echo "CRITICAL: file ( $FILE_NAME ) md5sum is different than md5sum stored a week ago!" >> $CHECK_RESULT
fi
fi
done < ${DATABASE}${SSH_HOST_TO_CHECK}-${DATE}-${EXECUTABLES}
while read line
do
logger -t "$SCRIPT_NAME[$SSH_HOST_TO_CHECK]" -p "$SYSLOG_FACILITY.$SYSLOG_SEVERITY" "$line"
done < $CHECK_RESULT
# evaluation
EXIT_CODE=$STATE_OK
# filter out files and strings we are not interested in (changing frequently)
cat $CHECK_RESULT | \
grep -v "Permission denied" | \
grep -v "/etc/prelink.cache" | \
grep -v " /etc/df.info" > $CHECK_RESULT_FILTERED
# set the exit codes
if [ $( cat $CHECK_RESULT_FILTERED | grep CRITICAL | wc -l ) -ne 0 ]; then
EXIT_CODE=$STATE_CRITICAL
else
if [ $( cat $CHECK_RESULT_FILTERED | grep WARNING | wc -l ) -ne 0 ]; then
EXIT_CODE=$STATE_WARNING
fi
fi
[ $EXIT_CODE -eq 0 ] && echo "OK: consistency achieved"
cat $CHECK_RESULT_FILTERED | sort
rm $CHECK_RESULT
rm $CHECK_RESULT_FILTERED
exit $EXIT_CODE
[ add comment ] ( 11 views ) | [ 0 trackbacks ] | permalink
This plugin checks sensors (psu, temperature, fans et al) and overall health of SAN switches that understand the Fibre Alliance MIB. There is a long list of companies behind that MIB; I have tested the script with switches from Brocade and Qlogic.This plugin checks sensors (psu, temperature, fans et al) and overall health of SAN switches that understand the Fibre Alliance MIB. There is a long list of companies behind that MIB; I have tested the script with switches from Brocade and Qlogic.
http://exchange.nagios.org/directory/Pl ... th/details
[ add comment ] ( 8 views ) | [ 0 trackbacks ] | permalink