You are on page 1of 6

tcpdump

tcpdump
tcpdump
tcpdump
tcpdump
tcpdump
tcpdump
tcpdump
tcpdump
tcpdump

-i
-i
-i
-i
-i
-i
-i
-i
-i
-i

lo
lo
lo
lo
lo
lo
lo
lo
lo
lo

udp port 7781 -A
udp port 7780 -A
udp port 7779 -A
udp port 7778 -A
udp port 14448 -A
udp port 14447 -A
udp port 14446 -A
udp port 14445 -A
udp port 13337 -A
udp port 13345 -A

//L4 to DB UMTS
//L4 to DB CDMA
//L4 to DB GSM
//L4 to DB LTE
//DB to L5 UMTS
//DB to L5 CDMA
//DB to L5 GSM
//DB tx side to L5 LTE
//L5 rx side from DB LTE
//PTT Alert output to the brain

//To access another machine use this command (as user not root)
ssh user@192.168.25.148
Once logged onto the other machine as user you can sudo su
//To
find
//To
find
//To
find

delete files of type *.tif smaller than 160k
-name "*.tif" -size -160k -delete
delete files greater than 160k use
-name "*.tif" -size +160k -delete
delete files exactly 160k use
-name "*.tif" -size 160k -delete

//Save make output to a file so you can grep for errors also displays it to std
out
make clean all install 2>&1 | tee output.log
//To reset the dhcpd leases remove the following file. This allows you to change
tuners connected to a backend
rm /var/lib/dhcp/dhcpd.leases
Then issue this command to restart the dhcp service
//back end dhcp server restart
/etc/init.d/isc-dhcp-server restart
//To run the reset script
mysql -uroot -ppassword < tableCreationText.sql
mysql -uroot -ppassword mrtDB
mysql> SHOW COLUMNS FROM mytable FROM mydb;
//restart udev rules variation 1 which didnt work for the gps
sudo service udev restart
//dmesg human readable timestamps
dmesg -T
//Use this to reload the udev rules
udevadm control --reload
//To watch what happens when devices
udevadm monitor
//or try
unbuffer udevadm monitor --environment
//To increase the logging of udev rules use this command
//The default log level for udev rules is "err" see file /etc/udev/udev.conf
//Then you will see all logs in your system log via syslog
udevadm control --log-priority=info
//display info about the port
stty -a -F /dev/gps

-l G3_Com pat_2 -lpthread -lm -lrt gdb --args commandname args for command name //this command will set multiple delimeters for -F in this case ( and ) awk -F'[()]' '{ print $2 }' //This command skips the Rover header lines and then takes the timestamp and con verts it to seconds awk -F [T. } if(temp>2){print y[i]} } '} .cpp NMEA.log | awk -F: '{ y[NR]=$0. i<NR. ". }' | head //This command will convert a hex string to into a c array format //testMsgs holds the hex string cat testMsgs | fold -2 | awk -F."}' //Use this command to extract the mib from a gns file cat TSR_UMTS_2-4-5-20141015T112614.//set the port speed to 4800 stty -F /dev/gps ispeed 4800 //ouputs gps data cat /dev/gps //set 115200 8N1 for dev gps for the firefly gps stty -F /dev/gps ispeed 115200 cs8 -cstopb -parenb //gpsd commands (on my laptop) lsof | grep ttyUSB0 // to see who owns this port //To set the gps in nmea mode and 4800 baud and use gpsctl in low level mode gpsctl -f /dev/ttyUSB0 -n -s 4800 gpsmon /dev/ttyUSB0 //serial port dump with timestamps jpnevulator --ascii --timing-print --read --tty /dev/gps //To see info about the serial ports setserial -ga /dev/ttyS* setserial -g /dev/ttyS* //recursive searches that skip svn and cscope and tags files grep -ri --exclude=*. print i " " temp > "tt". 'BEGIN { print "\nunsigned char arrayName[]= {" } { printf "0x%s.cpp SGPS.:' '] 'NR>6 { secs=$3*3600+$4*60+$5. print secs " " $0.cpp -o sgpsTest2 -L .{tags. i<NR. $0 } END { print "\n}.log | awk -F: '{ x[NR]=$NF } END { for(i=1.svn*} --exclude=tags --exclude=cscope* l3parse * //Build stand alone gps gcc CEventHandler. '{print $21 }' //This is the folder where the l3parse is launched /home/user/workspace/trunk/wcdma/UmtsDecoder/ //Subtract prev row from curr row in a file to get running offset grep "Time update" nmeaParser.c NmeaParser.svn} --exclude=tags --exclude=tt getGps * grep -r --exclude=*. i++) { if(x[i] > x[i-1]) {temp=x[i]-x[i-1].gns | awk -F. } END { for( i=1. x[NR]=$NF. i++) {print x[i] ":" x[i-1] " delta=" x[i]-x[i-1]'}} //Filters out wrap around near 59-0 then saves results to a file called tt which gets cat into xgraph //We also store the entire command in y[] array grep "Time update" nmeaParser.{tags. print x[i] ":" x[i-1] " d elta=" temp.

