manuel's blog

just another men's two cents

Archive for the ‘console’ 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 , , , , , , ,

Show all files in OS X’s finder

without comment

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

Written by manuel

July 28th, 2011 at 9:15 am

Posted in IT

Tagged with , , , , ,

screen as a minicom alternative?

without comment

for those who still use minicom to connect to a console (serial) port on a cisco (or whatever) device: i prefer “screen”, because its so easy, and for the most things it’s all you need.
screen should be already pre installed with ubuntu, with osx it’s easy to install using macports.
to use it, just type:
$ screen […]

Written by manuel

February 23rd, 2011 at 4:56 pm

Posted in IT

Tagged with , , , , , , ,