manuel's blog

just another men's two cents

Archive for the ‘FreeBSD’ tag

Capturing whole packet with tcpdump for analysis with wireshark

without comment

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 […]

Written by manuel

May 24th, 2014 at 12:57 pm

Posted in IT

Tagged with , , , , , , , ,


List all mass storage devices with FreeBSD

without comment

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: 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 […]

Written by manuel

December 14th, 2011 at 2:02 pm

Posted in IT

Tagged with , , , , ,

FreeBSD watch network interface usage

without comment

If you want to know the current network bandwith usage on a FreeBSD host, this will help you.

  1. systat -ifstat 1
                  /0   /1   /2   /3   /4   /5 [...]

Written by manuel

December 13th, 2011 at 12:39 pm

Posted in IT

Tagged with , , , , , , ,