Professional Documents
Culture Documents
Diagnostic v1 0
Diagnostic v1 0
Data diagnostics
Diagnostic Applications
• Standard UNIX/Linux:
• tcpdump
• cat, od/hexdump
• Ps
• Provided by ELDIS:
• recv
• ast2text
• CMSIpSwitch
Command tcpdump
• Options:
• -X print out packet data (protocol headers + payload)
• -s0 print the whole packet (not only first 96 B)
• -ttt time difference between packets
• -w write captured data to a file
Command tcpdump
• Output example:
• Using I/O redirection, we can print the file(s) into a new file
• cat /etc/resolv.conf > newfile.txt
• cat /etc/resolv.conf >> newfile.txt
Command od/hexdump
• Displays the specified files in user specified format (octal, decimal, hexadecimal)
• I/O redirection
• od -x /etc/resolv.conf > newfile.txt
Command TCP/IP and cat/od/hexdump
• Using I/O redirection and /dev/tcp virtual files, cat/od/hexdump can be used for
listening to TCP/IP server and printing data it is sending
• Examples:
• od -x < /dev/tcp/192.168.5.101/$((0x4000))
• cat < /dev/tcp/127.0.0.1/$((0x2402))
• hexdump < /dev/tcp/smp1/$((0x6010))
Command ps (process status)
• Usage: ps options
• ps -e lists all processes in the system
• ps auxww lists complete info about all processes
• I/O redirection
• ps aux > /tmp/test
Command recv
• recv is an ELDIS application for printing the data from IP descriptor (ELDIS’ abstraction
layer)
• Options:
• -o output saves data into binary file ‘output’
• -t diff print time as a difference between packets
• -S no data output, measure throughput only
Command recv
• Output example:
• Supports categories 001, 002, 003, 004, 008, 009, 010, 020, 021, 023, 034, 048, 062, 065
and 247
• Options:
• -n input is IP-descriptor (assumed to be a file if not
specified)
• -c CAT decode only ASTERIX category CAT
Command ast2text
• Output example:
f4 1e 33 02 4b 0b 54 70 94 40
40 40 00
Command CMSIpSwitch
• CMSIpSwitch is and ELDIS application which sends data from input to specified output
• Options:
• -daemon run on background
• -twoway send also data from output to input
• -cut B E cut B bytes from beginning and E from end
Command CMSIpSwitch examples
• Send data received from UDP port 0x3210 to port 0x3620 (act as a TCP server)
• CMSIpSwitch udp:0.0.0.0:0x3210:: server:0.0.0.0:0x3620:10
• Send merged data received from two TCP servers (on ports 0x3610 and 0x3420) via UDP
unicast. Note the use of quotes
• CMSIpSwitch “client:127.0.0.1:0x3610:10 client:127.0.0.1:0x3420:10”
udp:::192.168.5.1:13840