g3np. y[NR]=$0 } END { fo r(i=1.org/MRT/trunk -r {2014-10-30}:{2014-10-31} //To see what will be updated prior to updating svn status -u //To verify if a backend has the larger buffer settings should see 1000000 if th e change has been made cat /proc/sys/net/ipv4/udp_rmem_min //To debug the UMTS L3 SFN Gaps and verify SIB reception ///trunk/wcdma/UmtsDecoder/umts_decode_proc_308./-----$/ p' //To see all changes over a data range svn log https://subversion.log | grep -i "Wrote to rover" | awk -F [T:' '] '{ x[NR]=$3*3600+$4 *60+$5.5 tt.g3np. i++) { temp=x[i]-x[i-1]. print temp} }' //Creates an xgraph file of the above command cat LteBrain.} END { for(i=2.log | awk '{ print $3 }' | sort | uniq //visual folder and file disk usage k4dirstat //Calc gns file time stamp gaps between rows and prints entire line where gap is larger than 2 seconds cat *LTE*. i<NR.} END { for(i=1. i++) { temp=x[i]-x[i-1].log | grep decode | wc -l //Verifies how often we write to Rover (Should be every second) cat LteBrain.log | grep scan | wc -l grep push_q2 tsControl-umts.log | grep search | wc -l grep push_q2 tsControl-umts. print i " " temp} }' > t t. i++) { temp=x[i]-x[i-1]. } }' > tt //To mount the g3 vault network folder to get to it via the command line //Step 1: goto the /mnt folder and create the following folder mkdir vault //Step 2: issue this command and use your domain password root@tsdev-777:/mnt# smbmount //s20-dc001/g3\ vault /mnt/vault/ -o user=agambard .log | grep 00:28:30 bwm-ng //Get the unique thread ids of a Brain program from the Brain log cat LteBrain. i<NR.:' '] '{ x[NR]=$3*3600+$4*60+$5. i<NR.xg //Setting the y axis min and max same pattern for x axis xgraph -ly 0.log | grep "Block11\|INVALID" grep 7FC80A731700 dblog.xg //To see a specific users commits and files changed svn log -v -l50 | sed -n '/agambardella/.log | grep missed tail -f umtsL3.log | grep -i "Wrote to rover" | awk -F [T:' '] '{ x[NR]=$3*3600+$4 *60+$5.org/ //to see total search/scan/decode tasks awaiting L4/L3 processing after the grab is completed //Note that this is assuming the log file is tech specific grep push_q2 tsControl-umts.gns | awk -F [T.sh is the script that starts the se processes tail -f chDecoder.//to see directories in svn svn list https://subversion. if(temp >= 3) print temp "---" y[i-1].log | grep "CRC fail" tail -f v49umts.10213.

OPTIONS+="last_rule" //Mike D's incomplete and lame way to do a grab at some unknown freq trunk/NDR308# .sql mysql -uroot -ppassword < /var/www/ts/data/fillBandsTable.sql mysql -uroot -ppassword < /var/www/ts/data/tableCreationText.4' //To run the g3lte proc as a udp server issue the following command . } END { if (n > 0) print "AVG="sum / n. ATTRS{idProduct}=="0109".308 eth3 //all IF data trunk/NDR308# .]6" LteBrain_2014_1119_230005. RUN+="/Virtuoso/master/kickGPS. ATTRS{idVendor}=="050d".2}(./bps.6 -w "\-98[\. n++.cfg //Step 2 do the grab /wcdma/CellSearch/udpTunerCmdClient 'grab tech=lte to=10000 freq='$FREQ' blocks= 85 name='outputfilename bw=1. }' //Does max and avg grep "LTE Processing time for taskType=2" dblog.log > output.sh".log | awk 'BEGIN {max = 0} { if ($NF>max) max=$NF.2})?)?[m|K]//g" output.20 -cfg /usr/local/bin/ndr308.sql mysql -uroot -ppassword mrtDB < /tmp/missionHistorySave.log2 mysqldump -uroot -ppassword --no-create-info --complete-insert mrtDB MissionHist ory > /tmp/missionHistorySave.sql mysql -uroot -ppassword < /var/www/ts/data/TSAK.ella //vi command to delete blank lines in the file being edited :g/^$/d //Find 10 largest du -hsx * | sort -rh | head -10 //This command removes duplicates from an existing command history file //note that there are 2 history files one is in /root and the other in /home/use r cat ./ndr308_grab --port 14001 -n 20000 //does an lte grab and saves a xxx.308 eth2 //channelizer per data stream trunk/NDR308# .sql //To see how many times a cell was dropped from the brain issue the following gr ep command: grep -i badfscount=5 LteBrain.sql mysql -uroot -ppassword < /var/www/ts/data/fillMccMncTableText.log | grep LTE_search grep for a negative floating point value -98.log | grep LTE_search //removes carls colorcodes sed -r "s/\x1B\[([0-9]{1.]0" LteBrain_2014_1119_230005. sum += $NF.sql mysql -uroot -ppassword < /var/www/ts/data/TSAK_SID.log | awk '{ sum += $NF. NAME="gps" .0 -w "1935[\.1.bash_history | awk '!x[$0]++' > ttt //To calc just the avg task times in dblog over entire test grep "LTE Processing time for taskType=0" dblog.[0-9]{1.168. pr int $NF } END { if (n > 0) print sum / n. pri nt "MAX=" max }' //To grep //To grep grep for a floating point number 1935./bps.v49 file to same folder //Agam way that works to do a grab at a known freq //Step 1 start ndr308 server ndr308_Server -host 192.log //For new jackson labs firefly gps KERNEL=="ttyUSB*". n++.

log & //Start tsControl for EVDO tsControl --evdo --num_proc 2 --q1-depth 30 --q2-depth 20 --grab-depth 4 &> /pub lic/mrt/logs/tsControl-evdo.log //to use non promiscuous mode tcpdump -p -i eth2 If you want the app to always run as root .168. //to close the quickfix list :ccl //This is a line from the tsControl log for CDMA. print NR.0000 name=/public/mrt/logs/mikedbag4 out=/public/mrt /logs/mikedout pci=291" //The g3lte logging goes to file mikedout //To grep whole words use the -w option //To pretty print shell output pipe the output through command bla bla bla | column -t //Counts the number of commas in each sendTask line which is used to count the n umber of brain sendTasks that //are multiple scans or decodes grep sendTask CdmaBrain.log & //Start db mrtdbProxy -d DEBUG4 & //Switch to vim.ndr308_Server.73 stream_id= 6 //Use this command to awk out that PN0 related time value.20 -snapwait 3000 &> /public/mrt/logs/ndr308_Serve r. This command will sor t the values from smallest to largest. The value in parenthesis (0. and use :set hlsearch //You can then use :highlight Search ctermfg=yellow to customize.log | awk -F./ ndr308_Server -host 192. '/.log | awk -F'[()]' '{ print $2 }' | sort -n //to see how many channelizers are being used use this command (CDMA example) grep CDMA.sum $0}' //just the sum grep sendTask CdmaBrain.018s) is what you need to focus on .} END {print sum} ' //Start ndr308 server. This is how you determine if P N 0 is a problem. grep -i pn0 tsControl-cdma. ***WARNING***: G3NJ_ERR: cdma_cell_search: samp_num= 1309991452 pn0_samp_num= 13 09969948 diff= 21504 (0. This is in usr/local/bin and doesnt require the . '/.g3lte -l 1 //Then run udp_send --portnum and hit return //Then in the udp_send terminal paste the following command "id=2408 type=decode f=1935. //NOTE THAT THE FIRST VALUE in the beginning of the log should be ignored. //If its bigger than 10 seconds than PN0 will be unreliable because searches are not occurring often enough to keep it updated./{sum+=(NF-1)./{sum+=(NF-1). It wi ll be a very large value.018s) PN= 244 peakIndex= 6582 Ec/Io= -5.1.NF-1.06 PN0= 16082 PN 0_avg= 16084. where: cterm is for formating ctermfg is for foreground color ctermbg is for background color //see :help highlight link //You can then use :noh to temporarily hide the last search highlight.log | awk -F.

just append this to the end of the document X-Ayatana-Desktop-Shortcuts=Runroot [Runroot Shortcut Group] Name=Run as root Exec=gksudo -k -u root APP_COMMAND TargetEnvironment=Unity PTT compile steps ----------------cd /home/user/workspace/ptt/G3_Core. ndr308_Server -host tunerCtrl # from another terminal do a grab at 145MHz to set tuner freq. .00 -C -S 30. make v49_main ptt_scan cd /home/user/workspace/ptt/ptt/WF.sh .72 # thresh.dip. To add a quicklist option to 'Run as root' Follow steps 1.desktop file which will be in either: /usr/share/applications/APPNAME. fC. make all PTT run these programs ---------------------cd /home/user/workspace/ptt/NDR308. 2) Locate the applications .local/share/applications/APPNAME. make clean all v49_ndr308.desktop or somewhere else. make clean all install cd /home/user/workspace/ptt/NDR308.1) Pin the application to the launcher as normal. rm $fn. fftLen.o # need this ./v49_main -p 14001 # 14001-4 or 14023 .v49.desktop|grep APPAME 3) Open with gedit: gksudo gedit /usr/share/applications/APPNAME. sR cd /home/ptt/ptt/WF.desktop ~/./lab.o cd /home/user/workspace/ptt/ptt. . uuusnd -p 5555 "grab tech=lte freq=145 blocks=90 0 name=$fn bw=20" OK cd /home/user/workspace/ptt/ptt. conj. If it works y ou will see "uuusnd(): resp is ok" fn=/tmp/xx-lte.desktop 4) Change then line Exec=APP_COMMAND to Exec=gksudo -k -u root APP_COMMAND 5) Save This command will also keep your environment which is very usefull if you need t o connect to others servers and use your private key./ptt_scan -T 15 -N 2048 -F 0. ./pumpit. use locate . 2 and 3 above If the launcher currently doesn't have any other quicklist options.