Subject: Re: strange problem
To: DataZap <az@datazap.net>
From: Stefan 'Kaishakunin' Schumacher <stefan@net-tex.de>
List: netbsd-help
Date: 08/03/2006 11:56:49
--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Also sprach DataZap (az@datazap.net)
=20
> Does anyone have any ideas on why the system goes down and what I can do
> to keep this from happening?

Are you sure the hardware is fine? Sometimes crashes are caused by bad
RAM, CPU oder power supply.=20

To test RAM and CPU you can encrypt, decrypt and compare large files,
a corrupted RAM leads to errors in the files.=20


This small skript will generate a 200m file, encrypt, decrypt and
compare it with the source with a SHA1 hash. I use it at work to check
PCs if they behave strange. Maybe this helps to verify the hardware
works as expected.


#!/bin/ksh
typeset -i cnt=3D1
typeset -i rounds=3D5
typeset -i size=3D200

while [[ $cnt -le $rounds ]]=20
do
dd if=3D/dev/urandom of=3Dtemp.wipe bs=3D1m count=3D$size 2>/dev/null
sha1 temp.wipe >> temp.sha1.1
openssl des3 -in temp.wipe -out temp.wipe.enc -e -salt -k passwd=20
rm -f temp.wipe
openssl des3 -d -in temp.wipe.enc -out temp.wipe -k passwd
rm -f temp.wipe.nc
sha1 temp.wipe >> temp.sha1.2
cnt=3Dcnt+1
done
diff temp.sha1.1 temp.sha1.2
[ $? -eq 0 ] && { echo "No Error"; } || echo "Errors found!";
rm temp.wipe.enc temp.wipe

--=20
PGP FPR: CF74 D5F2 4871 3E5C FFFE 0130 11F4 C41E B3FB AE33
--=20
http://www.net-tex.de
http://www.cryptomancer.de

--mP3DRpeJDSE+ciuQ
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (NetBSD)

iD8DBQFE0chhEfTEHrP7rjMRAkJwAJ46ZJt9ASEub7x/E/RuBcFqUEyB/ACfdMYl
j28mRueuOSvRac6hA9jFyng=
=9CJr
-----END PGP SIGNATURE-----

--mP3DRpeJDSE+ciuQ--