Bits and quibbles from the hobbyist rabble. Here is a collection of scripts, tips and other various bits of info I have found useful over th...stop: 0x00000050 (0xe4fd6220, 0x00000001, 0x8046a992, 0x00000001)
Page fault in nonpaged area
Address 8046a992 base at 80400000, datestamp 4344ec59 - ntoskrnl.exe
Beginning dump of physical memory
Stop: c0000218 (registry file failure)
the registry cannot load hive (file):
\systemroot\system32\config\software or its log a alternative
it is corrupt, absent, or not writable
Beginning Dump...
I use rdiff-backup and I like it quite a bit. The only problem I have is finding a decent web front end for it or something. So having used drupal as my cms on my public and private network, I decided to start writing something that would allow me to glean some information out of rdiff-backup. Yes, sure..I could just have cron email me the reports...but I don't want to clutter my inbox. (it's all ready cluttered! ;)
To start my foray, I've created the following php snippet and made it a block inside drupal:
function get_dir($path) {
$dir = dir($path);
while ($file = $dir->read()) {
if (is_dir($path.$file))
continue;
if (!(preg_match("/^session_stat.*$/", $file)))
continue;
$filetime = filemtime($path.$file);
$filetimes[$filetime]= $file;
}
$dir->close();
return $filetimes;
}
$rdiffPath="/backup/rdiff-backup-data/";
$filearr = get_dir($rdiffPath);
ksort($filearr);
$file = array_pop($filearr);
print "".file_get_contents($rdiffPath.$file)."";
-----
This is nothing amazing.. it simply gets the newest session_status file created by rdiff-backup and displays it. I didn't write this myself either. I borrowed some code to get me started but completely re-wrote it to make it a little more elegant once I understood some of the php basics. Also helpful was the php quick reference that contains all php functions.
I was looking for a way to log events from one of my linux firewall/routers. It has been going down at strange times and I kept having to reboot it in the morning. After a bit of searching, I've settled on the following combination of software and technology to create a viable monitoring solution:
You could also use this in conjunction with another utility, https://engineering.purdue.edu/ECN/Resources/Documents/UNIX/evtsys, to consolidate your Microsoft Windows Server logs as well. (I haven't tried that yet, though.)
Set up a basic LAMP server, Linux/Apache/MySQL/PHP.
Install the package syslog-ng. Configure syslog-ng to save all logs in a MySQL database. http://www.balabit.com/products/syslog_ng/
Install and configure php-syslog-ng. http://www.vermeer.org/projects/php-syslog-ng
There is some help available on configuring syslog-ng on the php-syslog-ng site.
You can search through the system log and look for specific events or even look for events from specific servers.
Interesting networking tricks and tips. This one is useful if you have Cisco switches configured with CDP (Cisco Discovery Protocol).
You can issue the following tcpdump command on a host connected to a Cisco Switch:
tcpdump -n -i eth-s1/s1p1 -s 1500 -w - -c 1 ether dst 1:0:c:cc:cc:cc and greater 60|strings -a
This will produce output which will tell you the switch type and port the device is plugged into.
use it like this: disable.pl --server domaincontroller.example.com --bindDN cn=privileged_user,dc=example,dc=com --password --searchbase dc=example,dc=com --infile
--server: one of your domain controllers
--bindDN: the DN of an account with appropriate privileges (e.g. cn=administrator,ou=built-in,dc=example,dc=com
--password: above accounts password
--searchbase: where the search should start, e.g. dc=example,dc=com, or ou=students,dc=example,dc=com
--infile: file with the list of users to be disabled
So a friend and I had an idea about doing secure backups to each other's home computers over the Cox network. We came up with the following qualifications:
1) Transmission between computers is secure.
2) Privacy maintained, one can not view contents of the other's backup.
3) Backups should be efficient and take minimal time to complete.
To meet these qualifications we devised the following plan.
1) Utilize OpenVPN to encrypt data traversing the Cox network.
2) Encrypt data using dm-mapper or cryptoloop on the local computer, before transmission over the network.
3) Utilize rdiff-backup, or similar technology, to transmit only differentials when a file changes, not the entire file.
VPN
We created a VPN using OpenVPN and used ip addresses 10.6.0.2 and 10.6.0.1.
Target Media
Bonus: the remote side uses LVM to create a volume which can be expanded to accomodate the backup should it overtake current storage allocation. This requires the use of a filesystem which can grow. The remote side offers an iSCSI target for the local computer to attach to. 10.6.0.1 offers target 10.6.0.2 logs in to target. The target is assigned device sdc.
Encryption
dm-crypt is used to create an encrypted device on the local computer. The local computer then formats this encrypted device with the ext3 filesystem. Ext3 is used for it's ability to grow in response to the backup's space requirements.
Backup
The first backup is peformed using a straight file copy. Subsequent backups are made using rdiff-backup which transmits only differentials.