HDD Performance Information
Get performance information from Hdd: $diskinfo -tv /dev/da1 /dev/da1 512 # sectorsize 299966445568 # mediasize in bytes (279G) 585871964 # mediasize in sectors 0 # stripesize 0 # stripeoffset 71798 # Cylinders according to firmware. 255 # Heads according to firmware. 32 # Sectors according to firmware. HP RAID 0 # Disk descr. PDZVU0MLM8P2E7 # Disk ident. No # TRIM/UNMAP support Unknown # Rotation rate in RPM Not_Zoned # Zone Mode Seek times: Full stroke: 250 iter in 3.
Capturing whole packet with tcpdump for analysis with wireshark
Capturing the hole packet on your NIC for later analysis with wireshark $tcpdump -nnvvXSs 1514 -i em0 -w /tmp/em0.dumptcp Will capture 1514 bytes of all packets on interface “em0” and dump it to the file “/tmp/em0.dumptcp”. You can then import the file into wireshark for analysis. Explanation of Parameters Text below is copied from tcpdump man page -nn Don’t convert protocol and port numbers etc. to names either. -vv Even more verbose output.
Decompress all files in a Windows installation
To decompress/uncompress all files in a Windows installation just open a terminal window by pressing cmd+r, type “cmd” and press enter. Now you can start the uncompressing of your files: > cd \ > compact /u /s /a /q /i *.*
List all mass storage devices with FreeBSD
Get a list of installed mass storage devices with FreeBSD egrep 'ad[0-9]|da[0-9]|cd[0-9]|acd[0-9]' /var/run/dmesg.boot where: ad -> IDE HDD da -> SCSI HDD cd -> IDE CD/DVD acd-> SCSI CD/DVD Here’s an example output: da0 at ciss0 bus 0 scbus0 target 0 lun 0 da0: <COMPAQ RAID 0 VOLUME OK> Fixed Direct Access SCSI-5 device da0: 135.168MB/s transfers da0: Command Queueing enabled da0: 139979MB (286677120 512 byte sectors: 255H 32S/T 35132C) da1 at ciss0 bus 0 scbus0 target 1 lun 0 da1: <COMPAQ RAID 0 VOLUME OK> Fixed Direct Access SCSI-5 device da1: 135.
FreeBSD watch network interface usage
If you want to know the current network bandwith usage on a FreeBSD host, this will help you. systat -ifstat 1 $systat -ifstat 1 /0 /1 /2 /3 /4 /5 /6 /7 /8 /9 /10 Load Average |||||| Interface Traffic Peak Total lo0 in 0.000 KB/s 0.000 KB/s 308.224 MB out 0.000 KB/s 0.000 KB/s 308.224 MB bce1 in 2.850 MB/s 2.850 MB/s 157.746 GB out 234.496 KB/s 234.496 KB/s 19.
Show all files in OS X’s finder
By default the finder in OS X does not show all the files. You can still see the files if you use a terminal and type ls -la but sometimes you may need the finder to point to a particularly file. e.g. you want to load a hidden file in to an application. To force finder to show all files, just type the following into a terminal: defaults write com.apple.Finder AppleShowAllFiles YES
Howto: apt-cacher with ubuntu
If you have an office with loads of linux computers, it might be useful to have a local repository to save bandwidth on you local wan. But a local repository needs to be up-to-date and it’s hard to decide which packages should be mirrored. If you want to have a good and useful mirror you’ll probably waste a lot of hard drive space and also a lot of your wan bandwidth updating never used packages.
Taking screenshot with OS X
The following shortcuts can be used to take screenshots with OS X. Take a screenshot of the full screen and save it as a PNG file on the desktop CMD+Shift+3 Select a specific part of your screen to take a screenshot. The picture is saved as a PNG on your desktop CMD+Shift+4 Click on a window to make a screenshot of this particularly window. The picture is saved as a PNG on your desktop CMD+Shift+4 space click
US iTunes gift cards
If you’re like me: a big TV series fan living outside US, its sometimes quiet annoying, to get you’re favorite TV series in a legal way. The only solution I found so far is, to buy US iTunes gift cards online and create a US iTunes store account. Configure iTunes is quiet easy, just change the “store country” to US and create a new Account. You have to provide a US address and phone number, you have also to use a different email address, then you use for your local iTunes account.
Howto converting UNIX timestamp into readable format using bash
Howto converting UNIX timestamp into readable format using bash. date -j -f "%s" 1299452400 Mon Mar 7 00:00:00 CET 2011 Get current UNIX timestamp date -j +%s