June 17, 2008

SNMP TRAP terms

For V1, there is the simple TRAP, which is sent from SNMP Agent to SNMP managers/trap receivers

From V2c on, including V3,
  • TRAP is renamed to NOTIFICATION,
  • NEW: INFORM -- essentially ACKed-trap
V3: added security. Both UserID and EngineID are needed for security purpose.

  • For TRAP/NOTIFICATION, the engineID is the AGENT's engineID, which has to be added to the userlist on the trap receiver side.
  • For INFORM, the engineID is the receiver's enginerID, which can be auto discovered in most cases.
See the NET SNMP V3 tutorial for more details. http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap-v3.html

June 7, 2008

Directory differential backup using xcopy

Xcopy builtin Windows 2000/XP provides a great way to back up your files conveniently. Just use the command:

xcopy SRC_DIR DEST_DIR /d/e/v/c/r/y/h/i

(remember the option as dev-cry-hi)

This does incremental backup, i.e. it only copy newer files to the destination directory. It is blazingly fast!!

Now you just don't have any excuses not to back up files.

June 4, 2008

backup and move the windows harddrive

If your computer's harddrive is failing, and you bought a new harddrive and need to move your entire disk over to the new drive, simply use dd to do it. Assuming your new harddrive is connected to your computer via the USB connection (usb harddrive adaptor), you can simply do the following:

1. use another computer, download and burn a copy of Puppy Linux CD (keep this is very useful)
2. boot into puppy linux CD
3. open the command window, type
dd if=/dev/hda of=/dev/sda bs=1M conv=sync,noerror
(note: depending your harddrive size and your USB speed, this may take a long time. I had a slow usb (12Mbits/s) and my final dd speed was 1Mbytes/second. So it took overnight to do the entire 40GB drive)
4. shutdown computer
5. install the new drive into your laptop
6. boot

Everything should work. I just tried one.