Basic command-line: Difference between revisions

From Phobos Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
==Basic==
*Log in as super user
*Log in as super user
<pre>su</pre>
<pre>su</pre>
Line 5: Line 6:
*Free storage on system
*Free storage on system
<pre>df -h</pre>
<pre>df -h</pre>
==Time & GPS==
*Show system time
*Show system time
<pre>date</pre>
<pre>date</pre>
Line 11: Line 13:
*Manually set system time to 30.november 2015, 17:00 and reboot (date format MMDDhhmm[[YY]YY][.ss])
*Manually set system time to 30.november 2015, 17:00 and reboot (date format MMDDhhmm[[YY]YY][.ss])
<pre>su -c "date 113017002015;hwclock -w -u;reboot" </pre>
<pre>su -c "date 113017002015;hwclock -w -u;reboot" </pre>
*Monitor data received from GPS connected to C1 (or Com1 for GWM). More details: [[GPS in port C1]]
<pre>cat /dev/gps0</pre>
*Monitor PPS pulse received from GPS connected to C1 (or Com1 for GWM). More details: [[GPS in port C1]]
<pre>ppswatch -a /dev/gpspps0</pre>
==Logs & files==
*Display content of console.log
*Display content of console.log
<pre>cat /var/log/telem/console.log</pre>
<pre>cat /var/log/telem/console.log</pre>
Line 17: Line 24:
*Follow the content of console.log, only show lines containing phrase "DI23"
*Follow the content of console.log, only show lines containing phrase "DI23"
<pre>tail -f /var/log/telem/console.log |grep DI23</pre>
<pre>tail -f /var/log/telem/console.log |grep DI23</pre>
*Save a TCP capture log from eth2, TCP port 2404, to file tcplog1.pcap (Wireshark compatible)
<pre>tcpdump -i eth2 -n  tcp port 2404 -w tcplog1.pcap</pre>
*Edit the file named log-conf.xml (changes will be lost after reboot)
*Edit the file named log-conf.xml (changes will be lost after reboot)
<pre> nano /usr/local/etc/telem/log-conf.xml</pre>
<pre> nano /usr/local/etc/telem/log-conf.xml</pre>
*Save a TCP capture log from eth2, TCP port 2404, to file tcplog1.pcap (Wireshark compatible)
==Configs==
<pre>tcpdump -i eth2 -n  tcp port 2404 -w tcplog1.pcap</pre>
*List old GWS configs available
*List old GWS configs available
<pre>/etc/init.d/S11telem-config list-old</pre>
<pre>/etc/init.d/S11telem-config list-old</pre>
*Load old GWS configs number 3
*Load old GWS configs number 3
<pre>/etc/init.d/S11telem-config old 3 </pre>
<pre>/etc/init.d/S11telem-config old 3 </pre>
*Monitor data received from GPS connected to C1 (or Com1 for GWM). More details: [[GPS in port C1]]
<pre>cat /dev/gps0</pre>
*Monitor PPS pulse received from GPS connected to C1 (or Com1 for GWM). More details: [[GPS in port C1]]
<pre>ppswatch -a /dev/gpspps0</pre>

Revision as of 08:45, 3 March 2015

Basic

  • Log in as super user
su
  • Display current software and hardware version
cat /VERSION
  • Free storage on system
df -h

Time & GPS

  • Show system time
date
  • Show time from hardware clock (UTC)
hwclock -r
  • Manually set system time to 30.november 2015, 17:00 and reboot (date format MMDDhhmm[[YY]YY][.ss])
su -c "date 113017002015;hwclock -w -u;reboot" 
  • Monitor data received from GPS connected to C1 (or Com1 for GWM). More details: GPS in port C1
cat /dev/gps0
  • Monitor PPS pulse received from GPS connected to C1 (or Com1 for GWM). More details: GPS in port C1
ppswatch -a /dev/gpspps0

Logs & files

  • Display content of console.log
cat /var/log/telem/console.log
  • Follow the content of console.log
tail -f /var/log/telem/console.log
  • Follow the content of console.log, only show lines containing phrase "DI23"
tail -f /var/log/telem/console.log |grep DI23
  • Save a TCP capture log from eth2, TCP port 2404, to file tcplog1.pcap (Wireshark compatible)
tcpdump -i eth2 -n  tcp port 2404 -w tcplog1.pcap
  • Edit the file named log-conf.xml (changes will be lost after reboot)
 nano /usr/local/etc/telem/log-conf.xml

Configs

  • List old GWS configs available
/etc/init.d/S11telem-config list-old
  • Load old GWS configs number 3
/etc/init.d/S11telem-config old 3